summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot/aaf_install.sh94
-rw-r--r--boot/aaf_serv.sh98
-rw-r--r--boot/aaf_vm_init.sh6
-rw-r--r--boot/bind_zones14
-rw-r--r--boot/bind_zones_onap16
-rw-r--r--boot/db_simpledemo_onap_org20
-rw-r--r--boot/db_simpledemo_openecomp_org20
-rw-r--r--boot/dns_install.sh6
-rw-r--r--boot/music_install.sh94
-rw-r--r--boot/music_serv.sh98
-rw-r--r--boot/music_vm_init.sh13
-rw-r--r--boot/oof_install.sh94
-rw-r--r--boot/oof_serv.sh98
-rw-r--r--boot/oof_vm_init.sh6
-rw-r--r--heat/ONAP/onap_openstack.env6
-rw-r--r--heat/ONAP/onap_openstack.yaml220
-rw-r--r--heat/ONAP/onap_openstack_light.yaml217
-rw-r--r--heat/ONAP/onap_openstack_template.env6
18 files changed, 1118 insertions, 8 deletions
diff --git a/boot/aaf_install.sh b/boot/aaf_install.sh
new file mode 100644
index 00000000..14363269
--- /dev/null
+++ b/boot/aaf_install.sh
@@ -0,0 +1,94 @@
+#!/bin/bash
+
+# Read configuration files
+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)
+MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
+
+# Add host name to /etc/host to avoid warnings in openstack images
+if [[ $CLOUD_ENV != "rackspace" ]]
+then
+ echo 127.0.0.1 $(hostname) >> /etc/hosts
+
+ # Allow remote login as root
+ mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
+ cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
+fi
+
+# Set private IP in /etc/network/interfaces manually in the presence of public interface
+# Some VM images don't add the private interface automatically, we have to do it during the component installation
+if [[ $CLOUD_ENV == "openstack_nofloat" ]]
+then
+ LOCAL_IP=$(cat /opt/config/local_ip_addr.txt)
+ CIDR=$(cat /opt/config/oam_network_cidr.txt)
+ BITMASK=$(echo $CIDR | cut -d"/" -f2)
+
+ # Compute the netmask based on the network cidr
+ if [[ $BITMASK == "8" ]]
+ then
+ NETMASK=255.0.0.0
+ elif [[ $BITMASK == "16" ]]
+ then
+ NETMASK=255.255.0.0
+ elif [[ $BITMASK == "24" ]]
+ then
+ NETMASK=255.255.255.0
+ fi
+
+ echo "auto eth1" >> /etc/network/interfaces
+ echo "iface eth1 inet static" >> /etc/network/interfaces
+ echo " address $LOCAL_IP" >> /etc/network/interfaces
+ echo " netmask $NETMASK" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
+ ifup eth1
+fi
+
+# Download dependencies
+echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list
+echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list
+apt-get update
+apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make
+
+# Download scripts from Nexus
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/aaf_vm_init.sh -o /opt/aaf_vm_init.sh
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/aaf_serv.sh -o /opt/aaf_serv.sh
+chmod +x /opt/aaf_vm_init.sh
+chmod +x /opt/aaf_serv.sh
+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-trusty 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
+
+mkdir /opt/docker
+curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
+chmod +x /opt/docker/docker-compose
+
+# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
+DNS_FLAG=""
+if [ -s /opt/config/dns_ip_addr.txt ]
+then
+ DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
+fi
+if [ -s /opt/config/external_dns.txt ]
+then
+ DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
+fi
+echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
+
+cp /lib/systemd/system/docker.service /etc/systemd/system
+sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
+service docker restart
+
+# DNS IP address configuration
+echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
+resolvconf -u
+
+# Clone Gerrit repository and run docker containers
+cd /opt
+./aaf_vm_init.sh \ No newline at end of file
diff --git a/boot/aaf_serv.sh b/boot/aaf_serv.sh
new file mode 100644
index 00000000..73d22ad3
--- /dev/null
+++ b/boot/aaf_serv.sh
@@ -0,0 +1,98 @@
+#!/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="./aaf_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/aaf_vm_init.sh b/boot/aaf_vm_init.sh
new file mode 100644
index 00000000..d0f23953
--- /dev/null
+++ b/boot/aaf_vm_init.sh
@@ -0,0 +1,6 @@
+#!/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)
+DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) \ No newline at end of file
diff --git a/boot/bind_zones b/boot/bind_zones
index 870def1d..1dfd6d02 100644
--- a/boot/bind_zones
+++ b/boot/bind_zones
@@ -77,12 +77,16 @@ vm1.clamp.simpledemo.openecomp.org. IN A clamp_ip_addr
c1.vm1.clamp.simpledemo.openecomp.org. IN A clamp_ip_addr
c2.vm1.clamp.simpledemo.openecomp.org. IN A clamp_ip_addr
-;vm1.aaf.simpledemo.openecomp.org. IN A aaf_ip_addr
+vm1.aaf.simpledemo.openecomp.org. IN A aaf_ip_addr
vm1.mr.simpledemo.openecomp.org. IN A mr_ip_addr
vm1.openo.simpledemo.openecomp.org. IN A openo_ip_addr
+vm1.music.simpledemo.openecomp.org. IN A music_ip_addr
+
+vm1.oof.simpledemo.openecomp.org. IN A oof_ip_addr
+
;CNAMES
;A&AI
@@ -131,7 +135,7 @@ robot.api.simpledemo.openecomp.org. IN CNAME vm1.robot.simpledemo.openecomp.org.
sniro.api.simpledemo.openecomp.org. IN CNAME vm1.robot.simpledemo.openecomp.org.
;AAF
-;aaf.api.simpledemo.openecomp.org. IN CNAME vm1.aaf.simpledemo.openecomp.org.
+aaf.api.simpledemo.openecomp.org. IN CNAME vm1.aaf.simpledemo.openecomp.org.
;OPEN-O
msb.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.org.
@@ -140,3 +144,9 @@ vnfsdk.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.
vfc.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.org.
uui.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.org.
esr.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.org.
+
+;MUSIC
+music.api.simpledemo.openecomp.org. IN CNAME vm1.music.simpledemo.openecomp.org.
+
+;OOF
+oof.api.simpledemo.openecomp.org. IN CNAME vm1.oof.simpledemo.openecomp.org. \ No newline at end of file
diff --git a/boot/bind_zones_onap b/boot/bind_zones_onap
index 365e3a3a..425f3d1e 100644
--- a/boot/bind_zones_onap
+++ b/boot/bind_zones_onap
@@ -77,12 +77,16 @@ vm1.clamp.simpledemo.onap.org. IN A clamp_ip_addr
c1.vm1.clamp.simpledemo.onap.org. IN A clamp_ip_addr
c2.vm1.clamp.simpledemo.onap.org. IN A clamp_ip_addr
-;vm1.aaf.simpledemo.onap.org. IN A aaf_ip_addr
+vm1.aaf.simpledemo.onap.org. IN A aaf_ip_addr
vm1.mr.simpledemo.onap.org. IN A mr_ip_addr
vm1.openo.simpledemo.onap.org. IN A openo_ip_addr
+vm1.music.simpledemo.openecomp.org. IN A music_ip_addr
+
+vm1.oof.simpledemo.openecomp.org. IN A oof_ip_addr
+
;CNAMES
;A&AI
@@ -131,7 +135,7 @@ robot.api.simpledemo.onap.org. IN CNAME vm1.robot.simpledemo.onap.org.
sniro.api.simpledemo.onap.org. IN CNAME vm1.robot.simpledemo.onap.org.
;AAF
-;aaf.api.simpledemo.onap.org. IN CNAME vm1.aaf.simpledemo.onap.org.
+aaf.api.simpledemo.onap.org. IN CNAME vm1.aaf.simpledemo.onap.org.
;OPEN-O
msb.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
@@ -139,4 +143,10 @@ mvim.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
vnfsdk.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
vfc.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
uui.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
-esr.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org. \ No newline at end of file
+esr.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
+
+;MUSIC
+music.api.simpledemo.onap.org. IN CNAME vm1.music.simpledemo.onap.org.
+
+;OOF
+oof.api.simpledemo.onap.org. IN CNAME vm1.oof.simpledemo.onap.org. \ No newline at end of file
diff --git a/boot/db_simpledemo_onap_org b/boot/db_simpledemo_onap_org
index ca583c9b..c3a2df84 100644
--- a/boot/db_simpledemo_onap_org
+++ b/boot/db_simpledemo_onap_org
@@ -81,6 +81,12 @@ vm1.clamp.simpledemo.onap.org. IN A 10.0.12.1
c1.vm1.clamp.simpledemo.onap.org. IN A 10.0.12.1
c2.vm1.clamp.simpledemo.onap.org. IN A 10.0.12.1
+vm1.openo.simpledemo.onap.org. IN A 10.0.14.1
+
+vm1.music.simpledemo.onap.org. IN A 10.0.15.1
+
+vm1.oof.simpledemo.onap.org. IN A 10.0.16.1
+
;CNAMES
;A&AI
@@ -132,3 +138,17 @@ clamp.api.simpledemo.onap.org. IN CNAME vm1.clamp.simpledemo.onap.org.
;AAF
aaf.api.simpledemo.onap.org. IN CNAME vm1.aaf.simpledemo.onap.org.
+
+;OPEN-O
+msb.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
+mvim.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
+vnfsdk.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
+vfc.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
+uui.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
+esr.api.simpledemo.onap.org. IN CNAME vm1.openo.simpledemo.onap.org.
+
+;MUSIC
+music.api.simpledemo.onap.org. IN CNAME vm1.music.simpledemo.onap.org.
+
+;OOF
+oof.api.simpledemo.onap.org. IN CNAME vm1.oof.simpledemo.onap.org. \ No newline at end of file
diff --git a/boot/db_simpledemo_openecomp_org b/boot/db_simpledemo_openecomp_org
index b025f7bb..e867a26f 100644
--- a/boot/db_simpledemo_openecomp_org
+++ b/boot/db_simpledemo_openecomp_org
@@ -81,6 +81,12 @@ vm1.clamp.simpledemo.openecomp.org. IN A 10.0.12.1
c1.vm1.clamp.simpledemo.openecomp.org. IN A 10.0.12.1
c2.vm1.clamp.simpledemo.openecomp.org. IN A 10.0.12.1
+vm1.openo.simpledemo.openecomp.org. IN A 10.0.14.1
+
+vm1.music.simpledemo.openecomp.org. IN A 10.0.15.1
+
+vm1.oof.simpledemo.openecomp.org. IN A 10.0.16.1
+
;CNAMES
;A&AI
@@ -132,3 +138,17 @@ clamp.api.simpledemo.openecomp.org. IN CNAME vm1.clamp.simpledemo.openecomp.org.
;AAF
aaf.api.simpledemo.openecomp.org. IN CNAME vm1.aaf.simpledemo.openecomp.org.
+
+;OPEN-O
+msb.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.org.
+mvim.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.org.
+vnfsdk.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.org.
+vfc.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.org.
+uui.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.org.
+esr.api.simpledemo.openecomp.org. IN CNAME vm1.openo.simpledemo.openecomp.org.
+
+;MUSIC
+music.api.simpledemo.openecomp.org. IN CNAME vm1.music.simpledemo.openecomp.org.
+
+;OOF
+oof.api.simpledemo.openecomp.org. IN CNAME vm1.oof.simpledemo.openecomp.org.
diff --git a/boot/dns_install.sh b/boot/dns_install.sh
index 79272cbd..239bfce5 100644
--- a/boot/dns_install.sh
+++ b/boot/dns_install.sh
@@ -88,6 +88,9 @@ then
sed -i "s/vid_ip_addr/"$(cat /opt/config/vid_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
sed -i "s/clamp_ip_addr/"$(cat /opt/config/clamp_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
sed -i "s/openo_ip_addr/"$(cat /opt/config/openo_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
+ sed -i "s/music_ip_addr/"$(cat /opt/config/music_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
+ sed -i "s/oof_ip_addr/"$(cat /opt/config/oof_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
+ sed -i "s/aaf_ip_addr/"$(cat /opt/config/aaf_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
sed -i "s/aai1_ip_addr/"$(cat /opt/config/aai1_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.onap.org
sed -i "s/aai2_ip_addr/"$(cat /opt/config/aai2_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.onap.org
@@ -104,6 +107,9 @@ then
sed -i "s/vid_ip_addr/"$(cat /opt/config/vid_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.onap.org
sed -i "s/clamp_ip_addr/"$(cat /opt/config/clamp_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.onap.org
sed -i "s/openo_ip_addr/"$(cat /opt/config/openo_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.onap.org
+ sed -i "s/music_ip_addr/"$(cat /opt/config/music_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
+ sed -i "s/oof_ip_addr/"$(cat /opt/config/oof_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
+ sed -i "s/aaf_ip_addr/"$(cat /opt/config/aaf_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
fi
# Configure Bind
diff --git a/boot/music_install.sh b/boot/music_install.sh
new file mode 100644
index 00000000..6965b957
--- /dev/null
+++ b/boot/music_install.sh
@@ -0,0 +1,94 @@
+#!/bin/bash
+
+# Read configuration files
+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)
+MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
+
+# Add host name to /etc/host to avoid warnings in openstack images
+if [[ $CLOUD_ENV != "rackspace" ]]
+then
+ echo 127.0.0.1 $(hostname) >> /etc/hosts
+
+ # Allow remote login as root
+ mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
+ cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
+fi
+
+# Set private IP in /etc/network/interfaces manually in the presence of public interface
+# Some VM images don't add the private interface automatically, we have to do it during the component installation
+if [[ $CLOUD_ENV == "openstack_nofloat" ]]
+then
+ LOCAL_IP=$(cat /opt/config/local_ip_addr.txt)
+ CIDR=$(cat /opt/config/oam_network_cidr.txt)
+ BITMASK=$(echo $CIDR | cut -d"/" -f2)
+
+ # Compute the netmask based on the network cidr
+ if [[ $BITMASK == "8" ]]
+ then
+ NETMASK=255.0.0.0
+ elif [[ $BITMASK == "16" ]]
+ then
+ NETMASK=255.255.0.0
+ elif [[ $BITMASK == "24" ]]
+ then
+ NETMASK=255.255.255.0
+ fi
+
+ echo "auto eth1" >> /etc/network/interfaces
+ echo "iface eth1 inet static" >> /etc/network/interfaces
+ echo " address $LOCAL_IP" >> /etc/network/interfaces
+ echo " netmask $NETMASK" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
+ ifup eth1
+fi
+
+# Download dependencies
+echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list
+echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list
+apt-get update
+apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make
+
+# Download scripts from Nexus
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/music_vm_init.sh -o /opt/music_vm_init.sh
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/music_serv.sh -o /opt/music_serv.sh
+chmod +x /opt/music_vm_init.sh
+chmod +x /opt/music_serv.sh
+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
+apt-get update
+apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
+apt-get install -y --allow-unauthenticated docker-engine
+
+mkdir /opt/docker
+curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
+chmod +x /opt/docker/docker-compose
+
+# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
+DNS_FLAG=""
+if [ -s /opt/config/dns_ip_addr.txt ]
+then
+ DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
+fi
+if [ -s /opt/config/external_dns.txt ]
+then
+ DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
+fi
+echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
+
+cp /lib/systemd/system/docker.service /etc/systemd/system
+sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
+service docker restart
+
+# DNS IP address configuration
+echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
+resolvconf -u
+
+# Clone Gerrit repository and run docker containers
+cd /opt
+./music_vm_init.sh \ No newline at end of file
diff --git a/boot/music_serv.sh b/boot/music_serv.sh
new file mode 100644
index 00000000..29dc4c3c
--- /dev/null
+++ b/boot/music_serv.sh
@@ -0,0 +1,98 @@
+#!/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="./music_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/music_vm_init.sh b/boot/music_vm_init.sh
new file mode 100644
index 00000000..b18aa998
--- /dev/null
+++ b/boot/music_vm_init.sh
@@ -0,0 +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)
+DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
+
+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
diff --git a/boot/oof_install.sh b/boot/oof_install.sh
new file mode 100644
index 00000000..d4921371
--- /dev/null
+++ b/boot/oof_install.sh
@@ -0,0 +1,94 @@
+#!/bin/bash
+
+# Read configuration files
+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)
+MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
+
+# Add host name to /etc/host to avoid warnings in openstack images
+if [[ $CLOUD_ENV != "rackspace" ]]
+then
+ echo 127.0.0.1 $(hostname) >> /etc/hosts
+
+ # Allow remote login as root
+ mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
+ cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
+fi
+
+# Set private IP in /etc/network/interfaces manually in the presence of public interface
+# Some VM images don't add the private interface automatically, we have to do it during the component installation
+if [[ $CLOUD_ENV == "openstack_nofloat" ]]
+then
+ LOCAL_IP=$(cat /opt/config/local_ip_addr.txt)
+ CIDR=$(cat /opt/config/oam_network_cidr.txt)
+ BITMASK=$(echo $CIDR | cut -d"/" -f2)
+
+ # Compute the netmask based on the network cidr
+ if [[ $BITMASK == "8" ]]
+ then
+ NETMASK=255.0.0.0
+ elif [[ $BITMASK == "16" ]]
+ then
+ NETMASK=255.255.0.0
+ elif [[ $BITMASK == "24" ]]
+ then
+ NETMASK=255.255.255.0
+ fi
+
+ echo "auto eth1" >> /etc/network/interfaces
+ echo "iface eth1 inet static" >> /etc/network/interfaces
+ echo " address $LOCAL_IP" >> /etc/network/interfaces
+ echo " netmask $NETMASK" >> /etc/network/interfaces
+ echo " mtu $MTU" >> /etc/network/interfaces
+ ifup eth1
+fi
+
+# Download dependencies
+echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list
+echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list
+apt-get update
+apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make
+
+# Download scripts from Nexus
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/oof_vm_init.sh -o /opt/oof_vm_init.sh
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/oof_serv.sh -o /opt/oof_serv.sh
+chmod +x /opt/oof_vm_init.sh
+chmod +x /opt/oof_serv.sh
+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-trusty 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
+
+mkdir /opt/docker
+curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
+chmod +x /opt/docker/docker-compose
+
+# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
+DNS_FLAG=""
+if [ -s /opt/config/dns_ip_addr.txt ]
+then
+ DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
+fi
+if [ -s /opt/config/external_dns.txt ]
+then
+ DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
+fi
+echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
+
+cp /lib/systemd/system/docker.service /etc/systemd/system
+sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
+service docker restart
+
+# DNS IP address configuration
+echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
+resolvconf -u
+
+# Clone Gerrit repository and run docker containers
+cd /opt
+./oof_vm_init.sh \ No newline at end of file
diff --git a/boot/oof_serv.sh b/boot/oof_serv.sh
new file mode 100644
index 00000000..58a1691b
--- /dev/null
+++ b/boot/oof_serv.sh
@@ -0,0 +1,98 @@
+#!/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="./oof_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/oof_vm_init.sh b/boot/oof_vm_init.sh
new file mode 100644
index 00000000..d0f23953
--- /dev/null
+++ b/boot/oof_vm_init.sh
@@ -0,0 +1,6 @@
+#!/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)
+DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) \ No newline at end of file
diff --git a/heat/ONAP/onap_openstack.env b/heat/ONAP/onap_openstack.env
index 2cfdaa08..adc3e40b 100644
--- a/heat/ONAP/onap_openstack.env
+++ b/heat/ONAP/onap_openstack.env
@@ -89,6 +89,9 @@ parameters:
vid_ip_addr: 10.0.8.1
clamp_ip_addr: 10.0.12.1
openo_ip_addr: 10.0.14.1
+ music_ip_addr: 10.0.15.1
+ oof_ip_addr: 10.0.16.1
+ aaf_ip_addr: 10.0.13.1
###########################
# #
@@ -146,6 +149,9 @@ parameters:
esr_docker: v1.0.0
dgbuilder_docker: v0.1.0
cli_docker: v1.1.0
+ music_docker: latest
+ oof_docker: latest
+ aaf_docker: latest
vfc_nokia_docker: v1.0.2
vfc_ztevnfmdriver_docker: v1.0.2
diff --git a/heat/ONAP/onap_openstack.yaml b/heat/ONAP/onap_openstack.yaml
index 676a8465..f975a2a9 100644
--- a/heat/ONAP/onap_openstack.yaml
+++ b/heat/ONAP/onap_openstack.yaml
@@ -201,6 +201,12 @@ parameters:
type: string
openo_ip_addr:
type: string
+ music_ip_addr:
+ type: string
+ oof_ip_addr:
+ type: string
+ aaf_ip_addr:
+ type: string
###########################
# #
@@ -325,6 +331,13 @@ parameters:
type: string
cli_docker:
type: string
+ music_docker:
+ type: string
+ oof_docker:
+ type: string
+ aaf_docker:
+ type: string
+
vfc_nokia_docker:
type: string
vfc_ztevnfmdriver_docker:
@@ -522,6 +535,9 @@ resources:
__vid_ip_addr__: { get_param: vid_ip_addr }
__clamp_ip_addr__: { get_param: clamp_ip_addr }
__openo_ip_addr__: { get_param: openo_ip_addr }
+ __music_ip_addr__: { get_param: music_ip_addr }
+ __oof_ip_addr__: { get_param: oof_ip_addr }
+ __aaf_ip_addr__: { get_param: aaf_ip_addr }
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
__dns_forwarder__: { get_param: dns_forwarder }
@@ -549,6 +565,9 @@ resources:
echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
+ echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
+ echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
+ echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
echo "__external_dns__" > /opt/config/external_dns.txt
echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
@@ -906,8 +925,12 @@ resources:
__vid_ip_addr__: { get_param: vid_ip_addr }
__clamp_ip_addr__: { get_param: clamp_ip_addr }
__openo_ip_addr__: { get_param: openo_ip_addr }
+ __music_ip_addr__: { get_param: music_ip_addr }
+ __oof_ip_addr__: { get_param: oof_ip_addr }
+ __aaf_ip_addr__: { get_param: aaf_ip_addr }
__external_dns__: { get_param: external_dns }
- __vm_image_name__: { get_param: ubuntu_1404_image }
+ __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
+ __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
__vm_flavor__: { get_param: flavor_medium }
__public_net_id__: { get_param: public_net_id }
__script_version__: { get_param: artifacts_version }
@@ -945,10 +968,14 @@ resources:
echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
+ echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
+ echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
+ echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
echo "__cloud_env__" > /opt/config/cloud_env.txt
echo "__external_dns__" > /opt/config/external_dns.txt
echo "__vm_image_name__" > /opt/config/vm_image_name.txt
- echo "__vm_flavor__" > /opt/config/vm_flavor.txt
+ echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
+ echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
echo "__script_version__" > /opt/config/script_version.txt
echo "__public_net_id__" > /opt/config/public_net_id.txt
echo "__robot_repo__" > /opt/config/remote_repo.txt
@@ -1773,3 +1800,192 @@ resources:
cd /opt
chmod +x dcae2_install.sh
./dcae2_install.sh > /tmp/dcae2_install.log 2>&1
+
+
+ # MUSIC instantiation
+ music_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: music_ip_addr }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ music_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: music_private_port }
+
+ music_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1404_image }
+ flavor: { get_param: flavor_large }
+ name:
+ str_replace:
+ template: base-music
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: music_private_port }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __nexus_repo__: { get_param: nexus_repo }
+ __nexus_docker_repo__: { get_param: nexus_docker_repo }
+ __nexus_username__: { get_param: nexus_username }
+ __nexus_password__: { get_param: nexus_password }
+ __artifacts_version__: { get_param: artifacts_version }
+ __dns_ip_addr__: { get_param: dns_ip_addr }
+ __docker_version__: { get_param: music_docker }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_repo__" > /opt/config/nexus_repo.txt
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__artifacts_version__" > /opt/config/artifacts_version.txt
+ echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__external_dns__" > /opt/config/external_dns.txt
+
+ # Download and run install script
+ curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/music_install.sh -o /opt/music_install.sh
+ cd /opt
+ chmod +x music_install.sh
+ ./music_install.sh
+
+
+ # OOF instantiation
+ oof_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: oof_ip_addr }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ oof_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: oof_private_port }
+
+ oof_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1404_image }
+ flavor: { get_param: flavor_medium }
+ name:
+ str_replace:
+ template: base-oof
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: oof_private_port }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __nexus_repo__: { get_param: nexus_repo }
+ __nexus_docker_repo__: { get_param: nexus_docker_repo }
+ __nexus_username__: { get_param: nexus_username }
+ __nexus_password__: { get_param: nexus_password }
+ __artifacts_version__: { get_param: artifacts_version }
+ __dns_ip_addr__: { get_param: dns_ip_addr }
+ __docker_version__: { get_param: oof_docker }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_repo__" > /opt/config/nexus_repo.txt
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__artifacts_version__" > /opt/config/artifacts_version.txt
+ echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__external_dns__" > /opt/config/external_dns.txt
+
+ # Download and run install script
+ curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/oof_install.sh -o /opt/oof_install.sh
+ cd /opt
+ chmod +x oof_install.sh
+ ./oof_install.sh
+
+
+ # AAF instantiation
+ aaf_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aaf_ip_addr }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ aaf_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: aaf_private_port }
+
+ aaf_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1404_image }
+ flavor: { get_param: flavor_medium }
+ name:
+ str_replace:
+ template: base-aaf
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: aaf_private_port }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __nexus_repo__: { get_param: nexus_repo }
+ __nexus_docker_repo__: { get_param: nexus_docker_repo }
+ __nexus_username__: { get_param: nexus_username }
+ __nexus_password__: { get_param: nexus_password }
+ __artifacts_version__: { get_param: artifacts_version }
+ __dns_ip_addr__: { get_param: dns_ip_addr }
+ __docker_version__: { get_param: aaf_docker }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_repo__" > /opt/config/nexus_repo.txt
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__artifacts_version__" > /opt/config/artifacts_version.txt
+ echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__external_dns__" > /opt/config/external_dns.txt
+
+ # Download and run install script
+ curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aaf_install.sh -o /opt/aaf_install.sh
+ cd /opt
+ chmod +x aaf_install.sh
+ ./aaf_install.sh \ No newline at end of file
diff --git a/heat/ONAP/onap_openstack_light.yaml b/heat/ONAP/onap_openstack_light.yaml
index ac84c025..0b83ac88 100644
--- a/heat/ONAP/onap_openstack_light.yaml
+++ b/heat/ONAP/onap_openstack_light.yaml
@@ -201,6 +201,12 @@ parameters:
type: string
openo_ip_addr:
type: string
+ music_ip_addr:
+ type: string
+ oof_ip_addr:
+ type: string
+ aaf_ip_addr:
+ type: string
###########################
# #
@@ -325,6 +331,13 @@ parameters:
type: string
cli_docker:
type: string
+ music_docker:
+ type: string
+ oof_docker:
+ type: string
+ aaf_docker:
+ type: string
+
vfc_nokia_docker:
type: string
vfc_ztevnfmdriver_docker:
@@ -522,6 +535,9 @@ resources:
__vid_ip_addr__: { get_param: vid_ip_addr }
__clamp_ip_addr__: { get_param: clamp_ip_addr }
__openo_ip_addr__: { get_param: openo_ip_addr }
+ __music_ip_addr__: { get_param: music_ip_addr }
+ __oof_ip_addr__: { get_param: oof_ip_addr }
+ __aaf_ip_addr__: { get_param: aaf_ip_addr }
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
__dns_forwarder__: { get_param: dns_forwarder }
@@ -549,6 +565,9 @@ resources:
echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
+ echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
+ echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
+ echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
echo "__external_dns__" > /opt/config/external_dns.txt
echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
@@ -906,6 +925,9 @@ resources:
__vid_ip_addr__: { get_param: vid_ip_addr }
__clamp_ip_addr__: { get_param: clamp_ip_addr }
__openo_ip_addr__: { get_param: openo_ip_addr }
+ __clamp_ip_addr__: { get_param: clamp_ip_addr }
+ __openo_ip_addr__: { get_param: openo_ip_addr }
+ __music_ip_addr__: { get_param: music_ip_addr }
__external_dns__: { get_param: external_dns }
__vm_image_name__: { get_param: ubuntu_1404_image }
__vm_flavor__: { get_param: flavor_medium }
@@ -945,10 +967,14 @@ resources:
echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
+ echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
+ echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
+ echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
echo "__cloud_env__" > /opt/config/cloud_env.txt
echo "__external_dns__" > /opt/config/external_dns.txt
echo "__vm_image_name__" > /opt/config/vm_image_name.txt
- echo "__vm_flavor__" > /opt/config/vm_flavor.txt
+ echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
+ echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
echo "__script_version__" > /opt/config/script_version.txt
echo "__public_net_id__" > /opt/config/public_net_id.txt
echo "__robot_repo__" > /opt/config/remote_repo.txt
@@ -1773,3 +1799,192 @@ resources:
cd /opt
chmod +x dcae2_install.sh
./dcae2_install.sh > /tmp/dcae2_install.log 2>&1
+
+
+ # MUSIC instantiation
+ music_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: music_ip_addr }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ music_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: music_private_port }
+
+ music_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1404_image }
+ flavor: { get_param: flavor_large }
+ name:
+ str_replace:
+ template: base-music
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: music_private_port }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __nexus_repo__: { get_param: nexus_repo }
+ __nexus_docker_repo__: { get_param: nexus_docker_repo }
+ __nexus_username__: { get_param: nexus_username }
+ __nexus_password__: { get_param: nexus_password }
+ __artifacts_version__: { get_param: artifacts_version }
+ __dns_ip_addr__: { get_param: dns_ip_addr }
+ __docker_version__: { get_param: music_docker }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_repo__" > /opt/config/nexus_repo.txt
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__artifacts_version__" > /opt/config/artifacts_version.txt
+ echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__external_dns__" > /opt/config/external_dns.txt
+
+ # Download and run install script
+ curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/music_install.sh -o /opt/music_install.sh
+ cd /opt
+ chmod +x music_install.sh
+ ./music_install.sh
+
+
+ # OOF instantiation
+ oof_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: oof_ip_addr }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ oof_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: oof_private_port }
+
+ oof_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1404_image }
+ flavor: { get_param: flavor_medium }
+ name:
+ str_replace:
+ template: base-oof
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: oof_private_port }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __nexus_repo__: { get_param: nexus_repo }
+ __nexus_docker_repo__: { get_param: nexus_docker_repo }
+ __nexus_username__: { get_param: nexus_username }
+ __nexus_password__: { get_param: nexus_password }
+ __artifacts_version__: { get_param: artifacts_version }
+ __dns_ip_addr__: { get_param: dns_ip_addr }
+ __docker_version__: { get_param: oof_docker }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_repo__" > /opt/config/nexus_repo.txt
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__artifacts_version__" > /opt/config/artifacts_version.txt
+ echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__external_dns__" > /opt/config/external_dns.txt
+
+ # Download and run install script
+ curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/oof_install.sh -o /opt/oof_install.sh
+ cd /opt
+ chmod +x oof_install.sh
+ ./oof_install.sh
+
+
+ # AAF instantiation
+ aaf_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aaf_ip_addr }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ aaf_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: aaf_private_port }
+
+ aaf_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1404_image }
+ flavor: { get_param: flavor_medium }
+ name:
+ str_replace:
+ template: base-aaf
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: aaf_private_port }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __nexus_repo__: { get_param: nexus_repo }
+ __nexus_docker_repo__: { get_param: nexus_docker_repo }
+ __nexus_username__: { get_param: nexus_username }
+ __nexus_password__: { get_param: nexus_password }
+ __artifacts_version__: { get_param: artifacts_version }
+ __dns_ip_addr__: { get_param: dns_ip_addr }
+ __docker_version__: { get_param: aaf_docker }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_repo__" > /opt/config/nexus_repo.txt
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__artifacts_version__" > /opt/config/artifacts_version.txt
+ echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__external_dns__" > /opt/config/external_dns.txt
+
+ # Download and run install script
+ curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aaf_install.sh -o /opt/aaf_install.sh
+ cd /opt
+ chmod +x aaf_install.sh
+ ./aaf_install.sh \ No newline at end of file
diff --git a/heat/ONAP/onap_openstack_template.env b/heat/ONAP/onap_openstack_template.env
index 950f8ef2..3229c1a5 100644
--- a/heat/ONAP/onap_openstack_template.env
+++ b/heat/ONAP/onap_openstack_template.env
@@ -89,6 +89,9 @@ parameters:
vid_ip_addr: 10.0.8.1
clamp_ip_addr: 10.0.12.1
openo_ip_addr: 10.0.14.1
+ music_ip_addr: 10.0.15.1
+ oof_ip_addr: 10.0.16.1
+ aaf_ip_addr: 10.0.13.1
###########################
# #
@@ -146,6 +149,9 @@ parameters:
esr_docker: ${ESR_SERVER_DOCKER}
dgbuilder_docker: ${CCSDK_DGBUILDER_IMAGE_DOCKER}
cli_docker: ${CLI_DOCKER}
+ music_docker: ${MUSIC_DOCKER}
+ oof_docker: ${OOF_DOCKER}
+ aaf_docker: ${AAF_DOCKER}
vfc_nokia_docker: ${NOKIA_DOCKER}
vfc_ztevnfmdriver_docker: ${ZTEVNFMDRIVER_DOCKER}