summaryrefslogtreecommitdiffstats
path: root/ci/k8.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/k8.sh')
-rwxr-xr-xci/k8.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/ci/k8.sh b/ci/k8.sh
index 51b2f571..bea84a39 100755
--- a/ci/k8.sh
+++ b/ci/k8.sh
@@ -3,6 +3,21 @@ set -ex
opnfvfeature=$1
+juju scp kubernetes-master/0:/home/ubuntu/config ~/joid_config/config
+
+export KUBE_MASTER_IP=`juju status kubernetes-master --format=yaml | grep public-address | cut -d ":" -f 2 | head -1 | sed "s/^[ \t]*//g"`
+export KUBE_MASTER_URL=http://${KUBE_MASTER_IP}:6443
+
+configk8(){
+cat <<-EOF
+export KUBERNETES_PROVIDER=local
+export KUBE_MASTER_IP=${KUBE_MASTER_IP}
+export KUBE_MASTER_URL=${KUBE_MASTER_URL}
+EOF
+}
+
+configk8 > ~/joid_config/k8config
+
juju run-action kubernetes-worker/0 microbot replicas=3
juju config kubernetes-master enable-dashboard-addons=true || true
juju expose kubernetes-worker || true