How to Configure Google Cloud as a Binary Storage Provider for Artifactory

JFrog Support
2020-12-21 20:58

Relevant Versions: This information pertains to Artifactory versions 4.6 and above.

As Artifactory fully supports Google Cloud Storage (GCS), your Artifactory filestore can reside in the cloud. This a part of Artifactory’s new filestore management capabilities, which are configurable with the binarystore.xml configuration file. More details on this subject are available HERE.

When using google-storage as a binary provider, the default chain is as follows:

<config version="v1">
   <chain template="google-storage" />
   <provider id="cache-fs" type="cache-fs">
      <provider id="eventual" type="eventual">
         <provider id="retry" type="retry">
            <provider id="google-storage" type="google-storage" />
         </provider>
      </provider>
   </provider>
</config>

With this configuration, Artifactory uses a cache-fs to store the most frequently downloaded artifacts. If the artifact has not been cached, it will download the file from the Google Cloud Storage bucket.

Here is an example binarystore.xml configuration for google-storage:

<config version="v1">
    <chain template="google-storage"/>
    <provider id="google-storage" type="google-storage">
        <endpoint>commondatastorage.googleapis.com</endpoint>
        <bucketName><BUCKET NAME></bucketName> 
        <identity>XXXXXX</identity>
        <credential>XXXXXXX</credential>
        <property name="httpclient.max-connections" value=150></property>
    </provider>
</config> 

You can find additional parameters for google-storage HERE.