From e4d7405f0f7d4a730a8fa4ffaa9f9b38c1927c72 Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Tue, 26 Jun 2018 12:37:00 -0700 Subject: [PATCH] Add Nexus 2 lftools info 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 --- docs/infra/nexus.rst | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/nexus2.rst | 8 ------- 2 files changed, 67 insertions(+), 8 deletions(-) diff --git a/docs/infra/nexus.rst b/docs/infra/nexus.rst index f528c1e..7ad496d 100644 --- a/docs/infra/nexus.rst +++ b/docs/infra/nexus.rst @@ -162,6 +162,73 @@ Configure global-var in ci-management Refer to :ref:`Jenkins CFG Global Variables ` 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 ` + +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 -s `, +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 diff --git a/docs/nexus2.rst b/docs/nexus2.rst index 5a824d3..52bc595 100644 --- a/docs/nexus2.rst +++ b/docs/nexus2.rst @@ -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 Nexus2 repos with lftools -================================ - -.. TODO: Creating Nexus2 repos using lftools (RELENG-954) - -- 2.16.6