Connect a Container Registry
Microtica allows you to connect your own Docker registries where you would store Docker images built during pipeline execution.
You can use images to deploy services on Kubernetes clusters.
Currently, Microtica supports two types of private Docker registries:
- DockerHub
- Amazon ECR
- GitLab Container Registry
In order to connect with DockerHub registry you would need to first create a Personal Access Token from DockerHub portal.
Go to your Account Settings and click on Security tab from the side menu on the left.
Click on New Access Token button to create new access token. A dialog will appear asking you to enter the name of the access token. Enter a name that will distinguish this token from others (e.g. Microtica Pipelines).
Click on Create button and new access token will be generated. Copy the value of the token in the clipboard, we would need the value in the next step.
Revoking access to DockerHub
If you decide to revoke the access to your registry you just need to deactivate or completely remove the access token from the DockerHub portal.
The last thing we need to do is to add the registry in Microtica Portal. To do that go to Project Integrations -> Container Registries.
Default registry
If you mark the registry as default, when composing pipelines, if you don’t specify the registry the default registry will be used automatically.
In order to connect with Amazon ECR registry you would need to first create an IAM user from AWS Console.
From the IAM console choose Users and click on Add User button top left.
Choose a username for the new user and select Programmatic access for Access Type and click on Next: Permission button.
Now we have to choose the permissions to assign to this user. In this particular case we only need access to the ECR service.
Select the Attach existing policies directly option and search for “container”. Then select AmazonEC2ContainerRegistryFullAccess policy and click on Next: Tags button in the bottom right.
Follow the next step and at the end click on Create user button.
New access keys are now generated. Copy the value of the keys in the clipboard, we would need the values in the next step.
The last thing we need to do is to add the registry in Microtica Portal. To do that go to Project Integrations -> Container Registries.
Choose a simple and easy to remember name when creating a registry. The name will be used when referencing it from the pipeline steps. Enter the Access key Id and Secret access key as provided in the AWS console.
Default registry
If you mark the registry as default, when composing pipelines, if you don’t specify the registry the default registry will be used automatically.
In order to connect with GitLab Container registry you would need to login into your GitLab account.
From the Profile menu go to Preferences and then choose the Access Tokens tab.
Next, generate a new token with write_registry permission selected.
The last thing we need to do is to add the registry in Microtica Portal. To do that go to Project Integrations -> Container Registries.
Choose a simple and easy to remember name when creating a registry. The name will be used when referencing it from the pipeline steps. Enter the Token Name and Token value as provided in the GitLab portal.
Default registry
If you mark the registry as default, when composing pipelines, if you don’t specify the registry the default registry will be used automatically.