Versions Compared

Key

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

...

SDN-R is an extension of CCSDK (Common Controller Software Development KIt), and SDN-R uses the same procedure as CCSDK to create a running instance.   To begin, clone the ccsdk/distribution repository and look at the docker-compose.yml file in ccsdk/distribution/src/main/yaml.

...

Executing this docker-compose.yml file will create and launch the containers.  Below is a sample terminal session.  Navigate to <path>/ccsdk/distribution/src/main/yml and enter these commands (note that the credentials to login to NEXUS_DOCKER_REPO are docker:docker):

...

When you see the OpenDaylight banner, the CCSDK containers are running in your host, e.g.as shown below:

Code Block
titleView running docker containers
%: docker ps
CONTAINER ID        IMAGE                                                    COMMAND                  CREATED             STATUS                 PORTS                     NAMES
a2f93b2a812a        nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image:0.2.4   "/bin/bash -c 'cd /o…"   3 weeks ago         Up 2 hours             0.0.0.0:3000->3100/tcp    ccsdk_dgbuilder_container
744e3cc8a7fb        nexus3.onap.org:10001/onap/ccsdk-odlsli-image:0.2.4      "/opt/onap/ccsdk/bin…"   3 weeks ago         Up 2 hours             0.0.0.0:8383->8181/tcp    ccsdk_odlsli_container
232ec2acbd1b        mysql/mysql-server:5.6                                   "/entrypoint.sh mysq…"   3 weeks ago         Up 3 weeks (healthy)   0.0.0.0:32787->3306/tcp   ccsdk_db_container


And you You can browse to the OpenDaylight apidoc/explorer.  Note that port 8383 in the host is forwarded to port 8181 in the odlsli container.

...

Code Block
titleBash session with the odlsli container
%: docker exec -t -i ccsdk_odlsli_container /bin/bash -c 'TERM=xterm exec /bin/bash'
root@744e3cc8a7fb:/# pwd
/
root@744e3cc8a7fb:/# echo $ODL_HOME
/opt/opendaylight/current
root@744e3cc8a7fb:/# echo $SDNC_CONFIG_DIR/
/opt/onap/ccsdk/data/properties/
root@744e3cc8a7fb:/# ps -elf | grep opendaylight
4 S root         1     0  0  80   0 -  1126 wait   18:34 ?        00:00:00 /bin/sh /opt/opendaylight/current/bin/karaf
0 S root        96     1  8  80   0 - 2002545 futex_ 18:34 ?      00:10:07 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Djava.security.properties=/opt/opendaylight/current/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.security.egd=file:/dev/./urandom -Djava.endorsed.dirs=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/endorsed:/usr/lib/jvm/java-8-openjdk-amd64/lib/endorsed:/opt/opendaylight/current/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/lib/jvm/java-8-openjdk-amd64/lib/ext:/opt/opendaylight/current/lib/ext -Dkaraf.instances=/opt/opendaylight/current/instances -Dkaraf.home=/opt/opendaylight/current -Dkaraf.base=/opt/opendaylight/current -Dkaraf.data=/opt/opendaylight/current/data -Dkaraf.etc=/opt/opendaylight/current/etc -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/opt/opendaylight/current/data/tmp -Djava.util.logging.config.file=/opt/opendaylight/current/etc/java.util.logging.properties -Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight/current/lib/boot/org.apache.karaf.diagnostic.boot-4.0.10.jar:/opt/opendaylight/current/lib/boot/org.apache.karaf.jaas.boot-4.0.10.jar:/opt/opendaylight/current/lib/boot/org.apache.karaf.main-4.0.10.jar:/opt/opendaylight/current/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main
0 S root      1186  1164  0  80   0 -  2821 pipe_w 20:30 pts/0    00:00:00 grep --color=auto opendaylight
root@744e3cc8a7fb:/# cd $ODL_HOME
root@744e3cc8a7fb:/opt/opendaylight/current# ls
CONTRIBUTING.markdown  configuration  etc                lib        taglist.log
LICENSE                daexim         idmlight.db.mv.db  lock
README.markdown        data           instances          patches
bin                    deploy         journal            snapshots
build.url              derby.log      karaf.pid          system
root@744e3cc8a7fb:/opt/opendaylight/current# ./bin/client
Logging in as karaf

    ________                       ________                .__  .__       .__     __
    \_____  \ ______   ____   ____ \______ \ _____  ___.__.|  | |__| ____ |  |___/  |_
     /   |   \\____ \_/ __ \ /    \ |    |  \\__  \<   |  ||  | |  |/ ___\|  |  \   __\
    /    |    \  |_> >  ___/|   |  \|    `   \/ __ \\___  ||  |_|  / /_/  >   Y  \  |
    \_______  /   __/ \___  >___|  /_______  (____  / ____||____/__\___  /|___|  /__|
            \/|__|        \/     \/        \/     \/\/            /_____/      \/


Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

opendaylight-user@root>




...

The entrypoint script for the odlsli container

The entrypoint script for the odlsli container is /opt/onap/ccsdk/bin/startODL.sh.  Here is the home directory for the user ccsdk.

...

The features installation script

The Below is the installFeatures.sh script in CCSDK_HOME/bin installs the features into OpenDaylight.  That script is:

Code Block
titleCCSDK_HOME/features Folder
root@744e3cc8a7fb:/opt/onap/ccsdk/bin# cat $CCSDK_HOME/bin/installFeatures.sh
#!/bin/bash

###
# ============LICENSE_START=======================================================
# openECOMP : SDN-C
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights
#                                                       reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END=========================================================
###

CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}

${CCSDK_HOME}/bin/installCcsdkFeatures.sh

...

We now see how the karaf features for OpenDaylight are structured so they can be installed and OpenDaylight launched.  The next step is to understand how the installation folders in CCSDK_HOME/features are created.  A good example is the 'sliapi' feature that is part of the CCSDK_CORE_FEATURES.  In the gerrit repository, this code appears in ccsdk/sli/core/sliapi.

The sliapi directory contains the usual directories for a karaf feature with an additional directory "installer."  This directory contains the code that creates the installation folder stored in the CCSDK_HOME/features folder in the ODLSLI container.

Let's take Taking a look at the pom.xml file.

...