forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add local scripts, simplify kubecfg.sh
- Loading branch information
1 parent
e35dfed
commit fea7b61
Showing
5 changed files
with
150 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2014 Google Inc. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
## Contains configuration values for interacting with the Vagrant cluster | ||
|
||
# NUMBER OF MINIONS IN THE CLUSTER | ||
NUM_MINIONS=1 | ||
|
||
# IP LOCATIONS FOR INTERACTING WITH THE MASTER | ||
export KUBE_MASTER_IP="127.0.0.1" | ||
export KUBERNETES_MASTER="http://127.0.0.1:8080" | ||
|
||
# IP LOCATIONS FOR INTERACTING WITH THE MINIONS | ||
for (( i=0; i <${NUM_MINIONS}; i++)) do | ||
KUBE_MINION_IP_ADDRESSES[$i]="127.0.0.1" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2014 Google Inc. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# A library of helper functions that each provider hosting Kubernetes must implement to use cluster/kube-*.sh scripts. | ||
|
||
source $(dirname ${BASH_SOURCE})/${KUBE_CONFIG_FILE-"config-default.sh"} | ||
|
||
function detect-master () { | ||
echo "KUBE_MASTER_IP: $KUBE_MASTER_IP" | ||
echo "KUBE_MASTER: $KUBE_MASTER" | ||
} | ||
|
||
# Get minion IP addresses and store in KUBE_MINION_IP_ADDRESSES[] | ||
function detect-minions { | ||
echo "Minions already detected" | ||
} | ||
|
||
# Verify prereqs on host machine | ||
function verify-prereqs { | ||
for x in go; do | ||
if [ "$(which $x)" == "" ]; then | ||
echo "Can't find $x in PATH, please fix and retry." | ||
exit 1 | ||
fi | ||
done | ||
} | ||
|
||
# Instantiate a kubernetes cluster | ||
function kube-up { | ||
echo "Not applicable" | ||
} | ||
|
||
# Delete a kubernetes cluster | ||
function kube-down { | ||
echo "Not applicable" | ||
} | ||
|
||
# Update a kubernetes cluster with latest source | ||
function kube-push { | ||
echo "Not applicable" | ||
} | ||
|
||
# Execute prior to running tests to build a release if required for env | ||
function test-build-release { | ||
echo "Not applicable" | ||
} | ||
|
||
# Execute prior to running tests to initialize required structure | ||
function test-setup { | ||
echo "Not applicable" | ||
} | ||
|
||
# Execute after running tests to perform any required clean-up | ||
function test-teardown { | ||
echo "Not applicable" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters