Use 2.0.0-ONAP tag instead beijing branch
[integration.git] / deployment / heat / onap-oom / rancher_vm_entrypoint.sh
index a729b6b..5a27c26 100644 (file)
@@ -1,4 +1,14 @@
 #!/bin/bash -x
+#
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+
 printenv
 
 mkdir -p /opt/config
@@ -12,6 +22,7 @@ __integration_override_yaml__
 EOF
 sed -i 's/\_\_oam_network_id__/__oam_network_id__/g' /opt/config/integration-override.yaml
 sed -i 's/\_\_oam_subnet_id__/__oam_subnet_id__/g' /opt/config/integration-override.yaml
+sed -i 's/\_\_k8s_1_vm_ip__/__k8s_1_vm_ip__/g' /opt/config/integration-override.yaml
 cp /opt/config/integration-override.yaml /root
 
 echo `hostname -I` `hostname` >> /etc/hosts
@@ -63,7 +74,7 @@ usermod -aG docker ubuntu
 
 docker run --restart unless-stopped -d -p 8080:8080  -e CATTLE_BOOTSTRAP_REQUIRED_IMAGE=__docker_proxy__/rancher/agent:v1.2.9 __docker_proxy__/rancher/server:v1.6.14
 
-# install kubernetes 1.8.6
+# install kubernetes 1.8.10
 curl -s -LO https://storage.googleapis.com/kubernetes-release/release/v1.8.10/bin/linux/amd64/kubectl
 chmod +x ./kubectl
 sudo mv ./kubectl /usr/local/bin/kubectl
@@ -170,11 +181,19 @@ done
 # Install using OOM
 export HOME=/root
 
+# update and initialize git
+apt-get -y install git
+git config --global user.email root@rancher
+git config --global user.name root@rancher
+git config --global log.decorate auto
+
 # Clone OOM:
 cd ~
-git clone -b master http://gerrit.onap.org/r/oom
+git clone -b 2.0.0-ONAP http://gerrit.onap.org/r/oom
 cd oom
 git log -1
+git tag -a "deploy0" -m "initial deployment"
+git checkout -b workarounds
 
 # Run ONAP:
 cd ~/oom/kubernetes/
@@ -188,6 +207,8 @@ make all
 helm search -l | grep local
 helm install local/onap -n dev --namespace onap -f ~/integration-override.yaml
 
+# Enable auto-completion for kubectl
+echo "source <(kubectl completion bash)" >> ~/.bashrc
 
 # Check ONAP status:
 sleep 3