Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

What should ONAP teams to onboard a new component? Just provide the VM specs that they want, we will create the VM accordingly. We will also create <component_name>_install.sh


Make sure that all the component-specific configuration is in the Gerrit repository

<component_name>_install.sh will take care of cloning the Gerrit repository of the component, if needed, for example:


# Clone Gerrit repository and run docker containers

cd /opt

git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO


This is required if the component has some specific configuration to use during the installation process.

What should ONAP teams do? Please let us know if you need this step. If so, please make sure that configuration files are updated.


Prepare installation scripts that install software dependencies and docker containers

<component_name>_vm_init.sh downloads and installs docker containers. This script may vary from component to component, depending on the strategy each team adopts. For example:

  • DCAE GEN 1, AAI, MSO, MESSAGE ROUTER, have custom scripts that are used to download and run docker images. Hence, the only thing that <component_name>_vm_init.sh does is to call the custom script. The following example shows the content of dcae_vm_init.sh:

#!/bin/bash

export MTU=$(/sbin/ifconfig|grepMTU|sed's/.*MTU://'|sed's/.*//'|sort-n|head-1)

cd /opt/dcae-startup-vm-controller

git pull

bash init.sh

make up

  • Some teams use docker compose to run docker containers, while other teams prefer docker run. Here is the content of vid_vm_init.sh, which uses docker run:

#!/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)

cd /opt/vid

git pull

cd /opt


docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD$NEXUS_DOCKER_REPO

docker pull $NEXUS_DOCKER_REPO/openecomp/vid:$DOCKER_IMAGE_VERSION

docker pull $NEXUS_DOCKER_REPO/library/mariadb:10


docker rm -f vid-mariadb

docker rm -f vid-server


docker run --name vid-mariadb -e MYSQL_DATABASE=vid_openecomp_epsdk -e MYSQL_USER=vidadmin -e MYSQL_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -e MYSQL_ROOT_PASSWORD=LF+tp_1WqgSY -v /opt/vid/lf_config/vid-my.cnf:/etc/mysql/my.cnf -v /opt/vid/lf_config/vid-pre-init.sql:/docker-entrypoint-initdb.d/vid-pre-init.sql -v /var/lib/mysql -d mariadb:10


docker run -e VID_MYSQL_DBNAME=vid_openecomp_epsdk -e VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U --name vid-server -p 8080:8080 --link vid-mariadb:vid-mariadb-docker-instance -d $NEXUS_DOCKER_REPO/openecomp/vid:$DOCKER_IMAGE_VERSION


Parameter names in capital letters are those passed via Heat template to the VM. Then, the script logs into the docker hub and download containers. Finally, docker run is used to launch those containers.

What should ONAP teams do? Please help us build the <component_name>_vm_init.sh script. This should contain the logic that runs the docker images. Feel free to choose your preferred strategy.