aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2017-08-29 10:38:08 -0400
committerMarco Platania <platania@research.att.com>2017-08-29 10:38:08 -0400
commit569b54f0659cc790c0c9c2eec3a72884b6162626 (patch)
tree4e6c0e3d935c6dd0bfa956c366a6834c4373175c
parent0c1136ad3537b872565bb622df7e7167f6365f4a (diff)
Add CLAMP VM to ONAP
- Extend Heat templates with CLAMP resources definition - Create installation scripts for CLAMP - Update DNS configuration Change-Id: I1db7f884f8318eceb74dace972f8ad808ac8551d Issue-ID: INT-115 Signed-off-by: Marco Platania <platania@research.att.com>
-rw-r--r--boot/bind_zones9
-rw-r--r--boot/clamp_install.sh111
-rw-r--r--boot/clamp_serv.sh98
-rw-r--r--boot/clamp_vm_init.sh12
-rw-r--r--boot/db_simpledemo_openecomp_org11
-rw-r--r--boot/dns_install.sh1
-rw-r--r--heat/ONAP/onap_openstack.env2
-rw-r--r--heat/ONAP/onap_openstack.yaml89
-rw-r--r--heat/ONAP/onap_openstack_float.env3
-rw-r--r--heat/ONAP/onap_openstack_float.yaml94
-rw-r--r--heat/ONAP/onap_openstack_nofloat.env2
-rw-r--r--heat/ONAP/onap_openstack_nofloat.yaml88
-rw-r--r--heat/ONAP/onap_rackspace.env1
-rw-r--r--heat/ONAP/onap_rackspace.yaml71
14 files changed, 585 insertions, 7 deletions
diff --git a/boot/bind_zones b/boot/bind_zones
index 01d8128c..83b9f873 100644
--- a/boot/bind_zones
+++ b/boot/bind_zones
@@ -69,9 +69,13 @@ vm1.portal.simpledemo.openecomp.org. IN A portal_ip_addr
c1.vm1.portal.simpledemo.openecomp.org. IN A portal_ip_addr
c2.vm1.portal.simpledemo.openecomp.org. IN A portal_ip_addr
+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.mr.simpledemo.openecomp.org. IN A mr_ip_addr
+vm1.mr.simpledemo.openecomp.org. IN A mr_ip_addr
;CNAMES
@@ -115,5 +119,8 @@ collector.api.simpledemo.openecomp.org. IN A dcae_coll_ip_addr
;dbc.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org.
;drprov.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org.
+CLAMP
+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.
diff --git a/boot/clamp_install.sh b/boot/clamp_install.sh
new file mode 100644
index 00000000..03af2301
--- /dev/null
+++ b/boot/clamp_install.sh
@@ -0,0 +1,111 @@
+#!/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)
+OPENSTACK_API_KEY=$(cat /opt/config/openstack_api_key.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" ]]
+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
+add-apt-repository -y ppa:openjdk-r/ppa
+apt-get update
+apt-get install -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/clamp_vm_init.sh -o /opt/clamp_vm_init.sh
+curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/clamp_serv.sh -o /opt/clamp_serv.sh
+chmod +x /opt/clamp_vm_init.sh
+chmod +x /opt/clamp_serv.sh
+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
+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
+cd /opt
+git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO
+
+# Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes
+if [[ $CLOUD_ENV != "rackspace" ]]
+then
+ sed -i "s/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub
+ grub-mkconfig -o /boot/grub/grub.cfg
+ sed -i "s/ens[0-9]*/eth0/g" /etc/network/interfaces.d/*.cfg
+ sed -i "s/ens[0-9]*/eth0/g" /etc/udev/rules.d/70-persistent-net.rules
+ echo 'network: {config: disabled}' >> /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
+ echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
+ reboot
+fi
+
+# Run docker containers. For openstack Ubuntu 16.04 images this will run as a service after the VM has restarted
+./clamp_vm_init.sh
diff --git a/boot/clamp_serv.sh b/boot/clamp_serv.sh
new file mode 100644
index 00000000..ed311849
--- /dev/null
+++ b/boot/clamp_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="./clamp_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/clamp_vm_init.sh b/boot/clamp_vm_init.sh
new file mode 100644
index 00000000..997e5566
--- /dev/null
+++ b/boot/clamp_vm_init.sh
@@ -0,0 +1,12 @@
+#!/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)
+DMAAP_TOPIC=$(cat /opt/config/dmaap_topic.txt)
+OPENSTACK_USERNAME=$(cat /opt/config/openstack_username.txt)
+OPENSTACK_APIKEY=$(cat /opt/config/api_key.txt)
+
+# Fetch the latest code/scripts
+cd /opt/clamp
+git pull
diff --git a/boot/db_simpledemo_openecomp_org b/boot/db_simpledemo_openecomp_org
index 4209bfe0..65c8265f 100644
--- a/boot/db_simpledemo_openecomp_org
+++ b/boot/db_simpledemo_openecomp_org
@@ -69,9 +69,13 @@ vm1.portal.simpledemo.openecomp.org. IN A 10.0.9.1
c1.vm1.portal.simpledemo.openecomp.org. IN A 10.0.9.1
c2.vm1.portal.simpledemo.openecomp.org. IN A 10.0.9.1
-vm1.aaf.simpledemo.openecomp.org. IN A 10.0.12.1
+vm1.aaf.simpledemo.openecomp.org. IN A 10.0.13.1
-vm1.mr.simpledemo.openecomp.org. IN A 10.0.11.1
+vm1.mr.simpledemo.openecomp.org. IN A 10.0.11.1
+
+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
;CNAMES
@@ -115,5 +119,8 @@ collector.api.simpledemo.openecomp.org. IN A 10.0.4.102
;dbc.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org.
;drprov.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org.
+CLAMP
+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.
diff --git a/boot/dns_install.sh b/boot/dns_install.sh
index e76f371a..48c402c8 100644
--- a/boot/dns_install.sh
+++ b/boot/dns_install.sh
@@ -79,6 +79,7 @@ then
sed -i "s/sdnc_ip_addr/"$(cat /opt/config/sdnc_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
sed -i "s/vid_ip_addr/"$(cat /opt/config/vid_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
sed -i "s/dcae_coll_ip_addr/"$(cat /opt/config/dcae_coll_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
fi
# Configure Bind
diff --git a/heat/ONAP/onap_openstack.env b/heat/ONAP/onap_openstack.env
index 4b13a466..964ec080 100644
--- a/heat/ONAP/onap_openstack.env
+++ b/heat/ONAP/onap_openstack.env
@@ -89,6 +89,7 @@ parameters:
sdc_ip_addr: 10.0.3.1
sdnc_ip_addr: 10.0.7.1
vid_ip_addr: 10.0.8.1
+ clamp_ip_addr: 10.0.12.1
dcae_coll_float_ip: PUT DCAE COLLECTOR FLOATING IP HERE
dcae_db_float_ip: PUT DCAE DATABASE FLOATING IP HERE
@@ -133,3 +134,4 @@ parameters:
sdc_repo: http://gerrit.onap.org/r/sdc.git
sdnc_repo: http://gerrit.onap.org/r/sdnc/oam.git
vid_repo: http://gerrit.onap.org/r/vid.git
+ clamp_repo: http://gerrit.onap.org/r/clamp.git
diff --git a/heat/ONAP/onap_openstack.yaml b/heat/ONAP/onap_openstack.yaml
index 10396c26..a99054c1 100644
--- a/heat/ONAP/onap_openstack.yaml
+++ b/heat/ONAP/onap_openstack.yaml
@@ -232,6 +232,10 @@ parameters:
type: string
description: VID IP Address
+ clamp_ip_addr:
+ type: string
+ description: CLAMP IP Address
+
dcae_coll_float_ip:
type: string
description: DCAE Collector Floating IP Address
@@ -340,6 +344,10 @@ parameters:
type: string
description: VID repository
+ clamp_repo:
+ type: string
+ description: CLAMP repository
+
#############
# #
@@ -450,6 +458,7 @@ resources:
__sdc_ip_addr__: { get_param: sdc_ip_addr }
__sdnc_ip_addr__: { get_param: sdnc_ip_addr }
__vid_ip_addr__: { get_param: vid_ip_addr }
+ __clamp_ip_addr__: { get_param: clamp_ip_addr }
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
template: |
@@ -475,6 +484,7 @@ resources:
echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
+ echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
echo "__external_dns__" > /opt/config/external_dns.txt
# Download and run install script
@@ -1410,4 +1420,81 @@ resources:
curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
cd /opt
chmod +x appc_install.sh
- ./appc_install.sh \ No newline at end of file
+ ./appc_install.sh
+
+
+ # CLAMP instantiation
+ clamp_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
+
+ clamp_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: clamp_private_port }
+
+ clamp_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1604_image }
+ flavor: { get_param: flavor_medium }
+ name:
+ str_replace:
+ template: base-clamp
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: clamp_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 }
+ __openstack_username__: { get_param: openstack_username }
+ __openstack_tenant_id__: { get_param: openstack_tenant_id }
+ __openstack_api_key__: { get_param: openstack_api_key }
+ __openstack_region__: { get_param: openstack_region }
+ __keystone_url__: { get_param: keystone_url }
+ __dmaap_topic__: { get_param: dmaap_topic }
+ __artifacts_version__: { get_param: artifacts_version }
+ __dns_ip_addr__: { get_param: dns_ip_addr }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ __clamp_repo__: { get_param: clamp_repo }
+ 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 "__dmaap_topic__" > /opt/config/dmaap_topic.txt
+ echo "__openstack_username__" > /opt/config/openstack_username.txt
+ echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
+ echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
+ echo "__openstack_region__" > /opt/config/openstack_region.txt
+ echo "__keystone_url__" > /opt/config/keystone.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+ echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__external_dns__" > /opt/config/external_dns.txt
+ echo "__clamp_repo__" > /opt/config/remote_repo.txt
+
+ # Download and run install script
+ curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
+ cd /opt
+ chmod +x clamp_install.sh
+ ./clamp_install.sh \ No newline at end of file
diff --git a/heat/ONAP/onap_openstack_float.env b/heat/ONAP/onap_openstack_float.env
index e2baf6ea..bbc70199 100644
--- a/heat/ONAP/onap_openstack_float.env
+++ b/heat/ONAP/onap_openstack_float.env
@@ -92,6 +92,7 @@ parameters:
sdc_float_ip: PUT SDC FLOATING IP HERE
sdnc_float_ip: PUT SDN-C FLOATING IP HERE
vid_float_ip: PUT VID FLOATING IP HERE
+ clamp_float_ip: PUT CLAMP FLOATING IP HERE
### Private IP addresses ###
@@ -115,6 +116,7 @@ parameters:
sdc_ip_addr: 10.0.3.1
sdnc_ip_addr: 10.0.7.1
vid_ip_addr: 10.0.8.1
+ clamp_ip_addr: 10.0.12.1
###########################
# #
@@ -152,3 +154,4 @@ parameters:
sdc_repo: http://gerrit.onap.org/r/sdc.git
sdnc_repo: http://gerrit.onap.org/r/sdnc/oam.git
vid_repo: http://gerrit.onap.org/r/vid.git
+ clamp_repo: http://gerrit.onap.org/r/clamp.git
diff --git a/heat/ONAP/onap_openstack_float.yaml b/heat/ONAP/onap_openstack_float.yaml
index bc15fa7f..74e24e46 100644
--- a/heat/ONAP/onap_openstack_float.yaml
+++ b/heat/ONAP/onap_openstack_float.yaml
@@ -236,6 +236,10 @@ parameters:
type: string
description: VID Floating IP Address
+ clamp_float_ip:
+ type: string
+ description: CLAMP Floating IP Address
+
### Private IP addresses ###
oam_network_cidr:
type: string
@@ -313,6 +317,10 @@ parameters:
type: string
description: VID IP Address
+ clamp_ip_addr:
+ type: string
+ description: CLAMP IP Address
+
###########################
# #
@@ -402,6 +410,10 @@ parameters:
type: string
description: VID repository
+ clamp_repo:
+ type: string
+ description: CLAMP repository
+
#############
# #
@@ -516,6 +528,7 @@ resources:
__sdc_ip_addr__: { get_param: sdc_ip_addr }
__sdnc_ip_addr__: { get_param: sdnc_ip_addr }
__vid_ip_addr__: { get_param: vid_ip_addr }
+ __clamp_ip_addr__: { get_param: clamp_ip_addr }
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
template: |
@@ -541,6 +554,7 @@ resources:
echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
+ echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
echo "__external_dns__" > /opt/config/external_dns.txt
# Download and run install script
@@ -1488,4 +1502,82 @@ resources:
curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
cd /opt
chmod +x appc_install.sh
- ./appc_install.sh \ No newline at end of file
+ ./appc_install.sh
+
+
+ # CLAMP instantiation
+ clamp_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
+
+ clamp_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: clamp_private_port }
+ floating_ip_address: { get_param: clamp_float_ip }
+
+ clamp_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1604_image }
+ flavor: { get_param: flavor_medium }
+ name:
+ str_replace:
+ template: base-clamp
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: clamp_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 }
+ __openstack_username__: { get_param: openstack_username }
+ __openstack_tenant_id__: { get_param: openstack_tenant_id }
+ __openstack_api_key__: { get_param: openstack_api_key }
+ __openstack_region__: { get_param: openstack_region }
+ __keystone_url__: { get_param: keystone_url }
+ __dmaap_topic__: { get_param: dmaap_topic }
+ __artifacts_version__: { get_param: artifacts_version }
+ __dns_ip_addr__: { get_param: dns_ip_addr }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ __clamp_repo__: { get_param: clamp_repo }
+ 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 "__dmaap_topic__" > /opt/config/dmaap_topic.txt
+ echo "__openstack_username__" > /opt/config/openstack_username.txt
+ echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
+ echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
+ echo "__openstack_region__" > /opt/config/openstack_region.txt
+ echo "__keystone_url__" > /opt/config/keystone.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+ echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__external_dns__" > /opt/config/external_dns.txt
+ echo "__clamp_repo__" > /opt/config/remote_repo.txt
+
+ # Download and run install script
+ curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
+ cd /opt
+ chmod +x clamp_install.sh
+ ./clamp_install.sh \ No newline at end of file
diff --git a/heat/ONAP/onap_openstack_nofloat.env b/heat/ONAP/onap_openstack_nofloat.env
index 0987d580..1ef3c753 100644
--- a/heat/ONAP/onap_openstack_nofloat.env
+++ b/heat/ONAP/onap_openstack_nofloat.env
@@ -86,6 +86,7 @@ parameters:
sdc_ip_addr: 10.0.3.1
sdnc_ip_addr: 10.0.7.1
vid_ip_addr: 10.0.8.1
+ clamp_ip_addr: 10.0.12.1
###########################
@@ -125,3 +126,4 @@ parameters:
sdc_repo: http://gerrit.onap.org/r/sdc.git
sdnc_repo: http://gerrit.onap.org/r/sdnc/oam.git
vid_repo: http://gerrit.onap.org/r/vid.git
+ clamp_repo: http://gerrit.onap.org/r/clamp.git
diff --git a/heat/ONAP/onap_openstack_nofloat.yaml b/heat/ONAP/onap_openstack_nofloat.yaml
index 59b97026..05ba2239 100644
--- a/heat/ONAP/onap_openstack_nofloat.yaml
+++ b/heat/ONAP/onap_openstack_nofloat.yaml
@@ -228,6 +228,10 @@ parameters:
type: string
description: VID IP Address
+ clamp_ip_addr:
+ type: string
+ description: CLAMP IP Address
+
###########################
# #
@@ -317,6 +321,10 @@ parameters:
type: string
description: VID repository
+ clamp_repo:
+ type: string
+ description: CLAMP repository
+
#############
# #
@@ -409,6 +417,7 @@ resources:
__sdc_ip_addr__: { get_param: sdc_ip_addr }
__sdnc_ip_addr__: { get_param: sdnc_ip_addr }
__vid_ip_addr__: { get_param: vid_ip_addr }
+ __clamp_ip_addr__: { get_param: clamp_ip_addr }
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
template: |
@@ -434,6 +443,7 @@ resources:
echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
+ echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
echo "__external_dns__" > /opt/config/external_dns.txt
# Download and run install script
@@ -1337,4 +1347,80 @@ resources:
curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
cd /opt
chmod +x appc_install.sh
- ./appc_install.sh \ No newline at end of file
+ ./appc_install.sh
+
+
+ # CLAMP instantiation
+ clamp_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
+
+ clamp_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1604_image }
+ flavor: { get_param: flavor_medium }
+ name:
+ str_replace:
+ template: base-clamp
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - network: { get_param: public_net_id }
+ - port: { get_resource: clamp_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 }
+ __openstack_username__: { get_param: openstack_username }
+ __openstack_tenant_id__: { get_param: openstack_tenant_id }
+ __openstack_api_key__: { get_param: openstack_api_key }
+ __openstack_region__: { get_param: openstack_region }
+ __keystone_url__: { get_param: keystone_url }
+ __dmaap_topic__: { get_param: dmaap_topic }
+ __artifacts_version__: { get_param: artifacts_version }
+ __dns_ip_addr__: { get_param: dns_ip_addr }
+ __clamp_ip_addr__: { get_param: clamp_ip_addr }
+ __oam_network_cidr__: { get_param: oam_network_cidr }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ __clamp_repo__: { get_param: clamp_repo }
+ 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 "__clamp_ip_addr__" > /opt/config/local_ip_addr.txt
+ echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
+ echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
+ echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
+ echo "__openstack_username__" > /opt/config/openstack_username.txt
+ echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
+ echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
+ echo "__openstack_region__" > /opt/config/openstack_region.txt
+ echo "__keystone_url__" > /opt/config/keystone.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+ echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__external_dns__" > /opt/config/external_dns.txt
+ echo "__clamp_repo__" > /opt/config/remote_repo.txt
+
+ # Download and run install script
+ curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
+ cd /opt
+ chmod +x clamp_install.sh
+ ./clamp_install.sh \ No newline at end of file
diff --git a/heat/ONAP/onap_rackspace.env b/heat/ONAP/onap_rackspace.env
index 4f3945bf..5c82a47f 100644
--- a/heat/ONAP/onap_rackspace.env
+++ b/heat/ONAP/onap_rackspace.env
@@ -83,3 +83,4 @@ parameters:
sdc_repo: http://gerrit.onap.org/r/sdc.git
sdnc_repo: http://gerrit.onap.org/r/sdnc/oam.git
vid_repo: http://gerrit.onap.org/r/vid.git
+ clamp_repo: http://gerrit.onap.org/r/clamp.git
diff --git a/heat/ONAP/onap_rackspace.yaml b/heat/ONAP/onap_rackspace.yaml
index a5037408..260632c2 100644
--- a/heat/ONAP/onap_rackspace.yaml
+++ b/heat/ONAP/onap_rackspace.yaml
@@ -205,6 +205,10 @@ parameters:
type: string
description: VID repository
+ clamp_repo:
+ type: string
+ description: CLAMP repository
+
resources:
random-str:
@@ -1127,4 +1131,69 @@ resources:
curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
cd /opt
chmod +x appc_install.sh
- ./appc_install.sh \ No newline at end of file
+ ./appc_install.sh
+
+
+ # CLAMP instantiation
+ clamp_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": 10.0.12.1}]
+
+ clamp_vm:
+ type: OS::Nova::Server
+ properties:
+ image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
+ flavor: 4 GB General Purpose v1
+ name:
+ str_replace:
+ template: base-clamp
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - network: { get_param: public_net_id }
+ - port: { get_resource: clamp_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 }
+ __openstack_username__: { get_param: openstack_username }
+ __openstack_tenant_id__: { get_param: openstack_tenant_id }
+ __openstack_api_key__: { get_param: openstack_api_key }
+ __dmaap_topic__: { get_param: dmaap_topic }
+ __artifacts_version__: { get_param: artifacts_version }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
+ __cloud_env__: { get_param: cloud_env }
+ __mso_repo__: { get_param: clamp_repo }
+ 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 "10.0.0.1" > /opt/config/dns_ip_addr.txt
+ echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
+ echo "__openstack_username__" > /opt/config/openstack_username.txt
+ echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
+ echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+ echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__clamp_repo__" > /opt/config/remote_repo.txt
+
+ # Download and run install script
+ curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
+ cd /opt
+ chmod +x clamp_install.sh
+ ./clamp_install.sh \ No newline at end of file