Versions Compared

Key

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

...

Installation in Casablanca

Setting the startup features

We have described the installation procedure prior to Casablanca, and we now turn to the procedure beginning in Casablanca.  As we mentioned earlier, OpenDaylight is configured in Casablanca to install the CCSDK features upon booting up rather than afterwards in a bash script, and "component meta-features" are used rather than the individual features. OpenDaylight boots up much more quickly using this procedure.  Features to install at boot time are configured in $ODL_HOME/etc/org.apache.karaf.features.cfg in two parameters: featuresRepositories and featuresBoot.  We begin by looking in ccsdk/distribution/odlsli/src/main/docker/Dockerfile for the FROM IMAGE of the CCSDK container (master branch, 8/25/2018)::

...

  • featuresRepositories = file:${karaf.home}/etc/290021b0-51f7-4e02-8efa-007cad16f73a.xml
  • featuresBoot = 0af5d86a-980c-48a9-a02d-bdac71ff8529

Startup features in the Dockerfile FROM IMAGE

These universally unique identifiers (UUIDs) identify the startup features.  featuresRepositories references the file $ODL_HOME/etc/290021b0-51f7-4e02-8efa-007cad16f73a.xml, shown here.

...

No Format
opendaylight-user@root>feature:list -i
Name                                 | Version | Required | State   | Repository                           | Description
-------------------------------------+---------+----------+---------+--------------------------------------+--------------------------------------------------
aries-proxy                          | 4.1.5   |          | Started | standard-4.1.5                       | Aries Proxy
aries-blueprint                      | 4.1.5   |          | Started | standard-4.1.5                       | Aries Blueprint
feature                              | 4.1.5   |          | Started | standard-4.1.5                       | Features Support
shell                                | 4.1.5   |          | Started | standard-4.1.5                       | Karaf Shell
shell-compat                         | 4.1.5   |          | Started | standard-4.1.5                       | Karaf Shell Compatibility
deployer                             | 4.1.5   |          | Started | standard-4.1.5                       | Karaf Deployer
bundle                               | 4.1.5   |          | Started | standard-4.1.5                       | Provide Bundle support
config                               | 4.1.5   |          | Started | standard-4.1.5                       | Provide OSGi ConfigAdmin support
diagnostic                           | 4.1.5   |          | Started | standard-4.1.5                       | Provide Diagnostic support
instance                             | 4.1.5   |          | Started | standard-4.1.5                       | Provide Instance support
jaas                                 | 4.1.5   |          | Started | standard-4.1.5                       | Provide JAAS support
log                                  | 4.1.5   |          | Started | standard-4.1.5                       | Provide Log support
package                              | 4.1.5   |          | Started | standard-4.1.5                       | Package commands and mbeans
service                              | 4.1.5   |          | Started | standard-4.1.5                       | Provide Service support
system                               | 4.1.5   |          | Started | standard-4.1.5                       | Provide System support
kar                                  | 4.1.5   |          | Started | standard-4.1.5                       | Provide KAR (KARaf archive) support
ssh                                  | 4.1.5   |          | Started | standard-4.1.5                       | Provide a SSHd server on Karaf
management                           | 4.1.5   |          | Started | standard-4.1.5                       | Provide a JMX MBeanServer and a set of MBeans in
wrap                                 | 0.0.0   |          | Started | standard-4.1.5                       | Wrap URL handler
standard                             | 4.1.5   |          | Started | standard-4.1.5                       | Wrap feature describing all features part of a st
0af5d86a-980c-48a9-a02d-bdac71ff8529 | 0.0.0   | x        | Started | 290021b0-51f7-4e02-8efa-007cad16f73a |

Editing the parameters for the startup karaf features

The above This is the starting point for the CCSDK image.  Recall that the Dockerfile for the CCSDK image contains these commands:

...

These commands append new repositories to featuresRepositories and set featuresBoot to the desired feature names. (Note: the final content of the file is not what I expect from these commands, but the objectives of the commands are objective is achieved, i.e., the parameters are set to the correct values.)  We inspect the features.xml file for the respository repository containing our example feature sliapi.

...

ENV

...

CCSDK_SLI_CORE_REPO

...

mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.sli.core.version}/xml/features

No Format

% cd ~/.m2/repository/org/onap/ccsdk/sli/core/ccsdk-sli-core-all/0.3.0-SNAPSHOT
% cat ccsdk-sli-core-all-0.3.0-SNAPSHOT-features.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="ccsdk-sli-core-all">
    <repository>mvn:org.onap.ccsdk.sli.core/ccsdk-slicore-utils/0.3.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:org.onap.ccsdk.sli.core/ccsdk-dblib/0.3.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:org.onap.ccsdk.sli.core/ccsdk-filters/0.3.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:org.onap.ccsdk.sli.core/ccsdk-sli/0.3.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:org.onap.ccsdk.sli.core/ccsdk-sliapi/0.3.0-SNAPSHOT/xml/features</repository>
    <repository>mvn:org.onap.ccsdk.sli.core/ccsdk-sliPluginUtils/0.3.0-SNAPSHOT/xml/features</repository>
    <feature name="ccsdk-sli-core-all" description="ccsdk-sli-core :: features :: ccsdk-sli-core-all" version="0.3.0.SNAPSHOT">
        <details>Root POM to be used in place of odlparent for CCSDK based projects</details>
        <feature version="0.3.0.SNAPSHOT" prerequisite="false" dependency="false">ccsdk-slicore-utils</feature>
        <feature version="0.3.0.SNAPSHOT" prerequisite="false" dependency="false">ccsdk-dblib</feature>
        <feature version="0.3.0.SNAPSHOT" prerequisite="false" dependency="false">ccsdk-filters</feature>
        <feature version="0.3.0.SNAPSHOT" prerequisite="false" dependency="false">ccsdk-sli</feature>
        <feature version="0.3.0.SNAPSHOT" prerequisite="false" dependency="false">ccsdk-sliapi</feature>
        <feature version="0.3.0.SNAPSHOT" prerequisite="false" dependency="false">ccsdk-sliPluginUtils</feature>
    </feature>
</features>

Constructing the component meta-feature

We see that the component meta-feature "ccsdk-sli-core-all" contains the repository and name for the features.xml file for sliapifor all of the features in the ccsdk/sli/core repository, including sliapi.  To see how the ccsdk-sli-core-all is constructed, we inspect the features file in ccsdk/sli/core.

Image Added

The pom.xml file of interest is features/ccsdk-sli-core-all/pom.xml, which we show here in its entirety.

No Format
%: cat pom.xml
<?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/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>

        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>single-feature-parent</artifactId>
                <version>1.1.0-SNAPSHOT</version>
                <relativePath />
        </parent>

        <groupId>org.onap.ccsdk.sli.core</groupId>
        <artifactId>ccsdk-sli-core-all</artifactId>
        <version>0.3.0-SNAPSHOT</version>
        <packaging>feature</packaging>

        <name>ccsdk-sli-core :: features :: ${project.artifactId}</name>
        <dependencyManagement>
                <dependencies>
                        <dependency>
                                <groupId>org.opendaylight.mdsal.model</groupId>
                                <artifactId>mdsal-model-artifacts</artifactId>
                                <version>${odl.mdsal.model.version}</version>
                                <type>pom</type>
                                <scope>import</scope>
                        </dependency>
                        <dependency>
                                <groupId>org.opendaylight.controller</groupId>
                                <artifactId>mdsal-artifacts</artifactId>
                                <version>${odl.mdsal.version}</version>
                                <type>pom</type>
                                <scope>import</scope>
                        </dependency>
                </dependencies>
        </dependencyManagement>

        <dependencies>
                <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>ccsdk-slicore-utils</artifactId>
                        <version>${project.version}</version>
                        <type>xml</type>
                        <classifier>features</classifier>
                </dependency>
                <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>ccsdk-dblib</artifactId>
                        <version>${project.version}</version>
                        <type>xml</type>
                        <classifier>features</classifier>
                </dependency>
                <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>ccsdk-filters</artifactId>
                        <version>${project.version}</version>
                        <type>xml</type>
                        <classifier>features</classifier>
                </dependency>
                <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>ccsdk-sli</artifactId>
                        <version>${project.version}</version>
                        <type>xml</type>
                        <classifier>features</classifier>
                </dependency>
                <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>ccsdk-sliapi</artifactId>
                        <version>${project.version}</version>
                        <type>xml</type>
                        <classifier>features</classifier>
                </dependency>
                <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>ccsdk-sliPluginUtils</artifactId>
                        <version>${project.version}</version>
                        <type>xml</type>
                        <classifier>features</classifier>
                </dependency>
        </dependencies>
</project>

We see that it includes dependencies for the feature.xml file for each feature in the ccsdk/sli/core repository and generates the feature.xml file (packaging>feature</packaging>) for ccsdk-sli-core-all.  I believe that all of the other folders in ccsdk/sli/core/features are vestigial or - at least - uninvolved in the installation of features in ccsdk_odlsli_container.