summaryrefslogtreecommitdiffstats
path: root/src/vagrant/kubeadm_onap/onap_setup.sh
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-12-21 04:17:48 -0500
committerGuo Ruijing <ruijing.guo@intel.com>2017-12-21 04:46:35 -0500
commit09c951502f43c477d48903bc335905b2d5287295 (patch)
tree9cdc3180d96ea25bfb6cffd08e6b0ddc5c5f2184 /src/vagrant/kubeadm_onap/onap_setup.sh
parent35951994a9a6eafd94e59958b0c97d80a8660742 (diff)
onap deployment by kubeadm + onap oom
Change-Id: I4db577c754a4cd550482e40c2a96004faf65bd24 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'src/vagrant/kubeadm_onap/onap_setup.sh')
-rwxr-xr-xsrc/vagrant/kubeadm_onap/onap_setup.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/vagrant/kubeadm_onap/onap_setup.sh b/src/vagrant/kubeadm_onap/onap_setup.sh
new file mode 100755
index 0000000..3e1d9b4
--- /dev/null
+++ b/src/vagrant/kubeadm_onap/onap_setup.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+set -ex
+
+sudo apt-get install -y putty-tools python-openstackclient
+mkdir ~/.kube
+r=0
+while [ "$r" == "0" ]
+do
+ sleep 30
+ echo "y\n" | plink -ssh -pw vagrant vagrant@master "cat ~/.kube/config" > ~/.kube/config || true
+ r=$(kubectl get pods -n kube-system | grep "tiller-deploy.*Run" | wc -l)
+done
+
+curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
+git clone http://gerrit.onap.org/r/oom
+cd oom; git checkout release-1.1.0
+source /vagrant/openstack/openrc
+cat <<EOF | tee ~/oom/kubernetes/config/onap-parameters.yaml
+OPENSTACK_UBUNTU_14_IMAGE: "ubuntu1404"
+OPENSTACK_PUBLIC_NET_ID: "e8f51956-00dd-4425-af36-045716781ffc"
+OPENSTACK_OAM_NETWORK_ID: "d4769dfb-c9e4-4f72-b3d6-1d18f4ac4ee6"
+OPENSTACK_OAM_SUBNET_ID: "191f7580-acf6-4c2b-8ec0-ba7d99b3bc4e"
+OPENSTACK_OAM_NETWORK_CIDR: "10.0.0.0/16"
+OPENSTACK_USERNAME: "admin"
+OPENSTACK_API_KEY: "adim"
+OPENSTACK_TENANT_NAME: "admin"
+OPENSTACK_TENANT_ID: "47899782ed714295b1151681fdfd51f5"
+OPENSTACK_REGION: "RegionOne"
+OPENSTACK_KEYSTONE_URL: "http://192.168.0.30:5000/v2.0"
+OPENSTACK_FLAVOUR_MEDIUM: "m1.medium"
+OPENSTACK_SERVICE_TENANT_NAME: "service"
+DMAAP_TOPIC: "AUTO"
+DEMO_ARTIFACTS_VERSION: "1.1.0-SNAPSHOT"
+EOF
+cd ~/oom/kubernetes/oneclick && ./deleteAll.bash -n onap || true
+(kubectl delete ns onap; helm del --purge onap-config) || true
+echo "y\n" | plink -ssh -pw vagrant vagrant@worker1 "sudo rm -rf /dockerdata-nfs/onap"
+cd ~/oom/kubernetes/config && ./createConfig.sh -n onap
+while true; do sleep 30; kubectl get pods --all-namespaces | grep onap | wc -l | grep "^0$" && break; done
+source ~/oom/kubernetes/oneclick/setenv.bash
+cd ~/oom/kubernetes/oneclick && ./createAll.bash -n onap