# Oracle Bucket Storage

### Requirements <a href="#id-1-requirements" id="id-1-requirements"></a>

1. An Oracle Cloud project that you can administer.
2. A Valohai project or organization to link with the Oracle Bucket.

### Create an Oracle Bucket <a href="#id-2-create-an-oracle-bucket" id="id-2-create-an-oracle-bucket"></a>

To set up a new bucket within the Oracle Cloud console, follow this [official Oracle guide](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/managingbuckets_topic-To_create_a_bucket.htm).

Once you have a bucket created, make a note of the namespace, this will be used as part of the endpoint URL of the bucket itself.

### Generate access key <a href="#id-3-generate-access-key" id="id-3-generate-access-key"></a>

* Navigate to your Profile (click the top right person icon).
* Click My Profile.
* Navigate to customer secret keys.
* Click generate a secret key.
* Insert any name (make it memorable, as you will need to find the IAM ID later).
* Click generate a secret key.
* Copy the generated key.

### Oracle S3 Endpoint <a href="#id-4-oracle-s3-endpoint" id="id-4-oracle-s3-endpoint"></a>

To point to your Oracle bucket, you will need the following information to build the correct endpoint:

* Namespace of your bucket.
* Region of your bucket.

The endpoint will look something like the following:\
`https://NAMESPACE.compat.objectstorage.REGION.oraclecloud.com`

### Link the Store to a Valohai Project <a href="#id-5-link-the-store-to-a-valohai-project" id="id-5-link-the-store-to-a-valohai-project"></a>

1. Navigate to: **Project** -> **Settings** -> **Data Stores** -> **Add Amazon S3**.
2. **Store Name**: use the same name as the Oracle bucket.
3. **Bucket Name**: use the same name as the Oracle bucket.
4. **IAM Secret Access Key**: paste in the previously generated secret key from Oracle.
5. **IAM Access Key ID**: in Oracle, under `Customer secret keys` find the key you just created. Under the column `Access key`, click the access key ID. Copy and paste this into Valohai.
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 Oracle S3 storage by default.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valohai.com/data/configure-data-stores/oracle-bucket-storage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
