Add Nexus3 repo explanation 72/12772/6
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Tue, 25 Sep 2018 21:51:10 +0000 (14:51 -0700)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Wed, 26 Sep 2018 21:28:17 +0000 (14:28 -0700)
Add details on repos present in most projects
and how to configure them in Jenkins and in the code.

Issue: RELENG-1092
Change-Id: Id88110ea571bbee2621b5443a8bb290fbf1abd09
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
docs/_static/jenkins-settings-files-docker.png [new file with mode: 0644]
docs/nexus3.rst

diff --git a/docs/_static/jenkins-settings-files-docker.png b/docs/_static/jenkins-settings-files-docker.png
new file mode 100644 (file)
index 0000000..e1466d1
Binary files /dev/null and b/docs/_static/jenkins-settings-files-docker.png differ
index 70b93cc..0b0d3ea 100644 (file)
@@ -37,3 +37,74 @@ For example:
 Nexus 3 communicates with Jenkins server which is the interface used to make
 the docker image publications on a scheduled or by demand basis (depending on the Jenkins JJB
 configuration for the particular job).
+
+Nexus 3 Repositories
+====================
+
+Nexus 3 allows users to manage different types of repositories. To learn more about
+how to manage them, please refer to `Sonatype's official documentation
+<https://help.sonatype.com/repomanager3/configuration/repository-management/>`_.
+
+Most LF projects manage their Docker images using the following repos:
+
+:docker.release: (hosted/HTTP port 10002) Official repository for released images.
+    Releases repositories have a Disable re-deployment policy to avoid overwriting
+    released versions.
+
+:docker.snapshot: (hosted/HTTP port 10003) Used to publish docker snapshot images.
+
+Special repo namespaces:
+
+:docker.public: (group/HTTP port 10001) A meta-url containing all release repos in
+    a combined view.
+
+:docker.staging: (hosted/HTTP port 10004) Used to publish docker images produced
+    by the scheduled jobs.
+
+:docker.io: Repositories that proxy artifacts from https://registry-1.docker.io.
+
+For continuous integration builds, Jenkins has one settings file for each Gerrit repository.
+Each settings file contains an entry for each accessible Nexus3 repository (ServerId).
+
+.. image:: _static/jenkins-settings-files-docker.png
+   :alt: Jenkins settings files.
+   :align: center
+
+Fabric8.io plugin usage
+-----------------------
+
+Projects using fabric8.io maven plugin for managing their docker images should make
+sure to define the docker registries. For example:
+
+.. code-block:: xml
+
+   <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
+   <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
+
+   <groupId>io.fabric8</groupId>
+   <artifactId>docker-maven-plugin</artifactId>
+   <version>0.19.1</version>
+   <configuration>
+       <verbose>true</verbose>
+       <apiVersion>1.23</apiVersion>
+       <pullRegistry>${docker.pull.registry}</pullRegistry>
+       <pushRegistry>${docker.push.registry}</pushRegistry>
+       <images>
+           <image>
+               <name>onap/vvp/jenkins</name>
+               <alias>vvp-jenkins</alias>
+               <build>
+                   <cleanup>true</cleanup>
+                   <tags>
+                       <tag>${docker.tag}</tag>
+                       <tag>${docker.latest.tag}</tag>
+                   </tags>
+                   <dockerFileDir>${project.basedir}</dockerFileDir>
+               </build>
+           </image>
+       </images>
+   </configuration>
+
+.. note::
+
+   More information in https://dmp.fabric8.io