TeamForge supports both Nexus 2 and Nexus 3beta integrations. This page walks you through the installation procedure for both Nexus 2 and Nexus 3 and upgrade procedure from Nexus 2 to Nexus 3.

Installing Nexus 2 / Nexus 3

Nexus comes bundled with a Jetty instance that listens to all configured IP addresses on a host (0.0.0.0) and runs on port 8081 by default.

Installing Nexus is straightforward. Unzip the Nexus bundle in a directory and start Nexus.

The following instructions are for installing Nexus as a standalone server and integrating it with TeamForge.

  1. Log on to the Nexus server.
  2. Download
    • Nexus 2.9.0 or later (CollabNet supports until Nexus 2.14.8 version) zip file, if you’re installing Nexus 2. For instructions, see Nexus 2 Installation.
    • Nexus 3.11.0 zip file, if you’re installing Nexus 3. For instructions, see Nexus 3 Installation.
  3. Unzip the content to a directory of your choice.

    You can find two directories, a directory that contains Nexus installation files and folders (hereinafter referred to as <nexus-install-directory>) and a Nexus work directory (hereinafter referred to as <nexus-work-directory>).

    <sonatype-work> is the default Nexus work directory. As a notation, <nexus-work-directory> is used in place of <sonatype-work> in this document.

    Make sure you have full access permissions on all Nexus folders.
  4. This step is applicable only for Nexus 2. Open the command prompt and start Nexus.
    • Linux:
      cd <nexus-install-directory>
      

      Add the following token in the <nexus-install-directory>/conf/nexus.properties file and start Nexus:

      nexus.ui.keepAlive=false
      ./bin/nexus start
      
    • Windows:
      cd <nexus-install-directory>
      

      Add the following token in the <nexus-install-directory>\conf\nexus.properties file and start Nexus:

      nexus.ui.keepAlive=false
      \bin\nexus start
      
  5. Verify if Nexus is running by accessing the URL:

    • For Nexus 2: <nexus host name>:port/nexus/index.html.
    • For Nexus 3: <nexus host name>:port/index.html.

    Default port is 8081. In case you have multiple Nexus instances, modify the application-port token in

    • /<nexus-install-directory>/conf/nexus.properties file for Nexus 2.
    • /<nexus-install-directory>/etc/nexus-default.properties file for Nexus 3.
  6. Stop Nexus.
    • Linux:
      ./bin/nexus stop
      
    • Windows:
      \bin\nexus stop
      

Upgrade Nexus 2 to Nexus 3

This section discusses how to migrate your repositories from Nexus 2 to 3 and the post migration steps.

  1. Upgrade your Nexus 2 server to Nexus 3 following the instructions. See Upgrading Nexus.

  2. Log on to the Nexus 3 server as a Site Administrator.

  3. Click Realms from the Security section on the Administration menu.

  4. Select TF Authentication Realm and TF Authentication Token Realm from the available list of realms.

  5. Add them to the list of active realms and click Save.

  6. Copy teamforgeProjectConfiguration folder from Nexus 2 to Nexus 3.

    • If you have installed Nexus 3 on the same Nexus 2 server:

      cp -r <nexus_2_data_dir>/sonatype-work/nexus/conf/teamforgeProjectConfiguration <nexus_3_data_dir>/sonatype-work/nexus3/etc/
      
    • If Nexus 2 and Nexus 3 are installed on separate servers:

      scp -r user@<nexus_2_data_dir>/sonatype-work/nexus/conf/teamforgeProjectConfiguration user@<nexus_3_data_dir>/sonatype-work/nexus3/etc/
      
  7. Copy the values of the TIME_TO_HOLD_USER_CACHE and TIME_TO_HOLD_PERMISSION_CACHE properties from the Nexus 2 ctf_nexus.properties file to that of Nexus 3.

    • Location of the ctf_nexus.properties file in Nexus 2:

      <nexus_2_data_dir>/sonatype-work/nexus/conf/      
      
    • Location of the ctf_nexus.properties file in Nexus 3:

      <nexus_3_data_dir>/sonatype-work/nexus3/etc/
      
  8. Change the application-port property in the <nexus_3_data_dir>/nexus/etc/nexus-default.properties file in Nexus 3.

  9. Do this step on the TeamForge Application Server. Run the nexus3_upgrade.sh script with the required arguments (see below) from the root path of the binary application to update the repository path and the IAF server name of Nexus 2 (against the Binary database) with that of Nexus 3.

    sh /opt/collabnet/integrations/cn-binary/bin/nexus3_upgrade.sh nexus2_app_name nexus3_app_name nexus3_repo_host_url    
    

    where,

    • nexus2_app_name: Integrated Application Framework (IAF) server name of Nexus 2
    • nexus3_app_name: Integrated Application Framework (IAF) server name of Nexus 3
    • nexus3_repo_host_url: Repository path of Nexus 3
  10. Restart Nexus 3.

    <nexus_3_app_dir>/bin/nexus restart
    
  11. Delete the Nexus 2 application integrated with TeamForge.

    1. Log on to TeamForge as a Site Administrator.

    2. Select My Workspace > Admin.

    3. Select Integrated Apps from the Projects menu.

    4. Select the Binaries tab.

    5. Select the Nexus 2 integrated app that you want to delete.

    6. Click Delete or Force Delete.

Key points to note in TeamForge with Nexus 3

Clicking a repository link from the Binaries page shows the repository in the Nexus application page on a separate browser tab.

Clicking Create Repository from the Binaries page redirects you to the Nexus application to create the repository.

Include Traceability functionality is not supported any more.

All users with permission to create binary repositories can link repositories.

You can create new repositories, update or delete existing repositories and do other repository management activities only from within the Nexus application (with TeamForge’s RBAC).

Roles and permissions are mapped/created automatically during the Nexus 2 to Nexus 3 migration and during repository creation.

You can link TeamForge to different types of Nexus repositories - Maven, Docker, NuGet, and so on.

You can link the repository groups from Nexus to TeamForge from the Binaries page.
Tags for this page: installation upgrade ctf_18.2