Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

Latest commit

 

History

History
74 lines (47 loc) · 2.66 KB

2015-08-24-how-to-sync-runabove-object-storage-containers-to-ovh-public-cloud.markdown

File metadata and controls

74 lines (47 loc) · 2.66 KB
layout title categories author lang
post
How to synchronize RunAbove container to OVH Public Cloud?
Object-Storage
pilgrimstack
en

Swift provides a very simple way to synchronize different containers even if the source and the destination are not in the same infrastructure. That is our case here with RunAbove Object Storage and OVH Public Cloud.

A job runs on the RunAbove Swift server. It will replicate all write transactions in the container on RunAbove to an other on OVH Public Cloud.

Prerequistes :

How it works :

The authentication will be done by using a shared key.

The source container should have two specials metadata:

  • X-Container-Sync-To: the destination of the container on the other infrastructure
  • X-Container-Sync-Key: the shared key between containers

The destination container should have one special metadata:

  • X-Container-Sync-Key: the shared key between containers

Generate the shared key :

With Python client :

Assuming you have sourced your environnement with OVH Public Cloud credentials, you have to add the key to the destiantion container.

Then you have to get the public address of this container.

Now you can tell to the source container which destination it should pushed the data with the shared key.

Start by sourcing the RunAbove credentials, then:

With cURL :

On the destination:

        -X POST -H "X-Container-Sync-Key: $sharedKey" -H "Content-Length: 0" 
        -H "X-Auth-Token: abcd1234" 

On the source:

        -X POST -H "X-Container-Sync-Key: $sharedKey" -H "Content-Length: 0" 
        -H "X-Auth-Token: abcd1234" 
        -H "X-Container-Sync-To: https://storage.sbg1.cloud.ovh.net/v1/AUTH_YYYYYYYYY/myContainer"

Conclusion :

This synchronization between two containers is a very good way to migrate data from one infrastructure to another without any service interruption. If you want, you can use it for any others reasons : share objects between openstack users, replicate your data between two geographical and separate infras...