Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu provider - can't set docker opts or complete install #17615

Merged
merged 2 commits into from Dec 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions cluster/ubuntu/config-default.sh
Expand Up @@ -71,3 +71,5 @@ ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}"
# Add envitonment variable separated with blank space like "http_proxy=http://10.x.x.x:8080 https_proxy=https://10.x.x.x:8443"
PROXY_SETTING=${PROXY_SETTING:-""}

DEBUG=${DEBUG:-"false"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line here


6 changes: 2 additions & 4 deletions cluster/ubuntu/reconfDocker.sh
Expand Up @@ -16,16 +16,15 @@

# reconfigure docker network setting

source ~/kube/config-default.sh

if [ "$(id -u)" != "0" ]; then
echo >&2 "Please run as root"
exit 1
fi


function config_etcd {

source ~/kube/config-default.sh

attempt=0
while true; do
/opt/bin/etcdctl get /coreos.com/network/config
Expand All @@ -46,7 +45,6 @@ function config_etcd {
}

function restart_docker {

attempt=0
while [[ ! -f /run/flannel/subnet.env ]]; do
if (( attempt > 200 )); then
Expand Down
31 changes: 28 additions & 3 deletions cluster/ubuntu/util.sh
Expand Up @@ -373,8 +373,15 @@ function provision-master() {

EXTRA_SANS=$(echo "${EXTRA_SANS[@]}" | tr ' ' ,)

BASH_DEBUG_FLAGS=""
if [[ "$DEBUG" == "true" ]] ; then
BASH_DEBUG_FLAGS="set -x"
fi

# remote login to MASTER and configue k8s master
ssh $SSH_OPTS -t "${MASTER}" "
set +e
${BASH_DEBUG_FLAGS}
source ~/kube/util.sh

setClusterInfo
Expand All @@ -386,7 +393,9 @@ function provision-master() {
create-kube-controller-manager-opts '${NODE_IPS}'
create-kube-scheduler-opts
create-flanneld-opts '127.0.0.1' '${MASTER_IP}'
sudo -E -p '[sudo] password to start master: ' -- /bin/bash -c '
sudo -E -p '[sudo] password to start master: ' -- /bin/bash -ce '
${BASH_DEBUG_FLAGS}

cp ~/kube/default/* /etc/default/
cp ~/kube/init_conf/* /etc/init/
cp ~/kube/init_scripts/* /etc/init.d/
Expand Down Expand Up @@ -418,8 +427,15 @@ function provision-node() {
ubuntu/binaries/minion \
"${1}:~/kube"

BASH_DEBUG_FLAGS=""
if [[ "$DEBUG" == "true" ]] ; then
BASH_DEBUG_FLAGS="set -x"
fi

# remote login to node and configue k8s node
ssh $SSH_OPTS -t "$1" "
set +e
${BASH_DEBUG_FLAGS}
source ~/kube/util.sh

setClusterInfo
Expand All @@ -433,7 +449,8 @@ function provision-node() {
'${MASTER_IP}'
create-flanneld-opts '${MASTER_IP}' '${1#*@}'

sudo -E -p '[sudo] password to start node: ' -- /bin/bash -c '
sudo -E -p '[sudo] password to start node: ' -- /bin/bash -ce '
${BASH_DEBUG_FLAGS}
cp ~/kube/default/* /etc/default/
cp ~/kube/init_conf/* /etc/init/
cp ~/kube/init_scripts/* /etc/init.d/
Expand Down Expand Up @@ -477,8 +494,15 @@ function provision-masterandnode() {

EXTRA_SANS=$(echo "${EXTRA_SANS[@]}" | tr ' ' ,)

BASH_DEBUG_FLAGS=""
if [[ "$DEBUG" == "true" ]] ; then
BASH_DEBUG_FLAGS="set -x"
fi

# remote login to the master/node and configue k8s
ssh $SSH_OPTS -t "$MASTER" "
set +e
${BASH_DEBUG_FLAGS}
source ~/kube/util.sh

setClusterInfo
Expand All @@ -499,7 +523,8 @@ function provision-masterandnode() {
'${MASTER_IP}'
create-flanneld-opts '127.0.0.1' '${MASTER_IP}'

sudo -E -p '[sudo] password to start master: ' -- /bin/bash -c '
sudo -E -p '[sudo] password to start master: ' -- /bin/bash -ce '
${BASH_DEBUG_FLAGS}
cp ~/kube/default/* /etc/default/
cp ~/kube/init_conf/* /etc/init/
cp ~/kube/init_scripts/* /etc/init.d/
Expand Down