OVH Object Storage

In this guide, we’ll link a OVH object storage to a Valohai project.

Requirements

  1. An OVH Cloud project that you can administer.

  2. A Valohai project or organization to link OVH object Storage to.

Create OVH Object Storage

To set up new object storage within the OVH console, follow these steps:

  1. Navigate to your OVH project and select Object storage under the Storage section.

  2. Click on Create an object container.

  3. Choose S3 API as the solution.

  4. Select any preferred region.

  5. At the Link User step, click Create User. Be sure to save the credentials generated during this step.

  6. Enter a name for your container and then create it.

Permissions

Now, let’s grant the new S3 user access to the files in the bucket:

  1. Create a JSON file with the necessary policy using your terminal:

echo '{"Statement":[{"Action":["s3:*"],"Effect":"Allow","Resource":["*"],"Sid":"FullAccess"}]}' > my_policy.json
  1. Navigate to the S3 Users tab under Object Storage, select your user, and choose Import S3 Policy.

  2. Select the newly created my_policy.json file to import the policy.

Once the policy is imported we are ready to link this bucket to Valohai.

You can connect this data store either to a single project or create it on the organization level.

  • Navigate to Hi, <username> (the top-right menu) -> Manage <organization>

  • Open the “Data Stores” tab and add your store’s details. The data store can be shared with everyone in the organization, or you can expose the data store only to certain teams.

  1. Navigate to Project -> Settings -> Data Stores -> Add Amazon S3.

  2. Name: usually makes sense to use the same name as the bucket name.

  3. Bucket: the bucket name; “ovh-bucket-test” in this example; use the name that you set when creating the object storage in OVH.

  4. Access Keys: provide the Access Key and Secret Access Key associated with your S3 user.

  5. Set the region: check the region in OVH Object Storage, use lowercase, for example if ‘DE’ type ‘de’.

  6. Check the box labeled Use put_object for uploads.

  7. When you create the store, the credentials provided will be checked by creating a small test file in the bucket. If the creation succeeds, you are good to go.

  8. Once the data store is linked, you can set it as your project’s default upload store under Settings -> General -> Default upload store. This ensures that uploaded outputs will be stored in this particular OVH storage by default.

Last updated

Was this helpful?