Skip to main content

Upgrading Nexus Repository in an HA Environment

Note

Only available in Sonatype Nexus Repository Pro. Interested in a free trial? Start here.

Warning

Upgrading Sonatype Nexus Repository in an HA environment does require downtime. Upgrade is not possible without downtime.

Do not add new instances until old instances are completely terminated.

Upgrading Using YAMLs (Without Helm Charts)

  1. Scale replicas to "0" using the command below:

    kubectl get statefulsets <stateful-set-name>
    kubectl scale statefulsets <stateful-set-name> --replicas=0
  2. Update the statefulsets.yaml with the Sonatype Nexus Repository version to wish you which to upgrade. Look for a line like the following:

    image: sonatype/nexus3:<version>
  3. Ensure the statefulset.yaml is set to include the desired number of replicas.

  4. Apply the updated statefulset.yaml:

    kubectl apply -f <updated-stateful-set-file>

Upgrading Using Helm Charts

  1. Scale replicas to 0 using the command below:

    kubectl get statefulsets -n <namespace>kubectl scale statefulsets <stateful-set-name> --replicas=0 -n <namespace>helm uninstall <release-name>
  2. Update your custom values.yaml to the desired Sonatype Nexus Repository version. Look for a line like the following:

    container:
        image:
        repository: sonatype/nexus3
        tag: <version-number>
  3. Use an upgrade command like the ones below:

    1. If you installed from Sonatype Helm index:

      helm upgrade <release-name> sonatype/nxrm-ha
    2. If you installed directly from the Git repository:

      helm upgrade <release-name> nxrm3-ha-repository/nxrm-ha-helm -f values.yaml

Upgrading From the AWS-/Azure-Specific HA Helm Charts to the Combined Helm Chart (Sonatype Nexus Repository 3.62.0+)

Before release 3.62.0, we offered separate Helm charts for AWS and Azure environments. As of release 3.62.0, we now offer a single HA Helm chart (GitHubArtifactHub) that can be used in AWS, Azure, or on-premises deployments.

If you were previously using one of the separate Helm charts and will now be using the combined one, follow these steps:

  1. Uninstall the old Helm chart using a command like the following where <release-name> is the string you provided when first installing the chart:

    helm uninstall <release-name>
  2. Update the values.yaml for the new combined HA Helm Chart (GitHubArtifactHub). with appropriate settings for your deployment. Note that you will need to customize a new values.yaml with appropriate information for your deployment; you will not be able to use the same custom values.yaml that you used with the individual AWS/Azure Helm charts.

  3. Install the new Helm chart using a command like the following:

    helm install <release-name> --debug

Upgrading in a Non-Kubernetes Environment

If you are not using Kubernetes, you will need to stop each Sonatype Nexus Repository instance before upgrading.

Then, you can upgrade each instance following the instructions provided in Upgrading a Standalone Instance.