Artifactory version 6.x to 7.x upgrade with Docker Compose

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo

Before you proceed, see System Requirements for information on supported platforms, supported browsers, and other requirements.

Operating Systems and Platform Support

The following table lists the supported operating systems and the versions.

Product

Debian

RHEL

Ubuntu

Amazon Linux

Windows Server

Artifactory

10.x, 11.x

8.x, 9.x

20.04, 22.04

Amazon Linux 2023

2016 or 2019

Xray

10.x, 11.x

8.x, 9.x

20.04, 22.04

Distribution

10.x, 11.x

8.x, 9.x

20.04, 22.04

Insight

10.x, 11.x

8.x, 9.x

20.04, 22.04

Amazon Linux 2023

Pipelines

8.x

20.04, 22.04

Amazon Linux 2023

Build nodes only

Supported Platforms

The following table lists the supported platforms.

Product

x86-64

ARM64

Kubernetes

OpenShift

Artifactory

1.19+

4.13+

Xray

1.19+

4.13+

Distribution

1.19+

4.13+

Insight

1.19+

Pipelines

1.19+

Installation on Kubernetes environments is through Helm Charts. Supported Helm version is Helm 3+.

Kubernetes Sizing Requirements

We have included YAML files with the different sizing configuration for Artifactory , Xray, and Distribution in our GitHub pages. You can use these YAML files when you set up your cluster.

ARM64 Support

From version 7.41.4, Artifactory supports installation on ARM64 architecture through Helm and Docker installations. You must set up an external database as the Artifactory database since Artifactory does not support the bundled database with the ARM64 installation. Artifactory installation pulls the ARM64 image automatically when you run the Helm or Docker installation on the ARM64 platform.

ARM64 support is also available for Xray, Distribution and Insight.

Artifactory Database Requirements

You can configure your own database from the following list.

Artifactory supports the following databases.

  • PostgreSQL

    Tip

    JFrog highly recommends using PostgreSQL for all products in the JFrog Platform. For more information, see Choose the right database.

  • Oracle

  • MySQL

  • Microsoft SQL Server

  • MariaDB

Artifactory HA requires an external database, which is fundamental to management of binaries and is also used to store cluster wide configuration files.

Since Artifactory HA contains multiple Artifactory cluster nodes, your database must be powerful enough to service all the nodes in the system. Moreover, your database must be able to support the maximum number of connections possible from all the Artifactory cluster nodes in your system.

If you are replicating your database you must ensure that at any given point in time all nodes see a consistent view of the database, regardless of which specific database instance they access. Eventual consistency, and write-behind database synchronization is not supported.

Artifactory Filestore

The filestore is where binaries are physically stored.

Artifactory provides the following options to store binaries.

  • Local file system in which binaries are stored with redundancy using a binary provider, which manages synchronizing files between the cluster nodes according to the redundancy defined.

  • Cloud storage: Amazon S3, Microsoft Azure, and Google Cloud Storage.

  • Network File System (NFS)

For detailed information, see Filestore Configuration.

Binary Storage

While Artifactory can use a Networked File System (NFS) for its binary storage, you should not install the application itself on an NFS. The Artifactory application needs very fast, reliable access to its configuration files. Any latency from an NFS will result in poor performance when the application fails to read these files. Therefore, install Artifactory on a local disk mounted directly to the host.

To use an NFS to store binaries, use the file-system binarystore.xml configuration with the additional <baseDataDir> setting.

Working with Very Large Storage

In most cases, our recommendation for storage is at least 3 times the total size of stored artifacts, in order to accommodate system backups.Backups

However, when working with a very large volume of artifacts, the recommendation may vary greatly according to the specific setup of your system. Therefore, when working with over 10 TB of stored artifacts, contact JFrog support, who will work with you to provide a recommendation for storage that is customized to your specific setup.

Allocated storage space may vary

Xray downloads and then deletes fetched artifacts after indexing. However, in order to have more parallel indexing processes, and thereby more temporary files at the same time would require more space.

This is especially applicable for large BLOBs such as Docker images.

Artifactory Network Ports

Artifactory uses external network ports to communicate with services outside Artifactory and internal network ports to communicate with Artifactory and other JFrog Platform microservices.

External Network Ports

Artifactory uses the following external network ports by default.

  • 8081

  • 8082

Internal Network Ports

Artifactory uses the following internal network ports.

Microservice

Port

Artifactory

HTTP: 8081, 8091

Access

HTTP: 8040, 8015

gRPC: 8045, 8016

Frontend

HTTP: 8070

Metadata

HTTP: 8086

Router

HTTP: 8082, 8046, 8049

gRPC: 8047

Event

HTTP:8061

gRPC: 8062

JFConnect

HTTP: 8030

gRPC: 8035

Observability

HTTP: 8036

gRPC: 8037

Mission Control

HTTP: 8080

In addition, review the Docker requirements.

Docker Requirements

For Docker and Docker Compose installations, JFrog services require Docker 20.10.10 and above, and Docker Compose v1.24 and above to be installed on the machine on which you want to run on.

For install instructions, refer to the Docker and the Docker Compose documentation.

  1. Stop and remove the current containers.

    Upgrading from Docker run

    docker stop artifactory
    docker rm -f artifactory

    Upgrading from Docker Compose previously available in Bintray

    docker stop artifactory postgresql  nginx
    docker rm -f artifactory postgresql  nginx
  2. 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

    The .env file is used by docker-compose and is updated during installations and upgrades.

    Some operating systems do not display dot files by default. If you make any changes to the file, remember to backup before an upgrade.

  3. Run the config.sh script to setup folders with required ownership.

    ./config.sh
  4. Check that the migration has completed successfully, by reviewing the following files:

    1. migration log: $JFROG_HOME/artifactory/var/log/migration.log

    2. system.yaml configuration: $JFROG_HOME/artifactory/var/etc/system.yaml. This newly created file will contain your current custom configurations in the new format.

    3. 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 as docker-compose.yaml .

  5. Manage Artifactory using native Docker Compose commands.

    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
  6. Access Artifactory from your browser at: http://SERVER_HOSTNAME:8082/ui/.

    For example, on your local machine: http://localhost:8082/ui/

    Reverse Proxy Settings

    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

    Navigate to Administration > Artifactory > General > HTTP Settings to adjust your Reverse Proxy Settings and generate a new configuration template. See Reverse Proxy Settings.HTTP Settings

  7. Check Artifactory Log.

    tail -f $JFROG_HOME/artifactory/var/log/console.log

    Configure log rotation of the console log

    The console.log file can grow quickly since all services write to it. For more information, see configure the log rotation.Configuring Log Rotation for Tomcat

Artifactory version 6.x to 7.x Docker Compose Upgrade Using Docker Volumes
  1. Stop and remove the current Docker containers.

    docker stop artifactory postgresql
    docker rm -f artifactory postgresql
  2. 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
  3. Copy the docker-compose-volumes.yaml file to the extracted folder.

    cp templates/docker-compose-volumes.yaml docker-compose.yaml
  4. Add the entry to 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

    Avoid duplicating the entry in the .env file.

  5. Remove the following env from the docker-compose.yaml file.

    - 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

    Migration starts from within the container and a new system.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 from system.yaml because the ENV supercedes the system.yaml entries. You can also choose to update these environment values to the old connection details for the upgrade to be successful.

  6. Manage Artifactory using the native Docker Compose commands.

    docker-compose -p rt up -d
    docker-compose -p rt ps
    docker-compose -p rt down

    Run this command from the extracted folder.

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:

  1. Download the java.security file that has TLS 1.0 and 1.1 enabled.

  2. Create the directory, ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java.

    mkdir -p ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java
  3. Copy the java.security file into ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java.

  4. 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.