From: Narinder Gupta Date: Wed, 25 Jan 2017 23:47:43 +0000 (-0600) Subject: modified to fix kubernetes issue. X-Git-Tag: danube.1.0~81 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=7188808f4521feb83e828b14479db8df70c60a7b;p=joid.git modified to fix kubernetes issue. Change-Id: Ib9d90bc171836aa83f455d6727c9a1457b5fd400 Signed-off-by: Narinder Gupta --- diff --git a/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml b/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml index f5162ad7..27c0e874 100644 --- a/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml +++ b/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml @@ -1,5 +1,5 @@ easyrsa: - charm: "./{{ ubuntu.release }}/easyrsa" + charm: "cs:~containers/easyrsa" num_units: 1 to: - "lxd:nodes/0" diff --git a/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml b/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml index ca6de4a3..d79c5962 100644 --- a/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml +++ b/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml @@ -1,5 +1,5 @@ etcd: - charm: "./{{ ubuntu.release }}/etcd" + charm: "cs:~containers/etcd" {% if k8.feature.loadbalancer %} num_units: 3 {% else %} diff --git a/ci/config_tpl/juju2/bundlek8_tpl/kubeapi-load-balancer.yaml b/ci/config_tpl/juju2/bundlek8_tpl/kubeapi-load-balancer.yaml index 08e7b33a..a0b829c2 100644 --- a/ci/config_tpl/juju2/bundlek8_tpl/kubeapi-load-balancer.yaml +++ b/ci/config_tpl/juju2/bundlek8_tpl/kubeapi-load-balancer.yaml @@ -1,6 +1,6 @@ kubeapi-load-balancer: - charm: "./{{ ubuntu.release }}/kubeapi-load-balancer" + charm: "cs:~containers/kubeapi-load-balancer" num_units: 1 expose: true to: diff --git a/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml b/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml index 3953734b..93f8890e 100644 --- a/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml +++ b/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml @@ -1,12 +1,12 @@ kubernetes-master: - charm: "./{{ ubuntu.release }}/kubernetes-master" + charm: "cs:~containers/kubernetes-master" num_units: 1 expose: true to: - "nodes/0" kubernetes-worker: - charm: "./{{ ubuntu.release }}/kubernetes-worker" + charm: "cs:~containers/kubernetes-worker" num_units: {{ opnfv.units - 1 }} expose: true to: diff --git a/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml b/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml index b800d59b..30832c54 100644 --- a/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml +++ b/ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml @@ -1,4 +1,4 @@ flannel: - charm: ./{{ ubuntu.release }}/flannel + charm: cs:~containers/flannel diff --git a/ci/deploy.sh b/ci/deploy.sh index c44eaba0..4d79ec8d 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -203,5 +203,8 @@ if [[ "$opnfvmodel" = "openstack" ]]; then ../juju/joid-configure-openstack || true fi +if [[ "$opnfvmodel" = "kubernetes" ]]; then + ./k8.sh +fi echo "...... finished ......." diff --git a/ci/k8.sh b/ci/k8.sh new file mode 100755 index 00000000..b312a84e --- /dev/null +++ b/ci/k8.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -ex +mkdir -p ~/.kube || true +juju scp kubernetes-master/0:config ~/.kube/config || true +juju scp kubernetes-master/0:kubectl ./kubectl || true +./kubectl cluster-info || true +juju config kubernetes-master enable-dashboard-addons=true || true +#./kubectl proxy +#http://localhost:8001/ui +./kubectl get nodes || true +#./kubectl create -f example.yaml || true +./kubectl get pods --all-namespaces || true +./kubectl get services --all-namespaces || true +juju expose kubernetes-worker || true diff --git a/ci/kubernates/fetch-charms.sh b/ci/kubernates/fetch-charms.sh deleted file mode 100755 index 06f48387..00000000 --- a/ci/kubernates/fetch-charms.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -ex - -distro=$1 -mkdir -p $distro - -function build { - sudo apt-get install charm-tools -y - (cd $distro/charm-$1; charm build -s $distro -obuild src) - mv $distro/charm-$1/build/$distro/$1 $distro -} - -# openstack -bzr branch lp:~narindergupta/opnfv/ntp $distro/ntp -charm pull cs:~containers/kubernetes-master $distro/kubernetes-master -charm pull cs:~containers/kubernetes-worker $distro/kubernetes-worker -charm pull cs:~containers/flannel $distro/flannel -charm pull cs:~containers/etcd $distro/etcd -charm pull cs:~containers/easyrsa $distro/easyrsa -charm pull cs:~containers/kubeapi-load-balancer $distro/kubeapi-load-balancer diff --git a/ci/kubernetes/fetch-charm.sh b/ci/kubernetes/fetch-charm.sh new file mode 100644 index 00000000..255f1eb7 --- /dev/null +++ b/ci/kubernetes/fetch-charm.sh @@ -0,0 +1,14 @@ +#!/bin/bash -ex + +distro=$1 +mkdir -p $distro + +function build { + sudo apt-get install charm-tools -y + (cd $distro/charm-$1; charm build -s $distro -obuild src) + mv $distro/charm-$1/build/$distro/$1 $distro +} + +# openstack +bzr branch lp:~narindergupta/opnfv/ntp $distro/ntp +