> For the complete documentation index, see [llms.txt](https://dbi-services.gitbook.io/yak-user-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dbi-services.gitbook.io/yak-user-doc/quickstarts/oci.md).

# OCI

## 1. Declare secrets for OCI credentials

* From the menu, navigate to **configuration** -> **secrets**
* Click "**declare**"
* Give a name to your secret
* Select "**oci credentials**" as secret type
* Retrieve your tokens from your OCI account and fill-in the fields in the form:
  * **OCI Region** (your OCI Region ID)
  * **OCI Tenancy**
  * **OCI User Fingerprint**
  * **OCI User ID**
  * **OCI private key value**
* Click "**Save**"

## 2. Declare SSH keys

In order to connect securely to the linux targets once created, a pair of SSH keys must be generated and the **private key** must be transferred to the instances.

1. Generate a SSH key:

SSH keys can be generated from any machine running openSSH with the "ssh-keygen" command

Example:

```bash
$ ssh-keygen -b 4096 -m PEM -t rsa -f sshkey -q -N ""
```

2. Copy the content of the **private key** file:

```bash
##This is just an example, generate your own private key

-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABASDILVb1
MiZ78g848c6Dk6KYwkJZXloSIruLe+Sid0Xd+Lb1rAxbwzAhXWRMzzBT5k3WciXk2fMhUD
p4YSahpYvquZK950aXiZNDOJpKZP8wjf4g4nQyiJZ/0G0J9mIaI2h/fr8TA67KHYtu/Eyf
PN9bKJwII3aiGlu5/Viq2cgYT8jJ01AK8cY3tSqKdlrN2GyxllBFl42QplbxA2USPJ1E6v
VIjtbmJjdz[...........................................]qAc4HxP02t/N2ZN
q+dDNWeShfVz4zjApPQCzdiGqLAlzUy67KNxQgljhaOEaYTQgrLE8XNGsIFNZwGvsEo/xZ
XnN2p
-----END OPENSSH PRIVATE KEY-----
```

3. Give an explicit name to your secret and paste the entirety of the **private key** into the corresponding field of the form.
4. Click "**Save**"

## 3. Declare your infrastructure

* From the menu, navigate to "**Infrastructures**"
* Click the "**declare**" button
* Give a name to your infrastructure (:warning: : "\_" character is not supported in infrastructure names)
* Select your provider ("**oci**" in the present example)
* Get the required information from your OCI account and fill-in the form with (see ["declare infrastructures"](/yak-user-doc/manage-infrastructures/manage-infrastructure.md#oci-settings) section for more details):
  * **Availability domain**
  * **Compartment ID**
  * **Region ID**
  * **Security list**
  * **Subnet ID**
* Create infrastructure tags (optional)
  * Tags are key-value pairs applied to a resource to hold metadata about that resource.
  * Servers (OCI instances) inherit the tags from the infrastructure they belong to.
* Click "**Save**"

## 4. Attach your OCI and SSH secret

* From the menu, navigate to "**Infrastructures**"
* Select the OCI infrastructure in the list
* Click the "**Action**" button
* Click "**Attach secret**"
* Select the secret created in step 1 from the list
* Click "**Attach**"

:point\_up:Repeat the same operation to attach your SSH key

## 5. Declare a server

* Navigate to the "**Servers**" menu
* Click "**declare**"
* Give it a name
* Select the **infrastructure** to deploy your servers to
* Select an **image** to install\
  (YaK comes with a list of default images, but more images can be added manually - see [dedicated section](/yak-user-doc/configuration/images.md))
* Select a server **shape**\
  (YaK comes with a list of default shapes, but more shapes can be added manually - see [dedicated section](/yak-user-doc/configuration/shapes.md))
* Add custom tags as per your need (optional)
* IP address : fill in as per your need or use automatic IP with public address. Assign IP addresses according to your OCI strategy and internal rules.
* Admin access checkbox : This defines the IP address used to connect to the instance for configuration purpose.
* As the server is part of an infrastructure and secrets have been attached to this infrastructure, the server automatically inherits the secrets.
  * Secrets can be overriden at server level if required.

## 6. Deploy server

* Select your server(s) in the list
* Click "**Deploy**" from the "**Actions**" menu
* Confirm "**Deploy**" in the pop up box

## 7. Start your server

Once deployed to your provider, select your server(s) in the list and click the "**start**" button to start your server.

## 8. Job status

Status of your deployment can be followed from the "**Jobs**" menu.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://dbi-services.gitbook.io/yak-user-doc/quickstarts/oci.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
