Merge "Move archetypes Sonar scan to Sonarcloud"
[releng/builder.git] / docs / jenkins.rst
index a74cd82d543019a72eaa37c7b7738298fedfd357..e8a0c1962de7d60a661f0ac4334d9953beb9654f 100644 (file)
@@ -1,3 +1,5 @@
+.. _odl-jenkins:
+
 Jenkins
 =======
 
@@ -27,26 +29,31 @@ in the jenkins-master_ silo and this can be achieved by simply creating a
 
 .. code-block:: bash
 
-    git clone https://git.opendaylight.org/gerrit/releng/builder
+    git clone --recursive https://git.opendaylight.org/gerrit/releng/builder
     cd builder
     mkdir jjb/<new-project>
 
+.. note:
+
+    releng/global-jjb is a submodule of releng/builder repository which
+    requires a git submodule update --init or using --recursive with git clone.
+    `releng-global-jjb`_
+
 Where <new-project> should be the same name as your project's git repo in
-Gerrit. So if your project is called "aaa" then create a new jjb/aaa directory.
+Gerrit. If your project is called "aaa" then create a new jjb/aaa directory.
 
 Next we will create <new-project>.yaml as follows:
 
 .. code-block:: yaml
 
+    ---
     - project:
         name: <NEW_PROJECT>-carbon
         jobs:
-            - '{project-name}-clm-{stream}'
-            - '{project-name}-distribution-{stream}'
-            - '{project-name}-integration-{stream}'
-            - '{project-name}-merge-{stream}'
-            - '{project-name}-periodic-{stream}'
-            - '{project-name}-verify-{stream}-{maven}-{jdks}'
+          - '{project-name}-clm-{stream}'
+          - '{project-name}-integration-{stream}'
+          - '{project-name}-merge-{stream}'
+          - '{project-name}-verify-{stream}-{maven}-{jdks}'
 
         project: '<NEW_PROJECT>'
         project-name: '<NEW_PROJECT>'
@@ -54,10 +61,10 @@ Next we will create <new-project>.yaml as follows:
         branch: 'master'
         jdk: openjdk8
         jdks:
-            - openjdk8
+          - openjdk8
         maven:
-            - mvn33:
-                mvn-version: '{mvn33}'
+          - mvn33:
+              mvn-version: 'mvn33'
         mvn-settings: '<NEW_PROJECT>-settings'
         mvn-goals: 'clean install -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
         mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m'
@@ -68,7 +75,7 @@ Next we will create <new-project>.yaml as follows:
     - project:
         name: <NEW_PROJECT>-sonar
         jobs:
-            - '{project-name}-sonar'
+          - '{project-name}-sonar'
 
         project: '<NEW_PROJECT>'
         project-name: '<NEW_PROJECT>'
@@ -80,7 +87,7 @@ Next we will create <new-project>.yaml as follows:
 Replace all instances of <new-project> with the name of your project. This will
 create the jobs with the default job types we recommend for Java projects. If
 your project is participating in the simultanious-release and ultimately will
-be included in the final distribution. We recommend adding the following job
+be included in the final distribution, it is required to add the following job
 types into the job list for the release you are participating.
 
 
@@ -118,8 +125,7 @@ Build Minions
 The Jenkins jobs are run on build minions (executors) which are created on an
 as-needed basis. If no idle build minions are available a new VM is brought
 up. This process can take up to 2 minutes. Once the build minion has finished a
-job, it will remain online for 45 minutes before shutting down. Subsequent
-jobs will use an idle build minion if available.
+job, it will be destroyed.
 
 Our Jenkins master supports many types of dynamic build minions. If you are
 creating custom jobs then you will need to have an idea of what type of minions
@@ -134,11 +140,13 @@ Adding New Components to the Minions
 If your project needs something added to one of the minions, you can help us
 get things added faster by doing one of the following:
 
-* Submit a patch to RelEng/Builder for the `packer/provision`_ scripts that
-  configures your new piece of software during minion boot up.
+* Submit a patch to RelEng/Builder for the appropriate `jenkins-scripts`
+  definition which configure software during minion boot up.
+* Submit a patch to RelEng/Builder for the `packer/provision` scripts that
+  configures software during minion instance imaging.
 * Submit a patch to RelEng/Builder for the Packer's templates  in
-  the `packer/templates`_ directory that configures your new piece of
-  software which get baked into the image.
+  the `packer/templates` directory that configures a new instance definition
+  along with changes in `packer/provision`.
 
 Going the first route will be faster in the short term as we can inspect the
 changes and make test modifications in the sandbox to verify that it works.
@@ -148,30 +156,30 @@ changes and make test modifications in the sandbox to verify that it works.
    The first route may add additional setup time considering this is run every
    time the minion is booted.
 
-The second route, however, is better for the community as a whole as it will
-allow others to utilize our Packer setups to replicate our systems more
+The second and third routes, however, is better for the community as a whole as
+it will allow others to utilize our Packer setups to replicate our systems more
 closely. It is, however, more time consuming as an image snapshot needs to be
-created based on the updated Packer definitions before it can be attached to
-the Jenkins configuration on sandbox for validation testing.
+created based on the updated Packer definitions before it can be attached to the
+Jenkins configuration on sandbox for validation testing.
 
 In either case, the changes must be validated in the sandbox with tests to
 make sure that we don't break current jobs and that the new software features
 are operating as intended. Once this is done the changes will be merged and
 the updates applied to the RelEng Jenkins production silo. Any changes to
-files under `releng/builder/packer`_ will be validated and images would be built
+files under `releng/builder/packer` will be validated and images would be built
 triggered by verify-packer and merge-packer jobs.
 
 Please note that the combination of a Packer definitions from `vars`, `templates`
 and the `provision` scripts is what defines a given minion. For instance, a minion
-may be defined as `centos7-java-builder`_ which is a combination of Packer OS image
-definitions from `vars/centos.json`_, Packer template definitions from
-`templates/java-buidler.json` and spinup scripts from `provision/java-builder.sh`_.
+may be defined as `centos7-builder` which is a combination of Packer OS image
+definitions from `vars/centos.json`, Packer template definitions from
+`templates/builder.json` and spinup scripts from `provision/builder.sh`.
 This combination provides the full definition of the realized minion.
 
 Jenkins starts a minion using the latest image which is built and linked into the
 Jenkins configuration. Once the base instance is online Jenkins checks out the
 RelEng/Builder repo on it and executes two scripts. The first is
-`provision/baseline.sh`_, which is a baseline for all of the minions.
+`provision/baseline.sh`, which is a baseline for all of the minions.
 
 The second is the specialized script, which handles any system updates,
 new software installs or extra environment tweaks that don't make sense in a
@@ -182,66 +190,99 @@ time for every job which runs on the image. After all of these scripts have
 executed Jenkins will finally attach the minion as an actual minion and start
 handling jobs on it.
 
-Pool: ODLRPC
-^^^^^^^^^^^^^^^^^^^
+Flavors
+^^^^^^^
+
+Performance flavors come with dedicated CPUs and are not shared with other
+accounts in the cloud so should ensure consistent performance.
+
+.. list-table:: Flavors
+   :widths: auto
+   :header-rows: 1
+
+   * - Instance Type
+     - CPUs
+     - Memory
+
+   * - odl-standard-1
+     - 1
+     - 4
+
+   * - odl-standard-2
+     - 2
+     - 8
+
+   * - odl-standard-4
+     - 4
+     - 16
+
+   * - odl-standard-8
+     - 8
+     - 32
+
+   * - odl-standard-16
+     - 16
+     - 64
+
+   * - odl-highcpu-2
+     - 2
+     - 2
+
+   * - odl-highcpu-4
+     - 4
+     - 4
+
+   * - odl-highcpu-8
+     - 8
+     - 8
+
+Pool: ODLVEX
+^^^^^^^^^^^^
 
 .. raw:: html
 
     <table class="table table-bordered">
       <tr class="warning">
-        <td><b>Jenkins Label</b><br/> dynamic_verify</td>
-        <td><b>Minion Template name</b><br/> centos7-builder</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-builder</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/builder.sh</td>
-      </tr>
-      <tr>
-        <td colspan="4">
-          A CentOS 7 huild minion. This system has OpenJDK 1.7 (Java7) and OpenJDK
-          1.8 (Java8) installed on it along with all the other components and
-          libraries needed for building any current OpenDaylight project. This is
-          the label that is used for all basic -verify and -daily- builds for
-          projects.
+        <td><b>Jenkins Labels</b><br/>
+          centos7-builder-2c-1g,<br/>
+          centos7-builder-2c-2g,<br/>
+          centos7-builder-2c-8g,<br/>
+          centos7-builder-4c-4g,<br/>
+          centos7-builder-8c-8g,<br/>
+          centos7-autorelease-4c-16g
         </td>
-      </tr>
-
-      <tr class="warning">
-        <td><b>Jenkins Label</b><br/> dynamic_merge</td>
-        <td><b>Minion Template name</b><br/> centos7-builder</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-builder</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/builder.sh</td>
+        <td><b>Minion Template names</b><br/>
+          prd-centos7-builder-2c-1g,<br/>
+          prd-centos7-builder-2c-2g,<br/>
+          prd-centos7-builder-2c-8g,<br/>
+          prd-centos7-builder-4c-4g,<br/>
+          prd-centos7-builder-8c-8g,<br/>
+          prd-centos7-autorelease-4c-16g
+        <td><b>Packer Template</b><br/>
+        releng/builder/packer/templates/builder.json</td>
+        <td><b>Playbook</b><br/>
+        releng/builder/packer/common-packer/provision/baseline.yaml</td>
       </tr>
       <tr>
         <td colspan="4">
-          See dynamic_verify (same image on the back side). This is the label that
-          is used for all basic -merge and -integration- builds for projects.
-        </td>
-      </tr>
-
-      <tr class="warning">
-        <td><b>Jenkins Label</b><br/> matrix_master</td>
-        <td><b>Minion Template name</b><br/> centos7-matrix</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-java-node</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/matrix.sh</td>
-      </tr>
-      <tr>
-        <td colspan="4">
-          This is a very minimal system that is designed to spin up with 2 build
-          instances on it. The purpose is to have a location that is not the
-          Jenkins master itself for jobs that are executing matrix operations
-          since they need a director location. This image should not be used for
-          anything but tying matrix jobs before the matrx defined label ties.
+          CentOS 7 build minion configured with OpenJDK 1.7 (Java7) and OpenJDK
+          1.8 (Java8) along with all the other components and libraries needed
+          for building any current OpenDaylight project. This is the label that
+          is used for all basic verify, merge and daily builds for
+          projects.
         </td>
       </tr>
 
       <tr class="warning">
-        <td><b>Jenkins Label</b><br/> dynamic_robot</td>
-        <td><b>Minion Template name</b><br/> centos7-robot</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/integration-robotframework</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/robot.sh</td>
+        <td><b>Jenkins Labels</b><br/> centos7-robot-2c-2g</td>
+        <td><b>Minion Template names</b><br/> centos7-robot-2c-2g</td>
+        <td><b>Packer Template</b><br/>
+        releng/builder/packer/templates/robot.json</td>
+        <td><b>Playbook</b><br/> releng/builder/packer/provision/robot.yaml</td>
       </tr>
       <tr>
         <td colspan="4">
-          A CentOS 7 minion that is configured with OpenJDK 1.7 (Java7), OpenJDK
+          CentOS 7 minion configured with OpenJDK 1.7 (Java7), OpenJDK
           1.8 (Java8) and all the current packages used by the integration
           project for doing robot driven jobs. If you are executing robot
           framework jobs then your job should be using this as the minion that
@@ -251,88 +292,50 @@ Pool: ODLRPC
       </tr>
 
       <tr class="warning">
-        <td><b>Jenkins Label</b><br/> ubuntu_mininet</td>
-        <td><b>Minion Template name</b><br/> ubuntu-trusty-mininet</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/ubuntu-mininet</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/mininet-ubuntu.sh</td>
-      </tr>
-      <tr>
-        <td colspan="4">
-          Basic Ubuntu system with ovs 2.0.2 and mininet 2.1.0
-        </td>
-      </tr>
-
-      <tr class="warning">
-        <td><b>Jenkins Label</b><br/> ubuntu_mininet_ovs_23</td>
-        <td><b>Minion Template name</b><br/> ubuntu-trusty-mininet-ovs-23</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/ubuntu-mininet-ovs-23</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/mininet-ubuntu.sh</td>
-      </tr>
-      <tr>
-        <td colspan="4">
-          Basic Ubuntu system with ovs 2.3 and mininet 2.2.1
-        </td>
-      </tr>
-
-      <tr class="warning">
-        <td><b>Jenkins Label</b><br/> ubuntu_mininet_ovs_25</td>
-        <td><b>Minion Template name</b><br/> ubuntu-trusty-mininet-ovs-25</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/ubuntu-mininet-ovs-25</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/mininet-ubuntu.sh</td>
+        <td><b>Jenkins Labels</b><br/> ubuntu1604-mininet-ovs-25-2c-2g</td>
+        <td><b>Minion Template names</b><br/> ubuntu1604-mininet-ovs-25-2c-2g</td>
+        <td><b>Packer Template</b><br/> releng/builder/packer/templates/mininet-ovs-2.5.json</td>
+        <td><b>Playbook</b><br/> releng/builder/packer/provision//mininet-ovs-2.5.yaml</td>
       </tr>
       <tr>
         <td colspan="4">
-          Basic Ubuntu system with ovs 2.5 and mininet 2.2.2
+          Basic Ubuntu 16.04 (Xenial) system with ovs 2.5 and mininet 2.2.1
         </td>
       </tr>
 
       <tr class="warning">
-        <td><b>Jenkins Label</b><br/> dynamic_controller</td>
-        <td><b>Minion Template name</b><br/> centos7-java</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-java-node</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/controller.sh</td>
+        <td><b>Jenkins Labels</b><br/> ubuntu1604-mininet-ovs-26-2c-2g</td>
+        <td><b>Minion Template names</b><br/> ubuntu1604-mininet-ovs-26-2c-2g</td>
+        <td><b>Packer Template</b><br/> releng/builder/packer/templates/mininet-ovs-2.6.json</td>
+        <td><b>Playbook</b><br/> releng/builder/packer/provision//mininet-ovs-2.6.yaml</td>
       </tr>
       <tr>
         <td colspan="4">
-          A CentOS 7 minion that has the basic OpenJDK 1.7 (Java7) and OpenJDK
-          1.8 (Java8) installed and is capable of running the controller, not
-          building.
+          Ubuntu 16.04 (Xenial) system with ovs 2.6 and mininet 2.2.1
         </td>
       </tr>
 
       <tr class="warning">
-        <td><b>Jenkins Label</b><br/> dynamic_java</td>
-        <td><b>Minion Template name</b><br/> centos7-java</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-java-node</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/controller.sh</td>
+        <td><b>Jenkins Labels</b><br/> ubuntu1604-mininet-ovs-28-2c-2g</td>
+        <td><b>Minion Template names</b><br/> ubuntu1604-mininet-ovs-28-2c-2g</td>
+        <td><b>Packer Template</b><br/> releng/builder/packer/templates/mininet-ovs-2.8.json</td>
+        <td><b>Playbook</b><br/> releng/builder/packer/provision//mininet-ovs-2.8.yaml</td>
       </tr>
       <tr>
         <td colspan="4">
-          See dynamic_controller as it is currently the same image.
+          Ubuntu 16.04 (Xenial) system with ovs 2.8 and mininet 2.2.1
         </td>
       </tr>
 
       <tr class="warning">
-        <td><b>Jenkins Label</b><br/> dynamic_java_8g</td>
-        <td><b>Minion Template name</b><br/> centos7-java-8g</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-java-node</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/controller.sh</td>
+        <td><b>Jenkins Labels</b><br/> centos7-devstack-2c-4g</td>
+        <td><b>Minion Template names</b><br/> centos7-devstack-2c-4g</td>
+        <td><b>Packer Template</b><br/> releng/builder/packer/templates/devstack.json</td>
+        <td><b>Playbook</b><br/> releng/builder/packer/provision/devstack.yaml</td>
       </tr>
       <tr>
         <td colspan="4">
-          See dynamic_controller as it is currently the same image but with 8G of RAM.
-        </td>
-      </tr>
-
-      <tr class="warning">
-        <td><b>Jenkins Label</b><br/> dynamic_devstack</td>
-        <td><b>Minion Template name</b><br/> centos7-devstack</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/ovsdb-devstack</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/devstack.sh</td>
-      </tr>
-      <tr>
-        <td colspan="4">
-          A CentOS 7 system purpose built for doing OpenStack testing using
+          CentOS 7 system purpose built for doing OpenStack testing using
           DevStack. This minion is primarily targeted at the needs of the OVSDB
           project. It has OpenJDK 1.7 (aka Java7) and OpenJDK 1.8 (Java8) and
           other basic DevStack related bits installed.
@@ -340,14 +343,14 @@ Pool: ODLRPC
       </tr>
 
       <tr class="warning">
-        <td><b>Jenkins Label</b><br/> dynamic_docker</td>
-        <td><b>Minion Template name</b><br/> centos7-docker</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/ovsdb-docker</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/docker.sh</td>
+        <td><b>Jenkins Labels</b><br/> centos7-docker-2c-4g</td>
+        <td><b>Minion Template names</b><br/> centos7-docker-2c-4g</td>
+        <td><b>Packer Template</b><br/> releng/builder/packer/templates/docker.json</td>
+        <td><b>Playbook</b><br/> releng/builder/packer/common-packer/provision/docker.yaml</td>
       </tr>
       <tr>
         <td colspan="4">
-          A CentOS 7 system that is configured with OpenJDK 1.7 (aka Java7),
+          CentOS 7 system configured with OpenJDK 1.7 (aka Java7),
           OpenJDK 1.8 (Java8) and Docker. This system was originally custom
           built for the test needs of the OVSDB project but other projects have
           expressed interest in using it.
@@ -355,18 +358,30 @@ Pool: ODLRPC
       </tr>
 
       <tr class="warning">
-        <td><b>Jenkins Label</b><br/> gbp_trusty</td>
-        <td><b>Minion Template name</b><br/> gbp_trusty</td>
-        <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/gbp-ubuntu-docker-ovs-node</td>
-        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/ubuntu-docker-ovs.sh</td>
+        <td><b>Jenkins Labels</b><br/> ubuntu1604-gbp-2c-2g</td>
+        <td><b>Minion Template names</b><br/> ubuntu1604-gbp-2c-2g</td>
+        <td><b>Packer Template</b><br/> releng/builder/packer/templates/gbp.json</td>
+        <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/gpb.sh</td>
       </tr>
       <tr>
         <td colspan="4">
-          A basic Ubuntu node with latest OVS and docker installed. Used by Group Based Policy.
+          Ubuntu 16.04 (Xenial) node with latest OVS and docker installed. Used by Group Based Policy.
         </td>
       </tr>
+
     </table>
 
+Pool: ODLVEX - HOT (Heat Orchestration Templates)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+HOT integration enables to spin up integration labs servers for CSIT jobs
+using heat, rathar than using jclouds (deprecated). Image names are updated
+on the project specific job templates using the variable
+`{odl,docker,openstack,tools}_system_image` followed by image name in the
+format `<platform> - <template> - <date-stamp>`.
+
+.. include:: cloud-images.rst
+
 Creating Jenkins Jobs
 ---------------------
 
@@ -387,16 +402,11 @@ need to use the `jenkins-jobs` executable to translate a set of jobs into
 their XML descriptions and upload them to the sandbox Jenkins server.
 
 We document `installing <Installing Jenkins Job Builder_>`_ `jenkins-jobs`
-below. We also provide
-a `pre-built Docker image <jjb-docker_>`_ with `jenkins-jobs` already installed.
+below.
 
 Installing Jenkins Job Builder
 ------------------------------
 
-For users who aren't already experienced with Docker or otherwise don't want
-to use our `pre-built JJB Docker image <jjb-docker_>`_, installing JJB into a
-virtual environment is an equally good option.
-
 We recommend using `pip <Installing JJB using pip_>`_ to assist with JJB
 installs, but we
 also document `installing from a git repository manually
@@ -419,8 +429,8 @@ installs, we recommend using `Python Virtual Environments <python-virtualenv_>`_
 to manage JJB and its
 Python dependencies. The `python-virtualenvwrapper`_ tool can help you do so.
 
-There are good docs for installing `python-virtualenvwrapper`_. On Linux systems
-with pip (typical), they amount to:
+Documentation is available for installing `python-virtualenvwrapper`_. On Linux
+systems with pip (typical), they amount to:
 
 .. code-block:: bash
 
@@ -474,7 +484,7 @@ First, clone the latest version of the `releng-builder-repo`_.
 
 .. code-block:: bash
 
-    $ git clone https://git.opendaylight.org/gerrit/p/releng/builder.git
+    $ git clone --recursive https://git.opendaylight.org/gerrit/p/releng/builder.git
 
 Before actually installing JJB and its dependencies, make sure you've `created
 and activated <Virtual Environments_>`_ a virtual environment for JJB.
@@ -497,6 +507,9 @@ To validate that JJB was successfully installed you can run this command:
 
     (jjb)$ jenkins-jobs --version
 
+TODO: Explain that only the currently merged jjb/requirements.txt is supported,
+other options described below are for troubleshooting only.
+
 To change the version of JJB specified by `builder/jjb/requirements.txt
 <odl-jjb-requirements.txt_>`_
 to install from the latest commit to the master branch of JJB's git repository:
@@ -513,6 +526,29 @@ To install from a tag, like 1.4.0:
     $ cat jjb/requirements.txt
     -e git+https://git.openstack.org/openstack-infra/jenkins-job-builder@1.4.0#egg=jenkins-job-builder
 
+Updating releng/builder repo or global-jjb
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Follow these steps to update the releng/builder repo. The repo uses a submodule from
+a global-jjb repo so that common source can be shared across different projects. This
+requires updating the releng/builder repo periodically to pick up the changes. New
+versions of jjb could also require updating the releng/builder repo. Follow the
+previous steps earlier for updating jenkins-jobs using the
+`builder/jjb/requirements.txt <odl-jjb-requirements.txt_>`_ file. Ensure that the
+version listed in the file is the currently supported version, otherwise install a
+different version or simply upgrade using `pip install --upgrade jenkins-job-builder`.
+
+The example below assumes the user has cloned releng/builder to `~/git/releng/builder`.
+Update the repo, update the submodules and then submit a test to verify it works.
+
+.. code-block:: bash
+
+    cd ~/git/releng/builder
+    git checkout master
+    git pull
+    git submodule update --init --recursive
+    jenkins-jobs --conf jenkins.ini test jjb/ netvirt-csit-1node-openstack-queens-upstream-stateful-fluorine
+
 Installing JJB Manually
 -----------------------
 
@@ -565,30 +601,6 @@ To validate that JJB was successfully installed you can run this command:
 
     (jjb)$ jenkins-jobs --version
 
-JJB Docker Image
-----------------
-
-`Docker <docker-docs_>`_ is an open platform used to create virtualized Linux containers
-for shipping self-contained applications. Docker leverages LinuX Containers
-\(LXC\) running on the same operating system as the host machine, whereas a
-traditional VM runs an operating system over the host.
-
-.. code-block:: bash
-
-    docker pull zxiiro/jjb-docker
-    docker run --rm -v ${PWD}:/jjb jjb-docker
-
-This `Dockerfile <jjb-dockerfile_>`_ created the
-`zxiiro/jjb-docker image <jjb-docker_>`_.
-By default it will run:
-
-.. code-block:: bash
-
-    jenkins-jobs test .
-
-You'll need to use the `-v/--volume=[]` parameter to mount a directory
-containing your YAML files, as well as a configured `jenkins.ini` file if you
-wish to upload your jobs to the `Jenkins Sandbox`_.
 
 Jenkins Job Templates
 ---------------------
@@ -603,52 +615,24 @@ patch you wish to trigger against.
 All jobs have a default build-timeout value of 360 minutes (6 hrs) but can be
 overrided via the opendaylight-infra-wrappers' build-timeout property.
 
+TODO: Group jobs into categories: every-patch, after-merge, on-demand, etc.
+TODO: Reiterate that "remerge" triggers all every-patch jobs at once,
+because when only a subset of jobs is triggered, Gerrit forgets valid -1 from jobs outside the subset.
+TODO: Document that only drafts and commit-message-only edits do not trigger every-patch jobs.
+TODO: Document test-{project}-{feature} and test-{project}-all.
+
 .. raw:: html
 
     <table class="table table-bordered">
-      <tr class="warning">
-        <td><b>Job Template</b><br/>{project}-distribution-{stream}</td>
-        <td><b>Gerrit Trigger</b><br/>test-distribution</td>
-      </tr>
-      <tr>
-        <td colspan="2">
-          This job builds a distrbution against your patch, tiggers distribution sanity CSIT jobs
-          and reports back the results to Gerrit. Leave a comment with trigger keyword above
-          to activate it for a particular patch.
-
-          This job is maintained by the <a href="https://wiki.opendaylight.org/view/Integration/Test">Integration/Test</a>
-          project.
-
-          <div class="admonition note">
-            <p class="first admonition-title">Note</p>
-            <p>
-              Running the "test-distribution" trigger will cause Jenkins to
-              remove it's existing vote if it's already -1 or +1'd a comment.
-              You will need to re-run your verify jobs (recheck) after running
-              this to get Jenkins to put back the correct vote.
-            </p>
-          </div>
-        </td>
-      </tr>
-
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-distribution-check-{stream}</td>
-        <td><b>Gerrit Trigger</b><br/>recheck | redistcheck</td>
+        <td><b>Gerrit Trigger</b><br/>recheck</td>
       </tr>
       <tr>
         <td colspan="2">
           This job runs the PROJECT-distribution-check-BRANCH job which is
           building also integration/distribution project in order to run SingleFeatureTest.
-
-          The <b>redistcheck</b> trigger is useful in cases where a project's
-          other jobs passed, however this job failed due to infra problems or
-          intermittent issues. It will retrigger just this job to save time.
-
-          BEWARE: If there were other failed jobs, redistcheck could lead
-          to false Verified+1 vote, risking a merge which breaks other projetcs.
-          Redistcheck is only for committers who are familiar with the risks involved.
-          If in doubt, use the safe trigger word: recheck.
-          Recheck triggers every job involved in verifying latest patch set in the Change.
+          It also performs various other checks in order to prevent the change to break autorelease.
         </td>
       </tr>
 
@@ -680,11 +664,11 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
           Artifacts are uploaded to OpenDaylight's
           <a href="https://nexus.opendaylight.org">Nexus</a> on completion.
 
+          A distribution-merge-{stream} job is triggered to add the new artifacts to the
+          integration distribution.
+
           Running the "remerge" trigger is possible before a Change is merged,
-          in which case it will cause Jenkins to remove it's existing vote
-          if it's already -1 or +1'd a comment.
-          You will need to re-run your verify jobs (recheck) after running
-          this to get Jenkins to put back the correct vote.
+          it would still build the actual HEAD. This job does not alter Gerrit votes.
         </td>
       </tr>
 
@@ -716,50 +700,31 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
 
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-validate-autorelease-{stream}</td>
-        <td><b>Gerrit Trigger</b><br/>recheck | revalidate</td>
+        <td><b>Gerrit Trigger</b><br/>recheck</td>
       </tr>
       <tr>
         <td colspan="2">
           This job runs the PROJECT-validate-autorelease-BRANCH job which is
           used as a quick sanity test to ensure that a patch does not depend on
           features that do not exist in the current release.
-
-          The <b>revalidate</b> trigger is useful in cases where a project's
-          other job passed, however this job failed due to infra problems or
-          intermittent issues. It will retrigger just this job to save time.
-
-          BEWARE: If there were other failed jobs, revalidate could lead
-          to false Verified+1 vote, risking a merge which breaks other projetcs.
-          Revalidate is only for committers who are familiar with the risks involved.
-          If in doubt, use the safe trigger word: recheck.
         </td>
       </tr>
 
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-verify-{stream}-{maven}-{jdks}</td>
-        <td><b>Gerrit Trigger</b><br/>recheck | reverify</td>
+        <td><b>Gerrit Trigger</b><br/>recheck</td>
       </tr>
       <tr>
         <td colspan="2">
           The Verify job template creates a Gerrit Trigger job that will
           trigger when a new patch is submitted to Gerrit.
           The job only builds the project code (including unit and integration tests).
-
-          The <b>reverify</b> trigger is useful in cases where a project's
-          other jobs passed however this job failed due to infra problems or
-          intermittent issues. It will retrigger just this job to save time.
-
-          BEWARE: If there were other failed jobs, reverify could lead
-          to false Verified+1 vote, risking a merge which breaks other projetcs.
-          Reverify is only for committers who are familiar with the risks involved.
-          If in doubt, use the safe trigger word: recheck.
-          Recheck triggers every job involved in verifying latest patch set in the Change.
         </td>
       </tr>
 
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-verify-node-{stream}</td>
-        <td><b>Gerrit Trigger</b><br/>recheck | renode</td>
+        <td><b>Gerrit Trigger</b><br/>recheck</td>
       </tr>
       <tr>
         <td colspan="2">
@@ -771,22 +736,12 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
           {nodever} containing the directory relative to the project root
           containing the nodejs package.json and version of node you wish to
           run tests with.
-
-          The <b>renode</b> trigger is useful in cases where a project's
-          other jobs passed, however this job failed due to infra problems or
-          intermittent issues. It will retrigger just this job to save time.
-
-          BEWARE: If there were other failed jobs, renode could lead
-          to false Verified+1 vote, risking a merge which breaks other projetcs.
-          Renode is only for committers who are familiar with the risks involved.
-          If in doubt, use the safe trigger word: recheck.
-          Recheck triggers every job involved in verifying latest patch set in the Change.
         </td>
       </tr>
 
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-verify-python-{stream} | {project}-verify-tox-{stream}</td>
-        <td><b>Gerrit Trigger</b><br/>recheck | retox</td>
+        <td><b>Gerrit Trigger</b><br/>recheck</td>
       </tr>
       <tr>
         <td colspan="2">
@@ -799,16 +754,6 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
           The 2 template names verify-python & verify-tox are identical and are
           aliases to each other. This allows the project to use the naming that
           is most reasonable for them.
-
-          The <b>retox</b> trigger is useful in cases where a project's
-          other verify jobs passed, however this job failed due to infra problems or
-          intermittent issues. It will retrigger just this job to save time.
-
-          BEWARE: If there were other failed jobs, retox could lead
-          to false Verified+1 vote, risking a merge which breaks other projetcs.
-          Retox is only for committers who are familiar with the risks involved.
-          If in doubt, use the safe trigger word: recheck.
-          Recheck triggers every job involved in verifying latest patch set in the Change.
         </td>
       </tr>
 
@@ -818,26 +763,13 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
       </tr>
       <tr>
         <td colspan="2">
-          This job runs a full integration test suite against your patch and
-          reports back the results to Gerrit. Leave a comment with trigger
-          keyword above to activate it for a particular patch.
+          This job builds a distribution against your Java patch and triggers distribution sanity CSIT jobs.
+          Leave a comment with trigger keyword above to activate it for a particular patch.
+          This job should not alter Gerrit votes for a given patch.
 
-          It then spawns the list of jobs in csit-list defined
+          The list of CSIT jobs to trigger is defined in csit-list
           <a href="https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=jjb/integration/integration-test-jobs.yaml">here</a>.
 
-          This job is maintained by the <a href="https://wiki.opendaylight.org/view/Integration/Test">Integration/Test</a>
-          project.
-
-          <div class="admonition note">
-            <p class="first admonition-title">Note</p>
-            <p>
-              Running the "test-integration" trigger will cause Jenkins to remove
-              it's existing vote if it's already -1 or +1'd a comment. You will need
-              to re-run your verify job (recheck) after running this to get Jenkins
-              to put back the correct vote.
-            </p>
-          </div>
-
           Some considerations when using this job:
           <ul>
             <li>
@@ -856,6 +788,33 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
             </li>
         </td>
       </tr>
+
+      <tr class="warning">
+        <td><b>Job Template</b><br/>integration-multipatch-test-{stream}</td>
+        <td><b>Gerrit Trigger</b><br/>multipatch-build</td>
+      </tr>
+      <tr>
+        <td colspan="2">
+          This job builds a list of patches provided in an specific order, and finally builds
+          a distribution from either provided patch or latest code in branch.
+          For example if someone leaves the following comment in a patch:
+          multipatch-build:controller=61/29761/5:45/29645/6,neutron=51/65551/4,netvirt:59/60259/17
+          the job will checkout controller patch 61/29761/5, cherry-pick 45/29645/6 and build controller,
+          checkout neutron patch 51/65551/4 and build neutron, checkout latest netvirt code,
+          cherry-pick 59/60259/17 and build netvirt, finally it will checkout latest distribution
+          code and build a distribution. The resulting distribution is stored in Nexus and the URL
+          is stored in a variable called BUNDLE_URL visible in the job console.
+          This job also accepts a gerrit topic, for example: multipatch-build:topic=binding-tlc-rpc,
+          in this case the job will find all patches in the topic binding-tlc-rpc for the projects
+          specified in the BUILD_ORDER parameter and will build all projects from the first a patch
+          has been found, for successive projects the branch HEAD is used if no patch is found.
+          The job uses patch numbers to sort patches in the same project.
+          Use multipatch-build-fast (vs multipatch-build) for building projects fast (-Pq).
+          This job should not alter Gerrit votes for a given patch, nor will do anything with the
+          given patch unless the patch is added to the build list.
+        </td>
+      </tr>
+
     </table>
 
 Maven Properties
@@ -876,186 +835,21 @@ wish to run in your project.
                 Maven property
                 <sonar>true</sonar>.
 
+.. _odl-jenkins-sandbox:
+
 Jenkins Sandbox
 ---------------
 
-The `jenkins-sandbox`_ instance's purpose is to allow projects to test their JJB
-setups before merging their code over to the RelEng master silo. It is
-configured similarly to the master instance, although it cannot publish
-artifacts or vote in Gerrit.
-
-If your project requires access to the sandbox please open an OpenDaylight
-Helpdesk ticket (<helpdesk@opendaylight.org>) and provide your ODL ID.
-
-Notes Regarding the Sandbox
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-* Jobs are automatically deleted every Saturday at 08:00 UTC
-* Committers can login and configure Jenkins jobs in the sandbox directly
-  (unlike with the master silo)
-* Sandbox configuration mirrors the master silo when possible
-* Sandbox jobs can NOT upload artifacts to Nexus
-* Sandbox jobs can NOT vote on Gerrit
-
-Configuration
-^^^^^^^^^^^^^
-
-Make sure you have Jenkins Job Builder [properly installed](#jjb_install).
-
-If you do not already have access, open an OpenDaylight Helpdesk ticket
-(<helpdesk@opendaylight.org>) to request access to ODL's sandbox instance.
-Integration/Test (`integration-test-wiki`_) committers have access by default.
-
-JJB reads user-specific configuration from a `jenkins.ini`_. An
-example is provided by releng/builder at `example-jenkins.ini`_.
-
-.. code-block:: bash
-
-    # If you don't have RelEng/Builder's repo, clone it
-    $ git clone https://git.opendaylight.org/gerrit/p/releng/builder.git
-    # Make a copy of the example JJB config file (in the builder/ directory)
-    $ cp jenkins.ini.example jenkins.ini
-    # Edit jenkins.ini with your username, API token and ODL's sandbox URL
-    $ cat jenkins.ini
-    <snip>
-    [jenkins]
-    user=<your ODL username>
-    password=<your ODL Jenkins sandbox API token>
-    url=https://jenkins.opendaylight.org/sandbox
-    <snip>
-
-To get your API token, `login to the Jenkins **sandbox** instance
-<jenkins-sandbox-login_>`_ (*not
-the main master Jenkins instance, different tokens*), go to your user page (by
-clicking on your username, for example), click "Configure" and then "Show API
-Token".
-
-Manual Method
-^^^^^^^^^^^^^
-
-If you `installed JJB locally into a virtual environment
-<Installing Jenkins Job Builder_>`_,
-you should now activate that virtual environment to access the `jenkins-jobs`
-executable.
-
-.. code-block:: bash
-
-    $ workon jjb
-    (jjb)$
-
-You'll want to work from the root of the RelEng/Builder repo, and you should
-have your `jenkins.ini` file [properly configured](#sandbox_config).
-
-Testing Jobs
-^^^^^^^^^^^^
-
-It's good practice to use the `test` command to validate your JJB files before
-pushing them.
-
-.. code-block:: bash
-
-    jenkins-jobs --conf jenkins.ini test jjb/ <job-name>
-
-If the job you'd like to test is a template with variables in its name, it
-must be manually expanded before use. For example, the commonly used template
-`{project}-csit-verify-1node-{functionality}` might expand to
-`ovsdb-csit-verify-1node-netvirt`.
-
-.. code-block:: bash
-
-    jenkins-jobs --conf jenkins.ini test jjb/ ovsdb-csit-verify-1node-netvirt
-
-Successful tests output the XML description of the Jenkins job described by
-the specified JJB job name.
-
-Pushing Jobs
-^^^^^^^^^^^^
-
-Once you've `configured your \`jenkins.ini\` <Configuration_>`_ and `verified your
-JJB jobs <Testing Jobs_>`_ produce valid XML descriptions of Jenkins jobs you
-can push them to the Jenkins sandbox.
-
-.. important::
-
-    When pushing with `jenkins-jobs`, a log message with the number
-    of jobs you're pushing will be issued, typically to stdout.
-    **If the number is greater than 1** (or the number of jobs you
-    passed to the command to push) then you are pushing too many
-    jobs and should **`ctrl+c` to cancel the upload**. Else you will
-    flood the system with jobs.
-
-    .. code-block:: bash
-
-        INFO:jenkins_jobs.builder:Number of jobs generated:  1
-
-    **Failing to provide the final `<job-name>` param will push all
-    jobs!**
-
-    .. code-block:: bash
-
-        # Don't push all jobs by omitting the final param! (ctrl+c to abort)
-        jenkins-jobs --conf jenkins.ini update jjb/ <job-name>
-
-Running Jobs
-^^^^^^^^^^^^
-
-Once you have your Jenkins job configuration `pushed to the
-Sandbox <Pushing Jobs_>`_ you can trigger it to run.
-
-Find your newly-pushed job on the `Sandbox's web UI <jenkins-sandbox_>`_. Click
-on its name to see the job's details.
-
-Make sure you're `logged in <jenkins-sandbox-login_>`_ to the Sandbox.
-
-Click "Build with Parameters" and then "Build".
-
-Wait for your job to be scheduled and run. Click on the job number to see
-details, including console output.
-
-Make changes to your JJB configuration, re-test, re-push and re-run until
-your job is ready.
-
-Docker Method
-^^^^^^^^^^^^^
-
-If `using Docker <JJB Docker image_>`_:
-
-.. code-block:: bash
-
-    # To test
-    docker run --rm -v ${PWD}:/jjb zxiiro/jjb-docker
-
-.. important::
-
-    When pushing with `jenkins-jobs`, a log message with
-    the number of jobs you're pushing will be issued, typically to stdout.
-    **If the number is greater than 1** (or the number of jobs you passed to
-    the command to push) then you are pushing too many jobs and should **`ctrl+c`
-    to cancel the upload**. Else you will flood the system with jobs.
-
-    .. code-block:: bash
-
-          INFO:jenkins_jobs.builder:Number of jobs generated:  1
-
-    **Failing to provide the final `<job-name>` param will push all jobs!**
-
-    .. code-block:: bash
+URL: https://jenkins.opendaylight.org/sandbox
 
-        # To upload jobs to the sandbox
-        # Please ensure that you include a configured jenkins.ini in your volume mount
-        # Making sure not to push more jobs than expected, ctrl+c to abort
-        docker run --rm -v ${PWD}:/jjb zxiiro/jjb-docker jenkins-jobs --conf jenkins.ini update . openflowplugin-csit-periodic-1node-cds-longevity-only-master
+Jenkins Sandbox documentation can be found in the
+:doc:`LF Jenkins Sandbox Guide <lfdocs:jenkins-sandbox>`.
 
-.. _docker-docs: https://www.docker.com/whatisdocker/
 .. _example-jenkins.ini: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=jenkins.ini.example
 .. _integration-test-wiki: https://wiki.opendaylight.org/view/Integration/Test
 .. _jenkins-master: https://jenkins.opendaylight.org/releng
-.. _jenkins-sandbox: https://jenkins.opendaylight.org/sandbox
-.. _jenkins-sandbox-login: https://jenkins.opendaylight.org/sandbox/login
 .. _jenkins.ini: http://docs.openstack.org/infra/jenkins-job-builder/execution.html#configuration-file
 .. _jjb-autoupdate-project.py: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=scripts/jjb-autoupdate-project.py
-.. _jjb-docker: https://hub.docker.com/r/zxiiro/jjb-docker/
-.. _jjb-dockerfile: https://github.com/zxiiro/jjb-docker/blob/master/Dockerfile
 .. _jjb-docs: http://ci.openstack.org/jenkins-job-builder/
 .. _jjb-init-project.py: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=scripts/jjb-init-project.py
 .. _jjb-repo: https://github.com/openstack-infra/jenkins-job-builder
@@ -1069,10 +863,9 @@ If `using Docker <JJB Docker image_>`_:
 .. _releng-wiki: https://wiki.opendaylight.org/view/RelEng:Main
 .. _releng-builder-gerrit: https://git.opendaylight.org/gerrit/#/admin/projects/releng/builder
 .. _releng-builder-repo: https://git.opendaylight.org/gerrit/gitweb?p=releng%2Fbuilder.git;a=summary
+.. _releng-global-jjb: https://gerrit.linuxfoundation.org/infra/#/q/project:releng/global-jjb
 .. _releng-builder-wiki: https://wiki.opendaylight.org/view/RelEng/Builder
 .. _streams-design-background: https://lists.opendaylight.org/pipermail/release/2015-July/003139.html
 .. _spinup-scripts: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree;f=jenkins-scripts
 .. _spinup-scripts-basic_settings.sh: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=jenkins-scripts/basic_settings.sh
 .. _spinup-scripts-controller.sh: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=jenkins-scripts/controller.sh
-.. _vagrant-basic-java-node: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree;f=vagrant/basic-java-node
-.. _vagrant-definitions: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree;f=vagrant