Artifactory installation on OpenShift uses the Artifactory Helm chart for installation. The installation follows a similar approach as the Helm installation with certain changes specific for OpenShift.
Before you proceed with the installation, review the system requirements.
Customized YAML File
When using a customized values.yaml
file, remember to attach a -f
flag to each upgrade command in the file.
Installation Steps
Follow these steps to install the product:
Add JFrog Helm Charts repository to 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) and 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.You need to set the
securityContext
of Artifactory andcontainerSecurityContext
as false in thevalues.yaml
file to proceed with the installation.containerSecurityContext: enabled: false artifactory: podSecurityContext: enabled: false
To make PostgreSQL work on OpenShift, disable the securityContext in the pod and container level in the
values.yaml
file.postgresql: securityContext: enabled: false containerSecurityContext: enabled: false
Artifactory version 7.77.3 and later supports Nginx. Update the following values in the
values.yaml
file to use Nginx.nginx: podSecurityContext: enabled: false containerSecurityContext: enabled: false
Install the chart with the release name
artifactory
and with master key and join key, and pass thevalues.yaml
file.helm upgrade --install artifactory --set artifactory.masterKey=${MASTER_KEY} --set artifactory.joinKey=${JOIN_KEY} --namespace artifactory jfrog/artifactory -f --values.yaml
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).
The following example shows a sample
values.yaml
file.containerSecurityContext: enabled: false artifactory: podSecurityContext: enabled: false postgresql: securityContext: enabled: false containerSecurityContext: enabled: false nginx: podSecurityContext: enabled: false containerSecurityContext: enabled: false
Connect to Artifactory.
It may 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 following example, art77 is the release name and art is the namespace).
NOTE: You are installing Artifactory in Openshift Environment. Open Artifactory in your browser Default credential for Artifactory: user: admin password: password
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
file and are then applied to thesystem.yaml
file.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).