Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOpsSchool!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Artifactory: Setting up Artifactory 7 High Availability Cluster

Here is a comprehensive, step-by-step guide to design, configure, and deploy JFrog Artifactory 7.x in High Availability (HA) mode—including all architectural and configuration considerations required for a successful, production-grade setup.

I. Planning & Architecture

A. Core Components of Artifactory HA

  • Cluster Nodes: 2+ Artifactory servers, all running the same exact version.
  • External Database: A supported, highly-available relational DB (PostgreSQL preferred for HA).
  • Shared Filestore: All nodes must access the same binary store—either via NFS (for filesystem) or object/cloud storage.
  • Load Balancer: Distributes traffic evenly to all Artifactory nodes.
  • Licenses: Each node requires a unique, valid Enterprise (X or +) or Edge license123.

B. Network and Placement

  • All cluster nodes, filestore, DB, and LB should reside on the same high-speed, low-latency LAN.
  • Open required TCP ports for node-to-node traffic and node-to-shared resources145.

II. Infrastructure Preparation

1. External Database (e.g., PostgreSQL)

  • Set up the DB on a reliable, HA-capable platform (consider failover and backup).
  • Create a dedicated Artifactory DB user and database.
  • Important: Grant all privileges needed, especially on the public schema6.

2. Shared Filestore

  • Option 1: NFS mount accessible by all nodes (recommended for on-premises).
  • Option 2: Cloud/object storage (S3, GCS, Azure Blob) for cloud-native install78.

3. Load Balancer

  • Install an LB (HAProxy, NGINX, F5, AWS ELB, etc.).
  • Configure: Sticky sessions (if needed), TCP/HTTP health checks, SSL termination.

4. Artifactory Nodes

  • Deploy multiple Artifactory 7.x nodes on dedicated hosts/VMs/containers.
  • Ensure consistent OS, network, Java, and software patch levels.

III. Software Installation Steps

1. Download & Install Artifactory 7.x

  • Download the appropriate Artifactory distribution (archive, RPM/DEB, Docker, Helm).
  • Unpack/install on each node in your cluster4.

2. Configure System YAML on Each Node

Configure $JFROG_HOME/artifactory/var/etc/system.yaml:

shared:
node:
id: <unique-node-id> # Unique value per node, e.g., art1, art2
ip: <this-node's-IP>
database:
type: postgresql
driver: org.postgresql.Driver
url: "jdbc:postgresql://db1:5432,db2:5432/artifactory?targetServerType=primary"
username: artifactory
password: "<your-db-password>"
filestore:
type: file-system
dir: "/mnt/nfs-volume/filestore" # or S3/object config as needed
# Optional: taskAffinity can be set to 'any' for all, for cloud-native HA

Other must-have config:

  • License key for this node
  • Join key (cluster secret)7
  • Communication ports and clustering configs

3. Verify Permissions

  • All nodes must be able to:
    • Read/write the shared filestore directory/object bucket
    • Connect to the database using their configured credentials

4. Place JDBC Driver

  • Copy the PostgreSQL (or chosen DB) JDBC driver .jar to each node’s $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib4.

IV. Cluster Bootstrap

1. Start the First Node

  • Start Artifactory on Node 1; perform initial setup/licensing via web UI or REST.
  • Add the HA license for this node.

2. Join Additional Nodes

  • Repeat install/config for each node, using a unique node.id per node, same join.key, and same DB/storage config.
  • For each, add its unique license via the running Artifactory UI.

3. Configure the Load Balancer

  • Add all node IPs and service ports (default 8082).
  • Ensure health checking and failover are enabled.
  • Optionally: Enable SSL termination.

V. Post-Deployment Tasks

  • Verify HA Status: Log into the Admin UI, check Cluster Status.
  • Logs: Ensure each node logs a unique Node ID and appears in the cluster list9.
  • Backups: Set up system and DB backups for HA cluster integrity.
  • Monitor: Enable service-level monitoring and alerting for all core infrastructure.
  • Test: Simulate node failures and ensure traffic/load is handled seamlessly.

VI. Configuration Checklist

RequirementHow to Configure
HA LicenseEach node must have a unique enterprise (X/+) license
External DatabaseUse JDBC in system.yaml under shared: database:
Shared Filestorefilestore: config pointing to NFS/object location
Cluster Join KeySet in system.yaml or during first setup
Node IDsEach node’s node: id: unique across cluster
Load BalancerRoute external access to all nodes
FirewallOpen needed cluster (inter-node), DB, storage, LB ports
PermissionsRW access to filestore; full DB privileges on schema

VII. What’s New in Artifactory 7.x Cloud-Native HA

  • Masterless mode: All nodes can perform scheduler/GC/backups (taskAffinity: any)
  • Self-healing: Any node can pick up cluster tasks, improving failover7

Additional Best Practices

  • Always pin all nodes to the same version—upgrade via rolling restarts.
  • For best resilience, use 3+ nodes if possible.
  • Store binaries on robust backend storage with snapshot/DR processes.
  • For PostgreSQL HA, use a failover cluster and specify multiple DB hosts in the JDBC URL6.

By following these design and setup instructions, you will achieve a highly available, scalable, and resilient Artifactory 7 cluster that meets production-grade HA requirements—including robust database/storage architecture, network design, full configuration coverage, and operational tips for ongoing administration.

If you need sample system.yaml or specific configuration samples for your storage or DB platform, please ask!

Another METHOD

Certainly! Here’s a detailed, up-to-date, step-by-step guide to set up JFrog Artifactory 7.x High Availability (HA) with design considerations, infrastructure, and all config files required.
This is written for self-hosted Linux VMs/EC2, PostgreSQL, and NFS/EFS as shared filestore.
It follows JFrog’s 7.x architecture, best practices, and includes references for each step.


🟢 Artifactory 7.x High Availability (HA) Setup Guide


1️⃣ Design & Architecture Planning

  • Minimum nodes: 2 application nodes (recommended 3+ for resilience)
  • Shared filestore: Required (NFS or AWS EFS)
  • Shared database: Required (e.g., PostgreSQL/MySQL/Aurora)
  • Load balancer: Required in front of all nodes (e.g., Nginx, HAProxy, AWS ELB)
  • Network: All nodes must be in the same LAN/VPC (low latency).
  • Service user: Run Artifactory as the same OS user on all nodes (artifactory).

Example Reference Design:

             +---------------------------+
             |        Load Balancer      |
             +------------+--------------+
                          |
           +--------------+--------------+
           |                             |
   +-------+--------+           +--------+-------+
   | Artifactory 1  |           | Artifactory 2  |   ... (Artifactory N)
   +-------+--------+           +--------+-------+
           |                             |
           +-------------+---------------+
                         |
            +------------+-------------+
            |    Shared Storage (EFS/NFS)
            +--------------------------+
            |    Shared Database (PGSQL/MySQL)
            +--------------------------+

2️⃣ Infrastructure Preparation

  • Provision servers: At least 2 Linux VMs/EC2, identical OS.
  • Create/prepare shared filestore: NFS or AWS EFS.
  • Set up PostgreSQL/MySQL: Accessible to all nodes, with one DB & user.
  • Set up a load balancer: Round-robin TCP/HTTP forwarding to all nodes’ :8082.

3️⃣ Install Artifactory on All Nodes

Repeat on each node:

# RHEL/CentOS
sudo yum install -y nfs-utils
# or Ubuntu/Debian
sudo apt update && sudo apt install -y nfs-common

# Mount the shared filestore (EFS/NFS)
sudo mkdir -p /mnt/efs
sudo mount -t nfs4 <efs_or_nfs_dns>:/ /mnt/efs

# Optional: add to /etc/fstab for persistency

# Download & install Artifactory
wget https://releases.jfrog.io/artifactory/artifactory-pro/rpm/jfrog-artifactory-pro-<version>.rpm
sudo yum install -y jfrog-artifactory-pro-<version>.rpm

# or, for Debian/Ubuntu:
wget https://releases.jfrog.io/artifactory/artifactory-pro/deb/jfrog-artifactory-pro-<version>.deb
sudo apt install -y ./jfrog-artifactory-pro-<version>.deb

# Create artifactory user/group if not auto-created
Code language: PHP (php)

4️⃣ Database Setup (Once Only)

  • Create a DB and user (PostgreSQL example):
sudo -u postgres psql
CREATE DATABASE artifactory WITH ENCODING UTF8;
CREATE USER artifactory WITH PASSWORD 'YourStrongPassword!';
GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;
\q
Code language: JavaScript (javascript)
  • Make sure all nodes can reach the database.

5️⃣ Configure system.yaml on All Nodes

Location:
/opt/jfrog/artifactory/var/etc/system.yaml

Minimal HA section:

shared:
  node:
    id: <unique-node-id>          # (Must be unique per node, e.g., "art1", "art2", "art3")
  database:
    type: postgresql
    url: jdbc:postgresql://<db-host>:5432/artifactory
    username: artifactory
    password: YourStrongPassword!
  extraJavaOpts: "-Xms2g -Xmx2g"  # Example: Tune as needed
  # Required for HA
  haEnabled: true
Code language: PHP (php)
  • Set node.id uniquely on every node!
  • All other configs (database, filestore) should be identical.

6️⃣ Configure Shared Filestore on All Nodes

Edit binarystore.xml:

  • Path: /opt/jfrog/artifactory/var/etc/artifactory/binarystore.xml
  • Example for EFS/NFS:
<config version="2">
  <chain template="file-system"/>
  <provider id="file-system" type="file-system">
    <fileStoreDir>/mnt/efs</fileStoreDir>
  </provider>
</config>
Code language: HTML, XML (xml)

(All nodes must mount the same EFS/NFS path and have this file identical.)


7️⃣ Permissions on Shared Storage

On each node:

sudo chown -R artifactory:artifactory /mnt/efs

8️⃣ Start Artifactory on All Nodes

sudo systemctl start artifactory
sudo systemctl status artifactory

9️⃣ Configure Load Balancer

  • Forward traffic to all Artifactory nodes on port 8082.
  • Use sticky sessions if possible (for UI).
  • Health checks: /artifactory/webapp/#/login or /artifactory/api/system/ping.

🔟 Verify HA Cluster

  • Access Artifactory via load balancer IP: http://<lb-ip>:8082
  • In the UI: Admin → High Availability → See all nodes listed and healthy.
  • Upload/download artifacts, check for replication across nodes.
  • Check logs for errors or cluster warnings.

1️⃣1️⃣ Best Practices

  • All nodes must be same Artifactory version.
  • Clock sync (NTP) across all nodes and DB.
  • Secure your NFS/EFS mounts (restrict by security group/ACL).
  • Monitor health via /api/system/ha/nodes.
  • Use SSL/HTTPS on your load balancer for production.

1️⃣2️⃣ Extra (Optional Advanced)

  • Set up access service for SSO/permissions sharing (automatic in 7.x).
  • Scale horizontally by adding more nodes (update LB and assign new node.id).

References


Summary Table

ComponentRecommendation
Nodes2+ (identical OS/version)
FilestoreShared (EFS or NFS)
DatabaseShared (PostgreSQL/MySQL)
Load BalancerRequired (L7/L4, sticky sessions preferred)
Node ConfigUnique node.id, identical DB/storage config
Storage Permsartifactory:artifactory on NFS/EFS
Cluster StateVerify in UI/Admin/API

Absolutely! Here are sample config files for a typical JFrog Artifactory 7.x High Availability (HA) setup using PostgreSQL and NFS/EFS for the shared filestore.

These examples assume:

  • 3 Artifactory nodes (node1, node2, node3).
  • All nodes use the same shared NFS/EFS path (e.g., /mnt/efs).
  • Database is on host db.example.com, with DB/user artifactory and password SuperSecretPW.

1️⃣ system.yaml (on each node)

🔹 node.id must be unique per node!
🔹 All other config (DB, storage, etc.) must be identical on all nodes.

Node 1 Example (/opt/jfrog/artifactory/var/etc/system.yaml):

shared:
  node:
    id: art1           # CHANGE for each node: art1, art2, art3, etc.
  database:
    type: postgresql
    driver: org.postgresql.Driver
    url: jdbc:postgresql://db.example.com:5432/artifactory
    username: artifactory
    password: SuperSecretPW
  extraJavaOpts: "-Xms4g -Xmx4g"
  haEnabled: true

logging:
  consoleLog:
    enabled: true

artifactory:
  joinKey: "YOUR-ARTIFACTORY-HA-JOIN-KEY"
Code language: PHP (php)
  • On Node 2, change id: art2, and so on.
  • joinKey can be generated via the first node’s UI or CLI; must be identical across all nodes in the cluster.

2️⃣ binarystore.xml (all nodes)

🔹 All nodes must have the same file, pointing to the shared NFS/EFS path.

Location:
/opt/jfrog/artifactory/var/etc/artifactory/binarystore.xml

<config version="2">
  <chain template="file-system"/>
  <provider id="file-system" type="file-system">
    <fileStoreDir>/mnt/efs</fileStoreDir>
  </provider>
</config>
Code language: HTML, XML (xml)
  • If your filestore is under a subdirectory, adjust <fileStoreDir> accordingly (e.g., /mnt/efs/artifactory-filestore).

3️⃣ PostgreSQL Connection Example

Artifactory DB user must have full privileges on the artifactory database and public schema.


4️⃣ /etc/fstab (all nodes) — for persistent EFS/NFS mount

fs-xxxxxx.efs.<region>.amazonaws.com:/ /mnt/efs nfs4 defaults,_netdev 0 0
Code language: HTML, XML (xml)

or for on-prem NFS:

nfs-server.example.com:/export/artifactory /mnt/efs nfs defaults,_netdev 0 0
Code language: JavaScript (javascript)

5️⃣ Permissions (run on every node)

sudo chown -R artifactory:artifactory /mnt/efs

6️⃣ Example Load Balancer (nginx.conf fragment)

upstream artifactory_ha {
    server art1.example.com:8082;
    server art2.example.com:8082;
    server art3.example.com:8082;
}
server {
    listen 80;
    server_name artifactory.example.com;

    location / {
        proxy_pass http://artifactory_ha;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
Code language: PHP (php)

Enable sticky sessions if possible for the UI, especially with advanced load balancers.


7️⃣ Minimal PostgreSQL Privileges (for reference)

GRANT ALL ON DATABASE artifactory TO artifactory;
GRANT ALL ON SCHEMA public TO artifactory;
ALTER SCHEMA public OWNER TO artifactory;
Code language: PHP (php)

🟢 Recap

  • system.yaml → Unique node ID, identical DB/storage config, same join key
  • binarystore.xml → All nodes, points to the same EFS/NFS path
  • All nodes mount shared filestore identically
  • Load balancer points to all nodes
  • DB user has full schema permissions

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x