Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

gcr to gcr.io domain hosted artifact registry prerequisites

Hi All,

My team is planning on migrating from gcr to gcr.io domain hosted artifact registry.

I request everyone's help to confirm if I have all the prerequisites right before we do it. Let us know if we are missing any steps here.

Before migration:

              authenticate to GCR.io using a service account key file.

Roles required by Artifact Registry SA:
artifactregistry.repositories.list – To list Artifact Repositories
roles/artifactregistry.reader
roles/artifactregistry.writer
roles/storage.objectViewer

Roles required by User to generate IAM Recommendations:
roles/storage.objectViewer
roles/iam.roleViewer
roles/serviceusage.serviceUsageConsumer

Roles required by user to confirm the transition:
roles/artifactregistry.admin
roles/storage.admin
roles/viewer

Artifact Registry roles to be granted with Current roles for respective users:

motheesagar_0-1716567675831.png

 

 

Migration steps:

  1. Install Google Cloud CLI or gcloud components update
    gcloud services enable \
        cloudresourcemanager.googleapis.com \
        artifactregistry.googleapis.com
  2. gcloud init
  3. #Enable Artifact Registry API#
  4. gcloud artifacts docker upgrade migrate \
        --projects=Project_ID

Migration verification:

  • Users and service accounts that use Container Registry can still push, pull, and deploy images when redirection is enabled.
  • Your automation only pushes images to existing repositories.
  • If you use Binary Authorization, your existing policies work correctly for images deployed from gcr.io repositories.
  • Configured Pub/Sub subscriptions include notifications for changes in your gcr.io repositories.

 

After migration (Post verification) (Cost reduction):

  1. Go to cloud storage page in GCP Console.
  2. Verify the existence of us.artifacts.PROJECT-ID.appspot.com
  3. Delete us.artifacts.PROJECT-ID.appspot.com

Thank you!

0 0 441
0 REPLIES 0