Upgrading from Version Below 6.10
To upgrade from a version below 6.10.x, you first need to upgrade to version 6.10.x (or any 6.x version above 6.10.x) as described in the Upgrading Artifactory 6.x documentation, and then continue to upgrading from version 6.10 to 7.x.
Before you upgrade, ensure that the operating system version that you use is supported. See System Requirements for detailed information on operating system support.
Upgrading from Version 6.10.x Onwards to 7.x
The following table provides the version in 7.x you can upgrade from particular versions of 6.x.
Upgrade from 6.x Version | Upgrade to 7.x Version |
---|---|
Artifactory version 6.23.21 and above | Artifactory version 7.21.3 and above |
Artifactory version 6.23.15 and above | Artifactory version 7.17.5 and above |
Artifactory version 6.23.13 and above | Artifactory version 7.16.0 and above |
Artifactory version 6.23.7 and above | Artifactory version 7.12.6 and above |
Artifactory version 6.23.3 and above | Artifactory version 7.11.x and above |
Artifactory version 6.23.1 and above | Artifactory version 7.10.x and above |
Artifactory version 6.23.0 and above | Artifactory version 7.10.x and above |
Artifactory version 6.22.x and above | Artifactory version 7.9.x and above |
Artifactory version 6.21.x and above | Artifactory version 7.7.x and above |
Artifactory version 6.20.x and above | Artifactory version 7.5.x and above |
Artifactory version 6.19.x and above | Artifactory version 7.4.2 and above |
Artifactory version 6.18.x and above | Artifactory version 7.3.2 and above |
Artifactory version 6.10.x to 6.17x | Any version of Artifactory 7.x |
Apart from the exceptions listed above, you can upgrade to any version of 7.x from any version from 6.10.x and above.
If you use S3 as the filestore, before you upgrade from 6.23.28 and higher (6.23.28, 6.23.31, 6.23.33, 6.23.36, 6.23.37, 6.23.38) to version 7.x, provide the S3 credentials in a non-encrypted, plaintext format. Artifactory will no longer be able to decrypt the encrypted credentials due to change in the encryption algorithm in version 7.x. and fails to start after upgrade. The credentials are automatically encrypted after the upgrade.
There are several new concepts introduced in Artifactory 7.x, improving the installation and customization process. For example, a system.yaml file holds the configurations and customizations that you make to the Artifactory installation. Artifactory preserves your configuration during an upgrade.
Artifactory 6.x has access-admin
and arti-admin
users for Access and Artifactory respectively. In Artifactory 7.x, a global admin
user handles administration across services. The access-admin
and arti-admin
users are still kept during the upgrade process. You can safely delete these users after the upgrade.
The following upgrade methods are supported:
Linux Archive Upgrade
Migration is a manual process for a Linux archive installation. The below steps also include copying directories over and running the migration script
Make sure to run all commands on the server with the user that's running Artifactory.
Stop the current server.
cd $ARTIFACTORY_HOME/bin ./artifactoryctl stop
Extract the contents of the compressed archive and move it into artifactory directory.
tar -xvf jfrog-artifactory-<pro|oss|cpp-ce>-<version>-linux.tar.gz mkdir jfrog mv artifactory-<pro|oss|cpp-ce>-<version> jfrog/artifactory
Set your
ARTIFACTORY_HOME
andJFROG_HOME
variables.
Note: the$ARTIFACTORY_HOME
variable points to your existing installation, and the$JFROG_HOME
variable points to the new installation.export ARTIFACTORY_HOME=<Path to your current Artifactory installation> export JFROG_HOME=<Full path to jfrog directory, for example: /opt/jfrog> export JF_PRODUCT_HOME=$JFROG_HOME/artifactory
Copy the directories from your current to the new path.
Below are the directories you need to copy from your current path to the new path.
The examples below of copying the data from your version 6 installation to your version 7 are provided in BASH.
Mandatory Steps# Artifactory data mkdir -p $JFROG_HOME/artifactory/var/data/artifactory/ cp -rp $ARTIFACTORY_HOME/data/. $JFROG_HOME/artifactory/var/data/artifactory/ # Access data mkdir -p $JFROG_HOME/artifactory/var/data/access/ cp -rp $ARTIFACTORY_HOME/access/data/. $JFROG_HOME/artifactory/var/data/access/ # Replicator data # Note: If you've have never used the Artifactory Replicator # your $ARTIFACTORY_HOME/replicator/ directory will be empty mkdir -p $JFROG_HOME/artifactory/var/data/replicator/ cp -rp $ARTIFACTORY_HOME/replicator/data/. $JFROG_HOME/artifactory/var/data/replicator/ # Artifactory config mkdir -p $JFROG_HOME/artifactory/var/etc/artifactory/ cp -rp $ARTIFACTORY_HOME/etc/. $JFROG_HOME/artifactory/var/etc/artifactory/ # Access config mkdir -p $JFROG_HOME/artifactory/var/etc/access/ cp -rp $ARTIFACTORY_HOME/access/etc/. $JFROG_HOME/artifactory/var/etc/access/ # Replicator config # Note: If you have never used the Artifactory Replicator # your $ARTIFACTORY_HOME/replicator/ directory will be empty mkdir -p $JFROG_HOME/artifactory/var/etc/replicator/ cp -rp $ARTIFACTORY_HOME/replicator/etc/. $JFROG_HOME/artifactory/var/etc/replicator/ # master.key mkdir -p $JFROG_HOME/artifactory/var/etc/security/ cp -p $ARTIFACTORY_HOME/etc/security/master.key $JFROG_HOME/artifactory/var/etc/security/master.key # server.xml mkdir -p $JFROG_HOME/artifactory/var/work/old cp -p $ARTIFACTORY_HOME/tomcat/conf/server.xml $JFROG_HOME/artifactory/var/work/old/server.xml # artifactory.defaults cp -rp $ARTIFACTORY_HOME/bin/artifactory.default $JFROG_HOME/artifactory/var/work/old/artifactory.default #or, if Artifactory was installed a service cp -rp $ARTIFACTORY_HOME/etc/default $JFROG_HOME/artifactory/var/work/old/artifactory.default # External database driver, for example: mysql-connector-java-<version>.jar mkdir -p $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib cp -rp $ARTIFACTORY_HOME/tomcat/lib/<your database driver> $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib/<your database driver> # Remove logback.xml with old links. Please consider migrating manually anything that is customized here rm -f $JFROG_HOME/artifactory/var/etc/artifactory/logback.xml rm -f $JFROG_HOME/artifactory/var/etc/access/logback.xml # Move Artifactory logs mkdir -p $JFROG_HOME/artifactory/var/log/archived/artifactory/ cp -rp $ARTIFACTORY_HOME/logs/. $JFROG_HOME/artifactory/var/log/archived/artifactory/ # Move configuration files # Note: Run the following only when upgrading from Artifactory version 6.x to version 7.5.x and above. mkdir -p $JFROG_HOME/artifactory/var/etc/artifactory/old mkdir -p $JFROG_HOME/artifactory/var/etc/access/old mkdir -p $JFROG_HOME/artifactory/var/etc/replicator/old cp $JFROG_HOME/artifactory/var/etc/artifactory/db.properties $JFROG_HOME/artifactory/var/etc/artifactory/old/db.properties cp $JFROG_HOME/artifactory/var/etc/artifactory/ha-node.properties $JFROG_HOME/artifactory/var/etc/artifactory/old/ha-node.properties cp $JFROG_HOME/artifactory/var/etc/access/db.properties $JFROG_HOME/artifactory/var/etc/access/old/db.properties cp $JFROG_HOME/artifactory/var/etc/replicator/replicator.yaml $JFROG_HOME/artifactory/var/etc/replicator/old/replicator.yaml
HA Steps
Replace any relative paths in the$ARTIFACTORY_HOME/etc/ha-node.properties
file with absolute paths.For example:# relative path artifactory.ha.data.dir=artifactory-ha # absolute path artifactory.ha.data.dir=/var/opt/jfrog/artifactory-ha
Optional Steps
# Artifactory backup (optional) mkdir -p $JFROG_HOME/artifactory/var/backup/artifactory/ cp -rp $ARTIFACTORY_HOME/backup/. $JFROG_HOME/artifactory/var/backup/artifactory/ # Access backup (optional) mkdir -p $JFROG_HOME/artifactory/var/backup/access/ cp -rp $ARTIFACTORY_HOME/access/data/. $JFROG_HOME/artifactory/var/backup/access/ # Replicator backup (optional) mkdir -p $JFROG_HOME/artifactory/var/backup/replicator/ cp -rp $ARTIFACTORY_HOME/replicator/data/. $JFROG_HOME/artifactory/var/backup/replicator/ # Access logs (optional) mkdir -p $JFROG_HOME/artifactory/var/log/archived/access/ cp -rp $ARTIFACTORY_HOME/access/logs/. $JFROG_HOME/artifactory/var/log/archived/access/ # Replicator logs (optional) mkdir -p $JFROG_HOME/artifactory/var/log/archived/replicator/ cp -rp $ARTIFACTORY_HOME/replicator/logs/. $JFROG_HOME/artifactory/var/log/archived/replicator/
Run the migration script with the same privileges as you have in your current Artifactory installation. This script will copy over and translate your current configurations to the new configuration format, according to the new file system layout.
The migration script only migrates configuration values. Any comments added to the configuration files in the Artifactory 6.x installation will not be migrated.
cd $JFROG_HOME/artifactory/app/bin ./migrate.sh
When upgrading Artifactory using Linux Archive, you will need to verify that the copied directories and the copied content have the right owners.
If you are using the default user:group, the owner will automatically be assigned artifactory:artifactory, and you will not need to take any further actions (the upgrade will use these by default).
If, however, you are using a custom user:group, you will then need to go the Artifactory
system.yaml
file and update it with the custom user:group. You will then need to make sure that the directory has the same user and group.- Check that the migration has completed successfully, by reviewing the following files:
- migration log:$JFROG_HOME/artifactory/var/log/migration.log
- system.yaml configuration:$JFROG_HOME/artifactory/var/etc/system.yaml
This newly created file will contain your current custom configurations in the new format. If Artifactory was installed as a service in previous version, install this version also as a service.
When an earlier version is installed as a service, it is important to update the new one also as a service. Otherwise a restart of the server may lead to older version of Artifactory coming up.
cd $JFROG_HOME/artifactory/app/bin ./installService.sh
Manage Artifactory.
$JFROG_HOME/artifactory/app/bin/artifactoryctl start|stop|check
Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine: http://localhost:8082/ui/If you had a reverse proxy or load balancer configured with your Artifactory 6.x, you will need to create a new reverse proxy configuration and update your reverse proxy settings.
You can generate a new configuration template by accessing the upgraded Artifactory server UI (by default
http://localhost:8082/ui/
), navigate to
Administration > Artifactory > General > HTTP Settings adjust your Reverse Proxy Settings and generate a new configuration template. See Reverse Proxy Settings.Check Artifactory Log.
tail -f $JFROG_HOME/artifactory/var/log/console.log
Docker Upgrade
The Docker upgrade only applies when upgrading from Artifactory 6.x to Artifactory 7.4.1 and above.
Stop and remove Artifactory using native Docker commands.
for exampledocker stop artifactory docker rm -f artifactory
Set the path to your current Artifactory home, and make sure the directory permissions are set correctly.
export ARTIFACTORY_HOME=<Mount Path to your current Artifactory data directory> chown -R 1030:1030 $ARTIFACTORY_HOME
Start the Artifactory container
docker run -e ENABLE_MIGRATION=y --name artifactory -v $ARTIFACTORY_HOME:/var/opt/jfrog/artifactory -d -p 8081:8081 -p 8082:8082 releases-docker.jfrog.io/jfrog/artifactory-<pro|oss|cpp-ce>:latest
- Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine:http://localhost:8082/ui/
. Check Artifactory Log.
docker logs -f artifactory
Docker Compose Upgrade
Stop and remove the current containers.
Upgrading from docker rundocker stop artifactory docker rm -f artifactory
Upgrading from docker compose available at https://bintray.com/jfrog/run/art-composedocker stop artifactory postgresql nginx docker rm -f artifactory postgresql nginx
Extract the contents of the compressed archive and go to the extracted folder.
tar -xvf jfrog-artifactory-<pro|oss|cpp-ce>-<version>-compose.tar.gz
.env file included within the Docker-Compose archive
This .env file is used by docker-compose and is updated during installations and upgrades.
Notice that some operating systems do not display dot files by default. If you make any changes to the file, remember to backup before an upgrade.
Run the config.sh script to setup folders with required ownership.
./config.sh
Check that the migration has completed successfully, by reviewing the following files:
migration log:
$JFROG_HOME/artifactory/var/log/migration.log
system.yaml
configuration:$JFROG_HOME/artifactory/var/etc/system.yaml
. This newly created file will contain your current custom configurations in the new format.Depending on your choices, a selected
docker-compose.yaml
will be available in the extracted folder. However, there are a few docker-compose templates in the directory templates.You can choose any template and copy it to the extracted folder asdocker-compose.yaml
.
Manage Artifactory using native Docker Compose commands:
docker-compose -p rt <action> command
.# Starting from 7.8.x, PostgreSQL needs to be started before starting the other services. docker-compose -p rt-postgres -f docker-compose-postgres-9-6-11v.yaml up -d docker-compose -p rt up -d docker-compose -p rt ps docker-compose -p rt down
Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine: http://localhost:8082/ui/If you had a reverse proxy or load balancer configured with your Artifactory 6.x, you will need to create a new reverse proxy configuration and update your reverse proxy settings.
You can generate a new configuration template by accessing the upgraded Artifactory server UI (by default http://localhost:8082/ui/), navigate to
Administration > Artifactory > General > HTTP Settings adjust your Reverse Proxy Settings and generate a new configuration template. See Reverse Proxy Settings.Check Artifactory Log.
tail -f $JFROG_HOME/artifactory/var/log/console.log
Docker Compose Upgrade Using Docker Volumes
Stop and remove the current Docker containers.
docker stop artifactory postgresql docker rm -f artifactory postgresql
Extract the contents of the compressed archive and go to the extracted folder.
tar -xvf jfrog-artifactory-<pro|oss|cpp-ce>-<version>-compose.tar.gz
Copy the
docker-compose-volumes.yaml
file to the extracted folder.cp templates/docker-compose-volumes.yaml docker-compose.yaml
Add the entry to the
.env
file.
Note: Avoid duplicating the entry in the.env
file.echo -e "JF_SHARED_NODE_IP=$(hostname -i)" >> .env echo -e "JF_SHARED_NODE_ID=$(hostname -s)" >> .env echo -e "JF_SHARED_NODE_NAME=$(hostname -s)" >> .env
Remove the following env from the
docker-compose.yaml
file.
Note: Migration starts from within the container and a newsystem.yaml
aligning to the migrated data from Artifactory 6.x is created. To leverage this process, remove the env here to ensure that the old connection details are taken fromsystem.yaml
because the ENV supercedes thesystem.yaml
entries. You can also choose to update these environment values to the old connection details for the upgrade to be successful.- JF_SHARED_DATABASE_TYPE=postgresql - JF_SHARED_DATABASE_USERNAME=artifactory - JF_SHARED_DATABASE_PASSWORD=password - JF_SHARED_DATABASE_URL=jdbc:postgresql://postgresql:5432/artifactory - JF_SHARED_DATABASE_DRIVER=org.postgresql.Driver
Manage Artifactory using the native Docker Compose command:
docker-compose -p rt <action>
command.
Note: Run this command from the extracted folder.Examplesdocker-compose -p rt up -d docker-compose -p rt ps docker-compose -p rt down
RPM Upgrade
Stop the current server.
service artifactory stop
Install Artifactory as a service on Red Hat compatible Linux distributions, as a root user.
yum -y install jfrog-artifactory-<pro|oss|cpp-ce>-<version>
Check that the migration has completed successfully, by reviewing the following files:
migration log:
$JFROG_HOME/artifactory/var/log/migration.log
system.yaml
configuration:$JFROG_HOME/artifactory/var/etc/system.yaml
This newly created file will contain your current custom configurations in the new format.
Manage Artifactory.
service artifactory start|stop
Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine: http://localhost:8082/ui/If you had a reverse proxy or load balancer configured with your Artifactory 6.x, you will need to create a new reverse proxy configuration and update your reverse proxy settings.
You can generate a new configuration template by accessing the upgraded Artifactory server UI (by default http://localhost:8082/ui/), navigate to
Administration > Artifactory > General > HTTP Settings adjust your Reverse Proxy Settings and generate a new configuration template. See Reverse Proxy Settings.Check Artifactory Log.
tail -f $JFROG_HOME/artifactory/var/log/console.log
Debian Upgrade
Stop the current server.
service artifactory stop
Install Artifactory as a service on a Debian compatible Linux distributions, as a root user.
Run Installationdpkg -i jfrog-artifactory-<pro|oss|cpp-ce>-<version>.deb
Check that the migration has completed successfully, by reviewing the following files:
migration log:
$JFROG_HOME/artifactory/var/log/migration.log
system.yaml
configuration:$JFROG_HOME/artifactory/var/etc/system.yaml
This newly created file will contain your current custom configurations in the new format.
Manage Artifactory.
service artifactory start|stop
Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine: http://localhost:8082/ui/If you had a reverse proxy or load balancer configured with your Artifactory 6.x, you will need to create a new reverse proxy configuration and update your reverse proxy settings.
You can generate a new configuration template by accessing the upgraded Artifactory server UI (by default http://localhost:8082/ui/), navigate to
Administration > Artifactory > General > HTTP Settings adjust your Reverse Proxy Settings and generate a new configuration template. See Reverse Proxy Settings.Check Artifactory Log.
tail -f $JFROG_HOME/artifactory/var/log/console.log
Helm Upgrade
Artifactory Upgrade from 6.x to 7.x (App Version)
Upgrading from 6.x to 7.x requires a one time migration process. This is done automatically on pod startup if needed. It is possible to configure the migration timeout with the following configuration in extreme cases. The default provided should be more than enough for completion of the migration:
artifactory: # Migration support from 6.x to 7.x migration: enabled: true timeoutSeconds: 3600
Migrating the MasterKey from Version 6.x to 7.x (App Version)
Version 6.x only supports a masterKey with 16 hex (32 characters) and if you have set a masterKey using openssl rand -hex 32
(64 characters) in 6.x, only the first 32 characters are used and rest are ignored. When migrating from 6.x to 7.x, we trim the first 32 characters and set the masterkey, which implies that 7.x still uses the trimmed masterkey of 6.x. Therefore, the artifactory.masterKey
should not be passed during migration from 6.x to 7.x.
Upgrading from 8.x to 11.x and Above Chart Versions
If you are upgrading from 8.x to 11.x and above chart versions, remember to delete the existing PostgreSQL statefulset before upgrading the chart due to breaking changes in PostgreSQL subchart.
kubectl delete statefulsets <OLD_RELEASE_NAME>-postgresql
Once you have a new chart version, you can upgrade your deployment.
Upgrading Single Node
Use the following command to upgrade.
Single nodehelm upgrade artifactory --namespace artifactory jfrog/artifactory
If Artifactory was installed without providing a value to postgresql.postgresqlPassword (i.e., if the password was auto-generated), follow these instructions to get the current password.
POSTGRES_PASSWORD=$(kubectl get secret -n <namespace> <myrelease>-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
Upgrade the release by passing the previously auto-generated secret.
helm upgrade <myrelease> jfrog/artifactory --set postgresql.postgresqlPassword=${POSTGRES_PASSWORD} --namespace <namespace>
This will apply any configuration changes on your existing deployment.
HA Upgrade
Use the following command to upgrade.
HAhelm upgrade artifactory-ha --namespace artifactory-ha jfrog/artifactory-ha
If Artifactory was installed without providing a value to postgresql.postgresqlPassword (i.e., if the password was auto-generated), follow these instructions to get the current password.
POSTGRES_PASSWORD=$(kubectl get secret -n <namespace> <myrelease>-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
Upgrade the release by passing the previously auto-generated secret.
helm upgrade <myrelease> --namespace artifactory-ha jfrog/artifactory-ha --set postgresql.postgresqlPassword=${POSTGRES_PASSWORD}
This will apply any configuration changes on your existing deployment.
Windows Upgrade
Migration is a manual process for a Windows installation. The below steps also include copying directories over and running the migration script
Make sure to run all commands on the server with the user that's running Artifactory.
Stop the current server.
cd %ARTIFACTORY_HOME%\bin artifactory.bat stop
If you are running the Artifactory service as a process, stop the service from Services. Press the Windows key +R and enter services.msc to access Services.
Extract the contents of the compressed archive, move it into a newly created jfrog\artifactory folder, and go to the new folder.
# Uncompress the zip file from windows interface mkdir jfrog move jfrog-artifactory-<pro|oss|cpp-ce>-<version> jfrog\artifactory
Set your
ARTIFACTORY_HOME
andJFROG_HOME
variables.
Note: The$ARTIFACTORY_HOME
variable points to your existing installation, and the$JFROG_HOME
variable points to the new installation.When setting the
ARTIFACTORY_HOME
andJFROG_HOME
variables, make sure to use Windows short name or escape space. For more information, see here.SET ARTIFACTORY_HOME=<Path to your current Artifactory installation> SET JFROG_HOME=<Path to jfrog folder> SET JF_PRODUCT_HOME=%JFROG_HOME%/artifactory
Copy the directories from your current to the new path. Ignore if the target directory exists.
Mandatory Steps
# Artifactory data mkdir %JFROG_HOME%\artifactory\var\data\artifactory xcopy %ARTIFACTORY_HOME%\data %JFROG_HOME%\artifactory\var\data\artifactory /E /q # Access data mkdir %JFROG_HOME%\artifactory\var\data\access xcopy %ARTIFACTORY_HOME%\access\data %JFROG_HOME%\artifactory\var\data\access /E /q # Replicator data # Note: If you've have never used the Artifactory Replicator # your %ARTIFACTORY_HOME%\replicator directory will be empty mkdir %JFROG_HOME%\artifactory\var\data\replicator xcopy %ARTIFACTORY_HOME%\replicator\data %JFROG_HOME%\artifactory\var\data\replicator /E /q # Artifactory config mkdir %JFROG_HOME%\artifactory\var\etc\artifactory xcopy %ARTIFACTORY_HOME%\etc %JFROG_HOME%\artifactory\var\etc\artifactory /E /q # Access config mkdir %JFROG_HOME%\artifactory\var\etc\access xcopy %ARTIFACTORY_HOME%\access\etc %JFROG_HOME%\artifactory\var\etc\access /E /q # Replicator config # Note: If you've have never used the Artifactory Replicator # your %ARTIFACTORY_HOME%\replicator directory will be empty mkdir %JFROG_HOME%\artifactory\var\etc\replicator xcopy %ARTIFACTORY_HOME%\replicator\etc %JFROG_HOME%\artifactory\var\etc\replicator /E /q # master.key mkdir %JFROG_HOME%\artifactory\var\etc\security xcopy %ARTIFACTORY_HOME%\etc\security\master.key %JFROG_HOME%\artifactory\var\etc\security /q # server.xml mkdir %JFROG_HOME%\artifactory\var\work\old xcopy %ARTIFACTORY_HOME%\tomcat\conf\server.xml %JFROG_HOME%\artifactory\var\work\old /q # External database driver, for example: mysql-connector-java-<version>.jar xcopy %ARTIFACTORY_HOME%\tomcat\lib\<your database driver> %JFROG_HOME%\artifactory\app\artifactory\tomcat\lib /q # Change ownership of new Artifactory directory to the user intended to run Artifactory. # This can be skipped if you performed all previous steps with the user intended to run Artifactory. # Remove logback.xml with old links. Please consider migrating manually anything that is customized here del %JFROG_HOME%\artifactory\var\etc\artifactory\logback.xml del %JFROG_HOME%\artifactory\var\etc\access\logback.xml # Move configuration files # Note: Run the following only when upgrading from Artifactory version 6.x to version 7.5.x and above. mkdir %JFROG_HOME%\artifactory\var\etc\artifactory\old mkdir %JFROG_HOME%\artifactory\var\etc\access\old mkdir %JFROG_HOME%\artifactory\var\etc\replicator\old move /Y %JFROG_HOME%\artifactory\var\etc\artifactory\db.properties %JFROG_HOME%\artifactory\var\etc\artifactory\old\db.properties move /Y %JFROG_HOME%\artifactory\var\etc\artifactory\ha-node.properties %JFROG_HOME%\artifactory\var\etc\artifactory\old\ha-node.properties move /Y %JFROG_HOME%\artifactory\var\etc\access\db.properties %JFROG_HOME%\artifactory\var\etc\access\old\db.properties move /Y %JFROG_HOME%\artifactory\var\etc\replicator\replicator.yaml %JFROG_HOME%\artifactory\var\etc\replicator\old\replicator.yaml
Optional Steps# Artifactory backup (optional) mkdir %JFROG_HOME%\artifactory\var\backup\artifactory xcopy %ARTIFACTORY_HOME%\backup %JFROG_HOME%\artifactory\var\backup\artifactory /E /q # Access backup (optional) mkdir %JFROG_HOME%\artifactory\var\backup\access xcopy %ARTIFACTORY_HOME%\access\backup %JFROG_HOME%\artifactory\var\backup\access /E /q # Replicator backup (optional) mkdir %JFROG_HOME%\artifactory\var\backup\replicator xcopy %ARTIFACTORY_HOME%\replicator\backup %JFROG_HOME%\artifactory\var\backup\replicator /E /q # Artifactory logs (optional) mkdir %JFROG_HOME%\artifactory\var\log\artifactory xcopy %ARTIFACTORY_HOME%\logs %JFROG_HOME%\artifactory\var\log\artifactory /E /q # Access logs (optional) mkdir %JFROG_HOME%\artifactory\var\log\access xcopy %ARTIFACTORY_HOME%\access\logs %JFROG_HOME%\artifactory\var\log\access /E /q # Replicator logs (optional) mkdir %JFROG_HOME%\artifactory\var\log\replicator xcopy %ARTIFACTORY_HOME%\replicator\logs %JFROG_HOME%\artifactory\var\log\replicator /E /q # Copy specific files from your current to the new path.
For HA installations, replace any relative paths in the %ARTIFACTORY_HOME%\etc\ha-node.properties file with absolute paths.
For example:# relative path artifactory.ha.data.dir=artifactory-ha # absolute path artifactory.ha.data.dir=\var\opt\jfrog\artifactory-ha
Run the migration script with the same privileges as you have in your current Artifactory installation. This script will copy over and translate your current configurations to the new configuration format, according to the new file system layout.
cd %JFROG_HOME%\artifactory\app\bin migrate.bat
The migration script only migrates configuration values. Any comments added to the configuration files in the Artifactory 6.x installation will not be migrated.
- Check that the migration has completed successfully, by reviewing the following files:
migration log:
%JFROG_HOME%\artifactory\var\log\migration.log
system.yaml
configuration:%JFROG_HOME%\artifactory\var\etc\system.yaml
This newly created file will contain your current custom configurations in the new format.Manage Artifactory.
%JFROG_HOME%\artifactory\app\bin\artifactory.bat start|stop
Firewall Alerts for first time Artifactory Windows Installation
When starting Artifactory, you may get some firewall exception messages. Select private networks and allow access to continue working.To install Artifactory as a Windows service, follow the steps here.
Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine: http://localhost:8082/ui/If you had a reverse proxy or load balancer configured with your Artifactory 6.x, you will need to create a new reverse proxy configuration and update your reverse proxy settings.
You can generate a new configuration template by accessing the upgraded Artifactory server UI (by default http://localhost:8082/ui/), navigate to
Administration > Artifactory > General > HTTP Settings adjust your Reverse Proxy Settings and generate a new configuration template. See Reverse Proxy Settings.Check the artifactory-service.log.
type %JFROG_HOME%\artifactory\var\log\artifactory-service.log
Upgrading from Version 7.x to 7.x
Before you upgrade, ensure that the operating system version that you use is supported. See System Requirements for detailed information on operating system support.
Upgrading from JFrog Artifactory 7.x to 7.10 or above
When upgrading from any version prior to 7.10, to any version from 7.10 and above, the upgrade process executes an internal DB schema migration which may result in a short downtime.
When upgrading from Artifactory 7.x to 7.x, your metadata will also be migrated automatically. For more information, see Metadata Migration in the JFrog Platform.
Viewing New Metrics and Trends
When upgrading to Artifactory 7.11.x, you need Mission Control 4.6.x to be able to use the new metrics and trends.
The following upgrade methods are supported:
Linux Archive Upgrade
- Log in as a root user.
Stop the current server.
Stop Artifactorycd $JFROG_HOME/artifactory/app/bin ./artifactoryctl stop
Export JFrog variables.
# Export variables to simplify commands export JFROG_HOME=<Your JFrog home directory, for example /opt/jfrog> export JF_NEW_VERSION=<For example /opt/jfrog/artifactory-7.x>
Extract the contents of the compressed archive and go to the extracted folder.
Untartar -xvf jfrog-artifactory-<pro|oss|cpp-ce>-<version>-linux.tar.gz
Replace the existing
$JFROG_HOME/artifactory/app
with the new app folder.Upgrade# Remove app rm -rf $JFROG_HOME/artifactory/app # Copy new app cp -r $JF_NEW_VERSION/app $JFROG_HOME/artifactory # Remove extracted new version rm -rf $JF_NEW_VERSION chown -R artifactory:artifactory /opt/jfrog/artifactory/app
If Artifactory was installed as a service in previous version, install this version also as a service.
When an earlier version is installed as a service, it is important to update the new one also as a service. Otherwise a restart of the server may lead to older version of Artifactory coming up.
cd $JFROG_HOME/artifactory/app/bin ./installService.sh
Manage Artifactory.
$JFROG_HOME/artifactory/app/bin/artifactoryctl start|stop|check
Access Artifactory from your browser at: http://SERVER_HOSTNAME:8082/ui/. For example, on your local machine:
http://localhost:8082/ui/
.Check Artifactory Log.
tail -f $JFROG_HOME/artifactory/var/log/console.log
RPM Upgrade
Stop the current server.
service artifactory stop
Install Artifactory as a service on Red Hat compatible Linux distributions, as a root user.
yum -y install jfrog-artifactory-<pro|oss|cpp-ce>-<version>.rpm
Manage Artifactory.
service artifactory start|stop
Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine:http://localhost:8082/ui/
Check Artifactory Log.
tail -f $JFROG_HOME/artifactory/var/log/console.log
Docker Upgrade
Stop and remove Artifactory using native Docker commands.
for exampledocker stop artifactory docker rm -f artifactory
Set the path to your current Artifactory home, and make sure the directory permissions are set correctly.
export ARTIFACTORY_HOME=<Mount Path to your current Artifactory data directory> chown -R 1030:1030 $ARTIFACTORY_HOME
Start the Artifactory container
docker run --name artifactory -v $ARTIFACTORY_HOME:/var/opt/jfrog/artifactory -d -p 8081:8081 -p 8082:8082 releases-docker.jfrog.io/jfrog/artifactory-<pro|oss|cpp-ce>:latest
- Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine:http://localhost:8082/ui/
. Check Artifactory Log.
docker logs -f artifactory
Docker Compose Upgrade
Stop the current server.
docker-compose -p rt stop
Extract the contents of the compressed archive and go to the extracted folder.
tar -xvf jfrog-artifactory-<pro|oss|cpp-ce>-<version>-compose.tar.gz cd artifactory-<pro|oss|cpp-ce>-<version>
Copy the contents of the
.env
file in the previous installation to the newly created.env
file in this archive without copying the versions, as this will affect the upgrade.Run the config.sh script to setup folders with required ownership.
./config.sh
Manage Artifactory using native Docker Compose commands,
docker-compose -p rt <action> command
.# Starting from 7.8.x, PostgreSQL needs to be started before starting the other services. if PostgreSQL 9.6.11 running use - docker-compose -p rt-postgres -f docker-compose-postgres-9-6.11v.yaml up -d if PostgreSQL 10.13 running use - docker-compose -p rt-postgres -f docker-compose-postgres-10-13v.yaml up -d if PostgreSQL 12.3 running use - docker-compose -p rt-postgres -f docker-compose-postgres.yaml up -d docker-compose -p rt up -d docker-compose -p rt ps docker-compose -p rt down
Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine:http://localhost:8082/ui/
Check Artifactory Log.
tail -f $ROOT_DATA_DIR/var/log/console.log
Debian Upgrade
Stop the current server.
service artifactory stop
Install Artifactory as a service on compatible Linux distributions, as a root user.
Run Installationdpkg -i jfrog-artifactory-<pro|oss|cpp-ce>-<version>.deb
Manage Artifactory.
service artifactory start|stop
Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine:http://localhost:8082/ui/
Check Artifactory Log.
tail -f $JFROG_HOME/artifactory/var/log/console.log
Helm Upgrade
Once you have a new chart version, you can upgrade your deployment.
Upgrading Single Node
Use the following command to upgrade.
Single nodehelm upgrade artifactory --namespace artifactory jfrog/artifactory
If Artifactory was installed without providing a value to postgresql.postgresqlPassword (i.e., if the password was auto-generated), follow these instructions to get the current password.
POSTGRES_PASSWORD=$(kubectl get secret -n <namespace> <myrelease>-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
Upgrade the release by passing the previously auto-generated secret.
helm upgrade <myrelease> jfrog/artifactory --set postgresql.postgresqlPassword=${POSTGRES_PASSWORD} --namespace <namespace>
This will apply any configuration changes on your existing deployment.
HA Upgrade
Upgrade path depends on the Artifactory helm chart that you used to install Artifactory HA. You must use the same chart that you used to install Artifactory HA.
HA Upgrade Using artifactory Chart
Use the following command to upgrade.
HAhelm upgrade artifactory --namespace artifactory-ha jfrog/artifactory
If Artifactory was installed without providing a value to postgresql.postgresqlPassword (i.e., if the password was auto-generated), follow these instructions to get the current password
POSTGRES_PASSWORD=$(kubectl get secret -n <namespace> <myrelease>-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
Upgrade the release by passing the previously auto-generated secret.
helm upgrade <myrelease> --namespace artifactory jfrog/artifactory --set postgresql.postgresqlPassword=${POSTGRES_PASSWORD}
This will apply any configuration changes on your existing deployment.
HA Upgrade Using artifactory-ha Chart
Use the following command to upgrade.
HAhelm upgrade artifactory-ha --namespace artifactory-ha jfrog/artifactory-ha
If Artifactory was installed without providing a value to postgresql.postgresqlPassword (i.e., if the password was auto-generated), follow these instructions to get the current password
POSTGRES_PASSWORD=$(kubectl get secret -n <namespace> <myrelease>-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
Upgrade the release by passing the previously auto-generated secret.
helm upgrade <myrelease> --namespace artifactory-ha jfrog/artifactory-ha --set postgresql.postgresqlPassword=${POSTGRES_PASSWORD}
This will apply any configuration changes on your existing deployment.
Windows Upgrade
Stop the current server.
Stop Artifactorycd %JFROG_HOME%\artifactory\app\bin artifactory.bat stop
Extract the contents of the compressed archive and go to the extracted folder.
Replace the existing
%JFROG_HOME%\app
with the new app folder.Upgrade# Export variables to simplify commands, Example paths provided here SET %JFROG_HOME%=\myHome\jfrog SET %JF_NEW_VERSION%=\myHome\artifactory-7.x # Remove app rmdir %JFROG_HOME%\artifactory\app # Copy new app copy %$JF_NEW_VERSION%\app %$JFROG_HOME%\artifactory # Remove extracted new version rmdir %JF_NEW_VERSION%
Manage Artifactory.
%JFROG_HOME%\artifactory\app\bin\artifactory.bat start|stop
Firewall Alerts for first time Artifactory Windows Installation
When starting Artifactory, you may get some firewall exception messages. Select private networks and allow access to continue working.
Access Artifactory from your browser at:
http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine:http://localhost:8082/ui/
.Check Artifactory Log.
type %JFROG_HOME%\artifactory\var\log\console.log
Enabling TLS 1.0 and 1.1 for Connectivity with Older Databases
Artifactory version 7.25.5 onwards includes OpenJDK version 11.0.11 and later. TLS 1.0 and TLS 1.1 are disabled by default from OpenJDK 11.0.11 onwards. If your database version does not support TLS 1.2, the Artifactory startup fails.
If you are unable to upgrade your database to a version that supports TLS 1.2 or later, perform the following steps to run Artifactory:
Download the java.security file that has TLS 1.0 and 1.1 enabled.
Create the directory,
${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java
.mkdir -p ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java
- Copy the java.security file into
${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java.
Provide the appropriate permissions to the directory.
chmod 755 ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java/java.security
Artifactory startup takes a backup of the existing java.security file and bootstraps custom java.security into the
${JFROG_HOME}/artifactory/app/third-party/java/conf/security
folder.
Configuring Java Security File for Helm Installations
Create the following local directory.
mkdir -p java/configmap
Download the java.security file that has TLS 1.0 and 1.1 enabled.
- Copy the java.security file to
java/configmap
. Run the following command to create a custom config map. For more information, refer to Using Config Maps.
kubectl create configmap java-security-config --from-file=java/configmap/java.security
Pass the following custom config map to your Helm install. For more information, refer to Using Config Maps.
artifactory: preStartCommand: "mkdir -p /opt/jfrog/artifactory/var/bootstrap/artifactory/java && cp -Lrf /tmp/java/* /opt/jfrog/artifactory/var/bootstrap/artifactory/java/" customVolumes: | - name: java-security-config configMap: name: java-security-config customVolumeMounts: | - name: java-security-config mountPath: /tmp/java/java.security subPath: java.security
Upgrading an Enterprise HA Cluster
This section describes the process to upgrade your Artifactory Enterprise High Availability cluster. Since your cluster contains more than one node, you may complete the upgrade process without incurring any down time to the Artifactory service your organization is using.
Before you upgrade, ensure that the operating system version that you use is supported. See System Requirements for detailed information on operating system support.
Upgrade Steps
Upgrading to the latest version includes the following three phases:
- Upgrading the first node.
- Upgrading the additional nodes.
- Verifying the HA installation and configuration.
Want to stop using NFS?
To stop using a shared NFS once the upgrade procedure is complete (optional), see Migrating Data from NFS to migrate to an alternative storage.
Using NFS Data Folders with the JFrog Router
If your HA cluster uses an NFS as its filestore, you will need to verify that after the upgrade, the only shared folder is the $JFROG_HOME/data/artifactory
directory (i.e., if the NFS is mounted directly to /var/opt/jfrog/artifactory/data
you will encounter problems).
This is because the $JFROG_HOME/data/router
folder must be unique to each node. This warning does not apply if you are using a different folder for your NFS.
Session Management Options
From version 6.2, Artifactory offers different alternatives for session management between the Artifactory HA members when accessing one of the members. If you do not configure your HA cluster to enable sticky sessions, the UI will not work until you have completed upgrading the whole cluster.
The way to manage sessions is controlled via the artifactory.map.provider.type
property (in the $JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties
file) which can take the following values:
db | (default) Sessions are managed by the database |
distributed | Sessions are managed by Hazelcast |
jvm | Sessions are managed by the JVM |
If sessions are configured to be managed by the database, Artifactory will also schedule a cron job to cleanup old sessions.
The cron expression to trigger the sessions can be configured using the artifactory.db.session.cleanup.cron
property in the $JFROG_HOME/artifactory/var/etc/artifactory
/artifactory.system.properties
file.
During installation, this cron expression is set with a default value that triggers the cleanup at a set minute (determined randomly) past each hour.
Upgrading HA Nodes Backward Compatibility
From Artifactory 7.17.4, the HA cluster supports Cloud-Native compatibility, whereby all nodes are equal and the need to set primary and secondary nodes is no longer required.
To use this new functionality, add the "taskAffinity
": "any
" to the nodes you would like to include in the cluster to the Artifactory System YAML.
When you upgrade, you are still set with primary and secondary nodes.
You can change these to taskAffinity: any
as follows:
node: haEnabled: true taskAffinity: any
and comment out or remove the following:
#primary: true
Upgrading the First Node
- Remove the first node from the load balancer. All requests will be directed to the additional nodes. Check the $HOME/logs/request.log and ARTIFACTORY_URL/api/tasks (search for "running") to ensure that Artifactory is completely inactive.
- Continue with the upgrade according to the instructions for your installation type.
Start up the first node. It will recognize that the HA cluster nodes are not all running the same version of Artifactory, and consequently, the system will be limited to allowing uploads and downloads.
Any attempt to perform other actions such as changing the DB schema, modifying permissions, changing repository configuration and more, are strictly blocked. This limitation will continue until all the cluster nodes are once again running the same version.
Version inconsistency generates exceptions
Running the HA cluster nodes with different versions generates exceptions. These can be seen in the log files and reflect the temporary inconsistent state during the upgrade process. This is normal and should be ignored until all the cluster nodes are, once again, running the same version.
When upgrading from Version 6.x and to 7.x
Adjust your reverse proxy settings and update your load balancer configuration to use the new JFrog Platform URL http://<hostname>:8081.You may need to update the Custom URL base as part of the Artifactory upgrade from 6.x to 7.x. Remember to use a URL that will work correctly in all cases; for example: https://mydomain, which is correct if the reverse proxy is also updated to use both the Artifactory REST API port and the Router port as documented.
Put the first node back to the load balancer.
Upgrading the Additional Node
For each additional node in your HA cluster, perform the following steps:
- Remove the node from the load balancer, so all requests are directed to the other nodes. Check the $HOME/logs/request.log and ARTIFACTORY_URL/api/tasks (search for "running") to ensure that Artifactory is completely inactive.
Continue with the upgrade according to the instructions for your installation type.
- Start up the additional node.
- Add the additional node back to the load balancer.
Repeat this process for each additional node.
Check your installation
After starting up each additional node, we recommend inspecting the system.yaml
and binarystore.xml
files (under $JFROG_HOME/artifactory/var/etc/
) to ensure they are correctly configured
Verify the HA Installation and Configuration
Once you have completed upgrading your HA cluster, you can verify that your cluster has been installed and configured correctly using the following tests.
- Directly Access the Artifactory UI for the server you have just configured
- In the Admin module go to Service | Artifactory | System Logs to view the log and verify that you see an entry for HA Node ID.
- The bottom of the module navigation bar should also indicate that you are running with an Enterprise license. In case of an error you will see an error message in the page header.
- Access Artifactory through your load balancer and log in as Admin.
In the Admin module go to Monitoring | Service Status. When selected the following table including details on all the Artifactory nodes in your cluster will be displayed.
In the Admin module under General | Settings, verify that the Custom URL Base field is correctly configured to the URL of the Load Balancer.