Configure Artifactory to Use S3

JFrog Installation & Setup Documentation

ft:sourceType
Paligo

Artifactory's filestore is configured through the binarystore.xml file. The binarystore.xml configuration file is located in the $JFROG_HOME/artifactory/var/etc/artifactory folder.

Direct (Eventual-less) versus Eventual Upload Mechanism

Migrating from eventual to direct?

If you are migrating from any eventual mechanism to the direct upload mechanism, make sure your eventual directory is empty or you could experience data loss.

The default S3 chain templates rely on an eventual upload mechanism, whereby an upload from a client is considered successful when the full binary has been uploaded to Artifactory. From Artifactory 7.9.0, the direct upload mechanism serves as an alternative mechanism whereby an upload is not considered successful until it reaches S3. There are advantages to both which we cover below.

Direct Upload Mechanism (Recommended)

The Direct Upload mechanism enables you to upload without the need to maintain persistent storage for the eventual directory. This mechanism may also allow for faster uploads, since there is less contention for disk IO, particularly when Artifactory is hosted on AWS.

Note

Direct upload (i.e. Eventual-less upload) and direct download are available for AWS, Azure, and GCP (Google Cloud Platform).

Direct download for Azure and GCP is only available for Self-Hosted environments.

  1. Client uploads an artifact to Artifactory.

  2. Artifactory receives and simultaneously uploads to S3.

  3. Artifactory finishes uploading the binary to S3

    1. Artifactory returns 201 success to the client.

    2. A database entry for the artifact is created.

Eventual Upload Mechanism

If you are uploading on a system where the S3 upload speed is slow (for example, when Artifactory is hosted self-hosted), you may want to use the Eventual Upload mechanism. The Eventual Upload mechanism also allows you to upload when S3 is down or experiencing network issues.

  1. Client uploads an artifact to Artifactory.

  2. Artifactory receives the full upload.

    1. Artifactory returns a 201 success message to the client.

    2. A database entry for the artifact is created.

    3. The binary is stored in an eventual directory on the local disk.

  3. Artifactory uploads the binary to S3.

  4. The binary is deleted from the eventual directory.