Introduction
This page discusses the process to install SDNR/SDNC into the ONAP installation at OWL (ONAP Wireless Laboratory) in WINLAB at Rutgers University. The ONAP installation itself is described in the wiki page ONAP Wireless Laboratory (OWL) at Wireless Information Network Laboratory (WINLAB). This page describes how to install a development Docker image of SDNC into ONAP rather than the default image taken from the nexus3.onap.org:10001 repository.
Procedure
Given the close deadline for the proof-of-concept, we have decided to develop our code in a github site that is outside of the ONAP gerrit (there is a description at this wiki page). The starting point for the code will be a branch of the ONAP gerrit, and we will fully conform with ONAP practices with the intention of submitting the code to the ONAP gerrit after the proof-of-concept. The OOM Rancher/Kubernetes helm charts are structured to install SDNC, and we have agreed to install the karaf features into CCSDK and then create a SDNC docker image from that CCSDK image. This is in accord with the policy of keeping features in CCSDK and will help us better leverage the work of the OOM group. We have also agreed to use the Casablanca branch of both CCSDK and SDNC rather than the master branch because the master branch has been updated to evolve into Dublin and Casablaca will be a stable environment as we work on the proof-of-concept.
We have described the procedure to install a new karaf feature into CCSDK in a set of wiki pages at SDNR Developer Guide. This page begins with the assumption that you have installed your features and included them in the "component meta-feature" for the repository ccsdk/features/sdnr/northbound.
Create a custom CCSDK Docker image
The first step is to create a CCSDK docker image with the desired features. The procedure to do this is the same as that described at SDNR Developer Guide except we are using the Casablanca branch, which requires two principal changes:
- Update the version values of the maven artifacts to the values in the Casablanca branch
- Modify the version of the OpenDaylight Oxygen Docker image that is used as the starting point for the CCSDK Docker image
This code is taken from ccsdk/sli/core/sliapi and ccsdk/distribution/pom.xml and shows the version numbers for the parent pom.xml files and artifacts. We can use version "1.1.2-SNAPSHOT" for the CCSDK parent poms and "0.3.2-SNAPSHOT" for the artifacts.
<parent>$ <groupId>org.onap.ccsdk.parent</groupId>$ <artifactId>single-feature-parent</artifactId>$ <version>1.1.2-SNAPSHOT</version>$ <relativePath/>$ </parent>$ <parent>$ <groupId>org.onap.ccsdk.parent</groupId>$ <artifactId>feature-repo-parent</artifactId>$ <version>1.1.2-SNAPSHOT</version>$ <relativePath/>$ </parent>$ <parent>$ <groupId>org.onap.ccsdk.parent</groupId>$ <artifactId>odlparent-lite</artifactId>$ <version>1.1.2-SNAPSHOT</version>$ <relativePath/>$ </parent>$ <parent>$ <groupId>org.onap.ccsdk.parent</groupId>$ <artifactId>binding-parent</artifactId>$ <version>1.1.2-SNAPSHOT</version>$ <relativePath/>$ </parent>$ <groupId>org.onap.ccsdk.distribution</groupId> <artifactId>distribution-odlsli</artifactId> <version>0.3.2-SNAPSHOT</version> <packaging>pom</packaging>
The Dockerfile in ccsdk/distribution/odlsli/src/main/docker that creates the CCSDK Docker images needs to be updated with the correct tag for the OpenDaylight Oxygen image. Change:
# Base ubuntu with added packages needed for open ecomp FROM onap/ccsdk-odl-oxygen-image:${project.version}
To:
# Base ubuntu with added packages needed for open ecomp FROM onap/ccsdk-odl-oxygen-image:0.3.2-STAGING
In the original code, ${project.version} is replaced with "0.3.2-SNAPSHOT," and there is no image with that tag in the nexus3 repository. This is a temporary condition as the Casablanca release goes through the approval process. Also, notice that the Dockerfile assumes a local copy of the image, so one should login to nexus3.onap.org:1001, pull down the image and rename it from nexus3.onap.org:1001/onap/ccsdk-odl-oxygen-image:0.3.2-STAGING to onap/ccsdk-odl-oxygen-image:0.3.2-STAGING. (Please edit this page to correct any errors or make improvements.) After making these changes, one can navigate to the ccsdk/distribution/odlsli directory and execute the command "mvn clean install -P docker" to create a new CCSDK Docker image that includes the new features for the proof-of-concept. The code below shows the generated images.
% docker images REPOSITORY TAG IMAGE ID CREATED SIZE onap/ccsdk-odlsli-image 0.3-STAGING-latest dc4309c12ee4 31 seconds ago 1.81GB onap/ccsdk-odlsli-image 0.3.2-SNAPSHOT dc4309c12ee4 31 seconds ago 1.81GB onap/ccsdk-odlsli-image 0.3.2-SNAPSHOT-STAGING-20181108T170427Z dc4309c12ee4 31 seconds ago 1.81GB onap/ccsdk-odlsli-image latest dc4309c12ee4 31 seconds ago 1.81GB nexus3.onap.org:10001/onap/ccsdk-odl-oxygen-image 0.3.2-STAGING ebc754e1a8b0 37 hours ago 1.69GB onap/ccsdk-odl-oxygen-image 0.3.2-STAGING ebc754e1a8b0 37 hours ago 1.69GB ...
To minimize confusion, I chose to rename the image to something meaningful for the proof-of-concept: oof-pci/ccsdk-odlsli-image:0.3.2-SNAPSHOT.
Create a custom SDNC Docker image
The next step is to create a custom SDNC Docker image from the newly created CCSDK image. Navigate to sdnc/oam/installation/sdnc and inspect two files:
- sdnc/oam/installation/sdnc/pom.xml
- sdnc/oam/installation/sdnc/installation/sdnc/src/main/docker/Dockerfile
The relevant part of sdnc/oam/installation/sdnc/pom.xml is:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> <version>1.1.2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <packaging>pom</packaging> <groupId>org.onap.sdnc.oam</groupId> <artifactId>installation-sdnc</artifactId> <version>1.4.2-SNAPSHOT</version> <name>sdnc-oam :: installation :: ${project.artifactId}</name> <description>Creates SDN Controller Docker container</description> <properties> <image.name>onap/sdnc-image</image.name> <sdnc.project.version>${project.version}</sdnc.project.version> <sdnc.northbound.version>1.4.2-SNAPSHOT</sdnc.northbound.version> <ccsdk.docker.version>0.3-STAGING-latest</ccsdk.docker.version> <sdnc.keystore>keystore.sdnc.p12</sdnc.keystore> <sdnc.keypass>onap3.0</sdnc.keypass> <sdnc.secureport>8443</sdnc.secureport> <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy> <docker.push.phase>deploy</docker.push.phase> <docker.verbose>true</docker.verbose> <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> </properties> ...
Notice that the version number for the Casablanca branch of SDNC is 1.4.2-SNAPSHOT, which differs from the version for CCSDK: 0.3.2-SNAPSHOT. Also, it specifies a property for the tag of the CCSDK Docker image as "0.3-STAGING-latest." The file sdnc/oam/installation/sdnc/installation/sdnc/src/main/docker/Dockerfile shows:
# Base ubuntu with added packages needed for open ecomp FROM onap/ccsdk-odlsli-image:${ccsdk.docker.version} ...
One can set the tag for the CCSDK Docker image in either file. I chose to set it in the Dockerfile.
# Base ubuntu with added packages needed for open ecomp # FROM onap/ccsdk-odlsli-image:${ccsdk.docker.version} FROM oof-pci/ccsdk-odlsli-image:0.3.2-SNAPSHOT ...
With that single change, one can navigate to sdnc/oam/installation/sdnc and execute the command "mvn clean install -P docker" to create the custom SDNC image. One now has these images.
% docker images REPOSITORY TAG IMAGE ID CREATED SIZE onap/sdnc-image 1.4-STAGING-latest 4bb8c2f04a35 12 seconds ago 1.85GB onap/sdnc-image 1.4.2-SNAPSHOT 4bb8c2f04a35 12 seconds ago 1.85GB onap/sdnc-image 1.4.2-SNAPSHOT-STAGING-20181108T173140Z 4bb8c2f04a35 12 seconds ago 1.85GB onap/sdnc-image latest 4bb8c2f04a35 12 seconds ago 1.85GB onap/ccsdk-odlsli-image 0.3-STAGING-latest dc4309c12ee4 27 minutes ago 1.81GB onap/ccsdk-odlsli-image 0.3.2-SNAPSHOT dc4309c12ee4 27 minutes ago 1.81GB onap/ccsdk-odlsli-image 0.3.2-SNAPSHOT-STAGING-20181108T170427Z dc4309c12ee4 27 minutes ago 1.81GB onap/ccsdk-odlsli-image latest dc4309c12ee4 27 minutes ago 1.81GB oof-pci/ccsdk-odlsli-image 0.3.2-SNAPSHOT dc4309c12ee4 27 minutes ago 1.81GB nexus3.onap.org:10001/onap/ccsdk-odl-oxygen-image 0.3.2-STAGING ebc754e1a8b0 37 hours ago 1.69GB onap/ccsdk-odl-oxygen-image 0.3.2-STAGING ebc754e1a8b0 37 hours ago 1.69GB ...
Upload the development SDNC Docker image to Docker hub
We now have a development SDNC Docker image, and we want to install it into ONAP at OWL. We are using the OOM Rancher/Kubernetes approach to installing ONAP, and their scripts pull all of the Docker images from the nexus3.onap.org repository. To pull down our development image, we must first push it to a Docker repository, but we cannot push it to nexus3 because of access restrictions. I am using a separate repository in an account in the public Docker hub repository, and I can provide access to others. We can modify this if it makes sense. So, the next step is to push the new image to that Docker hub. I first rename the image to something meaningful to the proof-of-concept and then push it.
% docker login --username ft3e0tab7p92qsoceonq % docker tag onap/sdnc-image:1.4.2-SNAPSHOT ft3e0tab7p92qsoceonq/oof-pci-sdnr:1.4.2-SNAPSHOT % docker push ft3e0tab7p92qsoceonq/oof-pci-sdnr:1.4.2-SNAPSHOT The push refers to repository [docker.io/ft3e0tab7p92qsoceonq/oof-pci-sdnr] 03e7ad007451: Pushed a0a1cf35dfbe: Pushed a07a5ef548f3: Pushed 00f72359482f: Pushed e8bd422087d4: Pushed e2049f74dbc7: Pushed a6be3b814740: Pushed 2aee35f4b0cf: Pushed cdfcf3c88e0c: Pushed 079c4c5e0c3b: Pushed c4645863df89: Pushed c931e6de9fae: Pushed dda32bf9f38e: Pushed a9d2e609edd2: Pushed 7f1e7f156f10: Pushed fd502652d1b6: Pushed 1be2b014d5b5: Pushed 95002f737271: Pushed daf5c98fd708: Pushed 6ddb554c87b4: Pushed 095019da6309: Pushed 6aaca5663342: Pushed 493565e7bfc4: Pushed a211906d4a22: Pushed 5d3087e4738c: Pushed 2940f1099458: Pushed f17a07942400: Pushed 93c6b053ea3a: Layer already exists ba2b9e9c0ba4: Layer already exists 2ee1b8bcd8b9: Layer already exists 8814cf621812: Layer already exists f332a5c37505: Layer already exists f1dfa8049aa6: Layer already exists 79109c0f8a0b: Layer already exists 33db8ccd260b: Layer already exists b8c891f0ffec: Layer already exists 1.4.2-SNAPSHOT: digest: sha256:381f062e441ae3ea32413f002a6cac83161d8280edcee1b85c5257889a024420 size: 7848
Installing the development SDNC Docker image into ONAP
The instructions to create an ONAP installation using the OOM Rancher/Kubernetes approach are in the ONAP wiki site (be sure to select the Casablanca version of the instructions). Once installed, there are further instructions on deploying ONAP at this wiki page. To install the development image rather than the nexus3 image, we must update parameter values in the Helm chart for SDNC in the OOM repository, shown here.
oom ??? docs ??? kubernetes ... ? ??? sdnc ? ? ??? charts ? ? ? ??? dmaap-listener ? ? ? ??? sdnc-ansible-server ? ? ? ??? sdnc-portal ? ? ? ??? ueb-listener ? ? ??? resources ? ? ??? sdnc-prom ? ? ??? templates ? ? ??? values.yaml ... ??? TOSCA