...
Executing this docker-compose.yml file will create and launch the containers. Navigate to <path>/ccsdk/distribution/src/main/yml yaml and enter the commands as in the sample terminal session below (the credentials to login to NEXUS_DOCKER_REPO are docker:docker). If you are executing this command for the first time, you will see output as the images are downloaded and extracted.
...
Code Block | ||
---|---|---|
| ||
%: docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7fd4d8d8ab15 nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image:0.3-STAGING-latest "/bin/bash -c 'cd /o…" 2 minutes ago Up 2 minutes 0.0.0.0:3000->3100/tcp ccsdk_dgbuilder_container cded16733254 nexus3.onap.org:10001/onap/ccsdk-odlsli-image:0.3-STAGING-latest "/opt/onap/ccsdk/bin…" 2 minutes ago Up 2 minutes 0.0.0.0:8383->8181/tcp ccsdk_odlsli_container 1880decd2cfc mysql/mysql-server:5.6 "/entrypoint.sh mysq…" 2 minutes ago Up 2 minutes (healthy) 0.0.0.0:32789->3306/tcp ccsdk_db_container |
You And you can browse to the OpenDaylight apidoc/explorer. Note that port 8383 in the host is forwarded to port 8181 in the odlsli container, and the credentials are not the usual "admin:admin." The password is shown below in the annotated startODL.sh file below.
...
ODLSLI pom.xml: Preliminaries and setting the version value of the ODLSLI docker image
ODLSLI pom.xml: Prepare the directories and files for a 'docker build' command
The pom.xml file uses three phases in the build life cycle to prepare the directory structure and files in ./target/docker-stage prior to build building the docker containerimage. They are:
- validate
- plugin: org.codehaus.groovy.maven : gmavin-plugin (described above)
- set the version of the ODLSLI docker image to be used in NEXUS_DOCKER_REPO
- Note: the name of the image is set in the property 'image.name' in the pom.xml properties section.
- plugin: maven-resources-plugin
- goal: copy-resources
- id: copy-dockerfile
- copy Docker file
- from ./src/main/docker/
- to ./target/docker-stage/
- id: copy-scripts
- copy all of the scripts (*.sh files)
- from ./src/main/scripts/
- to ./target/docker-stage/opt/onap/ccsdk/bin/
- id: copy-odl-resources
- copy the files:
idmlight.db.mv.db
org.ops4j.pax.logging.cfg
install_ccsdk.yml
ansible-sources.list
- from ./src/main/resources/
- to ./target/docker-stage/
- copy the files:
- id: copy-config
- copy the file org.ops4j.pax.logging.cfg
- from ./src/main/resources/
- to ./target/docker-stage/
- id: copy-data
- copy all of the MySQL databases (*.dump)
- from ./src/main/resources/
- to ./target/docker-stage/opt/onap/ccsdk/data/
- id: copy-properties
- copy all of the properties files (*.properties)
- from ./src/main/properties/
- to ./target/docker-stage/opt/onap/ccsdk/data/properties/
- id: copy-keystores
- copy all *.jks files
- from ./src/main/stores/
- to ./target/docker-stage/opt/onap/ccsdk/data/stores/
- id: copy-dockerfile
- goal: copy-resources
- plugin: org.codehaus.groovy.maven : gmavin-plugin (described above)
- generate-sources
- plugin: org.apache.maven.plugins : maven-dependency-plugin
- goal: unpack-dependencies
- id: "unpack features"
- unzip all of the dependencies
- from a local or remote Maven repository
- to ./target/docker-stage
- Note: all of the zipped features are rooted at the "system" folder, so they will be unzipped into the proper structure for the OpenDaylight feature repository.
- id: "unpack features"
- goal: unpack
- id: "unpack dgs"
- Unzip the zipped artifact org.onap.ccsdk.distribution : platform-logic-installer : ${project.version}
- from a local or remote Maven repository
- to .target/docker-stage/opt/onap/ccsdk/
- Note: this unzips the artifact into the home directory of user ccsdk in the docker container
- id: "unpack dgs"
- goal: unpack-dependencies
- plugin: org.apache.maven.plugins : maven-dependency-plugin
- process-sources
- plugin: org.codehaus.mojo : exec-maven-plugin
- goal: exec
- id: "change shell permissions"
- This executes the following command in the local computer:
- find ./target/docker-stage/opt/onap/ccsdk -name "*.sh" -exec chmod +x {} \;
- I.e., make all of the bash scripts in the ccsdk home directory executable.
- id: "change shell permissions"
- goal: exec
- plugin: org.codehaus.mojo : exec-maven-plugin
...
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 containerzip file that is included in the dependencies section of the ODLSLI pom.xml file.
Taking a look at the pom.xml file.
...