aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot/nbi_install.sh18
-rw-r--r--boot/nbi_vm_init.sh16
-rwxr-xr-xboot/vfc_vm_init.sh26
-rw-r--r--heat/ONAP/onap_openstack.env2
-rw-r--r--heat/ONAP/onap_openstack.yaml9
-rw-r--r--heat/ONAP/onap_openstack_light.yaml9
6 files changed, 63 insertions, 17 deletions
diff --git a/boot/nbi_install.sh b/boot/nbi_install.sh
index c5f5ce4c..71546016 100644
--- a/boot/nbi_install.sh
+++ b/boot/nbi_install.sh
@@ -5,7 +5,9 @@ NEXUS_REPO=$(cat /opt/config/nexus_repo.txt)
ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
+GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
+CODE_REPO=$(cat /opt/config/remote_repo.txt)
# Add host name to /etc/host to avoid warnings in openstack images
if [[ $CLOUD_ENV != "rackspace" ]]
@@ -60,7 +62,7 @@ mv /opt/nbi_serv.sh /etc/init.d
update-rc.d nbi_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-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
@@ -89,6 +91,18 @@ service docker restart
echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
resolvconf -u
-# Clone Gerrit repository and run docker containers
+# 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
cd /opt
./nbi_vm_init.sh
diff --git a/boot/nbi_vm_init.sh b/boot/nbi_vm_init.sh
index f50c8986..45cce7c9 100644
--- a/boot/nbi_vm_init.sh
+++ b/boot/nbi_vm_init.sh
@@ -4,3 +4,19 @@ 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)
+
+# Fetch the latest docker-compose.yml
+cd /opt/nbi
+wget https://git.onap.org/externalapi/nbi/tree/docker-compose.yml?h=master
+
+# Pull the nbi docker image from nexus
+# MariaDB and mongoDB will be pulled automatically from docker.io during docker-compose
+docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+
+docker pull $NEXUS_DOCKER_REPO/onap/externalapi/nbi:$DOCKER_IMAGE_VERSION
+
+# Change the Clamp docker image name in the docker-compose.yml to match the one downloaded
+sed -i "/image: onap\/nbi/c\ image: $NEXUS_DOCKER_REPO\/onap\/nbi:$DOCKER_IMAGE_VERSION" docker-compose.yml
+
+# Start nbi, MariaDB and MongoDB containers with docker compose and nbi/docker-compose.yml
+/opt/docker/docker-compose up -d \ No newline at end of file
diff --git a/boot/vfc_vm_init.sh b/boot/vfc_vm_init.sh
index 63e8b54e..288404b7 100755
--- a/boot/vfc_vm_init.sh
+++ b/boot/vfc_vm_init.sh
@@ -50,19 +50,19 @@ docker rm -f vfc_svnfm_nokiav2
docker run -i -t -d --name vfc_wfengine_activiti -p 8804:8080 -e SERVICE_IP=$OPENO_IP -e SERVICE_PORT=8804 -e OPENPALETTE_MSB_IP=$OPENO_IP -e OPENPALETTE_MSB_PORT=80 $NEXUS_DOCKER_REPO/onap/vfc/wfengine-activiti:$ACTIVITI_DOCKER_VER
docker run -i -t -d --name vfc_wfengine_mgrservice -p 8805:10550 -e SERVICE_IP=$OPENO_IP -e SERVICE_PORT=8805 -e OPENPALETTE_MSB_IP=$OPENO_IP -e OPENPALETTE_MSB_PORT=80 $NEXUS_DOCKER_REPO/onap/vfc/wfengine-mgrservice:$MGRSERVICE_DOCKER_VER
docker run -i -t -d --name vfc_catalog -p 8806:8806 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/catalog:$CATALOG_DOCKER_VER
-docker run -i -t -d --name vfc_emsdriver -p 8206:8206 -e MSB_ADDR=$OPENO_IP:80 -e VES_ADDR=$DCAE_COLL_IP:8080 -e VES_AUTHINFO="":"" $NEXUS_DOCKER_REPO/onap/vfc/emsdriver:$EMSDRIVER_DOCKER_VER
-docker run -i -t -d --name vfc_gvnfmdriver -p 8484:8484 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/gvnfmdriver:$GVNFMDRIVER_DOCKER_VER
-docker run -i -t -d --name vfc_jujudriver -p 8483:8483 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/jujudriver:$JUJUDRIVER_DOCKER_VER
-docker run -i -t -d --name vfc_svnfm_huawei -p 8482:8482 -p 8443:8443 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/nfvo/svnfm/huawei:$HUAWEI_DOCKER_VER
-docker run -i -t -d --name vfc_nslcm -p 8403:8403 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/nslcm:$NSLCM_DOCKER_VER
-docker run -i -t -d --name vfc_resmanagement -p 8480:8480 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/resmanagement:$RESMANAGEMENT_DOCKER_VER
-docker run -i -t -d --name vfc_vnflcm -p 8801:8801 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/vnflcm:$VNFLCM_DOCKER_VER
-docker run -i -t -d --name vfc_vnfmgr -p 8803:8803 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/vnfmgr:$VNFMGR_DOCKER_VER
-docker run -i -t -d --name vfc_vnfres -p 8802:8802 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/vnfres:$VNFRES_DOCKER_VER
-docker run -i -t -d --name vfc_ztesdncdriver -p 8411:8411 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/ztesdncdriver:$ZTESDNCDRIVER_DOCKER_VER
-docker run -i -t -d --name vfc_ztevnfmdriver -p 8410:8410 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/ztevnfmdriver:$ZTEVNFMDRIVER_DOCKER_VER
-docker run -i -t -d --name vfc_svnfm_nokia -p 8486:8486 -e MSB_ADDR=$OPENO_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/nfvo/svnfm/nokia:$NOKIA_DOCKER_VER
-docker run -i -t -d --name vfc_multivimproxy -p 8481:8481 -e MSB_ADDR=$MSB_IP:80 $NEXUS_DOCKER_REPO/onap/vfc/multivimproxy:$MULTIVIMPROXY_DOCKER_VER
+docker run -i -t -d --name vfc_emsdriver -p 8206:8206 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP -e VES_ADDR=$DCAE_COLL_IP:8080 -e VES_AUTHINFO="":"" $NEXUS_DOCKER_REPO/onap/vfc/emsdriver:$EMSDRIVER_DOCKER_VER
+docker run -i -t -d --name vfc_gvnfmdriver -p 8484:8484 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/gvnfmdriver:$GVNFMDRIVER_DOCKER_VER
+docker run -i -t -d --name vfc_jujudriver -p 8483:8483 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/jujudriver:$JUJUDRIVER_DOCKER_VER
+docker run -i -t -d --name vfc_svnfm_huawei -p 8482:8482 -p 8443:8443 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/nfvo/svnfm/huawei:$HUAWEI_DOCKER_VER
+docker run -i -t -d --name vfc_nslcm -p 8403:8403 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/nslcm:$NSLCM_DOCKER_VER
+docker run -i -t -d --name vfc_resmanagement -p 8480:8480 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/resmanagement:$RESMANAGEMENT_DOCKER_VER
+docker run -i -t -d --name vfc_vnflcm -p 8801:8801 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/vnflcm:$VNFLCM_DOCKER_VER
+docker run -i -t -d --name vfc_vnfmgr -p 8803:8803 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/vnfmgr:$VNFMGR_DOCKER_VER
+docker run -i -t -d --name vfc_vnfres -p 8802:8802 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/vnfres:$VNFRES_DOCKER_VER
+docker run -i -t -d --name vfc_ztesdncdriver -p 8411:8411 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/ztesdncdriver:$ZTESDNCDRIVER_DOCKER_VER
+docker run -i -t -d --name vfc_ztevnfmdriver -p 8410:8410 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/ztevnfmdriver:$ZTEVNFMDRIVER_DOCKER_VER
+docker run -i -t -d --name vfc_svnfm_nokia -p 8486:8486 -e MSB_ADDR=$OPENO_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/nfvo/svnfm/nokia:$NOKIA_DOCKER_VER
+docker run -i -t -d --name vfc_multivimproxy -p 8481:8481 -e MSB_ADDR=$MSB_IP:80 -e SERVICE_IP=$OPENO_IP $NEXUS_DOCKER_REPO/onap/vfc/multivimproxy:$MULTIVIMPROXY_DOCKER_VER
CBAM_IP=$(cat /opt/config/cbam_ip.txt)
VNFM_ID=vnfmUuid
diff --git a/heat/ONAP/onap_openstack.env b/heat/ONAP/onap_openstack.env
index b88ff918..db18ee2f 100644
--- a/heat/ONAP/onap_openstack.env
+++ b/heat/ONAP/onap_openstack.env
@@ -133,6 +133,7 @@ parameters:
clamp_branch: master
vnfsdk_branch: master
music_branch: master
+ nbi_branch: master
aai_docker: 1.2-STAGING-latest
aai_sparky_docker: 1.2-STAGING-latest
@@ -222,3 +223,4 @@ parameters:
clamp_repo: http://gerrit.onap.org/r/clamp.git
vnfsdk_repo: http://gerrit.onap.org/r/vnfsdk/refrepo.git
music_repo: http://gerrit.onap.org/r/music.git
+ nbi_repo: http://gerrit.onap.org/r/externalapi/nbi.git
diff --git a/heat/ONAP/onap_openstack.yaml b/heat/ONAP/onap_openstack.yaml
index 532ddea1..b40f6fbd 100644
--- a/heat/ONAP/onap_openstack.yaml
+++ b/heat/ONAP/onap_openstack.yaml
@@ -296,6 +296,8 @@ parameters:
type: string
music_repo:
type: string
+ nbi_repo:
+ type: string
################################
# #
@@ -489,7 +491,8 @@ parameters:
type: string
music_branch:
type: string
-
+ nbi_branch:
+ type: string
#############
# #
@@ -2187,6 +2190,8 @@ resources:
__artifacts_version__: { get_param: artifacts_version }
__dns_ip_addr__: { get_param: dns_ip_addr }
__docker_version__: { get_param: nbi_docker }
+ __nbi_repo__: { get_param: nbi_repo }
+ __gerrit_branch__: { get_param: nbi_branch }
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
template: |
@@ -2201,6 +2206,8 @@ resources:
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 "__nbi_repo__" > /opt/config/remote_repo.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
diff --git a/heat/ONAP/onap_openstack_light.yaml b/heat/ONAP/onap_openstack_light.yaml
index 720b39d2..19819566 100644
--- a/heat/ONAP/onap_openstack_light.yaml
+++ b/heat/ONAP/onap_openstack_light.yaml
@@ -292,6 +292,8 @@ parameters:
type: string
music_repo:
type: string
+ nbi_repo:
+ type: string
################################
# #
@@ -412,7 +414,8 @@ parameters:
type: string
music_branch:
type: string
-
+ nbi_branch:
+ type: string
#############
# #
@@ -2065,6 +2068,8 @@ resources:
__artifacts_version__: { get_param: artifacts_version }
__dns_ip_addr__: { get_param: dns_ip_addr }
__docker_version__: { get_param: nbi_docker }
+ __nbi_repo__: { get_param: nbi_repo }
+ __gerrit_branch__: { get_param: nbi_branch }
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
template: |
@@ -2079,6 +2084,8 @@ resources:
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 "__nbi_repo__" > /opt/config/remote_repo.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