Debug School

Cover image for JFrog Installation
Suyash Sambhare
Suyash Sambhare

Posted on

JFrog Installation

Environment Variables

JFrog Home

JFrog Home is the default home directory of the JFrog Platform that contains the application directory and the data directory.
The environment variable is JFROG_HOME

Linux/Windows Archive RPM/Debian Docker Container Docker Host
<extracted directory> /opt/jfrog /opt/jfrog ROOT_DATA_DIR Note: Defined and customized in the .env file Default value: ~/.jfrog

Application Directory

The application directory (immutable) contains all the individual product application binaries, scripts, and default configurations.

The environment variable is JFROG_HOME/<product>/app
Eg: JFROG_HOME/xray/app

Linux/Windows Archive RPM/Debian Docker Container Docker Host
<extracted directory>/<product>/app /opt/jfrog/<product>/app /opt/jfrog/<product>/app -

Data Directory

The data directory (mutable) contains all customizable configurations, data generated by the application, and logs.
The environment variable is JFROG_HOME/<product>/var
Eg: JFROG_HOME/xray/var

Linux/Windows Archive RPM/Debian Docker Container Docker Host
<extracted directory>/<product>/var /opt/jfrog/<product>/var ### Note The folder path is a symbolic link /opt/jfrog/<product>/var ROOT_DATA_DIR/var Default value : ~/.jfrog/<product>/var

You can customize the data folder using the following options in RPM/Debian installation.

  • Manual Option: Create a symbolic link from your custom folders to the default folders. Eg: , $JFROG_HOME/artifactory/var/mnt/artifactory/var

  • Environment Variable Option: Set the JF_PRODUCT_VAR environment variable to point to a custom location in your system's environment variables files.

Generic Directory Layout

This is a generic directory layout for all JFrog products.

  └── <product>
     ├── app
     │   ├── bin
     │   ├── run
     │   ├── doc
     │   ├── <third-party>
     │   │   ├── java
     │   │   ├── yq
     │   │   └── others
     │   └── <service>
     │   │   ├── bin
     │   │   └── lib
     │   └── misc
     └── var
        ├── backup
        │   └── <service>
        ├── bootstrap
        │   └── <service>
        ├── data
        │   └── <service>
        ├── etc
        │   ├── system.yaml
        │   ├── <service>
        │   └── security
        │       └──master.key
        │       └──join.key
        ├── log
        │   └── <service logs>
        │   └── archived
        │       └── <archived service logs>
        └── work
            └── <service>

Enter fullscreen mode Exit fullscreen mode

James Frog

Install Artifactory single node with RPM

Installation Steps

Complete the following steps to install the product.

  1. Install Artifactory as a service on Red Hat compatible Linux distributions, as a root user. yum install -y jfrog-artifactory--.rpm
  2. Customize the product configuration (optional) including database, Java Opts, and filestore.
  3. Manage Artifactory using the following commands. service artifactory start|stop
  4. Access Artifactory from your browser at: http://SERVER_HOSTNAME:8082/ui/ Eg: http://localhost:8082/ui/
  5. Check Artifactory Log. tail -F $JFROG\_HOME/artifactory/var/log/console.log

Configure log rotation of the console log

The console.log file can grow quickly since all services write to it.

Install Artifactory Single Node on OpenShift

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.

The chart directory includes three values files, one for each installation type–small/medium/large. These values files are recommendations for setting resource requests and limits for your installation. You can find the files in the corresponding chart directory.

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

Complete the following steps to install the product.

  1. Add https://charts.jfrog.ioto your Helm client. helm repo add jfrog
  2. Update the repository. helm repo update
  3. Create a unique Master Key (Artifactory requires a unique master key) and pass it to the template during installation. export MASTER_KEY=$(openssl rand -hex 32)echo ${MASTER_KEY}

Configure JFrog Platform in an Air-gapped Environment

An air-gapped environment is a system that has no access to the outside Internet. JFrog Platform uses theJFConnect microservice to fetch entitlements that enable the usage of various services.

You can configure the JFrog Platform to run in an air-gapped environment.

Do the following steps to configure the JFrog Platform to work in an air-gapped environment.

  1. Set the following values in the Artifactory System YAML file.
        enabled: true
            enabled: true
            enabled: true
Enter fullscreen mode Exit fullscreen mode
  1. Generate an admin-scoped token.
  2. Generate an offline request token with the JFConnect Start Register API with the bearer token that you obtained in the previous step in the air-gapped JPD. The API returns an offline request token.
  3. Run the Post Offline Request Token to JFrog Entitlements Service API with the offline request token in the body from a machine that has access to the Internet.
    Eg: curl --location '' --header 'Content-Type: application/json' --data '{"offline_request_token": "<token>"}' > entitlements.json

    If you run the previous command, you can ensure that the entitlements JSON that you receive from JES will have the same checksum as intended since you are writing the response body to a file. In addition, the response header also contains an
    offline_response_token that you need to provide to the air-gapped JPD.

  4. Run the JFConnect Offline Register API with the offline response token and the entitlements file in the machine that hosts the air-gapped JFrog Platform installation.
    curl --location 'http://localhost:8082/jfconnect/api/v1/offline/register' --header 'Authorization: Bearer <Bearer token>' --form 'entitlements=@"entitlements.json"' --form 'offline_response_token=<offline_response_token>'


Top comments (0)