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

Jayanth Suresh
2021-04-11 12:25

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> 

Additional configuration parameters for google-storage are available HERE.