aboutsummaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
Diffstat (limited to 'boot')
-rw-r--r--boot/bind_zones_onap6
-rw-r--r--boot/dbcl_serv.sh116
-rw-r--r--boot/dbcl_vm_init.sh83
-rw-r--r--boot/mr_install.sh11
-rw-r--r--boot/mr_vm_init.sh4
-rw-r--r--boot/music_install.sh3
-rw-r--r--boot/music_vm_init.sh8
-rwxr-xr-xboot/mvim_vm_init.sh2
-rwxr-xr-xboot/vfc_vm_init.sh5
9 files changed, 227 insertions, 11 deletions
diff --git a/boot/bind_zones_onap b/boot/bind_zones_onap
index d0cdf838..7f66e4ed 100644
--- a/boot/bind_zones_onap
+++ b/boot/bind_zones_onap
@@ -124,9 +124,9 @@ vid.api.simpledemo.onap.org. IN CNAME vm1.vid.simpledemo.onap.org.
portal.api.simpledemo.onap.org. IN CNAME vm1.portal.simpledemo.onap.org.
;Message Router
-;mr.api.simpledemo.onap.org. IN CNAME vm1.mr.simpledemo.onap.org.
+mr.api.simpledemo.onap.org. IN CNAME vm1.mr.simpledemo.onap.org.
ueb.api.simpledemo.onap.org. IN CNAME vm1.mr.simpledemo.onap.org.
-;dbc.api.simpledemo.onap.org. IN CNAME vm1.mr.simpledemo.onap.org.
+dbc.api.simpledemo.onap.org. IN CNAME vm1.mr.simpledemo.onap.org.
;drprov.api.simpledemo.onap.org. IN CNAME vm1.mr.simpledemo.onap.org.
;CLAMP
@@ -154,4 +154,4 @@ music.api.simpledemo.onap.org. IN CNAME vm1.music.simpledemo.onap.org.
oof.api.simpledemo.onap.org. IN CNAME vm1.oof.simpledemo.onap.org.
;NBI
-nbi.api.simpledemo.onap.org. IN CNAME vm1.nbi.simpledemo.onap.org. \ No newline at end of file
+nbi.api.simpledemo.onap.org. IN CNAME vm1.nbi.simpledemo.onap.org.
diff --git a/boot/dbcl_serv.sh b/boot/dbcl_serv.sh
new file mode 100644
index 00000000..dfb70206
--- /dev/null
+++ b/boot/dbcl_serv.sh
@@ -0,0 +1,116 @@
+
+#############################################################################
+#
+# Copyright © 2018 AT&T Intellectual Property. All rights reserved.
+#
+# 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
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#############################################################################
+
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start daemon at boot time
+# Description: Enable service provided by daemon.
+### END INIT INFO
+
+dir="/opt"
+cmd="./dbcl_vm_init.sh"
+user="root"
+
+name=`basename $0`
+pid_file="/var/run/$name.pid"
+stdout_log="/var/log/$name.log"
+stderr_log="/var/log/$name.err"
+
+get_pid() {
+ cat "$pid_file"
+}
+
+is_running() {
+ [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1
+}
+
+case "$1" in
+ start)
+ if is_running; then
+ echo "Already started"
+ else
+ echo "Starting $name"
+ cd "$dir"
+ if [ -z "$user" ]; then
+ sudo $cmd >> "$stdout_log" 2>> "$stderr_log" &
+ else
+ sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" &
+ fi
+ echo $! > "$pid_file"
+ if ! is_running; then
+ echo "Unable to start, see $stdout_log and $stderr_log"
+ exit 1
+ fi
+ fi
+ ;;
+ stop)
+ if is_running; then
+ echo -n "Stopping $name.."
+ kill `get_pid`
+ for i in {1..10}
+ do
+ if ! is_running; then
+ break
+ fi
+
+ echo -n "."
+ sleep 1
+ done
+ echo
+
+ if is_running; then
+ echo "Not stopped; may still be shutting down or shutdown may have failed"
+ exit 1
+ else
+ echo "Stopped"
+ if [ -f "$pid_file" ]; then
+ rm "$pid_file"
+ fi
+ fi
+ else
+ echo "Not running"
+ fi
+ ;;
+ restart)
+ $0 stop
+ if is_running; then
+ echo "Unable to stop, will not attempt to start"
+ exit 1
+ fi
+ $0 start
+ ;;
+ status)
+ if is_running; then
+ echo "Running"
+ else
+ echo "Stopped"
+ exit 1
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/boot/dbcl_vm_init.sh b/boot/dbcl_vm_init.sh
new file mode 100644
index 00000000..ba9859ad
--- /dev/null
+++ b/boot/dbcl_vm_init.sh
@@ -0,0 +1,83 @@
+#!/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
+docker pull $NEXUS_DOCKER_REPO/onap/dmaap/buscontroller:$DOCKER_IMAGE_VERSION
+docker tag $NEXUS_DOCKER_REPO/onap/dmaap/buscontroller:$DOCKER_IMAGE_VERSION onap/dmaap/buscontroller:latest
+
+docker rm -f dmaap-buscontroller
+
+TMP_CFG=/tmp/docker-dmaap-buscontroller.conf
+cat >> $TMP_CFG <<!EOF
+DMAAPBC_INT_HTTPS_PORT=0
+DMAAPBC_PG_ENABLED=false
+DMAAPBC_INSTANCE_NAME=ONAP-CSIT
+DMAAPBC_AAF_URL=https://aaf.api.simpledemo.onap.org:8095/proxy/
+DMAAPBC_MR_CNAME=mr.api.simpledemo.onap.org
+DMAAPBC_DRPROV_FQDN=drprov.simpledemo.onap.org
+!EOF
+
+# Insert docker run instructions here
+docker run -i -t -d --name dmaap-buscontroller -p 8080:8080 -p 8443:8443 -v $TMP_CFG:/opt/app/config/conf $NEXUS_DOCKER_REPO/onap/dmaap/buscontroller:$DOCKER_IMAGE_VERSION
+
+DBCL_FQDN=dbc.api.simpledemo.onap.org
+DRPS_FQDN=drprov.simpledemo.onap.org
+MR_FQDN=mr.api.simpledemo.onap.org
+# INITIALIZE: dmaap object
+JSON=/tmp/$$.dmaap
+cat << EOF > $JSON
+{
+"version": "1",
+"topicNsRoot": "org.onap.dmaap",
+"drProvUrl": "http://${DRPS_FQDN}:8080",
+"dmaapName": "onapStable",
+"bridgeAdminTopic": "MM_AGENT_PROV"
+
+}
+EOF
+
+curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://${DBCL_FQDN}:8080/webapi/dmaap
+
+
+
+# INITIALIZE: dcaeLocation object
+JSON=/tmp/$$.loc
+cat << EOF > $JSON
+{
+"dcaeLocationName": "csit-sanfrancisco",
+"dcaeLayer": "central-cloud",
+"clli": "STABLE2345",
+"zone": "zoneA"
+
+}
+EOF
+
+curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://${DBCL_FQDN}:8080/webapi/dcaeLocations
+
+
+# INITIALIZE: MR object in 1 site
+# Note: the values in the hosts[] are fictitious, and anticipate a
+# future MR cluster deployment.
+JSON=/tmp/$$.mrc
+cat << EOF > $JSON
+{
+"dcaeLocationName": "stable-sanfrancisco",
+"fqdn": "${MR_FQDN}",
+"hosts" : [
+ "mrhost1.simpledemo.onap.org",
+ "mrhost2.simpledemo.onap.org",
+ "mrhost3.simpledemo.onap.org"
+ ],
+"protocol" : "https",
+"port": "3094"
+
+}
+EOF
+
+curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://${DBCL_FQDN}:8080/webapi/mr_clusters
diff --git a/boot/mr_install.sh b/boot/mr_install.sh
index e2168383..9bd56563 100644
--- a/boot/mr_install.sh
+++ b/boot/mr_install.sh
@@ -54,6 +54,7 @@ apt-get update
apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget make openjdk-8-jdk git ntp ntpdate
# Download scripts from Nexus
+# a) scripts for message router (mr)
curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/mr_vm_init.sh -o /opt/mr_vm_init.sh
curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/mr_serv.sh -o /opt/mr_serv.sh
chmod +x /opt/mr_vm_init.sh
@@ -61,6 +62,14 @@ chmod +x /opt/mr_serv.sh
mv /opt/mr_serv.sh /etc/init.d
update-rc.d mr_serv.sh defaults
+# b) scripts for bus controller (dbcl)
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/dbcl_vm_init.sh -o /opt/dbcl_vm_init.sh
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/dbcl_serv.sh -o /opt/dbcl_serv.sh
+chmod +x /opt/dbcl_vm_init.sh
+chmod +x /opt/dbcl_serv.sh
+mv /opt/dbcl_serv.sh /etc/init.d
+update-rc.d dbcl_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
apt-get update
@@ -94,4 +103,4 @@ resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO dcae-startup-vm-message-router
-./mr_vm_init.sh \ No newline at end of file
+./mr_vm_init.sh
diff --git a/boot/mr_vm_init.sh b/boot/mr_vm_init.sh
index af17781a..bfc44c7d 100644
--- a/boot/mr_vm_init.sh
+++ b/boot/mr_vm_init.sh
@@ -4,4 +4,6 @@ export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort
cd /opt/dcae-startup-vm-message-router
sed -i 's|wget .*|wget -q \"http://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz\" \\|g' deploy.sh
-bash deploy.sh \ No newline at end of file
+bash deploy.sh &
+
+bash dbcl_vm_init.sh &
diff --git a/boot/music_install.sh b/boot/music_install.sh
index 6965b957..759a9389 100644
--- a/boot/music_install.sh
+++ b/boot/music_install.sh
@@ -5,7 +5,9 @@ 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)
MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
+CODE_REPO=$(cat /opt/config/remote_repo.txt)
# Add host name to /etc/host to avoid warnings in openstack images
if [[ $CLOUD_ENV != "rackspace" ]]
@@ -91,4 +93,5 @@ resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
+git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO
./music_vm_init.sh \ No newline at end of file
diff --git a/boot/music_vm_init.sh b/boot/music_vm_init.sh
index b18aa998..372cd33e 100644
--- a/boot/music_vm_init.sh
+++ b/boot/music_vm_init.sh
@@ -9,5 +9,9 @@ docker pull library/zookeeper:3.4
docker pull library/tomcat:8.5
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
-docker pull $NEXUS_DOCKER_REPO/onap/music/Cassandra:$DOCKER_IMAGE_VERSION
-docker pull $NEXUS_DOCKER_REPO/onap/music/music:$DOCKER_IMAGE_VERSION \ No newline at end of file
+docker pull $NEXUS_DOCKER_REPO/onap/music/cassandra_music:$DOCKER_IMAGE_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/music/music:$DOCKER_IMAGE_VERSION
+
+cd /opt/music/distribution/dockermusic
+git pull
+./music.sh start \ No newline at end of file
diff --git a/boot/mvim_vm_init.sh b/boot/mvim_vm_init.sh
index f8776bd4..b0350926 100755
--- a/boot/mvim_vm_init.sh
+++ b/boot/mvim_vm_init.sh
@@ -21,6 +21,6 @@ docker rm -f multicloud-ocata
docker rm -f multicloud-windriver
docker run -d -t -e MSB_ADDR=$OPENO_IP -e AAI_ADDR=$AAI_IP1 -p 9001:9001 --name multicloud-broker $NEXUS_DOCKER_REPO/onap/multicloud/framework:$DOCKER_IMAGE_VERSION
-docker run -d -t -e MSB_ADDR=$OPENO_IP -e AAI_ADDR=$AAI_IP1 -p 9004:9004 --name multicloud-vio $NEXUS_DOCKER_REPO/onap/multicloud/vio:$DOCKER_IMAGE_VERSION
+docker run -d -t -e MSB_ADDR=$OPENO_IP -e AAI_ADDR=$AAI_IP1 -e MR_ADDR=$MR_IP -p 9004:9004 --name multicloud-vio $NEXUS_DOCKER_REPO/onap/multicloud/vio:$DOCKER_IMAGE_VERSION
docker run -d -t -e MSB_ADDR=$OPENO_IP -e AAI_ADDR=$AAI_IP1 -p 9006:9006 --name multicloud-ocata $NEXUS_DOCKER_REPO/onap/multicloud/openstack-ocata:$DOCKER_IMAGE_VERSION
docker run -d -t -e MSB_ADDR=$OPENO_IP -e AAI_ADDR=$AAI_IP1 -p 9005:9005 --name multicloud-windriver $NEXUS_DOCKER_REPO/onap/multicloud/openstack-windriver:$DOCKER_IMAGE_VERSION \ No newline at end of file
diff --git a/boot/vfc_vm_init.sh b/boot/vfc_vm_init.sh
index f193b20d..47821e8a 100755
--- a/boot/vfc_vm_init.sh
+++ b/boot/vfc_vm_init.sh
@@ -13,7 +13,7 @@ docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
docker pull $NEXUS_DOCKER_REPO/onap/vfc/wfengine-activiti:$ACTIVITI_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/wfengine-mgrservice:$MGRSERVICE_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/catalog:$CATALOG_DOCKER_VER
-docker pull $NEXUS_DOCKER_REPO/onap/vfc/multivimproxy:$MVIMPROXY_DOCKER_VER
+docker pull $NEXUS_DOCKER_REPO/onap/vfc/multivimproxy:$MULTIVIMPROXY_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/emsdriver:$EMSDRIVER_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/gvnfmdriver:$GVNFMDRIVER_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/jujudriver:$JUJUDRIVER_DOCKER_VER
@@ -24,7 +24,6 @@ docker pull $NEXUS_DOCKER_REPO/onap/vfc/vnflcm:$VNFLCM_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/vnfmgr:$VNFMGR_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/vnfres:$VNFRES_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/ztesdncdriver:$ZTESDNCDRIVER_DOCKER_VER
-docker pull $NEXUS_DOCKER_REPO/onap/vfc/ztevmanagerdriver:$ZTEVMANAGERDRIVER_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/ztevnfmdriver:$ZTEVNFMDRIVER_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/nfvo/svnfm/nokia:$NOKIA_DOCKER_VER
docker pull $NEXUS_DOCKER_REPO/onap/vfc/nfvo/svnfm/nokiav2:$NOKIAV2_DOCKER_VER
@@ -43,7 +42,6 @@ docker rm -f vfc_vnflcm
docker rm -f vfc_vnfmgr
docker rm -f vfc_vnfres
docker rm -f vfc_ztesdncdriver
-docker rm -f vfc_ztevmanagerdriver
docker rm -f vfc_ztevnfmdriver
docker rm -f vfc_svnfm_nokia
docker rm -f vfc_svnfm_nokiav2
@@ -64,6 +62,7 @@ docker run -i -t -d --name vfc_vnfres -p 8802:8802 -e MSB_ADDR=$OPENO_IP:80 $NEX
docker run -i -t -d --name vfc_ztesdncdriver -p 8411:8411 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/ztesdncdriver:$ZTESDNCDRIVER_DOCKER_VER
docker run -i -t -d --name vfc_ztevnfmdriver -p 8410:8410 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/ztevnfmdriver:$ZTEVNFMDRIVER_DOCKER_VER
docker run -i -t -d --name vfc_svnfm_nokia -p 8486:8486 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/nfvo/svnfm/nokia:$NOKIA_DOCKER_VER
+docker run -i -t -d --name vfc_multivimproxy -p 8481:8481 -e MSB_ADDR=$MSB_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/multivimproxy:$MULTIVIMPROXY_DOCKER_VER
CBAM_IP=$(cat /opt/config/cbam_ip.txt)
VNFM_ID=vnfmUuid