Enabling JFrog Catalog in Xray Helm Chart

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo
Prerequistes

Starting from Xray version 3.107.14 and above, the JFrog Catalog has been added as a dependency chart in Xray.

Steps to Enable JFrog Catalog
  1. Install/Configure External PostgreSQL Database for JFrog Catalog. We do not recommend using bundled PostgreSQL for production environments.

    You can use the following commands to create the JFrog Catalog database schema:

    CREATE USER catalog WITH PASSWORD 'password';
    CREATE DATABASE catalogdb WITH OWNER=catalog ENCODING='UTF8' lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template=template0;
    GRANT ALL PRIVILEGES ON DATABASE catalogdb TO catalog;

    You can use cloud PostgreSQL databases as well, and create a new Database for the JFrog Catalog similar to JFrog Xray. For more information on the JFrog Catalog Database, see PostgreSQL for JFrog Catalog.

  2. Update the JFrog Helm Chart repository:

    helm repo update
  3. Edit JFrog Xray values.yaml and add/update the Catalog’s attribute section to true with the external Database as per the example below:

    global:
      jfrogUrl: http://<artifactory-url>
      joinKeySecretName: my-joinkey-secret
      masterKeySecretName: my-masterkey-secret
    xray:
      replicaCount: 1
    rabbitmq:
      enabled: true
      replicaCount: 1
      auth:
        username: guest
        password: "Password@123"
    postgresql:
      enabled: false
    database:
      url: "postgres://xray-postgresql:5432/xraydb?sslmode=disable"
      user: xray
      password: xray
    # This will install catalog chart as a dependency chart in xray.
    catalog:
      enabled: true
      createCatalogDb:
        enabled: false
      database:
        url: "postgres://catalog-postgresql:5432/catalogdb?sslmode=disable"
        user: catalog
        password: catalog
    

    You can pass the Database Credential as secrets as well. For more information, see PostgreSQL for JFrog Catalog.

    Note: If you are using an Xray version prior to 3.111.13 (Xray Helm chart version 103.111.13), you must include the following extraSystemYaml configuration in your values.yaml file under the Xray section:

    xray:
      extraSystemYaml:
        catalog:
          enabled: true
          central:
            enabled: true
    

    This is fixed in JFrog Xray version 3.111.13 [JFrog Xray Helm charts version 103.111.13] and no longer required for Xray 3.111.13 and above.

  4. Execute the helm upgrade command:

    helm upgrade --install xray jfrog-charts/xray -f xray.yaml -n xray

    You can pass the --version=<xray-chart-version> parameter in the Helm command to keep JFrog Xray at the same version which is installed. For example:

    helm upgrade --install xray jfrog-charts/xray -f xray.yaml -n xray --version=<xray-chart-version>
  5. Check for the JFrog Catalog pod and pod logs, and wait until the pods reach the ready state:

    kubectl get pod -n xray
    kubectl logs -f <catalog-pod-name> -n xray
    
  6. Access the JFrog Catalog from your browser at: http://<frogUrl&gt;/ui/catalog/packages/overview

    To modify additional settings for the JFrog Catalog chart, check the full values.yaml file for the supported keys and tags.

Important Notes
  1. Ensure that .Values.jfrogUrl and .Values.joinKey are provided in the global section for the JFrog Catalog subchart to access them. The joinKey from Artifactory will be used by the JFrog Catalog to join the JFrog Platform Cluster along with Artifactory. You can find the JPD(JFrog Platform Deployment) join key in the JPD UI in the Administration module | Security | General | Connection Details. In the Current Password field, enter your login password, and click Unlock. Now, you can view and copy the join key from the Join Key field.

  2. We recommend passing the .Values.masterKey in the values.yaml file, as the master key is used for the internal encryption key for the database and configuration files. By providing the .Values.masterKey, you will help facilitate the restoration of the application without the need to reset the encryption, allowing for a faster restore process.

    You can also pass them as secrets. Refer to the values.yaml for the supported keys.

  3. External PostgreSQL Configuration

    • Set .Values.postgresql.enabled to false when using an external PostgreSQL database. JFrog recommends using an external PostgreSQL database for optimal performance.

  4. Enabling JFrog Catalog

    • Please ensure that the .Values.catalog.enabled is set to true, and provides the database configuration in the .Values.catalog.database section.

  5. Xray Versions prior to 3.111.13

    • If you are using an Xray version prior to 3.111.13 (Xray Helm chart version 103.111.13), you must include the following extraSystemYaml configuration in your values.yaml as mentioned in the note of Step 3.