modified to fix kubernetes issue. 73/27573/1
authorNarinder Gupta <narinder.gupta@canonical.com>
Wed, 25 Jan 2017 23:47:43 +0000 (17:47 -0600)
committerNarinder Gupta <narinder.gupta@canonical.com>
Wed, 25 Jan 2017 23:48:25 +0000 (17:48 -0600)
Change-Id: Ib9d90bc171836aa83f455d6727c9a1457b5fd400
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml
ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
ci/config_tpl/juju2/bundlek8_tpl/kubeapi-load-balancer.yaml
ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml
ci/config_tpl/juju2/bundlek8_tpl/subordinate.yaml
ci/deploy.sh
ci/k8.sh [new file with mode: 0755]
ci/kubernates/fetch-charms.sh [deleted file]
ci/kubernetes/fetch-charm.sh [new file with mode: 0644]

index f5162ad..27c0e87 100644 (file)
@@ -1,5 +1,5 @@
     easyrsa:
-      charm: "./{{ ubuntu.release }}/easyrsa"
+      charm: "cs:~containers/easyrsa"
       num_units: 1
       to:
         - "lxd:nodes/0"
index ca6de4a..d79c596 100644 (file)
@@ -1,5 +1,5 @@
     etcd:
-      charm: "./{{ ubuntu.release }}/etcd"
+      charm: "cs:~containers/etcd"
 {% if k8.feature.loadbalancer %}
       num_units: 3
 {% else %}
index 08e7b33..a0b829c 100644 (file)
@@ -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:
index 3953734..93f8890 100644 (file)
@@ -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:
index b800d59..30832c5 100644 (file)
@@ -1,4 +1,4 @@
 
     flannel:
-      charm: ./{{ ubuntu.release }}/flannel
+      charm: cs:~containers/flannel
 
index c44eaba..4d79ec8 100755 (executable)
@@ -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 (executable)
index 0000000..b312a84
--- /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 (executable)
index 06f4838..0000000
+++ /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 (file)
index 0000000..255f1eb
--- /dev/null
@@ -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
+