Configuring the Cold Artifact Storage
To configure the Cold Artifact Storage, you must first configure a designated Artifactory instance as the Cold Artifactory, connect to it a storage provider (either cheap self-hosted storage or cloud storage provider, such as Amazon S3 Glacier), and then connect the Cold Artifactory instance to an existing Artifactory instance, also called Live Artifactory.
Before setting up Cold Artifact Storage, verify that the following prerequisites are in place:
Two Artifactory instances
- Enterprise or Enterprise Plus licenses
- Unique license for each Artifactory instance
Administrator access to both instances
Every cluster of Artifactory that needs to archive requires a single Cold Artifact Storage instance with a dedicated license.
Step 1: Configuring an Artifactory Instance as a Cold Instance
Perform the following steps on the Artifactory instance that you are designating as the Cold instance:
Update the Artifactory System YAML file:
shared.jfrogColdStorage.coldInstanceEnabledproperty and set it as
trueto configure the instance as the Cold instance.
Configure the Archive Binary Provider:
When setting up the Cold instance, you will need to connect it to a binary storage provider. You can use one of the following storage options:
Self-hosted Storage: If you wish to use the local file system, see Configuring the Filesystem Binary Provider.
Amazon S3 Glacier Cloud Storage: If you wish to use Amazon S3 Glacier, follow these steps:
binarystore.xmlconfiguration file located in the
- Specify the
Within the chain, define the standard Amazon S3 Binary Provider template as outlined in the section Amazon S3 Official SDK Template and configure the parameters as per your requirements.
Restart the Cold Artifactory instance:
After making the above changes, restart the Cold Artifactory instance for the changes to take effect.
Disabling Cold Artifact Storage feature
Cold Artifact Storage feature is enabled by default. If you wish to disable the feature, in the Artifactory System Properties file, set
Custom Base URL
It is recommended that you configure a Custom Base URL for this Artifactory instance. A custom URL base is especially useful when the system is running behind a proxy. For more information, see General System Settings.
Step 2: Connecting Live Artifactory to Cold Artifactory
Perform the following steps on the Artifactory instance that you are designating as the Live instance. This could be either your existing or a new Artifactory instance:
Update the Artifactory System YAML file:
shared.jfrogColdStorage.coldInstanceUrlproperty and enter the Cold instance URL that the Live instance will connect with.
- Restart the Live Artifactory Instance:
After making the above changes, restart the Live Artifactory instance for the changes to take effect.
Step 3: Pairing the Live Instance with the Cold Instance
For the Cold Artifactory instance to trust and receive requests from the Live Artifactory instance, the two instances must be paired. This is a one-way trust.
You can pair a Live Artifactory instance with a Cold Artifactory instance using either the UI or APIs.
Pairing using UI
For information about using the UI to pair Live and Cold Artifactory instances, see the section Pairing Tokens.
Pairing using API
Perform the following steps to pair the Live instance with the Cold instance using APIs:
On the Cold instance, execute the following POST request:
This generates the pairing token. For example:
Next, on the Live instance, use the generated pairing token to execute the following PUT request. This sets up trust between the Live instance and the Cold instance:
If the two instance are paired successfully, the request returns the following status:
Each connection between a Live instance and a Cold instance is bound to a namespace in the Cold instance, which is generated during the paring process. The namespace is unique and the trust is established for that specific namespace.
This namespace is required when you need to re-establish the trust between the Live and Cold instances, for example, after the token was revoked by mistake. In such scenarios:
- Retrieve the namespace.
- Regenerate the pairing token by providing the namespace as an argument in the POST request.
curl -u admin:password -X POST https://<cold_instance_ip_address>/artifactory/api/v1/service_trust/pairing/artifactory-cold/gbbxmcuj
gbbxmcuj is the namespace.
Optimizing Cold Artifact Storage Performance
Cold Artifact Storage includes several properties that can be used to configure and optimize its performance.
The list of parameters and their corresponding values that are shown below are for reference only. It is highly recommended that you do not change these values.
Live Artifactory Properties
The following properties can be configured in the Live Artifactory System YAML.
Number of threads that will be used per policy to archive items.
Number of threads that will be used to restore items.
Number of http connections that are allowed to deploy artifacts from the Live instance to the Cold instance.
Maximum socket timeout for an http connection.
Number of http peers per route that are allowed to deploy artifacts from the Live instance to the Cold instance.
Setting for how often the Live instance will try to pull restored items from the Cold instance.
Setting for how many restored items will be pulled from the Cold instance to the Live instance.
Approximate maximum allowed bandwidth for all restore operations.
Error threshold to stop restore operation.
Setting for how many items are fetched from the database during archive policy execution.
Approximate max allowed bandwidth for a single archive policy execution.
Stop execution if there are 10% errors during an archive process.
Cold Artifactory Properties
The following properties can be configured in the Cold Artifactory System YAML.
Number of threads that will be used when processing the restore request.
By default, on the Cold Artifactory instance, the cron job rate to check the restore status for each archived artifact is 120 seconds (2min). This can be reconfigured for cost optimization.
Interval for the cleanup job.