Deploying Artifactory on an OVHcloud Managed Kubernetes cluster

Find out how to install JFrog Artifactory on an OVHcloud Managed Kubernetes cluster

Last updated 17th October 2022

Objective

JFrog Artifactory is one of the major solution to manage dependencies and packaged binaries. All these objects are called artefacts.

Requirements

Instructions

You can find more detailed steps about the different ways to install JFrog Artifactory in the official documentation.

The following tutorial explains how to install a single node installation. For a more advanced installation (such as HA), read the official documentation.

Configure Helm to use the JFrog Helm chart

In a terminal, add the JFrog Helm repository to your Helm installation:

$ helm repo add jfrog https://charts.jfrog.io
$ helm repo update

Output should be like this:

$ helm repo add jfrog https://charts.jfrog.io
"jfrog" has been added to your repositories

$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "apache-airflow" chart repository
...Successfully got an update from the "ingress-nginx" chart repository
...Successfully got an update from the "jfrog" chart repository
Update Complete. ⎈Happy Helming!⎈

Configure the master key and the join key

At this point, it is strongly recommended to configure your master key and your join key. Find more information on these keys in the official documentation.

In a terminal, configure the master key as follows:

$ export MASTER_KEY=$(openssl rand -hex 32)

$ echo ${MASTER_KEY}

Output should be like this:

$ export MASTER_KEY=$(openssl rand -hex 32)
WARNING: can't open config file: /usr/local/etc/openssl/openssl.cnf

$ echo ${MASTER_KEY}
xxxxxxxxfffffffffffffxxxxxxxxxxxxxxxxxxxxxgggggggggggggxxxxxxxxxx

Next, configure the join key as follows:

$ export JOIN_KEY=$(openssl rand -hex 32)

$ echo ${JOIN_KEY}

Output should be like this:

$ export JOIN_KEY=$(openssl rand -hex 32)
WARNING: can't open config file: /usr/local/etc/openssl/openssl.cnf

$ echo ${JOIN_KEY}
xxxxxxxxyyyyyyyyyyyyyxxxxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyxxxxxxxxxx

The two warning messages are not important and have no impact.

Install JFrog Artifactory with Helm

First, you need to create the artifactory namespace:

$ kubectl create ns artifactory

Next, you can install JFrog Artifactory with the following Helm command:

$ helm upgrade --install artifactory \
--set artifactory.masterKey=${MASTER_KEY} \
--set artifactory.joinKey=${JOIN_KEY} \
--namespace artifactory jfrog/artifactory

Output should be like this:

$ helm upgrade --install artifactory \
--set artifactory.masterKey=${MASTER_KEY} \
--set artifactory.joinKey=${JOIN_KEY} \
--namespace artifactory jfrog/artifactory

Release "artifactory" does not exist. Installing it now.
NAME: artifactory
LAST DEPLOYED: Wed Oct 12 10:41:49 2022
NAMESPACE: artifactory
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Congratulations. You have just deployed JFrog Artifactory!

1. Get the Artifactory URL by running these commands:

   NOTE: It may take a few minutes for the LoadBalancer IP to be available.
         You can watch the status of the service by running 'kubectl get svc --namespace artifactory -w artifactory-artifactory-nginx'
   export SERVICE_IP=$(kubectl get svc --namespace artifactory artifactory-artifactory-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

Next, wait until the status of all Pods status are Running and ready (i.e the number of Pods desired equals to the actual number in the Ready column):

$ kubectl get pods -n artifactory -w

Output should be like this:

$ kubectl get pods -n artifactory -w
NAME                                             READY   STATUS    RESTARTS   AGE
artifactory-0                                    1/1     Running   0          8m11s
artifactory-artifactory-nginx-7c556cb56b-x5wvm   1/1     Running   0          8m11s
artifactory-postgresql-0                         1/1     Running   0          8m11s

Test the freshly installed JFrog artifactory

Get the URL of the administration console:

export SERVICE_IP=$(kubectl get svc --namespace artifactory artifactory-artifactory-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP/

Open the service URL in a browser and enter the default credentials: admin for Username and password for Password:

Artifactory login page

Do not forget to change the default password!

And that's it, you can start using your JFrog Artifactory instance:

Artifactory welcome page

After completing the configuration steps (see the official documentation), your JFrog Artifactory is ready to use:

Artifactory Maven repositories

Uninstall JFrog Artifactory

Similarly to the other steps, the uninstallation is done with a Helm command:

$ helm uninstall artifactory -n artifactory

Output should be like this:

$ helm uninstall artifactory -n artifactory
$ helm uninstall artifactory -n artifactory

release "artifactory" uninstalled

Then delete the artifactory namespace:

$ kubectl delete ns artifactory

Go further

For more details on how to use the JFrog Artifactory, read the official documentations.

To have an overview of the OVHcloud Managed Kubernetes service, you can go to the OVHcloud Managed Kubernetes page.

To learn more about how to use your Kubernetes cluster the practical way, we invite you to look at our tutorials.

Join our community of users.


Cette documentation vous a-t-elle été utile ?

N’hésitez pas à nous proposer des suggestions d’amélioration afin de faire évoluer cette documentation.

Images, contenu, structure… N’hésitez pas à nous dire pourquoi afin de la faire évoluer ensemble !

Vos demandes d’assistance ne seront pas traitées par ce formulaire. Pour cela, utilisez le formulaire "Créer un ticket" .

Merci beaucoup pour votre aide ! Vos retours seront étudiés au plus vite par nos équipes..


Ces guides pourraient également vous intéresser...

OVHcloud Community

Accedez à votre espace communautaire. Posez des questions, recherchez des informations, publiez du contenu et interagissez avec d’autres membres d'OVHcloud Community.

Echanger sur OVHcloud Community

Conformément à la Directive 2006/112/CE modifiée, à partir du 01/01/2015, les prix TTC sont susceptibles de varier selon le pays de résidence du client
(par défaut les prix TTC affichés incluent la TVA française en vigueur).