Use artifactory Chart for New Helm HA Installations
We recommend that you use the artifactory chart for new Helm HA installations. The artifactory chart is under active development and has the features of the artifactory-ha chart. Existing customers who use the artifactory-ha chart can continue to use that chart.
From Artifactory 7.59.9 and Above
From version 7.59.9 and above, Artifactory HA cluster is full HA with all nodes designated as primary nodes. The basic HA installation creates three primary nodes and 0 member nodes.
Add https://charts.jfrog.ioto your Helm client.
helm repo add jfrog https://charts.jfrog.io
Update the repository.
helm repo update
Create a unique Master Key (Artifactory requires a unique master key) pass it to the template during installation.
# Create a key export MASTER_KEY=$(openssl rand -hex 32)echo ${MASTER_KEY}
Custom Master Key in Production Installations
For production grade installations, we strongly recommend that you use a custom master key. If you initially use the default master key it will be very hard to change the master key at a later stage. Therefore, generate a unique key and pass it to the template at install/upgrade time.
Alternatively, you can manually create a secret containing the master key and pass it to the template during installation.
# Create a key export MASTER_KEY=$(openssl rand -hex 32) echo ${MASTER_KEY} # Create a secret containing the key. The key in the secret must be named master-key kubectl create secret generic my-masterkey-secret -n artifactory --from-literal=master-key=${MASTER_KEY}
In either case, make sure to pass the same master key on all future calls to Helm install and Helm upgrade. This means always passing
--set artifactory.masterKey=${MASTER_KEY}
(for the custom master key) or--set artifactory.masterKeySecretName=my-masterkey-secret
(for the manual secret) and verifying that the contents of the secret remain unchanged.Next, create a unique join key.
# Create a key export JOIN_KEY=$(openssl rand -hex 32) echo ${JOIN_KEY}
By default the chart has one set in the
values.yaml
(artifactory.joinKey
). However, this key is for demonstration purposes only and should not be used in a production environment. Generate a unique key and pass it to the template during installation.Alternatively, you can manually create a secret containing the join key and pass it to the template during installation.
# Create a key export JOIN_KEY=$(openssl rand -hex 32) echo ${JOIN_KEY} # Create a secret containing the key. The key in the secret must be named join-key kubectl create secret generic my-joinkey-secret -n artifactory --from-literal=join-key=${JOIN_KEY}
In either case, make sure to pass the same join key on all future calls to Helm install and Helm upgrade. This means always passing
--set artifactory.joinKey=${JOIN_KEY}
(for the custom join key) or--set artifactory.joinKeySecretName=my-joinkey-secret
(for the manual secret) and verifying that the contents of the secret remain unchanged.Install the chart with the release name
artifactory-ha
and with the master key and join key.helm upgrade --install artifactory-ha --set artifactory.masterKey=${MASTER_KEY} --set artifactory.joinKey=${JOIN_KEY} --namespace artifactory-ha --create-namespace jfrog/artifactory-ha
The parameter
replicaCount
decides the number of pods with Artifactory. You can set the replica count to a value more than or equal to 2. We recommend that you provide the value as 3.Change Internal PostgreSQL Password
If you are using an internal PostgreSQL, it is recommended to change the PostgreSQL password. For more information, see Auto-generated Passwords (Internal PostgreSQL).
Connect to Artifactory.
It might take a few minutes for Artifactory's public IP to become available. Follow the instructions that are output by the install command above to get the Artifactory IP to access it. Below you will find a sample instruction of what to look for to pick the URL to reach Artifactory (in the example below, art77 is the release name and art is the namespace).
Congratulations. You have just deployed JFrog Artifactory HA. SETUP: 1. Get the Artifactory IP and URL NOTE: It may take a few minutes for the LoadBalancer public IP to be available! You can watch the status of the service by running 'kubectl get svc -w artha77-nginx' export SERVICE_IP=$(kubectl get svc --namespace art artha77-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}') echo http://$SERVICE_IP/ 2. Open Artifactory in your browser Default credential for Artifactory: user: admin password: password
Install the Artifactory HA license using one of three methods: REST API, Artifactory UI, or a Kubernetes Secret. For more information, click the link below.
To access the logs, find the name of the pod using the following command.
kubectl --namespace <your namespace> get pods
To get the container logs, run the following command.
kubectl --namespace <your namespace> logs -f <name of the pod>
Optional Steps
Customize the product configuration including database, Java Opts, and filestore.
Filestore Options
Helm filestore (storage) installations require certain modifications; for more information, see Advanced Storage Options.
Note
Unlike other installations, Helm Chart configurations are made to the
values.yaml
and are then applied to thesystem.yaml
.Follow these steps to apply the configuration changes.
Make the changes to
values.yaml.
Run the command.
To configure Artifactory for Helm, you will need to override the default
system.yaml
configuration. For more information, see Overriding the Default System YAML File.By default, Helm deploys Artifactory with PostgreSQL (running in a separate pod). It is possible to deploy Artifactory without PostgreSQL (or any other external database), which will default to the embedded Derby database.