Install JFrog Worker with Artifactory Helm Chart

This topic explains how to install the JFrog Worker on a self-hosted using environment the Artifactory and Worker Helm Charts.

This topic explains how to install the JFrog Worker on a self-hosted environment using the Artifactory and Worker Helm Charts.

📘

What You Need to Know?

  • Worker is supported only with Artifactory version 7.98.4 and above.
  • Ensure that an Artifactory instance is already deployed and running in the Kubernetes environment using Helm Chart. This running instance must have the Worker configuration enabled.

Roadmap to Install Worker Helm Chart

Here's a high-level overview of what will you do to install the Worker Helm Chart on a Self-Hosted Environment:

  • Verify the production environment system requirements to ensure that the resources needed to install Worker are set correctly.
  • Install Artifactory with the Worker configuration enabled to ensure that the Worker UI is accessible after deploying the Worker chart. Additionally, it enables the Artifactory add-on that triggers Worker based on Artifactory events.
  • Create a Kubernetes cluster to run the Worker pods.
  • Add the JFrog Helm repository to the Helm Client to install the Worker.
  • Customize the worker-values.yaml file with specific values for the Join Key and Master Key, and the JFrog URL..
  • Deploy the Worker Chart to connect to a running instance of Artifactory, and start using the Worker.

Enabling Worker Configuration in Artifactory

📘

Note

You can connect Worker to an Artifactory instance running in Kubernetes. Hence, before installing Artifactory, make the following change.

In the custom-values.yaml file, configure the Worker by setting the worker.enabled key to true to activate the Artifactory add-on that executes Worker on Artifactory events. By default, this value is set to false.

artifactory:  
    worker:    
        enabled: true
📘

Note

If you are overriding the default system.yaml file provided with the Artifactory Helm Chart, you should add the following section to your custom system.yaml file:

shared:
  extraJavaOpts: "-Dartifactory.workers.addon.support=true"
  featureToggler:
    worker: true
access:
  worker:
    enabled: true

Steps to Install Worker Chart

Learn how to install the Worker Helm Charts on self-hosted environments.

  1. Add the JFrog Helm Charts repository to your Helm client.

    helm repo add jfrog https://charts.jfrog.io
  2. Update the repository.

    helm repo update
  3. Before you install Worker Helm Chart, you must add the values of joinKey, masterKey, and jfrogUrl in the worker-values.yaml file. This JFrog URL must point to the Artifactory instance that has Worker enabled.

    ## This is the worker-values.yaml file
    
    global:
      jfrogUrl: <YOUR_PREVIOUSLY_RETRIEVED_BASE_URL>
      joinKey: <YOUR_PREVIOUSLY_RETRIEVED_JOIN_KEY>
      masterKey: <YOUR_MASTER_KEY>

    Set these values in the worker-values.yaml file:

    • jfrogUrl: The URL of the machine where JFrog Artifactory is deployed, or the URL of the load balancer that directs traffic to it.
    • joinKey: This is the secret key required by Artifactory to register and authenticate the Worker service. You can retrieve this key from your Artifactory instance.
    • masterKey: This is the unique master key that the Worker service requires.
  4. Install the Worker Chart with the release name worker.

    helm upgrade --install worker --namespace worker --create-namespace jfrog/worker -f worker-values.yaml
    • worker: Name of the Helm release.
    • worker: Namespace of the Worker in Kubernetes.
    • jfrog/worker: Path of the deployed Worker Chart.
    • worker: Name of the Worker Chart.
    • -f: This flag is used when you include any new changes over the default values.
    • worker-values.yaml: This file contains the custom configurations that will be used during the installation.

    As a result of running this command, the Worker Chart is now deployed and Worker can be accessed using the Artifactory instance.

  5. Access Worker from your browser using the jfrogUrl defined in the parameters during the installation.

    https://<jfrogUrl>/ui/

    You can now access the Workers tab in the Administration module.

  6. Check the deployment status of your Worker Helm Chart.

    helm status jfrog-worker --namespace worker
  7. To access the logs, find the name of the pod using the following command.

    kubectl --namespace worker get pods
  8. To get the container logs, run the following command.

    kubectl --namespace worker logs -f <name of the pod>