You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

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:

  1. Update the version values of the maven artifacts to the values in the Casablanca branch
  2. 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
...

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:

  1. sdnc/oam/installation/sdnc/pom.xml
  2. sdnc/oam/installation/sdnc/installation/sdnc/src/main/docker/Dockerfile

The relevant part of sdnc/oam/installation/sdnc/pom.xml is:

...
<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>
...

It specifies 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}
...
  • No labels