Setting up Artifactory to Use GCS
First time installation or upgrade
If you are moving your filestore to GCS in the context of upgrading Artifactory, or a first time installation, we recommend that you first do a standard installation of Artifactory using the default settings, or a standard upgrade using your current settings.
In order to move your Artifactory filestore to the cloud, you need to execute the following steps:
- Shut down Artifactory.
- Set your enterprise license
- Configure Artifactory to use GCS
- Migrate your files to the cloud
- Start up Artifactory
Setting Your License
To use Artifactory's support for GCS, you need to have an enterprise license with your Artifactory installation.
To do so, make sure your $JFROG_HOME/artifactory/var/etc/artifactory/artifactory.lic
file contains your enterprise license.
Configuring Artifactory to Use GCS
To configure Artifactory to use a GCS object storage provider, you need to use the Google Cloud Storage binary provider described in Configuring the Filestore making sure to set the following parameters:
JetS3t Framework
Artifactory uses the JetS3t framework to access GCS. Some of the parameters below are used to set the corresponding value in the framework. For more details, please refer to the JetS3t Configuration Guide.
Parameter | Description |
---|---|
testConnection | Default: true When true, the Artifactory uploads and downloads a file when starting up to verify that the connection to the cloud storage provider is fully functional. |
multiPartLimit | Default: 100,000,000 bytes File size threshold over which file uploads are chunked and multi-threaded. |
identity | Your cloud storage provider identity. |
credential | Your cloud storage provider authentication credential. |
bucketName | Your globally unique bucket name on GCS. |
path | The relative path to your files within the bucket |
proxyIdentity | Corresponding parameters if you are accessing the cloud storage provider through a proxy server. |
proxyCredential | |
proxyPort | |
proxyHost | |
port | Default: 80 The port number through which you want to access GCS. You should only use the default value unless you need to contact a different endpoint for testing purposes. |
endpoint | Default: The GCS hostname. You should only use the default value unless you need to contact a different endpoint for testing purposes. |
httpsOnly | Default: false. Set to true if you only want to access GCS through a secure https connection. |
httpsPort | Default: 443 The port number through which you want to access GCS securely through https. You should only use the default value unless you need to contact a different endpoint for testing purposes. |
bucketExists | Default: false. Only available on google-storage. When true, it indicates to the binary provider that a bucket already exists in Google Cloud Storage and therefore does not need to be created. |
The following snippet shows the default chain that uses google-storage as the binary provider:
<config version="v1"> <chain> <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> </chain> <!-- Here is an example configuration part for the google-storage: --> <provider id="google-storage" type="google-storage"> <endpoint>commondatastorage.googleapis.com</endpoint> <bucketName><NAME></bucketName> <identity>XXXXXX</identity> <credential>XXXXXXX</credential> </provider> </config>
Interoperable Storage Access Keys
The Interoperability API lets you use HMAC authentication and lets GCS interoperate with tools written for other cloud storage systems. To use GCS, you need to turn on this API and use interoperability access details of the current user in GCS. This API is enabled per project member, not per project. Each member can set a default project and maintain their own access keys. For more details, please refer to Google Cloud Storage Interoperability.
You can obtain your access key parameters through your Google GCS account console and set them into the corresponding parameters in Artifactory as follows:
identity | This parameter is provided by GCS as your access key |
credential | This parameter is provided by GCS as your access secret |
Keep your database settings
Make sure you don't change your database settings in your db.properties
file.
Migrating Your Filestore
To migrate your filestore, you need to execute the following steps:
- Stop Artifactory
- Copy the
$JFROG_HOME/artifactory/data/filestore
directory to your GCS bucket name and path specified when you configured Artifactory to use GCS. - Start Artifactory