Create your FREE Codefresh account and start making pipelines fast. Create Account

Migrating from the Codefresh registry to Google Container Registry

5 min read

On July 15th the Codefresh registry that is part of all Codefresh accounts will be removed from service. The removal is part of a big round of improvements to our native integration with Docker registries. We have invested significant efforts in using Codefresh as a unified platform for Docker images and the way they are used inside CI/CD pipelines.

More details on the migration actions for the Codefresh registry can be found in our timeline announcement. The benefits of the new Docker build steps and other enhancements are also described in our roadmap blog post.

The new build enhancements are live right now in all Codefresh accounts, along with our migration dashboard that helps all customers select their new default Docker Registry as well as enabling all the other advancements.

How the migration affects Codefresh and GCR customers.

Your user experience after the migration takes place will not be changed significantly. In fact, the new Docker registry dashboard that is rolled along with all the enhancements will actually improve the usage and visibility of Docker images inside pipelines. Docker images from external registries will now be visible inside the Codefresh Image dashboard allowing you to inspect all build artifacts from a central place.

If you are already using the Google Container Registry in Codefresh, the migration is straightforward as you can simply mark GCR as your new default registry (more technical details are explained in the next sections of this article).

If you are not using Google Container Registry yet, you can connect it today to your Codefresh account via your Codefresh account settings (either with native integration or using it as a generic Docker registry).

The benefits of using GCR with Codefresh

The Google Container Registry (GCR) is part of the Google Cloud platform and offers a reliable and available storage service for Docker images.

The usage of GCR is especially important if you are already using other Google Cloud services or deploy to the Google Kubernetes Services, as there are several speed benefits when your Docker images are close to the services that use them. Of course you can even use the Google Container Registry for development of Docker images that you use in your pipelines for CI/CD purposes regardless of where your applications are deployed.

Using GCR also comes with extra benefits such as:

Connecting your GCR registry to Codefresh

Codefresh has native support for connecting to the GCR service. First, you need to create a service account in the form of a JSON file. Then visit the integration dashboard at https://g.codefresh.io/account-admin/account-conf/integration/registry and enter the details in the fields provided. Note that you have to be a Codefresh administrator to access this screen.

Google Registry integration
Google Registry integration

The authentication settings are defined once in the account level and then all pipelines can easily access this registry by using its name (“gcr” in the example) above, so make sure that you note that name down (and provide it to the developer team if you are a Codefresh admin).

If you have more than one registry you can repeat the process by changing the domain dashboard. Each registry must also have a unique name within your Codefresh account.

Migrating new images to GCR

Once the Google Registry is connected all your pipelines can use it to push new images to it. There are the two scenarios we will explain:
When you use the old build step and old image dashboard
When you use the new build step and new image dashboard (recommended)

You can toggle the new build step and image dashboard at: https://g.codefresh.io/account-admin/account-conf/cfcr-deprecation

Migration dashboard
Migration dashboard

Once you do this, all your build steps can simply mention the Google Container registry.

Notice the “registry” property in the build_image step. This means that the pipeline will automatically push to the GCR the image that was just built. You can inspect your new image on the Image dashboard (at https://g.codefresh.io/images/ ). The “registry” property is optional if the GCR registry is already set as default in your Codefresh account.

Docker image dashboard
Docker image dashboard

If you haven’t enabled the new build step yet, you can use the same property in the push step of a pipeline:

Again notice the “registry” property in the push step.

You can find more documentation of the build and push steps at:

Migrating existing images to GCR

In the previous section, we have seen how you can modify your pipeline so that they can use the Google Registry for image pushing. However, you might also have existing Docker images in your Codefresh registry with no associated pipelines (or even images that you manually uploaded to the registry outside of Codefresh).

In this case, you can easily create a brand new pipeline that promotes the images from the Codefresh registry to GCR.

You can also use multiple tags if you wish:

You only need to run this pipeline once. For one-off migrations, you can also use the Codefresh UI to promote an image to GCR.

Contact information

Migrating your Codefresh images to the Google Container Registry is a very easy process, especially if all your Docker images were created by Codefresh pipelines. If you already use GCR before the migration the process might be even simpler, as you only need to make sure that no forgotten images exist in the Codefresh registry (as all pipelines will push new images to GCR).

If you have more question for the migration timeline feel free to reach us at [email protected]

For more information on GCR and its unique features please visit its documentation.

Kostis Kapelonis

Kostis Kapelonis

Kostis is a software engineer/technical-writer dual class character. He lives and breathes automation, good testing practices and stress-free deployments.

Leave a Reply

* All fields are required. Your email address will not be published.