Add Nexus 2 lftools info 59/11559/9
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Tue, 26 Jun 2018 19:37:00 +0000 (12:37 -0700)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Fri, 29 Jun 2018 06:42:13 +0000 (23:42 -0700)
Add documentation on how to create Nexus 2 repos
using lftools.
Add examples of the files taken as parameter.

Change-Id: I7c3344d83b9419aed1c9a367ec4e35011eb0bedb
Issue-ID: RELENG-954
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
docs/infra/nexus.rst
docs/nexus2.rst

index f528c1e..7ad496d 100644 (file)
@@ -162,6 +162,73 @@ Configure global-var in ci-management
 Refer to :ref:`Jenkins CFG Global Variables <global-jjb:jenkins-cfg-envvar>`
 for details on global-vars configuration.
 
+.. _create-repos-lftools:
+
+Create Nexus2 repos with lftools
+================================
+
+LF Tools provides an interface to Nexus 2 for creating resources or reordering staging repositories.
+More information on how to use the commands:
+:ref:`LF Tools Nexus commands <nexus-commands>`
+
+The ``lftools nexus create repo`` command needs two files as parameters:
+
+* `-c, --config` Configuration file containing the repos and their tree structure.
+
+  .. code-block:: yaml
+
+     # Using ONAP as example
+
+     base_groupId: 'org.onap'
+     repositories:
+      appc:
+        password: 'NjPAd1ZZ5RbDalZy4ROHaApb4Bk3buTU'
+        extra_privs:
+          - 'LF Deployment Role'
+          - 'Staging: Deployer (autorelease)'
+        repositories:
+          cdt:
+            password: 'NjPAd1ZZ5RbDalZy4ROHaApb4Bk3buTU'
+            extra_privs:
+              - 'LF Deployment Role'
+              - 'Staging: Deployer (autorelease)'
+      aaf:
+        password: 'NjPAd1ZZ5RbDalZy4ROHaApb4Bk3buTU'
+        extra_privs:
+          - 'LF Deployment Role'
+          - 'Staging: Deployer (autorelease)'
+        repositories:
+          sms:
+            password: 'NjPAd1ZZ5RbDalZy4ROHaApb4Bk3buTU'
+            extra_privs:
+              - 'LF Deployment Role'
+              - 'Staging: Deployer (autorelease)'
+
+appc is the parent for cdt and aaf is the parent of sms.
+The projects created will be: appc, appc-cdt, aaf and aaf-sms.
+
+.. note::
+
+   ``extra_privs`` could have a different name between LF projects.
+
+* `-s, --settings` Configuration file with all the admin settings
+
+  .. code-block:: bash
+
+     # Using ONAP as example
+
+     nexus: 'https://nexus.onap.org'
+
+     user: 'admin'
+     password: 'admin123'
+
+     email_domain: 'onap.org'
+
+After running `lftools nexus create repo -c <the_repo_config> -s <your_settings_config>`,
+the script will create all repos, users, roles and privileges. Also, the `Repository Targets`
+gets set with the patterns to set restrictions for projects and the location where they
+should post artifacts. These patterns should match the GroupId in the project's pom.xml.
+
 .. _nexus-troubleshooting:
 
 Troubleshooting
index 5a824d3..52bc595 100644 (file)
@@ -149,11 +149,3 @@ Add roles required for Nexus users:
 
    More information on users, roles and privileges configuration using lftools along with the
    repos in :ref:`Create Nexus2 repos with lftools <create-repos-lftools>`.
-
-.. _create-repos-lftools:
-
-Create Nexus2 repos with lftools
-================================
-
-.. TODO: Creating Nexus2 repos using lftools (RELENG-954)
-