-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registry Issue when creating registry as part of pre-deployment #10
Comments
@daemel what was the name you used for the "action" acr and what is your treid? |
@tamirkamara - do you have a link to the documentation on the naming between ACR and ACTION_ACR? I've reviewed the documentation here https://microsoft.github.io/AzureTRE/using-tre/pipelines/ and https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal?tabs=azure-cli as instructed. I manually added ACTION_ACR as the workflow failed to login in the ACR until I added ACTION_ACR - the piece of code call that is in the deploy-reusable workflow
I've also found that when using the DeployTRE the workflow bootstrap never creates the ACR. That does seem to align with the documentation above as we are told to create it manually, but we are not given instructions on which Env variables to open. I documented this last week in this Issue microsoft/AzureTRE#2605 |
My previous comment was meant to diagnose the issue - can you confirm if your ACR_NAME and ACTIONS_ACR_NAME have the same name? As for the docs, we recently discovered that a page outlining what github secrets are needed was misplaces/lost. We have an item to tend to that so hopefully next time will be much easier. |
yes - ACR_NAME and ACTIONS_ACR_NAME are the same values. How are the 2 ACR's different when I only see one deployment? Moreover, testing with different names causes the workflows to fail at ACR login - a successful login only happens when the names are the same - please explain as the comments are not aligning with testing. |
Thank you for confirming. Why is this required and the difference:
I presume that you didn't have a successful login since you haven't created it before running the workflow, right? |
I would contend that what you are describing is much more than a clarification as the explanation above contradicts instructions on the Prerequisites page https://microsoft.github.io/AzureTRE/tre-admins/setup-instructions/pre-deployment-steps/ and diagrams on the Architecture page - https://microsoft.github.io/AzureTRE/azure-tre-overview/architecture/ If you are viewing this as Dev vs non-Dev instructions, then please convey those distinctions on the documentation site as it is very confusing as it is now; the documentation site today (based on your explanation) intermingles both the Dev and Actions approaches. Also, why 2 ACR's? An ACR can hold many different repositories, so why would we need 2 ACR's? |
The doc in https://microsoft.github.io/AzureTRE/tre-admins/setup-instructions/pre-deployment-steps/ is actually common step for both a manual/local and an automatic deployment. Due to the complexities in I do recognize that the end of this document should have 2 options and let the reader make a choice between a manual/local deployment ( I think the idea behind the 2 ACRs was to solve a chicken and an egg issue in our workflows design and how reusability works in github actions. I might have an idea on how to solve it but need to test and see if it works (probably only next week). |
Reference Link: https://microsoft.github.io/AzureTRE/using-tre/pipelines/
Performed the following
Setup Azure Container Registry (ACR) to hold the devcontainer images: 1. Create ACR to hold the devcontainer images following this guide. 1. Enable Admin Account 1. Having setup the previous steps, add the created ACR info to your Github Actions environment:
Run the Deploy-TRE workflow, received the following error
azurerm_container_registry.shared_acr: Creating...
azurerm_storage_account.state_storage: Modifying... [id=/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts/]
azurerm_storage_account.state_storage: Modifications complete after 4s [id=/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts/]
azurerm_storage_container.porter_container: Creating...
azurerm_storage_container.porter_container: Creation complete after 0s [id=https://.blob.core.windows.net/porter]
╷
│ Error: A resource with the ID "/subscriptions//resourceGroups//providers/Microsoft.ContainerRegistry/registries/" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_container_registry" for more information.
│
│ with azurerm_container_registry.shared_acr,
│ on main.tf line 42, in resource "azurerm_container_registry" "shared_acr":
│ 42: resource "azurerm_container_registry" "shared_acr" {
│
╵
make: *** [/home/vscode/AzureTRE/Makefile:32: mgmt-deploy] Error 1
Error: Process completed with exit code 2.
The text was updated successfully, but these errors were encountered: