Sonatype Nexus Repository#
This section explains why you would use Posit Package Manager in addition to Nexus Repository, and provides the necessary integration steps.
Why use Posit Package Manager and Nexus Repository?#
Nexus Repository is a general-purpose manager that supports multiple languages. If you already have Nexus Repository, or your IT organization has standardized on Nexus Repository, there are benefits to combining it with Package Manager: it can help manage binaries and build artifacts coming from upstream sources.
Do I need Nexus Repository if I only have Package Manager?
No, Package Manager is a complete solution for data science teams using R and/or Python.
Why should I consider Package Manager if I already have Nexus Repository?
Nexus Repository provides basic support for packages, but unfortunately, most data science teams face additional challenges:
- Version Management - While Nexus Repository provides access to CRAN and PyPI packages, most data scientists are familiar with the challenges that come with managing package versions over time. Package Manager makes this process easier by versioning the repository in addition to versioning individual packages, making it possible for old code to "just work."
- Approved Subsets of CRAN - Nexus Repository proxies all of CRAN and PyPI. Often, organizations require restricted access to approved subsets of these sources. Package Manager uses knowledge of package dependencies to help organizations maintain these validated subsets.
- Linux Binaries - Package Manager provides access to pre-compiled R package binaries that make package installation fast enough to prevent disruptions and make it drastically easier to implement automation.
Luckily, teams do not have to pick between the IT-supported Nexus Repository and the benefits of Package Manager -- the two tools can be combined together.
This integration is especially helpful for organizations that wish to have Posit Package Manager offline and are able to use Nexus Repository as a pass-through proxy for online package sources.
In the Package Manager and Nexus Repository integration, Package Manager still configures CRAN, Bioconductor, and PyPI repositories, not Nexus Repository. Package Manager downloads packages through the Nexus Repository proxy, rather than the Posit Package Service directly.
How to use Posit Package Manager with Nexus Repository#
Integrating Posit Package Manager and Nexus Repository#
The goal of these steps is to enable Package Manager to pull CRAN and Python packages and metadata from Nexus Repository.
Navigate to your Nexus Repository instance and log in as an admin.
Click “Server administration and configuration” at the top of the page.
Click “Repositories” on the left-hand side, and then click “Create repository.”
On the “Select Recipe” page, click the “raw (proxy)” option.
Inside the “Create Repository” view, enter
package-manager-syncas the unique identifier
For the “Remote storage” option enter:
Under "Use the Nexus Repository truststore," click "View Certificate," and then "add certificate to truststore."
Under "Storage", clear the "Strict Content Type Validation" check box.
Click "Create Repository" and copy the URL presented.
SSH into the server where Package Manager is installed. Run the following command to ensure that the service is stopped:
Edit the configuration file to add the following configuration section:
Run the following command to restart the service:
Follow the Quick Start section of this admin guide to create and sync a CRAN, Bioconductor, or PyPI repository.
To verify the integration is complete, navigate to the Activity page in your instance of Posit Package Manager. You will see a repository with an Activity Log showing the addition of CRAN, Bioconductor, or PyPI packages.
/var/log/rstudio/rstudio-pm/rstudio-pm.log,you will see that Package Manager has been pointed to the Nexus URL.
In Nexus Repository, you will see evidence that packages have been pulled through it, along with the time at which Package Manager pulled the latest cache sync.
Users will access packages from Posit Package Manager instead of accessing them directly from Nexus Repository.