> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ale.run/llms.txt
> Use this file to discover all available pages before exploring further.

# GCP Artifact Registry

> You can configure **GCP Artifact Registry** as the repository for storing images built in `ale` and for use during deployment.

***

## Create a GCP Artifact Registry

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/operations/images/gar01.png" />
</Frame>

> Access the **Artifact Registry** service in the Google Cloud Console and click `CREATE REPOSITORY`.

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/operations/images/gar02.png" />
</Frame>

> Enter a name for the repository and fill in the following values, then click `CREATE` to create the repository.

<Note>
  Use the default values except for the Region.
</Note>

* **Format** : Docker
* **Mode** : Standard
* **Location type** : Region
* **Region** : Select a region that suits your needs
* **Encryption** : Google-managed encryption key

## Retrieve the Repository Access URL

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/operations/images/gar03.png" />
</Frame>

> Click on the created repository to retrieve the access URL in the format `[region]-docker.pkg.dev/[GCP Project ID]/[Repository Name]`.

<Info>
  This access URL will be used to connect the repository to `ale`.
</Info>

## Service Account and Permissions

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/operations/images/gar04.png" />
</Frame>

> Go to the **IAM & Admin > Service Accounts** page and click `CREATE SERVICE ACCOUNT`.

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/operations/images/gar05.png" />
</Frame>

> Enter a recognizable **Service Account Name** and click `CREATE AND CONTINUE`.

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/operations/images/gar06.png" />
</Frame>

> In the role selector, choose **Artifact Registry Administrator** and click `DONE` to create the service account.

## Create a JSON Key

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/operations/images/gar07.png" />
</Frame>

> Click the <Icon icon="ellipsis-vertical" size={15} color="000" /> icon on the right side of the service account and select **Manage keys**.

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/operations/images/gar08.png" />
</Frame>

> On the service account key management page, click **ADD KEY > Create new key**. In the modal, select **JSON** as the key type and click `CREATE` to download the JSON key file.

## Connect to ale

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/operations/images/en/gcp-ar-10.png" />
</Frame>

> In the operations system, go to the Settings tab on the cluster page and click `Connect Container Repository`. In the modal that appears, enter the following values and click `Connect`.

* **Repository Provider** : Google Cloud Artifact Registry
* **Access URL** : [Access URL retrieved after creating the repository](/en/registry/gcp-ar#retrieve-the-repository-access-url)
* **Key File (JSON)** : Contents of the JSON key file
