aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdeploy/aws/oom_cluster_host_install.sh24
-rwxr-xr-xdeploy/cd.sh36
2 files changed, 33 insertions, 27 deletions
diff --git a/deploy/aws/oom_cluster_host_install.sh b/deploy/aws/oom_cluster_host_install.sh
index a65e661..8b6cbd4 100755
--- a/deploy/aws/oom_cluster_host_install.sh
+++ b/deploy/aws/oom_cluster_host_install.sh
@@ -39,6 +39,7 @@ Prereq:
-e [AWS efs id] : AWS Elastic File System ID prefix
-r [AWS region prefix] : AWS Region prefix
-t [token] : registration token
+-h [agent ver] : agent version (default 1.2.9 for 1.6.14
-c [true/false] : use computed client address
-a [IP address] : client address ip - no FQDN
-v [validate true/false]: optional
@@ -50,6 +51,7 @@ register_node() {
DOCKERDATA_NFS=dockerdata-nfs
DOCKER_VER=17.03
USERNAME=ubuntu
+ PORT=8880
if [[ "$IS_NODE" != false ]]; then
sudo curl https://releases.rancher.com/install-docker/$DOCKER_VER.sh | sh
@@ -61,11 +63,11 @@ register_node() {
if [[ "$IS_NODE" != false ]]; then
echo "Running agent docker..."
if [[ "$COMPUTEADDRESS" != false ]]; then
- echo "sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://$MASTER:8880/v1/scripts/$TOKEN"
- sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://$MASTER:8880/v1/scripts/$TOKEN
+ echo "sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v$AGENT_VER http://$MASTER:$PORT/v1/scripts/$TOKEN"
+ sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v$AGENT_VER http://$MASTER:$PORT/v1/scripts/$TOKEN
else
- echo "sudo docker run -e CATTLE_AGENT_IP=\"$ADDRESS\" --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://$MASTER:8880/v1/scripts/$TOKEN"
- sudo docker run -e CATTLE_AGENT_IP="$ADDRESS" --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://$MASTER:8880/v1/scripts/$TOKEN
+ echo "sudo docker run -e CATTLE_AGENT_IP=\"$ADDRESS\" --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v$AGENT_VER http://$MASTER:$PORT/v1/scripts/$TOKEN"
+ sudo docker run -e CATTLE_AGENT_IP="$ADDRESS" --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v$AGENT_VER http://$MASTER:$PORT/v1/scripts/$TOKEN
fi
fi
}
@@ -75,10 +77,11 @@ MASTER=
TOKEN=
AWS_REGION=
AWS_EFS=
+AGENT_VER=1.2.9
COMPUTEADDRESS=true
ADDRESS=
VALIDATE=
-while getopts ":u:n:s:e:r:t:c:a:v" PARAM; do
+while getopts ":u:n:s:e:r:t:h:c:a:v" PARAM; do
case $PARAM in
u)
usage
@@ -99,6 +102,9 @@ while getopts ":u:n:s:e:r:t:c:a:v" PARAM; do
t)
TOKEN=${OPTARG}
;;
+ h)
+ AGENT_VER=${OPTARG}
+ ;;
c)
COMPUTEADDRESS=${OPTARG}
;;
@@ -120,6 +126,8 @@ if [ -z $MASTER ]; then
exit 1
fi
-register_node $IS_NODE $MASTER $AWS_EFS $AWS_REGION $TOKEN $COMPUTEADDRESS $ADDRESS $VALIDATE
-echo "if you get ERROR: http://$MASTER:8880/v1 is not accessible (The requested URL returned error: 404 Not Found) - check your token"
-printf "**** Done ****\n"
+register_node $IS_NODE $MASTER $AWS_EFS $AWS_REGION $TOKEN $AGENT_VER $COMPUTEADDRESS $ADDRESS $VALIDATE
+echo "check dockerdata-nfs"
+sudo ls /dockerdata-nfs
+echo "if you get http://$MASTER:8880/v1 is not accessible (The requested URL returned error: 404 Not Found) - check your token"
+printf "**** Success: Done ****\n"
diff --git a/deploy/cd.sh b/deploy/cd.sh
index 5956b1c..82f9a40 100755
--- a/deploy/cd.sh
+++ b/deploy/cd.sh
@@ -30,7 +30,7 @@ example
./cd.sh -b master -e onap -c true -d false -w true -r false (standard new server/dev environment - use this as the default)
-u : Display usage
--b [branch] : branch = master or amsterdam (required)
+-b [branch] : branch = master/beijing or amsterdam (required)
-e [environment] : use the default (onap)
-c [true|false] : FLAG clone new oom repo (default: true)
-d [true|false] : FLAG delete prev oom - (cd build) (default: false)
@@ -50,16 +50,14 @@ deploy_onap() {
if [[ "$DELETE_PREV_OOM" != false ]]; then
echo "remove existing oom"
# master/beijing only - not amsterdam
- if [ "$BRANCH" == "master" ]; then
+ if [ "$BRANCH" == "amsterdam" ]; then
+ oom/kubernetes/oneclick/deleteAll.bash -n $ENVIRON
+ else
+ # workaround for secondary orchestration in dcae
kubectl delete namespace $ENVIRON
- kubectl delete namespace dcae
- kubectl delete namespace dev
- sudo helm delete --purge dev
+ echo "sleep for 4 min to allow the delete to finish pod terminations before trying a helm delete"
+ sleep 240
sudo helm delete --purge $ENVIRON
- sudo helm delete --purge onap
- sudo helm delete --purge dcae
- else
- oom/kubernetes/oneclick/deleteAll.bash -n $ENVIRON
fi
sleep 1
@@ -101,10 +99,7 @@ deploy_onap() {
git clone -b $BRANCH http://gerrit.onap.org/r/oom
fi
- if [ "$BRANCH" == "master" ]; then
- echo "moving values.yaml to oom/kubernetes/"
- #sudo cp values.yaml oom/kubernetes/onap
- else
+ if [ "$BRANCH" == "amsterdam" ]; then
echo "start config pod"
# still need to source docker variables
source oom/kubernetes/oneclick/setenv.bash
@@ -119,6 +114,9 @@ deploy_onap() {
sleep 15
echo "waiting for config pod to complete"
done
+ else
+ echo "moving values.yaml to oom/kubernetes/"
+ #sudo cp values.yaml oom/kubernetes/onap
fi
# usually the prepull takes up to 25-300 min - however hourly builds will finish the docker pulls before the config pod is finished
@@ -127,17 +125,17 @@ deploy_onap() {
#chmod 777 prepull_docker.sh
#./prepull_docker.sh
echo "start onap pods"
- if [ "$BRANCH" == "master" ]; then
+ if [ "$BRANCH" == "amsterdam" ]; then
+ cd oom/kubernetes/oneclick
+ ./createAll.bash -n $ENVIRON
+ cd ../../../
+ else
cd oom/kubernetes/
sudo make clean
sudo make all
- sudo make onap
+ sudo make $ENVIRON
sudo helm install local/onap -n onap --namespace $ENVIRON
cd ../../
- else
- cd oom/kubernetes/oneclick
- ./createAll.bash -n $ENVIRON
- cd ../../../
fi
echo "wait for all pods up for 15-80 min"