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

Artifact Registry, possible error in automatic migration

I used the automatic tool to migrate to Artifact Registry. My region is southamerica-east1 and 99% of my users are in that region. While translating I must have selected some wrong option and the tool created a new Bucket for Multi-region - us, as shown in the attached image.

error_artifacty.png

I have doubts about whether this is correct:

Shouldn't I have migrated to the southamerica-east1 region where 99% of my users are? After March, won't my cost increase since it was created in Multi-region us? Won't creating in the Multi-region us region slow down my app since 99% of my users are in the southamerica-east1 region? How do I solve this?

I appreciate any help!

Equipe-ca

Solved Solved
0 9 1,180
1 ACCEPTED SOLUTION

Migration completed successfully! I used the automatic migration tool for the second time to translate, it made changes requesting my authorization and the migration was completed. The app in production is working correctly. However...

View solution in original post

9 REPLIES 9

Hi, @Equipe-ca.

Multi-regional storage ensures high availability of the artifact and covers all U.S. regions, including the South America (east1) region. This option is available when creating the artifact. It's possible that you selected the multi-regional option instead of the regional one during the creation process. Additionally, it will incur higher costs compared to the regional option.

Screenshot 2025-01-22 at 20-08-11 Create repository – Artifact Registry – data-science-team-s… – Google Cloud console.png


I believe this will not directly affect your end users. As based on your description, the end user interacts with your application and they are not directly pulling container images from the Artifact Registry always.

Regards,
Mokit

Olá mokit , obrigado pelo seu feedback.  De qualquer forma, você pode me ajudar? Como posso reverter isso e fazê-la migrar para a região correta. Neste caso, southamerica-east1. Muito obrigado pela sua ajuda.

You need to create a new repository in the single region where you want to store your artifacts. You can do this via the Google Cloud Console or gcloud command line.

gcloud artifacts repositories create <REPOSITORY_NAME> \
  --repository-format=docker \
  --location=<NEW_REGION> \
  --description="Single regional repository"

Use the gcloud command to list all the artifacts in your multi-regional repository. Make sure you have access to them.

gcloud artifacts docker images list <MULTI_REGIONAL_REPOSITORY> --location=<OLD_REGION>

For each artifact (e.g., Docker images), you need to pull the artifact from the multi-regional repository and push it to the new single-regional repository.

# Pull the image from the multi-regional repository
docker pull <MULTI_REGIONAL_REPOSITORY>/<IMAGE>:<TAG>

# Tag the image for the new region's repository
docker tag <MULTI_REGIONAL_REPOSITORY>/<IMAGE>:<TAG> <NEW_REGION>-docker.pkg.dev/<PROJECT_ID>/<NEW_REPOSITORY>/<IMAGE>:<TAG>

# Push the image to the new region's repository
docker push <NEW_REGION>-docker.pkg.dev/<PROJECT_ID>/<NEW_REPOSITORY>/<IMAGE>:<TAG>

Create a bash script if you have multiple Docker images.

Once you've successfully moved the artifacts to the new region, you need to update your deployment pipelines or any services (e.g., GKE, Cloud Run etc.) to reference the new single-region repository.

Hi mokit, the first line of code worked to create a Single regional repository, but the second line failed. Since I don't have much knowledge, I think I confused you, so I'm giving you more details:
I use the default App Engine
Before the tool: Project, Project Bucket were in the southamerica-east1 region, Container Registry was in multiple regions in the US
After the tool: Project, Project Bucket are in the southamerica-east1 region, a new Project Bucket was created in multiple regions in the US, Container Registry is now in multiple regions in the US, the Artifact Registry repository has not yet been created
How it should look: Since 99% of my users are in the southamerica-east1 region, I think everything should be created in this region to reduce cost and possible latency.
Thanks for your patience 😞

buckts-23-01-2025.pngrepositorios.png

Olá mokit  , só para acrescentar algo.

Usando um projeto de teste antigo, tentei fazer a migração automática e  não me dá a opção de migrar para a região southamerica-east1, onde estão 99% dos meus usuários.

Link da documentação: https://cloud.google.com/artifact-registry/docs/transition/auto-migrate-gcr-ar?hl=pt-br

 

I've found another approach for this. Could you please check this reply thread - https://www.googlecloudcommunity.com/gc/Infrastructure-Compute-Storage/Help-with-gcloud-artifacts-do...?

By default, the automatic tooling creates Artifact Registry repos in the same region as Container Registry. Your Container Registry was using the US multiregion (Container Registry only supports US, EU, and Asia multiregions. Container Registry has never store images in southamerica-east1).

HI, jkolb, wrong. I changed the text from ( in a single region in the US ) to ( in multiple regions in the US )

Migration completed successfully! I used the automatic migration tool for the second time to translate, it made changes requesting my authorization and the migration was completed. The app in production is working correctly. However...