Add Projects to distribution

Managed Projects

Add features to distribution

Managed projects must be in the distribution. Follow the steps below to add your karaf features to distribution:

  1. Download int/dist repository:

    git clone ssh://<user>@git.opendaylight.org:29418/integration/distribution
    
  2. Make sure the projects you depend are already in the pom file:

    features/repos/index/pom.xml
    
  3. Check your project version is correct in the file:

    artifacts/upstream/properties/pom.xml
    
  4. Declare your feature repositories and user-facing features dependencies:

    If your project artifacts pom.xml contains your karaf feature repos and features, just add your project artifacts dependency in:

    artifacts/upstream/artifacts/pom.xml
    

    Otherwise add your project feature repositories and your user-facing features to:

    artifacts/upstream/feature-repos/pom.xml
    artifacts/upstream/single-features/pom.xml
    

    Note

    Always add your maven dependencies in alphabethical order. This also applies to the next steps.

  5. Add your feature repositories in:

    features/repos/index/pom.xml
    
  6. Add your user facing features in either:

    features/singles/odl-integration-compatible-with-all/pom.xml
    

    if your feature is compatible.

    features/singles/odl-integration-all/pom.xml
    

    if your feature is not compatible.

    Note

    You do not need to add a feature if it is already contained in another feature you have already included.

    Remember compatible features are those that can co-exist with other features in ODL because:

    • They do not interfere with any other feature

    • They are not network intrusive (e.g. configure network devices or push flows out-of-the-box)

  7. Push changes to int/dist and wait for patch verification and review.

    Once the patch is merged your project will be part of the OpenDaylight managed distribution which is normally available in nexus managed-distribution and will join the distribution-check verification.

Trigger distribution build

Once the project is in the distribution it is recommended to build and publish a new distribution every time a merge happens in the project. Follow the steps below to add this trigger:

  1. Download releng/builder repository:

    git clone ssh://<user>@git.opendaylight.org:29418/releng/builder
    
  2. Add your merge job in following file under distribution-managed section:

    jjb/integration/distribution/distribution-jobs.yaml
    
    - project:
        name: distribution-managed
        ...
        stream:
          - fluorine:
              branch: 'master'
              dependencies: >
                  aaa-merge-{stream},
                  bgpcep-merge-{stream},
                  coe-merge-{stream},
        ...
    
  3. Push changes to releng/builder and wait for patch verification and review.

Self-Managed Projects

Add features to distribution

Self-Managed projects must only be in the distribution if they want to be packaged in distribution and released at the same time as the Managed projects do.

Follow the next steps to add your karaf features to the OpenDaylight distribution:

  1. Download int/dist repository:

    git clone ssh://<user>@git.opendaylight.org:29418/integration/distribution
    
  2. Add your feature repository in:

    opendaylight/pom.xml
    

    Note

    Always add your maven dependencies in alphabethical order. This also applies to the next steps.

  3. Push changes to int/dist and wait for patch verification and review.

    Once the patch is merged your project will be part of the new OpenDaylight distribution which is normally available in nexus full-distribution.

    Note

    In order to install a Self-Managed feature, you have to first install the feature repository in karaf, the example below shows how to install a repository from the karaf console.

    opendayligt>feature:repo-add mvn:org.opendaylight.sxp/features-sxp//xml/features
    

    Note

    If the feature version is not specified in the URL (see example above), Karaf will use the latest version (normally only one stored) in the the system folder.

    Note

    You can alternatively add the repository in the karaf boot file etc/org.apache.karaf.features.cfg

Add features to sanity test

Distribution sanity test runs once a day to verify all projects features, managed and sef-managed, can be installed with no issues. Follow below steps to add your features to the sanity test.

  1. Download releng/builder repository:

    git clone ssh://<user>@git.opendaylight.org:29418/releng/builder
    
  2. Open the distribution-jobs.yaml file:

    jjb/integration/distribution/distribution-jobs.yaml
    

    Add your feature repo and user-facing features in the distribution section:

    stream:
      - fluorine:
          branch: 'master'
          karaf-version: odl
          # Self-Managed projects repos and features:
          sm-repos: >
              mvn:org.opendaylight.sxp/features-sxp//xml/features,
              mvn:org.opendaylight.tsdr/features-tsdr//xml/features
          sm-features: >
              odl-sxp-routing,
              odl-tsdr-core,
              odl-tsdr-openflow-statistics-collector,
              odl-tsdr-netflow-statistics-collector
    

    Note

    If the feature version is not specified in the URL (see example above), Karaf will use the latest version (normally only one stored) in the the system folder.

  3. Push changes to releng/builder and wait for patch verification and review.

    Once the patch is merged your project will be tested in the distribution-sanity.

Trigger distribution build

Once the project is in the distribution it is recommended to build and publish a new distribution every time a merge happens in the project. Follow the steps below to add this trigger:

  1. Download releng/builder repository:

    git clone ssh://<user>@git.opendaylight.org:29418/releng/builder
    
  2. Open the distribution-jobs.yaml file:

    jjb/integration/distribution/distribution-jobs.yaml
    

    And add your merge job in the distribution-full section:

    - project:
        name: distribution-full
        ...
        stream:
          - fluorine:
              branch: 'master'
              dependencies: >
                  sxp-merge-{stream},
         ...
    
  3. Push changes to releng/builder and wait for patch verification and review.