How to configure OpenStack Swift S3 Provider with Artifactory?

It is possible to configure OpenStack Swift as the object storage platform on Artifactory. To set up Artifactory with S3, follow these stepsCheck here for more information on S3 Object storage in general.

 

Below is a sample storage.properties configuration for OpenStack Swift which uses HTTP basic authentication:

###### CLEVERSAFE Configuration ###### 

binary.provider.type=S3

binary.provider.s3.identity=xxxxxxxxxx

binary.provider.s3.credential=xxxxxxxxxxxx

binary.provider.s3.endpoint=<OpenStack swift endpoint>

binary.provider.s3.bucket.name=<bucket name>

binary.provider.s3.https.only=false

binary.provider.s3.env.s3service.disable-dns-buckets=true

Note the highlighted entries (mandatory for the OpenStack Swift configuration):

binary.provider.s3.https.only entry

binary.provider.s3.env.s3service.disable-dns-buckets JetS3t property&nbsp;entry

By default, JetS3t sends requests to the bucket by the following convention ‘mybucket.s3.providerendpoint.com

OpenStack is following the convention ‘http://s3.providerendpoint.com/mybucket‘, so the above entry is needed to address the request format issue.


Version 4.6.0 of Artifactory introduces the new filestore management capabilities. Here is an basic example for OpenStack configuration with the binarystore.xml file:

Starting from 

<config version=”v1″>

<chain>

        <provider id=”cache-fs” type=”cache-fs”>

            <provider id=”eventual” type=”eventual”>

                <provider id=”retry” type=”retry”>

                    <provider id=”s3″ type=”s3″/>

                </provider>

            </provider>

     </provider>

</chain>

<provider id=”s3″ type=”s3″>

    <identity>XXXXXXXXX</identity>

    <credential>XXXXXXXX</credential>     

    <endpoint><My OpenStack Server></endpoint>

    <bucketName><My OpenStack Container></bucketName>

    <httpsOnly>false</httpsOnly> 

 <property name=”s3service.disable-dns-buckets” value=”true”></property>                               

</provider>

</config>