aboutsummaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2017-09-20 16:23:22 -0400
committerMarco Platania <platania@research.att.com>2017-09-20 16:23:22 -0400
commit14826109d7d7b8f8388f7866159c57acd1a307cb (patch)
tree5873eeb33f15e6467ee6d30c86af700bc4dce0a9 /boot
parent48e87a5668b870051e2b03b3c412b41dc791b021 (diff)
Add install scripts for OPEN-O component
- Modify vnfsdk_vm_init.sh - Modify msb_vm_init.sh - Rename vnfsdk_install.sh to openo_install.sh - Rename vnfsdk_serv.sh to openo_serv.sh - Add mvim_vm_init.sh, vfc_vm_init.sh, and vfc_vm_init.sh Change-Id: Ie7927356f542166c1dfe808b37b14fca5b1accb0 Issue-ID: INT-213 Signed-off-by: Marco Platania <platania@research.att.com>
Diffstat (limited to 'boot')
-rw-r--r--boot/msb_vm_init.sh10
-rwxr-xr-xboot/mvim_vm_init.sh20
-rw-r--r--boot/openo_install.sh (renamed from boot/vnfsdk_install.sh)29
-rw-r--r--boot/openo_serv.sh (renamed from boot/vnfsdk_serv.sh)2
-rwxr-xr-xboot/uui_vm_init.sh12
-rwxr-xr-xboot/vfc_vm_init.sh12
-rwxr-xr-xboot/vnfsdk_vm_init.sh4
7 files changed, 73 insertions, 16 deletions
diff --git a/boot/msb_vm_init.sh b/boot/msb_vm_init.sh
index 61f7cba4..73c342fc 100644
--- a/boot/msb_vm_init.sh
+++ b/boot/msb_vm_init.sh
@@ -1,11 +1,11 @@
#!/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
+NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
+NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
+NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
+DOCKER_IMAGE_VERSION=$(cat /opt/config/msb_docker.txt)
+source /opt/config/onap_ips.txt
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
docker pull $NEXUS_DOCKER_REPO/onap/msb/msb_discovery:$DOCKER_IMAGE_VERSION
diff --git a/boot/mvim_vm_init.sh b/boot/mvim_vm_init.sh
new file mode 100755
index 00000000..ecdb9216
--- /dev/null
+++ b/boot/mvim_vm_init.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Establish environment variables
+NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
+NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
+NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
+DOCKER_IMAGE_VERSION=$(cat /opt/config/mvim_docker.txt)
+
+source /opt/config/onap_ips.txt
+
+# Refresh images
+docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+docker pull $NEXUS_DOCKER_REPO/onap/multicloud/framework:latest
+docker pull $NEXUS_DOCKER_REPO/onap/multicloud/vio:latest
+
+docker rm -f multicloud-broker
+docker rm -f multicloud-vio
+
+docker run -e MS_ADDR=$OPENO_IP -e AAI_ADDR=$AAI_IP1 -p 9001:9001 --name multicloud-broker framework
+docker run -e MS_ADDR=$OPENO_IP -e AAI_ADDR=$AAI_IP1 -p 9004:9004 --name multicloud-vio vio \ No newline at end of file
diff --git a/boot/vnfsdk_install.sh b/boot/openo_install.sh
index e43f200a..c039d6c6 100644
--- a/boot/vnfsdk_install.sh
+++ b/boot/openo_install.sh
@@ -5,7 +5,7 @@ NEXUS_REPO=$(cat /opt/config/nexus_repo.txt)
ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
-GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
+VNFSDK_BRANCH=$(cat /opt/config/vnfsdk_branch.txt)
MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
@@ -55,11 +55,19 @@ apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates w
# Download scripts from Nexus
curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/vnfsdk_vm_init.sh -o /opt/vnfsdk_vm_init.sh
-curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/vnfsdk_serv.sh -o /opt/vnfsdk_serv.sh
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/msb_vm_init.sh -o /opt/msb_vm_init.sh
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/mvim_vm_init.sh -o /opt/mvim_vm_init.sh
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/vfc_vm_init.sh -o /opt/vfc_vm_init.sh
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/uui_vm_init.sh -o /opt/uui_vm_init.sh
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/openo_serv.sh -o /opt/openo_serv.sh
chmod +x /opt/vnfsdk_vm_init.sh
-chmod +x /opt/vnfsdk_serv.sh
-mv /opt/vnfsdk_serv.sh /etc/init.d
-update-rc.d vnfsdk_serv.sh defaults
+chmod +x /opt/msb_vm_init.sh
+chmod +x /opt/mvim_vm_init.sh
+chmod +x /opt/vfc_vm_init.sh
+chmod +x /opt/uui_vm_init.sh
+chmod +x /opt/openo_serv.sh
+mv /opt/openo_serv.sh /etc/init.d
+update-rc.d openo_serv.sh defaults
# Download and install docker-engine and docker-compose
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
@@ -92,8 +100,15 @@ echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
resolvconf -u
# Clone Gerrit repository and run docker containers
-mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
cd /opt
-git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO
+git clone -b $VNFSDK_BRANCH --single-branch $CODE_REPO
+./msb_vm_init.sh
+sleep 2
./vnfsdk_vm_init.sh
+sleep 2
+./mvim_vm_init.sh
+sleep 2
+./vfc_vm_init.sh
+sleep 2
+./uui_vm_init.sh \ No newline at end of file
diff --git a/boot/vnfsdk_serv.sh b/boot/openo_serv.sh
index f91a4d43..9d7823ff 100644
--- a/boot/vnfsdk_serv.sh
+++ b/boot/openo_serv.sh
@@ -10,7 +10,7 @@
### END INIT INFO
dir="/opt"
-cmd="./vnfsdk_vm_init.sh"
+cmd="./msb_vm_init.sh;sleep 2;./vnfsdk_vm_init.sh;sleep 2;./mvim_vm_init.sh;sleep 2;./vfc_vm_init.sh;sleep 2;./uui_vm_init.sh"
user="root"
name=`basename $0`
diff --git a/boot/uui_vm_init.sh b/boot/uui_vm_init.sh
new file mode 100755
index 00000000..630293d1
--- /dev/null
+++ b/boot/uui_vm_init.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Establish environment variables
+NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
+NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
+NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
+DOCKER_IMAGE_VERSION=$(cat /opt/config/uui_docker.txt)
+
+# Refresh images
+docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+
+# Insert docker run instructions here \ No newline at end of file
diff --git a/boot/vfc_vm_init.sh b/boot/vfc_vm_init.sh
new file mode 100755
index 00000000..5e8df727
--- /dev/null
+++ b/boot/vfc_vm_init.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Establish environment variables
+NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
+NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
+NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
+DOCKER_IMAGE_VERSION=$(cat /opt/config/vfc_docker.txt)
+
+# Refresh images
+docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+
+# Insert docker run instructions here \ No newline at end of file
diff --git a/boot/vnfsdk_vm_init.sh b/boot/vnfsdk_vm_init.sh
index e1db6b5a..16886990 100755
--- a/boot/vnfsdk_vm_init.sh
+++ b/boot/vnfsdk_vm_init.sh
@@ -9,7 +9,7 @@ set -x
NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
-DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
+#DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) --> don't needed at the moment
# Refresh configuration and scripts
cd /opt/refrepo
@@ -19,13 +19,11 @@ cd vnfmarket-be/deployment/install
# Get image names used below from docker-compose environment file
source .env
-
# Refresh images
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
docker pull $NEXUS_DOCKER_REPO/onap/refrepo:${REFREPO_TAG}
docker pull $NEXUS_DOCKER_REPO/onap/refrepo:${POSTGRES_TAG}
-
# docker-compose is not in /usr/bin
/opt/docker/docker-compose down
/opt/docker/docker-compose up -d