diff --git a/.gitbook.yaml b/.gitbook.yaml index fa03dabbb9..2b172dada7 100644 --- a/.gitbook.yaml +++ b/.gitbook.yaml @@ -69,3 +69,4 @@ redirects: user-guide/use-cases/connect-expressjs-with-mongodb-database: resources/use-cases/connect-expressjs-with-mongodb-database user-guide/use-cases/connect-django-with-mysql-database: resources/use-cases/connect-django-with-mysql-database user-guide/telemetry: resources/telemetry + user-guide/global-configurations/docker-registries: user-guide/global-configurations/container-registries.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 436198c341..8e3953c8e6 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -21,7 +21,7 @@ * [Projects](user-guide/global-configurations/projects.md) * [Cluster And Environments](user-guide/global-configurations/cluster-and-environments.md) * [Git Accounts](user-guide/global-configurations/git-accounts.md) - * [Container Registries](user-guide/global-configurations/docker-registries.md) + * [Container Registries](user-guide/global-configurations/container-registries.md) * [Chart Repositories](user-guide/global-configurations/chart-repo.md) * [Custom charts](user-guide/global-configurations/custom-charts.md) * [SSO Login Services](user-guide/global-configurations/sso-login.md) diff --git a/docs/user-guide/global-configurations/container-registries.md b/docs/user-guide/global-configurations/container-registries.md new file mode 100644 index 0000000000..52b16a4a9f --- /dev/null +++ b/docs/user-guide/global-configurations/container-registries.md @@ -0,0 +1,206 @@ +# Container/OCI Registry + +While [container registries](https://docs.devtron.ai/resources/glossary#container-registry) are typically used for storing [images](https://docs.devtron.ai/resources/glossary#image) built by the CI Pipeline, an OCI registry can store container images as well as other artifacts such as [helm charts](https://docs.devtron.ai/resources/glossary#helm-charts-packages). In other words, all container registries are OCI registries, but not all OCI registries are container registries. + +You can configure a container registry using any registry provider of your choice. It allows you to build, deploy, and manage your container images or charts with easy-to-use UI. + + +## Add Container Registry + +1. From the left sidebar, go to **Global Configurations** → **Container/OCI Registry**. + + ![Figure 1: Container/OCI Registry](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/container-registries/add-registry.jpg) + +2. Click **Add Registry**. + + ![Figure 2: Add a Registry](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/container-registries/add-container-registry-1.jpg) + +3. Choose a provider from the **Registry provider** dropdown. View the [Supported Registry Providers](#supported-registry-providers). + +4. Choose the Registry type: + * **Private Registry**: Choose this if your images or artifacts are hosted or should be hosted on a private registry restricted to authenticated users of that registry. Selecting this option requires you to enter your registry credentials (username and password/token). + * **Public Registry**: Unlike private registry, this doesn't require your registry credentials. Only the registry URL and repository name(s) would suffice. + +5. Assuming your registry type is private, here are few of the common fields you can expect: + + | Fields | Description | + | --- | --- | + | **Name** | Provide a name to your registry, this name will appear in the **Container Registry** drop-down list available within the [Build Configuration](https://docs.devtron.ai/usage/applications/creating-application/docker-build-configuration) section of your application| + | **Registry URL** | Provide the URL of your registry in case it doesn't come prefilled (do not include `oci://`, `http://`, or `/https://` in the URL) | + | **Authentication Type** | The credential input fields may differ depending on the registry provider, check [Registry Providers](#supported-registry-providers) | + | **Push container images** | Tick this checkbox if you wish to use the repository to push container images. This comes selected by default and you may untick it if you don't intend to push container images after a CI build. If you wish to to use the same repository to pull container images too, read [Registry Credential Access](#registry-credential-access). | + | **Push helm packages** | Tick this checkbox if you wish to push helm charts to your registry | + | **Use as chart repository** | Tick this checkbox if you want Devtron to pull helm charts from your registry and display them on its chart store. Also, you will have to provide a list of repositories (present within your registry) for Devtron to successfully pull the helm charts. | + | **Set as default registry** | Tick this checkbox to set your registry as the default registry hub for your images or artifacts | + +6. Click **Save**. + + +## Supported Registry Providers + +### ECR + +Amazon ECR is an AWS-managed container image registry service. +The ECR provides resource-based permissions to the private repositories using AWS Identity and Access Management (IAM). ECR allows both Key-based and Role-based authentications. + +Before you begin, create an [IAM user](https://docs.aws.amazon.com/AmazonECR/latest/userguide/get-set-up-for-amazon-ecr.html) and attach the ECR policy according to the authentication type. + +Provide the following additional information apart from the common fields: + +| Fields | Description | +| --- | --- | +| **Registry URL** | Example of URL format: `xxxxxxxxxxxx.dkr.ecr..amazonaws.com` where `xxxxxxxxxxxx` is your 12-digit AWS account ID | +| **Authentication Type** | Select one of the authentication types: