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
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)
-