This article explains the process of migrating an installed Nexus 2 or Nexus 3, configured for Talend, to Artifactory Pro on premises. The article also outlines how to migrate to Artifactory OSS, if you don't have a license for Artifactory Pro.
Windows Server 2016 (similar on Linux)
Artifactory Pro installed on premises.
For information on installing Artifactory Pro, see the JFrog Artifactory User Guide, and scroll down to the Installing on Windows section.
Install Artifactory in C:\Talend\ArtifactoryPro(8083).
Configure Artifactory to match your Nexus settings, except for the repositories, users, groups, and authorities that are ported using this tooling.
For best practice recommendations for configuring Artifactory for use in Talend, watch the Expert Session Learn About Repository Manager Migration on the Architect Sessions – Recorded Sessions web page.
Configuring the migration:
Connecting to Nexus.
Nexus 2 differences
Setting up the Repository.
Verifying the configuration.
Running the migration.
Rerunning the migration.
For a brief introduction to the NexusToArtifactory tool, see Migrate from Nexus to Artifactory.
Open your web browser and navigate to the GitHub jfrog/nexus2artifactory page.
Go back to the GitHub jfrog/nexus2artifactory page, and scroll down to the Usage section for instructions on how to run the tool.
Still on the nexus2artifactory page, scroll down and read the Future Development section for the current unsupported items. Note that there are also notes in the Usage section.
Open a command prompt window as an administrator in Windows, then using the cd command, change to the directory that you created earlier: C:\Talend\ArtifactoryMigration\JFrog.
Run the NexusToArtifactory.exe.
Note: The red ! after i indicates there is something to do.
Enter i (Initial Setup) in the tool window. The following screen appears.
Enter n (Nexus Data Directory).
Enter the full path of the directory where your Talend Nexus is installed, in this case, C:\Talend\7.1.1\tac\Artifact-Repository-Nexus-3.9.0-01-win64\sonatype-work\nexus3, then press Enter.
Enter x (Nexus URL) and provide the web address of your Talend Nexus, in this case, http://localhost:8081/, then press Enter.
Enter s (Nexus Username) and provide the ID of the Talend Nexus admin user account, in this case, admin, then press Enter.
Ignore the warning:
Incorrect username and/or password.
Enter c (Nexus Password) and provide the password of your Talend Nexus admin user account, in this case, Talend123, then press Enter. The text turns green when everything is correct.
Set up the Artifactory by performing the following steps:
Enter a (Artifactory URL) and provide the web address of your Artifactory Pro install, in this case, http://localhost:8083/artifactory/, then press Enter.
Enter u (Artifactory Username) and provide the admin ID of your Artifactory Pro install, in this case, admin, then press Enter.
Enter p (Artifactory Password) and provide the admin password of your Artifactory Pro install, in this case, Talend123, then press Enter.
Enter i (Initial Setup) in the tool window. Enter n (Nexus Data Directory).
Enter the full path of the directory where your Talend Nexus is installed, in this case, C:\Talend\Nexus2-651(8561)\sonatype-work\nexus.
For Nexus 2 the ID and password are not needed. These are the only differences when connecting to Nexus 2.
Enter the Artifactory details as you did in the previous steps.
See the https://github.com/JFrog/nexus2artifactory page for some of the errors you may encounter with repositories.
The default Nexus 3 install of Talend does not appear to have any errors. However, on Nexus 2, the central-m1 repository cannot be migrated because it is a shadow, so it must be unmarked (m key to toggle). These commands are demonstrated below.
You will transfer all the repositories, but only the following are needed for Talend by default:
You can choose to deselect the others if you wish.
Enter r (Repository Migration Setup) for Talend Nexus 3 default. The likely output is shown below:
If you don't see the repository you want, use the right arrow key > to go to the Next Page. Use the left arrow key < to go back to the Previous Page.
Type a number (1-8) to toggle the migration of the respective repository on (a green +) or off.
Enter e (Edit Repository), followed by 1. Pressing Enter on the second screen displays the following:
The commands on this screen work as you might expect, you do not need to make changes.
Enter q (Back) to the main screen, then s (Save Config JSON File), type nexus3, then press Enter.
By default, there is a red ! warning on the Security Migration Setup. Enter u.
Enter u again for Users Migration Setup.
Note that there isn't a green + sign next to admin and it is not going to be migrated. This is correct.
There is a red ! on Default Password, and you need to set this, but first a warning: Artifactory cannot copy the existing Nexus user passwords, so you must set new ones using one of the following strategies:
Use of the global Default Password is shown below:
Make the changes you require for the users. You may wish to make changes to G (Groups) and P (Permissions), but there is no need to do this for the Talend Nexus 3 or Nexus 2 defaults.
Enter q (Back) twice to go back to the main screen, and s (Save Config JSON File), Nexus3, then press Enter.
Enter q (Exit). You are ready to verify and run the configuration.
In the admin command window, run the following command:
NexusToArtifactory.exe –l logfile.log
Notice the -l switch, which collects log messages to a file. More useful options are described in the GitHub repository for the code, for example, the -v (error, warning, info, debug) to set the logging level.
Enter l (Load Config JSON File), enter nexus3, then press Enter.
Enter v (Verify Configuration). If there are errors as noted by a red !, correct them. Enter s (Save Config JSON file) to save the file, and verify it again.
Enter x (Run Migration).
A sample log file, logfile.log, is attached to this article. Enter q to continue.
Log in to Artifactory Pro, http://localhost:8083, as an Administrator.
From the navigation menu on the left, select Repositories. Go back to the home page, then refresh the browser page. This will cause Artifactory to update the number of artifacts being served.
Go back to the NexusToArtifactory.exe window, and enter x, then enter x again.
Notice the number of Artifacts has risen sharply; this is a concern. Go back into Artifactory and repeat the actions under Running the migration above, and you’ll see many more artifacts.
Back in the Artifact Repository Browser view, select Trash Can. From the Actions pull-down menu select Empty Trash Can, then click Empty Trash button.
Go back the home screen and refresh the page.
All is good. It seems that the migration tool deletes and inserts identical copies of some artifacts during a repeated migration, but this hasn’t caused any issues in testing. Test your migration results to ensure you have the same outcome.
There are a number of ways to reset the Artifactory Pro install to empty, if you need to start again.
Make a copy of the directory structure—before you start but after configuring Artifactory—then shut down Artifactory and copy the original directory structure back in.
Do a backup in Artifactory when you start, and restore this (or Export/Import).
Delete the repositories, users, groups, and others—remember to empty the trash. This is not difficult for a default Talend install, but it might be quite involved if this is your main repository for the company that covers far more than just the Talend repositories and users.
Simple counts are a good start, but you might want to run a full operational test of Jobs running in a test environment, to be sure.
Set the password of the user IDs.
Update TAC (TMC). For more information on updating TMC see the Bookshelf references section of this article. For TAC you need to edit Settings > Configurations > Artifact Repository > Software Update.
Artifactory OSS, the free version of Artifactory, does not support REST APIs, so you cannot use the NexusToArtifactory tool directly. If you don't have a licensed version of Artifactory Pro, download a trial version, then follow the instructions below to migrate to Artifactory OSS:
Follow the article above through Running the migration.
Install a copy of Artifactory OSS in another directory with a different port number.
Run an Artifactory System Export from Artifactory Pro to the file system, then shut down Artifactory Pro.
Update the ARTIFACTORY_HOME variable to point to the Artifactory OSS directory, then start Artifactory OSS.
Log in to Artifactory OSS, then run System Import on the export from Artifactory Pro.
For more information, see these pages on the Talend Help Center: