High Availability (HA) Ansible Installation

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo

By default, the Ansible Platform Collection is installed in a single node configuration. Currently, HA is supported for Artifactory and not the other products.

To enable HA for Artifactory, set the following as true in roles/artifactory/defaults/main.yml inside the Ansible Platform Collection.

artifactory_ha_enabled: true

You can also enable HA by setting extra-vars by running the following command if you are doing a fresh installation.

ansible-playbook -vv platform.yml -i hosts.ini --extra-vars "artifactory_ha_enabled=true"

You can enable HA for an existing single node installation by running the following command.

ansible-playbook -vv platform.yml -i hosts.ini --extra-vars "artifactory_ha_enabled=true artifactory_systemyaml_override=true"

Warning

By default, Ansible tries to manage all of the machines referenced in a play in parallel and starts all Artifactory nodes in parallel, which is not supported and causes the installation to fail. To avoid such a scenario, add the following serial mode logic in your playbook when you install or upgrade Artifactory in HA mode.

- hosts: artifactory_servers
  serial:
    - 1
    - 100%
  roles:
    - role: artifactory
      when: artifactory_enabled | bool

By default, all nodes are installed as primary nodes, which means that all nodes in the high availability cluster can perform tasks such as replication, garbage collection, backups, exporting, and importing. Every node in the cluster can serve any of the mentioned tasks and if any node goes down, the different nodes in the cluster will be able to perform these tasks instead. By default, when adding a new node (member) to the cluster, it will be able to perform cluster-wide tasks without user intervention.

The "taskAffinity": "any" attribute is set by default, on all the nodes in the cluster, when installing an Artifactory version 7.17.4 and above and is configured under the Nodes section in the Artifactory Configuration YAML. To remove this functionality from a node, set "taskAffinity": "none". For more information, see Cloud-Native High Availability.