summaryrefslogtreecommitdiffstats
path: root/boot/msb_vm_init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'boot/msb_vm_init.sh')
-rw-r--r--boot/msb_vm_init.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/boot/msb_vm_init.sh b/boot/msb_vm_init.sh
new file mode 100644
index 00000000..61f7cba4
--- /dev/null
+++ b/boot/msb_vm_init.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+NEXUS_USERNAME=onap
+NEXUS_PASSWD=onap
+NEXUS_DOCKER_REPO=nexus3.onap.org:10001
+# DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
+DOCKER_IMAGE_VERSION=latest
+
+
+docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+docker pull $NEXUS_DOCKER_REPO/onap/msb/msb_discovery:$DOCKER_IMAGE_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/msb/msb_apigateway:$DOCKER_IMAGE_VERSION
+
+docker rm -f msb_consul
+docker rm -f msb_discovery
+docker rm -f msb_apigateway
+
+docker run -d -p 8500:8500 --name msb_consul consul
+CONSUL_IP=`sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' msb_consul`
+
+docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery $NEXUS_DOCKER_REPO/onap/msb/msb_discovery:$DOCKER_IMAGE_VERSION
+DISCOVERY_IP=`sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' msb_discovery`
+
+docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP -e "ROUTE_LABELS=visualRange:0|1" --name msb_apigateway $NEXUS_DOCKER_REPO/onap/msb/msb_apigateway:$DOCKER_IMAGE_VERSION \ No newline at end of file