Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >

Search





Overview

The JFrog Platform K3s installer is supported only for the evaluation of the Platform. The installer sets up the lightweight Kubernetes (K3s) environment into which the entire Platform is deployed. This enables you to install the entire JFrog Platform on a single node with a single package. Since the installer seamlessly sets up the entire JFrog Platform and installs all the products, you cannot choose specific products.

The JFrog Platform consists of the following products:

  • Artifactory
  • Xray
  • Insight
  • Distribution
  • Pipelines

Important

You must not use the installer to install the JFrog Platform for production use cases.

For more information about the JFrog Platform and the various products, see JFrog Platform Overview.

The installer sets up a K3s server, installs Helm, and uses Helm Charts to install the JFrog Platform. For more information about K3s, refer to the official K3s documentation available at k3s.io.


Before You Begin

System Requirements

K3s installer requires Internet access since the platform images and Helm charts are pulled from the JFrog repositories.

For optimal usage of the Platform, it is recommended that your machine has 16 GB of RAM and an 8 core processor. 

To access the JFrog platform after installation, use the latest version of any of the following browsers:

  • Chrome
  • Firefox
  • Safari (for Mac)
  • Edge (Chromium-based versions) 

Since the JFrog Platform is installed on a K3s server, we recommend that you review the K3s system requirements in the K3s documentation and ensure that the machine meets the requirement. 

K3s Version

K3s installer supports K3s v1.19.13+k3s1. If you want to override the K3s version to be installed, set INSTALL_K3S_VERSION as an environment variable with the value as the required version. 

K3s installer is tested and certified on K3s v1.19.13+k3s1. The installer might not work with other versions.

When installing the JFrog Platform, you must run the installation as a root user or provide sudo access to a non-root user. 

System Architecture

To learn about the JFrog Platform Deployment, see System Architecture.

Prerequisites

Before installing JFrog Platform, verify that the following are in place.

  • Install net-tools package on Linux.

Subscription Levels

You will need an Enterprise+ trial license (get one from here) to use all the products in the JFrog Platform.

JFrog Subscription Levels

SELF-HOSTED 
ENTERPRISE+
Page Contents



Installation Steps

  1. Download the installer script from releases.jfrog.io.
  2. Run the installer script.

    ./jfrog-platform-<version>.k3s.sh
    

    The installer performs the following actions in sequence:

    1. Installs K3s server.
    2. Start K3s server.
    3. Installs Helm.
    4. Fetches the JFrog Platform binaries from the Helm repository.
    5. Initializes the pods with JFrog products.

      The installer exits while the pods are initialized and displays the further commands that you need to run to complete the installation. You can save these commands for future use.
      In the following example, xx.xx.xxx.xxx is the IP address of the machine. 

      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 jfrog-platform -w jfrog-platform-artifactory-nginx'
         export SERVICE_IP=$(kubectl get svc --namespace jfrog-platform jfrog-platform-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
      
      Using the buldled postgresql database:
      To extract the database password, run the following
      export DB_PASSWORD=$(kubectl get --namespace jfrog-platform $(kubectl get secret --namespace jfrog-platform -o name | grep postgresql) -o jsonpath="{.data.postgresql-password}" | base64 --decode)
      echo ${DB_PASSWORD}
      
      Open Artifactory URL in your browser. Enabled services should be activated with Artifactory.
      
      Your JFrog Platform is being deployed.
      Since all the product images are being downloaded, this process may take around 15 minutes depending on your connection speed.
      
      Execute the following steps to access Jfrog Platform UI,
      1. Run the following command to check the status of the platform,
      
              export KUBECONFIG=/etc/rancher/k3s/k3s.yaml; kubectl get pods -n jfrog-platform
      
      2. Once all pods are in the running state,  run the following command to expose the port to JFrog platform UI,
      
              nohup kubectl port-forward "jfrog-platform-artifactory-nginx-9cc54d4d7-28mfx" --address=localhost,"xx.xx.xxx.xxx" 80:80 -n jfrog-platform >/dev/null 2>&1 &
      
          You must run this command again to expose the ports if you restart the server.
      
      3. Access the JFrog Platform UI through the browser at: http://xx.xx.xxx.xxx
  3. Run the following command to check whether all pods are in the running state.

    export KUBECONFIG=/etc/rancher/k3s/k3s.yaml; kubectl get pods -n jfrog-platform

    The initial setup of the pods can take upwards of 15 minutes. Wait until all the pods are in the running state before you proceed.

  4. Run the following command to expose the ports so that you can access the JFrog Platform.

    nohup kubectl port-forward $(kubectl get pod -l app=artifactory,component=nginx -o jsonpath="{.items[0].metadata.name}" -n jfrog-platform) --address=localhost,"$(hostname -i 2>/dev/null | awk '{print $1}')" 80:80 -n jfrog-platform >/dev/null 2>&1 &

    You must run this command when you restart the machine to access the JFrog Platform.

  5. Access Artifactory from your browser at: http://SERVER_HOSTNAMEFor example, on your local machine: http://localhost.

  6. To access the logs, find the name of the pod using the following command.

    kubectl --namespace jfrog-platform get pods
  7. To get the specific container logs, run the following command.

    kubectl --namespace jfrog-platform logs -f <name of the pod> -c <name of the container>

After the installation is complete, refer to Onboarding Wizard for information on how to get started with using the JFrog Platform.


Uninstall the JFrog Platform K3s Installation

The K3s installation includes the following uninstallation script that you can run to remove K3s along with JFrog Platform.

/usr/local/bin/k3s-uninstall.sh

If you want to uninstall JFrog Platform and retain the K3s installation, run the following command.

helm uninstall jfrog-platform --namespace jfrog-platform

Removal of the Helm release does not completely remove the persistent volumes. You must remove them explicitly. For more information, refer to the K3s documentation available at K3s.



  • No labels
Copyright © 2021 JFrog Ltd.