aboutsummaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
Diffstat (limited to 'boot')
-rw-r--r--boot/aaf_install.sh2
-rw-r--r--boot/aai_install.sh2
-rw-r--r--boot/appc_install.sh2
-rw-r--r--boot/clamp_install.sh2
-rwxr-xr-xboot/dcae2_install.sh2
-rw-r--r--boot/mr_install.sh2
-rw-r--r--boot/music_install.sh2
-rw-r--r--boot/oof_install.sh2
-rw-r--r--boot/oof_vm_init.sh97
-rw-r--r--boot/openo_install.sh2
-rw-r--r--boot/policy_install.sh2
-rw-r--r--boot/portal_install.sh2
-rwxr-xr-xboot/robot/demo.sh6
-rw-r--r--boot/robot_install.sh2
-rw-r--r--boot/sdc_install.sh2
-rw-r--r--boot/sdnc_install.sh2
-rw-r--r--boot/sms_install.sh2
-rw-r--r--boot/so_install.sh2
-rw-r--r--boot/vid_install.sh2
19 files changed, 113 insertions, 24 deletions
diff --git a/boot/aaf_install.sh b/boot/aaf_install.sh
index 882c3ee4..c8531d55 100644
--- a/boot/aaf_install.sh
+++ b/boot/aaf_install.sh
@@ -72,7 +72,7 @@ mv /opt/aaf_serv.sh /etc/init.d
update-rc.d aaf_serv.sh defaults
# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | tee /etc/apt/sources.list.d/docker.list
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/aai_install.sh b/boot/aai_install.sh
index 981e026f..2c981e09 100644
--- a/boot/aai_install.sh
+++ b/boot/aai_install.sh
@@ -72,7 +72,7 @@ mv /opt/aai_serv.sh /etc/init.d
update-rc.d aai_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
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/appc_install.sh b/boot/appc_install.sh
index 7efedb81..fe4be354 100644
--- a/boot/appc_install.sh
+++ b/boot/appc_install.sh
@@ -71,7 +71,7 @@ mv /opt/appc_serv.sh /etc/init.d
update-rc.d appc_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
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/clamp_install.sh b/boot/clamp_install.sh
index 88b0370e..5063cd62 100644
--- a/boot/clamp_install.sh
+++ b/boot/clamp_install.sh
@@ -71,7 +71,7 @@ mv /opt/clamp_serv.sh /etc/init.d
update-rc.d clamp_serv.sh defaults
# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/dcae2_install.sh b/boot/dcae2_install.sh
index 05722c36..adf619a5 100755
--- a/boot/dcae2_install.sh
+++ b/boot/dcae2_install.sh
@@ -63,7 +63,7 @@ mv /opt/dcae2_serv.sh /etc/init.d
update-rc.d dcae2_serv.sh defaults
# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y "linux-image-extra-$(uname -r)" linux-image-extra-virtual jq
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/mr_install.sh b/boot/mr_install.sh
index a6a4f4b8..d11becfb 100644
--- a/boot/mr_install.sh
+++ b/boot/mr_install.sh
@@ -76,7 +76,7 @@ unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip dbcl_vm_init.sh > /opt/dbcl_vm_init
chmod +x /opt/dbcl_vm_init.sh
# 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
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/music_install.sh b/boot/music_install.sh
index a080034b..5149214f 100644
--- a/boot/music_install.sh
+++ b/boot/music_install.sh
@@ -71,7 +71,7 @@ mv /opt/music_serv.sh /etc/init.d
update-rc.d music_serv.sh defaults
# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | tee /etc/apt/sources.list.d/docker.list
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/oof_install.sh b/boot/oof_install.sh
index 8139b890..645b29c1 100644
--- a/boot/oof_install.sh
+++ b/boot/oof_install.sh
@@ -71,7 +71,7 @@ mv /opt/oof_serv.sh /etc/init.d
update-rc.d oof_serv.sh defaults
# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/oof_vm_init.sh b/boot/oof_vm_init.sh
index bbb8d9b2..4654ffbb 100644
--- a/boot/oof_vm_init.sh
+++ b/boot/oof_vm_init.sh
@@ -1,11 +1,13 @@
#!/bin/bash
+
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)
+CASS_MUSIC_IMAGE_VERSION=$(cat /opt/config/cass_version.txt)
+MUSIC_IMAGE_VERSION=$(cat /opt/config/music_version.txt)
HAS_IMAGE_VERSION=$(cat /opt/config/has_docker_version.txt)
OSDF_IMAGE_VERSION=$(cat /opt/config/osdf_docker_version.txt)
-MUSIC_URL=music.api.simpledemo.onap.org
cd /opt/optf-has
git pull
@@ -13,18 +15,105 @@ git pull
COND_CONF=/opt/optf-has/conductor.conf
LOG_CONF=/opt/optf-has/log.conf
-#Certification file for OOF-HAS
-BUNDLE=/opt/optf-has/AAF_RootCA.cer
+# Certification file for OOF-HAS
AAI_cert=/usr/local/bin/AAF_RootCA.cer
+BUNDLE=/opt/optf-has/AAF_RootCA.cer
OSDF_IMG=${NEXUS_DOCKER_REPO}/onap/optf-osdf:${OSDF_IMAGE_VERSION}
HAS_IMG=${NEXUS_DOCKER_REPO}/onap/optf-has:${HAS_IMAGE_VERSION}
-# pull images from repo
+# pull OOF images from repo
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
docker pull ${OSDF_IMG}
docker pull ${HAS_IMG}
+# Install MUSIC
+# MUSIC parameters
+CASS_IMG=${NEXUS_DOCKER_REPO}/onap/music/cassandra_music:$CASS_MUSIC_IMAGE_VERSION
+MUSIC_IMG=${NEXUS_DOCKER_REPO}/onap/music/music:$MUSIC_IMAGE_VERSION
+TOMCAT_IMG=library/tomcat:8.5
+ZK_IMG=library/zookeeper:3.4
+WORK_DIR=/opt/optf-has
+CASS_USERNAME=cassandra1
+CASS_PASSWORD=cassandra1
+
+# pull MUSIC images
+docker pull ${ZK_IMG}
+docker pull ${TOMCAT_IMG}
+docker pull ${CASS_IMG}
+docker pull ${MUSIC_IMG}
+
+# create directory for music properties and logs
+mkdir -p /opt/optf-has/music/properties
+mkdir -p /opt/optf-has/music/logs
+
+# add music.properties file
+cat > /opt/optf-has/music/properties/music.properties<<NEWFILE
+my.id=0
+all.ids=0
+my.public.ip=localhost
+all.public.ips=localhost
+
+#######################################
+
+# Optional current values are defaults
+
+#######################################
+zookeeper.host=music-zk
+cassandra.host=music-db
+#music.ip=localhost
+#debug=true
+#music.rest.ip=localhost
+#lock.lease.period=6000
+cassandra.user=cassandra1
+cassandra.password=cassandra1
+
+# AAF Endpoint if using AAF
+aaf.endpoint.url=https://aaf.api.simpledemo.onap.org
+NEWFILE
+
+# Create Volume for mapping war file and tomcat
+docker volume create music-vol
+
+# Create a network for all the containers to run in.
+docker network create music-net
+
+# Start Cassandra
+docker run -d --rm --name music-db --network music-net -p "7000:7000" -p "7001:7001" -p "7199:7199" -p "9042:9042" -p "9160:9160" -e CASSUSER=${CASS_USERNAME} -e CASSPASS=${CASS_PASSWORD} ${CASS_IMG}
+
+# Start Music war
+docker run -d --rm --name music-war -v music-vol:/app ${MUSIC_IMG}
+
+# Start Zookeeper
+docker run -d --rm --name music-zk --network music-net -p "2181:2181" -p "2888:2888" -p "3888:3888" ${ZK_IMG}
+
+# Delay for Cassandra
+sleep 20;
+
+# Start Up tomcat - Needs to have properties,logs dir and war file volume mapped.
+docker run -d --rm --name music-tomcat --network music-net -p "8080:8080" -v music-vol:/usr/local/tomcat/webapps -v ${WORK_DIR}/music/properties:/opt/app/music/etc:ro -v ${WORK_DIR}/music/logs:/opt/app/music/logs ${TOMCAT_IMG}
+
+# Connect tomcat to host bridge network so that its port can be seen.
+docker network connect bridge music-tomcat;
+sleep 6;
+echo "Running onboarding curl command"
+curl -X POST \
+ http://localhost:8080/MUSIC/rest/v2/admin/onboardAppWithMusic \
+ -H 'Cache-Control: no-cache' \
+ -H 'Content-Type: application/json' \
+ -H 'Postman-Token: 7d2839f4-b032-487a-8998-4d1b27a932d7' \
+ -d '{
+"appname": "conductor",
+"userId" : "conductor",
+"isAAF" : false,
+"password" : "c0nduct0r"
+}
+'
+echo "Onboarding curl complete"
+
+# Get MUSIC url
+MUSIC_URL=$(docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat)
+
# Run OOF-HAS
# Set A&AI and MUSIC url inside OOF-HAS conductor.conf
sed -i "138 s%.*%server_url = https://aai.api.simpledemo.onap.org:8443/aai%" $COND_CONF
diff --git a/boot/openo_install.sh b/boot/openo_install.sh
index 69cd2f76..7dd1c0c1 100644
--- a/boot/openo_install.sh
+++ b/boot/openo_install.sh
@@ -85,7 +85,7 @@ 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-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/policy_install.sh b/boot/policy_install.sh
index 6394fc18..0ba20829 100644
--- a/boot/policy_install.sh
+++ b/boot/policy_install.sh
@@ -71,7 +71,7 @@ mv /opt/policy_serv.sh /etc/init.d
update-rc.d policy_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
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/portal_install.sh b/boot/portal_install.sh
index 60b3d3d1..b8d7f1cd 100644
--- a/boot/portal_install.sh
+++ b/boot/portal_install.sh
@@ -71,7 +71,7 @@ mv /opt/portal_serv.sh /etc/init.d
update-rc.d portal_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
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/robot/demo.sh b/boot/robot/demo.sh
index a5a8e40e..b8df99ee 100755
--- a/boot/robot/demo.sh
+++ b/boot/robot/demo.sh
@@ -31,7 +31,7 @@ function usage
echo " demo.sh deleteVNF <module_name from instantiateVFW>"
echo " - Delete the module created by instantiateVFW"
echo " "
- echo " demo.sh heatbridge <stack_name> <service_instance_id> <service> <ipv4-oam-address>"
+ echo " demo.sh heatbridge <stack_name> <service_instance_id> <service> [<ipv4-oam-address>]"
echo " - Run heatbridge against the stack for the given service instance and service"
}
@@ -130,8 +130,8 @@ do
heatbridge)
TAG="heatbridge"
shift
- if [ $# -ne 4 ];then
- echo "Usage: demo.sh heatbridge <stack_name> <service_instance_id> <service> <ipv4-oam-address>"
+ if [ $# -lt 3 ];then
+ echo "Usage: demo.sh heatbridge <stack_name> <service_instance_id> <service> [<ipv4-oam-address>]"
exit
fi
VARIABLES="$VARIABLES -v HB_STACK:$1"
diff --git a/boot/robot_install.sh b/boot/robot_install.sh
index 827b2ce4..a41cf886 100644
--- a/boot/robot_install.sh
+++ b/boot/robot_install.sh
@@ -82,7 +82,7 @@ cp /opt/robot_serv.sh /etc/init.d
update-rc.d robot_serv.sh defaults
# Download and install docker-engine
-echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/sdc_install.sh b/boot/sdc_install.sh
index b0d58996..3efcf1fc 100644
--- a/boot/sdc_install.sh
+++ b/boot/sdc_install.sh
@@ -71,7 +71,7 @@ mv /opt/sdc_serv.sh /etc/init.d
update-rc.d sdc_serv.sh defaults
# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/sdnc_install.sh b/boot/sdnc_install.sh
index 196542fa..e767952c 100644
--- a/boot/sdnc_install.sh
+++ b/boot/sdnc_install.sh
@@ -71,7 +71,7 @@ mv /opt/sdnc_serv.sh /etc/init.d
update-rc.d sdnc_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
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/sms_install.sh b/boot/sms_install.sh
index 5522c373..b85ea52b 100644
--- a/boot/sms_install.sh
+++ b/boot/sms_install.sh
@@ -71,7 +71,7 @@ mv /opt/sms_serv.sh /etc/init.d
update-rc.d sms_serv.sh defaults
# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/so_install.sh b/boot/so_install.sh
index f58a6167..f346cbf5 100644
--- a/boot/so_install.sh
+++ b/boot/so_install.sh
@@ -72,7 +72,7 @@ mv /opt/so_serv.sh /etc/init.d
update-rc.d so_serv.sh defaults
# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine
diff --git a/boot/vid_install.sh b/boot/vid_install.sh
index 74018f60..6848c56d 100644
--- a/boot/vid_install.sh
+++ b/boot/vid_install.sh
@@ -71,7 +71,7 @@ mv /opt/vid_serv.sh /etc/init.d
update-rc.d vid_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
+echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y --allow-unauthenticated docker-engine