Versions Compared

Key

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

...

Test environment for creating and running docker container is located here: https://github.com/onap-oof-pci-poc/ccsdk/tree/master/distribution/odlwt-alpine-standalone-0.4.1-SNAPSHOT

Table of Contents

ONAP to ODL Dependency Background

...

Code Block
languagebash
cd ~
git clone git clone https://gerrit.onap.org/r/ccsdk/features
cd features/sdnr/wt
cp -r wt wt-0.4.1 
cd wt-0.4.1 
sed -i 's#<version>1.2.2-SNAPSHOT</version>#<version>1.2.1-SNAPSHOT</version>#g' $(find . -name "pom.xml") 
sed -i 's#<version>0.4.2-SNAPSHOT</version>#<version>0.4.1-SNAPSHOT</version>#g' $(find . -name "pom.xml")
mvn clean install

Create and run a Wireless transport micro services (wt) Container

Refering to github repository https://github.com/onap-oof-pci-poc/ccsdk with distribution/odlwt-alpine-standalone-0.4.1-SNAPSHOT

This distribution uses the ONAP ODL image "onap/ccsdk-odl-fluorine-alpine-image" to create the ONAP WT Container.

  • Container image versin 0.4.1-SNAPSHOUT with OpenDaylight Flourine SR1
  • There is no dependency to other ONAP Containers.
  • This version is including 0.4.1-SNAPSHOT features.

Configuration used by this container

  • Linux alpine as OS
  • ODL as single node or cluster node
  • Added bundles are Repository: 'ccsdk/features'/sdnr
  • ENTRYPOINT /opt/onap/ccsdk/bin/startSdnr.sh
  • ODLUX Login: - ODL Default is user here: admin/admin

Creation of 0.4.1-SNAPSHOUT Version for ODL Flourine SR1

The ONAP Dublin parents 1.2.1-SNAPSHOT and 1.2.1 are creating the bundles for ODL Flourine SR1. Parents with higher version number are creating bundles for ODL Floutine SR2.

Prerequ: Ubuntu with development setup for ONAP with access to ONAP Nexus.

Steps to create a Flourine SR1 Version, by example for using 0.4.2-SNAPSHOT:

cd features/sdnr/wt
     cp -r wt wt-0.4.1
     cd wt-0.4.1
     sed -i 's#<version>1.2.2-SNAPSHOT</version>#<version>1.2.1-SNAPSHOT</version>#g' $(find . -name "pom.xml")
     sed -i 's#<version>0.4.2-SNAPSHOT</version>#<version>0.4.1-SNAPSHOT</version>#g' $(find . -name "pom.xml")

Hint: It could occur that the versin number is used by something in the pom.xml. As a check use grep command with the version numbers to replace:

grep "<version>1\.2\.1-SNAPSHOT</version>" $(find . -name pom.xml)

Compile features and create image

After changing the version numbers a private build is required of "wireless transport" features for version "0.4.1-SNAPSHOT".

cd features/sdnr/wt
     mvn clean install

Create image with

cd distribution/odlwt-alpine-standalone-0.4.1-SNAPSHOT
     mvn clean install -P docker


Note

HINT: ONAP/Nexus does contain also a bundle with such a version number. This version is used as default if no compilation was done. Indication is such error: "[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.16.5:build (generate-images) on project distribution-odlwt-alpine: Unable to build image [oof-pci/ccsdk-odlwt-alpine-image]: COPY failed: stat /var/lib/docker/tmp/docker-builder864199067/preload.cache.schema: no such file or directory -> [Help 1]"

Parameters

  • SDNRWT true|false
    • Switch on the SDNRWT feature.

Cluster specific

  • Node index, provided via host-name
    • Format name-n
    • n defines the host index. Starts with 0 .. N-1. Index of the cluster node that is started.
  • --env SDNC_REPLICAS=n
    • n Number of cluster members.

  • --env PEERODLCLUSTER="true"
    • Set to any value for non GEO redundant setup.

  • --env ENABLEODLCLUSTER="true"
    • Mandatory to enable cluster configuration

Examples

Start single node

     docker run imageName

Start three node clusters

     docker run imageName --env NODE_INDEX="1" --env NODE_LIST="10.42.167.43 10.42.168.2 192.168.178.65"
     docker run imageName --env NODE_INDEX="2" --env NODE_LIST="10.42.167.43 10.42.168.2 192.168.178.65"
     docker run imageName --env NODE_INDEX="3" --env NODE_LIST="10.42.167.43 10.42.168.2 192.168.178.65"

Reference

Opendaylight cluster configuration

Container ports

docker run --detach --network="yaml_default" \
      --link ccsdk_db_container:dbhost --link ccsdk_db_container:sdnctldb01 --link ccsdk_db_container:sdnctldb02 \
      --publish 8181:8181 \
      --publish 8185:8185 \
      --publish 8085:8085 \
      --publish 9200:9200 \
      --env MYSQL_ROOT_PASSWORD=openECOMP1.0 \
      --env SDNC_CONFIG_DIR=/opt/onap/ccsdk/data/properties \

      --name sdnr \
    "$IMAGE"