Standalone

Upgrading

Before upgrading, be sure to check the upgrade notes section in the release notes for any special considerations when upgrading from older versions of Develocity. Additionally, ensure that K3s and Helm are upgraded to their latest versions.

Gradle recommends that administrators continue to use the same namespace when upgrading Develocity, as namespace changes create a new installation and require migration of data. For example, if you initially installed Develocity into the gradle-enterprise namespace, your upgrade should also use that. The default for the following snippets is develocity.

To upgrade K3s to the latest stable version, you can use the following script:

$ curl -sfL https://get.k3s.io | sh -

To upgrade Helm to the latest version, you can use the following script:

$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh
Develocity upgrades irreversibly update the database schema. This means that upgrades are irreversible unless the database is restored from a backup. As such, we strongly recommend users take a database backup before upgrading, and be prepared to restore it if the upgrade encounters a critical issue.

To upgrade Develocity:

  1. Execute helm repo update gradle to update locally available charts.

  2. Execute the upgrade command:

$ helm upgrade \
    --namespace develocity \
    --reuse-values \ (1)
    ge-standalone gradle/gradle-enterprise-standalone (2)
1 The --reuse-values parameter instructs Helm to reuse previous values.
2 Use the same Helm release name (ge-standalone in the examples in this guide).

or for airgap installations:

$ helm upgrade \
    --namespace develocity \
    --reuse-values \
    ge-standalone gradle-enterprise-standalone-«chart-version».tgz

If you do specify some changed values (for example, to use a new license file), they will be merged with your previous values.

Alternatively, to force helm upgrade to use only the values that you set at upgrade time, run with --reset-values instead of --reuse-values.

Running helm upgrade with --reset-values will cause any previous values to be lost. All values (including license files, SSL certificates, etc.) will need to be set as part of the command.

For major version upgrades (e.g. 2021.2.4 to 2021.3 or later), if data is stored in a user-managed database and superuser credentials are not supplied, the database setup script must be run prior to the upgrade. The correct script for the major version to which the system is being upgraded can be downloaded from the appendix.

Changing configuration values

To change configuration values, follow the same procedure as for upgrading, but specify the current version to ensure that a later version does not accidentally get installed.

To check the currently deployed version, run:

$ helm history --namespace develocity ge-standalone --max 1

To apply new configuration values to a Helm-managed online installation, run:

$ helm upgrade \
    --namespace develocity \
    ge-standalone gradle/gradle-enterprise-standalone \
    --version «deployed-version»
    --reuse-values
    «new values options»

or for a Helm-managed airgap installation:

$ helm upgrade \
    --namespace develocity \
    ge-standalone gradle-enterprise-standalone-«deployed-version».tgz \
    --version «deployed-version»
    --reuse-values
    «new values options»

Where «deployed-version» is the running version of Develocity. The above examples reuse previous values by default. Any specified values will override the existing values. Alternatively, if you wish to specify all values explicitly (ignoring any previously set values), run with --reset-values instead of --reuse-values.

Running helm upgrade with --reset-values will cause any previous values to be lost. All values (including license files, SSL certificates, etc.) will need to be set as part of the command.

Configuration values are provided to Helm when running the helm command by:

  • providing a Helm values file (which can contain inline files) with --values

  • providing files (such as the Develocity license or certificates) with --set-file

If you have made local modifications to a Helm values file, apply the changes to your installation by running an upgrade command (see above) with a --values «updated-values-file» option.

If you have made local modifications to a file you previously provided via --set-file, apply the changes to running an upgrade command (see above) with a --set-file option.

Changing namespaces

Gradle recommends that administrators continue to use the same namespace when upgrading Develocity. For example, if you initially installed Develocity into the develocity namespace, your upgrade should also use that same namespace.

Kubernetes

Upgrading

Before upgrading, be sure to check the upgrade notes section in the release notes for any special considerations when upgrading from older versions of Develocity.

Develocity upgrades irreversibly update the database schema. This means that upgrades are irreversible unless the database is restored from a backup. As such, we strongly recommend users take a database backup before upgrading, and be prepared to restore it if the upgrade encounters a critical issue.

To upgrade Develocity:

  1. Execute helm repo update gradle to update locally available charts.

  2. Execute the upgrade command:

$ helm upgrade \
    --namespace develocity \
    --reuse-values \ (1)
    ge gradle/gradle-enterprise (2)
1 The --reuse-values parameter instructs Helm to reuse previous values.
2 Use the same Helm release name (ge in the examples in this guide).

or for airgap installations:

$ helm upgrade \
    --namespace develocity \
    --reuse-values \
    ge gradle-enterprise-«chart-version».tgz

If you do specify some changed values (for example, to use a new license file), they will be merged with your previous values.

Alternatively, to force helm upgrade to use only the values that you set at upgrade time, run with --reset-values instead of --reuse-values.

Running helm upgrade with --reset-values will cause any previous values to be lost. All values (including license files, SSL certificates, etc.) will need to be set as part of the command.

If using helm template, all values must be supplied for each invocation.

You will be able to update any configuration values at upgrade time, but keep in mind that some values are immutable after initial installation, such as persistent volume sizes for provisioners that do not support dynamic resizing.

For major version upgrades (e.g. 2021.2.4 to 2021.3 or later), if data is stored in a user-managed database and superuser credentials are not supplied, the database setup script must be run prior to the upgrade. The correct script for the major version to which the system is being upgraded can be downloaded from the appendix.

Upgrading with multiple replicas

If you have configured more than one replica, you must scale the replicas down to one before upgrading to avoid having mixed versions running at the same time.

Before applying the upgrade, run the following command to scale the application down to one replica:

$ helm upgrade \
    --namespace develocity \
    --reuse-values \
    --set=global.scaling.replicas=1 \
    --version «deployed-version» \
    ge gradle/gradle-enterprise

Where «deployed-version» is the running version of Develocity, not the version being upgraded to.

The upgrade to the new version can now be executed. If your upgrade processes uses --reuse-values, you will need to include a --set=global.scaling.replicas=N argument where N is the desired replica number. The following example performs a version upgrade and changes the replica number in one operation:

$ helm upgrade \
    --namespace develocity \
    --reuse-values \
    --set=global.scaling.replicas=N \
    --version «deployed-version» \
    ge gradle/gradle-enterprise

Changing configuration values

To change configuration values, follow the same procedure as for upgrading, but specify the current version to ensure that a later version does not accidentally get installed.

To check the currently deployed version, run:

$ helm history --namespace develocity ge --max 1

To apply new configuration values to a Helm-managed online installation, run:

$ helm upgrade \
    --namespace develocity \
    ge gradle/gradle-enterprise \
    --version «deployed-version»
    --reuse-values
    «new values options»

or for a Helm-managed airgap installation:

$ helm upgrade \
    --namespace develocity \
    ge gradle-enterprise-«deployed-version».tgz \
    --version «deployed-version»
    --reuse-values
    «new values options»

Where «deployed-version» is the running version of Develocity. The above examples reuse previous values by default. Any specified values will override the existing values. Alternatively, if you wish to specify all values explicitly (ignoring any previously set values), run with --reset-values instead of --reuse-values.

Running helm upgrade with --reset-values will cause any previous values to be lost. All values (including license files, SSL certificates, etc.) will need to be set as part of the command.

Configuration values are provided to Helm when running the helm command by:

  • providing a Helm values file (which can contain inline files) with --values

  • providing files (such as the Develocity license or certificates) with --set-file

If you have made local modifications to a Helm values file, apply the changes to your installation by running an upgrade command (see above) with a --values «updated-values-file» option.

If you have made local modifications to a file you previously provided via --set-file, apply the changes to running an upgrade command (see above) with a --set-file option.

Changing namespaces

Gradle recommends that administrators continue to use the same namespace when upgrading Develocity. For example, if you initially installed Develocity into the develocity namespace, your upgrade should also use that same namespace.

Changing storage class

Storage classes cannot be changed once a persistent volume claim is in place. If you need to alter any configured Develocity storage classes, please contact Gradle support for assistance.

Appendix