Artifactory Single Node Manual Docker Compose Installation

JFrog Installation & Setup Documentation

ft:sourceType
Paligo
  1. Go to the download page, click the green arrow to download Docker Compose. Extract the contents of the compressed archive (.tar.gz file) and then go to the extracted folder.

    tar -xvf jfrog-artifactory-<pro|oss|cpp-ce>-<version>-compose.tar.gz

    .env file included within the Docker Compose Archive

    This .env file is used by Docker Compose and is updated during installations and upgrades.

    Notice that some operating systems do not display dot files by default. If you've made any changes to the file, remember to backup before an upgrade.

  2. Create the following folder structure under $JFROG_HOME/artifactory

    -- [1030     1030    ]  var
        |-- [1030     1030 ]  data
        |   |--   [104    107]    nginx                     - Necessary if you want to add nginx
        |   `--   [999    999]    postgres                  - Necessary if you want to add postgres
        |-- [1030     1030 ]  etc

    Enter the following commands in order so that you can set the ownership correctly.

    chown -R 1030:1030 $JFROG_HOME/artifactory/var
    chown -R 1030:1030 $JFROG_HOME/artifactory/var/data
    chown -R 1030:1030 $JFROG_HOME/artifactory/var/etc
    chown -R 104:107 $JFROG_HOME/artifactory/var/data/nginx
    chown -R 999:999 $JFROG_HOME/artifactory/var/data/postgres
  3. Copy the appropriate Docker Compose templates from the templates folder to the extracted folder. Rename it as docker-compose.yaml

    Requirement

    Template

    Artifactory + Derby (inbuilt database)

    docker-compose.yaml

    Artifactory + Postgres

    docker-compose-postgres.yaml

    Artifactory + Nginx

    docker-compose-nginx.yaml

  4. Update the .env file with the installation directory.

    ROOT_DATA_DIR=$JFROG_HOME/artifactory
    ##Enter the exact value of $JFROG_HOME. For example, /root/.jfrog.
  5. Customize the product configuration.

    1. Customize the PostgreSQL Database connection details. (optional)

    2. Set any additional configurations (for example: ports, node id) using the Artifactory system.yaml configuration file .

      Note

      Ensure the host's ID "shared.node.id" and IP "shared.node.ip" are added to the system.yaml. If these are not added, the container's IP will be used and other Platform Deployments, products will be unable to reach this instance

  6. Start Artifactory using docker-compose commands.

    docker-compose -p rt logs
    docker-compose -p rt ps
    docker-compose -p rt up -d
    docker-compose -p rt down
  7. Access Artifactory from your browser at:http://SERVER_HOSTNAME:8082/ui/. For example, on your local machine: http://localhost:8082/ui/.

  8. Check Artifactory Log.

    docker-compose -p rt logs

    Configure log rotation of the console log

    The console.log file can grow quickly since all services write to it. For more information, see configure the log rotation.Logging

After installing and before running Artifactory, you may set the following configurations.

  • System YAML Configuration File

    Where to find system.yaml?

    You can configure all your system settings using the system.yaml file located in the $JFROG_HOME /artifactory/var/etc folder. For more information, see Artifactory YAML Configuration.

    If you don't have a System YAML file in your folder, copy the template available in the folder and name it system.yaml.

    For the Helm charts, the system.yaml file is managed in the chart’s values.yaml.

  • Database

    Artifactory comes with an embedded Derby Database out-of-the-box. If you're planning to use it in production, it is highly recommended to first Configure the Database, and then start Artifactory.

  • Customize Java Opts (optional)Remember to modify your JVM Parameters as needed by setting JAVA_OPTIONS in Shared Configurations. The property to pass extra Java opts is artifactory.extraJavaOpts. It is highly recommended to set your Java memory parameters as follows:

    Tip

    The larger your repository or number of concurrent users, the larger you need to make the -Xms and -Xmx values accordingly. If you can reserve at least 512MB for Artifactory, the recommended minimal values are:

    -server -Xms512m -Xmx2g -Xss256k -XX:+UseG1GC

    For more recommendations about your hardware configuration (especially the -Xmx parameter), see System Requirements

  • Additional Settings

    These include: customizing ports, joinKey (join.key), masterKey (master.key).

  • Configuring the Filestore

    By default, Artifactory is configured to use the local file system as its filestore. Artifactory supports a variety of additional filestore configurations to meet a variety of needs for binary storage providers, storage size and redundancy.

Enable TLS 1.0 and 1.1 for Connectivity with Older Databases

Artifactory version 7.25.2 onwards includes OpenJDK version 11.0.11 and later. TLS 1.0 and TLS 1.1 are disabled by default from OpenJDK 11.0.11 onwards. If your database version does not support TLS 1.2, the Artifactory startup fails.

If you are unable to upgrade your database to a version that supports TLS 1.2 or later, perform the following steps to run Artifactory.

  1. Download the java.security file that has TLS 1.0 and 1.1 enabled.

  2. Create the directory, ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java.

  3. Copy the java.security file into ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java.

  4. Provide the appropriate permissions to the directory.

    Note

    Artifactory startup takes a backup of the existing java.security file and bootstraps custom java.security into the ${JFROG_HOME}/artifactory/app/third-party/java/conf/security folder.

Configure Java Security File for Helm Installations
  1. Create the following local directory.

    mkdir -p java/configmap
  2. Download the java.security file that has TLS 1.0 and 1.1 enabled.

  3. Copy the java.security file to java/configmap.

  4. Run the following command to create a custom config map. For more information, see Using Config Maps.

    kubectl create configmap java-security-config --from-file=java/configmap/java.security
  5. Pass the following custom config map to your Helm install. For more information, see Using Config Maps.

    artifactory:
      preStartCommand: "mkdir -p /opt/jfrog/artifactory/var/bootstrap/artifactory/java && cp -Lrf /tmp/java/* /opt/jfrog/artifactory/var/bootstrap/artifactory/java/"
      customVolumes: |
       - name: java-security-config
         configMap:
           name: java-security-config
      customVolumeMounts: |
        - name: java-security-config
          mountPath: /tmp/java/java.security
          subPath: java.security