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.


Czy ten przewodnik był pomocny?

Zachęcamy do przesyłania sugestii, które pomogą nam ulepszyć naszą dokumentację.

Obrazy, zawartość, struktura - podziel się swoim pomysłem, my dołożymy wszelkich starań, aby wprowadzić ulepszenia.

Zgłoszenie przesłane za pomocą tego formularza nie zostanie obsłużone. Skorzystaj z formularza "Utwórz zgłoszenie" .

Dziękujemy. Twoja opinia jest dla nas bardzo cenna.


Inne przewodniki, które mogą Cię zainteresować...

OVHcloud Community

Dostęp do OVHcloud Community Przesyłaj pytania, zdobywaj informacje, publikuj treści i kontaktuj się z innymi użytkownikami OVHcloud Community.

Porozmawiaj ze społecznością OVHcloud

Zgodnie z Dyrektywą 2006/112/WE po zmianach, od dnia 1 stycznia 2015 r., ceny brutto mogą różnić się w zależności od kraju zameldowania klienta
(ceny brutto wyświetlane domyślnie zawierają stawkę podatku VAT na terenie Polski).