diff --git a/devstack/plugin.sh b/devstack/plugin.sh index f4a4728..786cb17 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -15,6 +15,13 @@ STACKUBE_ROOT=$(dirname "${BASH_SOURCE}") +# Default release of Kubernetes is latest stable +KUBE_RELEASE=${KUBE_RELEASE:-"stable-1.8"} +# Get stable version from release URL +version=`curl -sSL dl.k8s.io/release/${KUBE_RELEASE}.txt` +# Change v1.8.2 to 1.8.2 +export KUBE_VERSION=${version#"v"} + function install_docker { if is_ubuntu; then sudo apt-get update @@ -69,7 +76,6 @@ ExecStart=/usr/bin/frakti --v=3 \ --logtostderr=false \ --cgroup-driver=${cgroup_driver} \ --listen=/var/run/frakti.sock \ - --streaming-server-addr=%H \ --hyper-endpoint=127.0.0.1:22318 MountFlags=shared TasksMax=8192 @@ -97,7 +103,7 @@ gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg EOF' sudo setenforce 0 sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config - sudo yum install -y kubelet-1.7.5-0 kubeadm-1.7.5-0 kubectl-1.7.5-0 + sudo yum install -y kubelet-${KUBE_VERSION}-0 kubeadm-${KUBE_VERSION}-0 kubectl-${KUBE_VERSION}-0 elif is_ubuntu; then sudo apt-get update && sudo apt-get install -y apt-transport-https sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - @@ -105,7 +111,7 @@ EOF' deb http://apt.kubernetes.io/ kubernetes-xenial main EOF' sudo apt-get update - sudo apt-get install -y kubelet=1.7.5-00 kubeadm=1.7.5-00 kubectl=1.7.5-00 + sudo apt-get install -y --allow-downgrades kubelet=${KUBE_VERSION}-00 kubeadm=${KUBE_VERSION}-00 kubectl=${KUBE_VERSION}-00 else exit_distro_not_supported fi diff --git a/devstack/settings b/devstack/settings index 64a2eff..82920ef 100644 --- a/devstack/settings +++ b/devstack/settings @@ -5,7 +5,7 @@ KUBERNETES_MASTER_PORT=${KUBERNETES_MASTER_PORT:-6443} # Kubeadm token, only for minions KUBEADM_TOKEN=${KUBEADM_TOKEN:-""} # The version of frakti -FRAKTI_VERSION=${FRAKTI_VERSION:-"v1.0"} +FRAKTI_VERSION=${FRAKTI_VERSION:-"v1.1.1"} # Kubernetes CLUSTER CIDR CLUSTER_CIDR=${CLUSTER_CIDR:-"10.244.0.0/16"} CLUSTER_GATEWAY=${CLUSTER_GATEWAY:-"10.244.0.1"} diff --git a/install/deploy_kubernetes.sh b/install/deploy_kubernetes.sh index 6b23617..0fe50a0 100644 --- a/install/deploy_kubernetes.sh +++ b/install/deploy_kubernetes.sh @@ -33,6 +33,7 @@ source $(readlink -f $1) [ "${COMPUTE_NODES_PRIVATE_IP}" ] +# TODO(harry): how to merge this with devstack/settings export KUBERNETES_API_PUBLIC_IP="${CONTROL_NODE_PUBLIC_IP}" export KUBERNETES_API_PRIVATE_IP="${CONTROL_NODE_PRIVATE_IP}" export KEYSTONE_URL="https://${CONTROL_NODE_PRIVATE_IP}:5001/v2.0" @@ -40,7 +41,15 @@ export KEYSTONE_ADMIN_URL="https://${CONTROL_NODE_PRIVATE_IP}:35358/v2.0" export CLUSTER_CIDR="10.244.0.0/16" export CLUSTER_GATEWAY="10.244.0.1" export CONTAINER_CIDR="10.244.1.0/24" -export FRAKTI_VERSION="v1.0" +export FRAKTI_VERSION="v1.1.1" + +# Default release of Kubernetes is latest stable +KUBE_RELEASE=${KUBE_RELEASE:-"stable-1.8"} +# Get stable version from release URL +version=`curl -sSL dl.k8s.io/release/${KUBE_RELEASE}.txt` +# Change v1.8.2 to 1.8.2 +export KUBE_VERSION=${version#"v"} + ########## control & compute nodes ########## diff --git a/install/kubernetes/deploy_kubeadm_kubectl_kubelet.sh b/install/kubernetes/deploy_kubeadm_kubectl_kubelet.sh index ae043e5..887fcce 100644 --- a/install/kubernetes/deploy_kubeadm_kubectl_kubelet.sh +++ b/install/kubernetes/deploy_kubeadm_kubectl_kubelet.sh @@ -13,13 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. - programDir=`dirname $0` programDir=$(readlink -f $programDir) parentDir="$(dirname $programDir)" programDirBaseName=$(basename $programDir) - setenforce 0 sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config @@ -42,7 +40,7 @@ gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg EOF -yum install -y kubelet-1.7.5-0 kubeadm-1.7.5-0 kubectl-1.7.5-0 +yum install -y --allow-downgrades kubelet-${KUBE_VERSION}-0 kubeadm-${KUBE_VERSION}-0 kubectl-${KUBE_VERSION}-0 # configure_kubelet unitFile='/etc/systemd/system/kubelet.service.d/10-kubeadm.conf'