Giter VIP home page Giter VIP logo

azuretre-deployment's Introduction

AzureTRE-Deployment Repo

This project is intended to assist the deployment of the Azure TRE project in real world environments. This includes deploying using a dev container from your local machine, deploying using GitHub Actions, and publishing custom templates.

See the Azure TRE documentation which includes detailed documentation and best practices to ensure a successful deployment and to assist you with customizing your own templates using this repository.

Contents

In this project you will find:

  • Github Actions implementing AzureTRE automation, including running deployments to Azure
  • Configuration specific to deployment
  • Workspace template definitions
  • User resource template definitions
  • Devcontainer setup

Prerequisites

To work with devcontainers you will need:

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

azuretre-deployment's People

Contributors

dependabot[bot] avatar jonnyry avatar lizashak avatar marrobi avatar martinpeck avatar microsoftopensource avatar svenaelterman avatar t-young31 avatar tamirkamara avatar tim-allen-ck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azuretre-deployment's Issues

Registry Issue when creating registry as part of pre-deployment

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.

variable name missmatch

Github action is expecting :

  • TEST_APP_ID, does not exist in the doc, and I think this is test_account_client_id in config.yaml ?
  • TEST_WORKSPACE_APP_ID, the doc says it is WORKSPACE_API_CLIENT_ID in the yaml, but that is not there, must be api_client_id ?
  • TEST_WORKSPACE_APP_SECRET, the docs says it is WORKSPACE_API_CLIENT_SECRET in the yaml, but it does not exist, must be api_client_secret ?

We have deployed TRE, but not able to authenticate API from .Net core application

We have deployed TRE, but not able to authenticate API from .Net core application while, authenitcation the Api
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: 'AADSTS500131: Assertion audience does not match the Client app presenting the assertion. The audience in the assertion was Client id and the expected audience is 'api:// apid or one of the Application Uris of this application with App ID. The downstream client must request a token for the expected audience (the application that made the OBO request) and this application should use that token as the assertion

Please suggest solution for above error.

Unable to change Environmental variables during deployment

I am receiving the following error below when running the Deploy TRE workflow.

I've set the following Env variable in the workflow Env settings to P1v2, with no change in the error
API_APP_SERVICE_PLAN_SKU_SIZE
APP_SERVICE_PLAN_SKU_SIZE

Error: creating Service Plan: (Serverfarm Name "plan-airlock-" / Resource Group "rg-"): web.AppServicePlansClient#CreateOrUpdate: Failure sending request: StatusCode=401 -- Original Error: Code="Unauthorized" Message="This region has quota of 0 PremiumV3 instances for your subscription. Try selecting different region or SKU." Details=[{"Message":"This region has quota of 0 PremiumV3 instances for your subscription. Try selecting different region or SKU."},{"Code":"Unauthorized"},{"ErrorEntity":{"Code":"Unauthorized","ExtendedCode":"52039","Message":"This region has quota of 0 PremiumV3 instances for your subscription. Try selecting different region or SKU.","MessageTemplate":"{0}. Try selecting different region or SKU.","Parameters":["This region has quota of 0 PremiumV3 instances for your subscription"]}}]

Issue / Need

  1. In Dev environments we need to un-select App Service Plans or be able to run them on something essentially free rather than the Premium versions of App Service Plans that are constrained.

  2. We need a reliable method of setting SKU sizes in the Env variables.

  3. We need this documented as today we can only find variable settings by reading the code.

PR Bot functionality for validating deployment configuration/custom templates before merge

For scenarios where configuration changes (i.e. updating a network address space) and custom template additions are made and PR'd into a user's deployment repo, it would be useful to have an out-of-the-box PR comment bot to run an ephemeral build (deployment of the TRE) before PRs are merged to a main branch and update the user's persistent environment, much like we do in the AzureTRE repo itself.

This would help users to validate any changes to configuration, custom templates etc. and test a deployment before deploying to a persistent env.

Would welcome some thoughts and discussion on this and happy to implement if there's agreement.

Unable to delete workspaces/resources/services

Error: error running command /cnab/app/terraform /usr/bin/terraform destroy -auto-approve -input=false -var image=Server 2019 Data Science VM -var image_gallery_id= -var parent_service_id=xxxxxxxxxxxxx -var shared_storage_access=true -var shared_storage_name=vm-shared-storage -var

Download sample env files required by AzureTRE in devcontainer.

Description

As a TRE Azure Administrator
I want to have the sample env files synced with the required env files by AzureTRE
So that I have all env vars in place

Acceptance criteria

  • Sample env files are synced with AzureTRE sample env files when opened in devcontainer

Error in Deploy Main / Deploymanagement

Encountered during Deploy TRE - Deploy Main / Deploy Management

Initializing provider plugins...

  • Finding hashicorp/azurerm versions matching "3.12.0"...
  • Using previously-installed hashicorp/azurerm v3.12.0

Terraform has been successfully initialized!
data.azurerm_client_config.current: Reading...
azurerm_resource_group.mgmt: Refreshing state... [id=/subscriptions//resourceGroups/]
data.azurerm_client_config.current: Read complete after 0s [id=2022-09-23 21:59:23.609348564 +0000 UTC]
azurerm_storage_account.state_storage: Refreshing state... [id=/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts/***]

│ Error: alpha numeric characters only are allowed in "name": ""

│ with azurerm_container_registry.shared_acr,
│ on main.tf line 43, in resource "azurerm_container_registry" "shared_acr":
│ 43: name = var.acr_name



│ Error: "name" cannot be less than 5 characters: ""

│ with azurerm_container_registry.shared_acr,
│ on main.tf line 43, in resource "azurerm_container_registry" "shared_acr":
│ 43: name = var.acr_name


make: *** [/home/vscode/AzureTRE/Makefile:32: mgmt-deploy] Error 1
Error: Process completed with exit code 2.

CICD fails at ACR Login on first attempt

Hi,

(I appreciate this is a known issue, but I didn't find an Issue on GH for it.)

When deploying a new AzureTRE, the CICD pipeline fails reliably on ACR Login with the error below. A workaround is available by re-running the workflow, but it would be better if the root cause could be fixed.

image

Fix TODO update link

Describe the bug

TODO add link to main repo can be updated now

Steps to reproduce

  1. Got to main README
  2. Update the TODO add link to main repo

Unable to Register Shared Bundle using GitHub Actions

Using GitHub Actions post Deploy main / Deploy TRE
All Register Shared Bundles start, and all fail at the same place
As noted previously I have removed ACR_NAME from the Env Secrets as GitHub Actions uses the ACTIONS_ACR_NAME

Example 1
Deploy main / Register Shared Bundles (shared_service, ${AZURETRE_HOME}/templates/shared_services/firewall)
»»» 🔨 Azure details from logged on user
»»» • Subscription: Microsoft Azure Sponsorship
»»» • Tenant: ***

ERROR: argument --name/-n: expected one argument

Examples from AI knowledge base:
az acr login -n MyRegistry
Log in to an Azure Container Registry

az acr login -n MyRegistry --expose-token
Get an Azure Container Registry access token

https://aka.ms/cli_ref
Read more about the command in reference docs
make: *** [/home/vscode/AzureTRE/Makefile:245: bundle-register] Error 2
Error: Process completed with exit code 2.

Example 2
Deploy main / Register Shared Bundles (shared_service, ${AZURETRE_HOME}/templates/shared_services/gitea)
»»» 🔨 Azure details from logged on user
»»» • Subscription: Microsoft Azure Sponsorship
»»» • Tenant: ***

ERROR: argument --name/-n: expected one argument

Examples from AI knowledge base:
az acr login -n MyRegistry
Log in to an Azure Container Registry

az acr login -n MyRegistry --expose-token
Get an Azure Container Registry access token

https://aka.ms/cli_ref
Read more about the command in reference docs
make: *** [/home/vscode/AzureTRE/Makefile:245: bundle-register] Error 2
Error: Process completed with exit code 2.

Direct to main documentation

Description

As a TRE Administrator
I want to have all the guidance docs in one place
So that I have everything centralized for me in one place

Upgrade to version 12

We are deploying TRE using via a pipeline and using this deployment template as our base.

The Upgrade instructions for our scenario suggests we update the OSS_VERSION variable in the .devcontainer only ?
https://microsoft.github.io/AzureTRE/v0.12.0/tre-admins/upgrading-tre/#how-to-upgrade-azuretre-version
But I notice that this template has been updated this morning to reflect version 12 changes / additions.

My question now then is, what is the upgrade process for this template ?
We have used the previous versions and added custom templates.
A simple pull from origin is needed?

Align with env files consolidation

Description

As a AzureTRE-Deployment developer,
I would like to use the latest AzureTRE version and to be aligned with the new configuration

devcontainer build failure

I've tried to build the devcontainer locally and I get the following error

[276489 ms] Start: Run in container: /bin/sh -c .devcontainer/scripts/post-create-command.sh
find: ‘AzureTRE/devops/’: No such file or directory
[277020 ms] postCreateCommand failed with exit code 1. Skipping any further user-provided commands.

Just downloading the AzureTRE release seems to fix it.

Hardware: M1 Pro Mac
OS: MacOS 12.5.1
build_log.txt

Many thanks for your help in advance.

Dev Container was not updated as part of v0.8.0 release

It looks like the dev container was not updated as part of the v0.8.0 release. given the upgrade to porter v1 the build of any Porter bundles will fail - for example the Firewall.

Workaround is to add the following lines into the dev container:

# can't be in a non default path
# ARG PORTER_HOME_V1=/home/$USERNAME/.porter-v1/
ARG PORTER_HOME_V1=/home/$USERNAME/.porter/
ARG PORTER_VERSION=v1.0.4
ARG PORTER_TERRAFORM_MIXIN_VERSION=v1.0.0
ARG PORTER_AZ_MIXIN_VERSION=v1.0.0
ARG PORTER_AZURE_PLUGIN_VERSION=v1.0.1
COPY .devcontainer/scripts/porter-v1.sh /tmp/
RUN export PORTER_VERSION=${PORTER_VERSION} \
    PORTER_TERRAFORM_MIXIN_VERSION=${PORTER_TERRAFORM_MIXIN_VERSION} \
    PORTER_AZ_MIXIN_VERSION=${PORTER_AZ_MIXIN_VERSION} \
    PORTER_AZURE_PLUGIN_VERSION=${PORTER_AZURE_PLUGIN_VERSION} \
    PORTER_HOME=${PORTER_HOME_V1} \
    && /tmp/porter-v1.sh

ENV PATH ${PORTER_HOME_V1}:$PATH

and copy https://github.com/microsoft/AzureTRE/blob/main/.devcontainer/scripts/porter-v1.sh in the .devcontainer/scripts/ directory.

cc @LizaShak @tamirkamara

Duplicate of https://github.com/microsoft/AzureTRE/issues/2605

The following pages and links are broken

Page - https://github.com/microsoft/AzureTRE-Deployment
Broken Link - https://github.com/microsoft/AzureTRE-Deployment/blob/main
Description - 404

Page - https://github.com/microsoft/AzureTRE-Deployment
Issue - incomplete ToDo
Project structure and overview
//TODO: Add link here once the pr on the main repo is merged

Page - https://github.com/microsoft/AzureTRE-Deployment
Recommendation - changed the following text
In this repository there are 3 configuration files:

Terraform Error in main.tf

Following last PR update, issues have been introduced with the main.tf file in AzureTRE repository.

Log Output

Initializing the backend...

Successfully configured the backend "azurerm"! Terraform will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins...

  • Finding hashicorp/azurerm versions matching "3.12.0"...
  • Using previously-installed hashicorp/azurerm v3.12.0

Terraform has been successfully initialized!
data.azurerm_client_config.current: Reading...
azurerm_resource_group.mgmt: Refreshing state... [id=/subscriptions//resourceGroups/]
data.azurerm_client_config.current: Read complete after 0s [id=2022-09-23 15:40:41.813769401 +0000 UTC]
azurerm_storage_account.state_storage: Refreshing state... [id=/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts/]
azurerm_container_registry.shared_acr: Refreshing state... [id=/subscriptions/
/resourceGroups//providers/Microsoft.ContainerRegistry/registries/]
azurerm_storage_container.porter_container: Refreshing state... [id=https://***.blob.core.windows.net/porter]

│ Error: alpha numeric characters only are allowed in "name": ""

│ with azurerm_container_registry.shared_acr,
│ on main.tf line 43, in resource "azurerm_container_registry" "shared_acr":
│ 43: name = var.acr_name



│ Error: "name" cannot be less than 5 characters: ""

│ with azurerm_container_registry.shared_acr,
│ on main.tf line 43, in resource "azurerm_container_registry" "shared_acr":
│ 43: name = var.acr_name


make: *** [/home/vscode/AzureTRE/Makefile:32: mgmt-deploy] Error 1
Error: Process completed with exit code 2.

VM and Private Endpoint failure during Deploy TRE Core

I've encountered this error while running Actions -> DeployTRE -> Deploy TRE Core

module.appgateway.azurerm_monitor_diagnostic_setting.agw: Creating...
module.appgateway.azurerm_monitor_diagnostic_setting.agw: Creation complete after 4s [id=/subscriptions//resourceGroups/rg-/providers/Microsoft.Network/applicationGateways/agw-|diagnostics-agw-]

│ Error: waiting for creation of Windows Virtual Machine: (Name "vm-" / Resource Group "rg-"): Code="RetryableError" Message="A retryable error occurred."

│ with azurerm_windows_virtual_machine.jumpbox,
│ on admin-jumpbox.tf line 27, in resource "azurerm_windows_virtual_machine" "jumpbox":
│ 27: resource "azurerm_windows_virtual_machine" "jumpbox" {



│ Error: waiting for creation of Private Endpoint "pe-ampls-" (Resource Group "rg-"): Code="InternalServerError" Message="An error occurred." Details=[]

│ with module.azure_monitor.azurerm_private_endpoint.azure_monitor_private_endpoint,
│ on azure-monitor/azure-monitor.tf line 82, in resource "azurerm_private_endpoint" "azure_monitor_private_endpoint":
│ 82: resource "azurerm_private_endpoint" "azure_monitor_private_endpoint" {


Script done, file is 1663699677-tre-core.log
Terraform Error
make: *** [/home/vscode/AzureTRE/Makefile:103: deploy-core] Error 1
Error: Process completed with exit code 2.

config.yaml to github secrets

It would be nice to add a script to avoid manually create the GH secrets.

here is what I am using :

gh auth login
repo="name/AzureTRE-Deployment"
env="CICD"
ghvar=$(cat ./config.yaml | grep ":" | grep -v -e '#' | grep -v -e ':$' | sed 's/ //g')
for fn in $ghvar; 
do 
	parameter=$(echo $fn |cut -d ":" -f 1)
	value=$(echo $fn |cut -d ":" -f 2)
	gh secret set $parameter -b $value --repo $repo  --env $env
done

git and Release Documentation / examples missing

Documentation on git updates and Releases would improve the customer functionality of this repo. For instance there are 2 open pull requests against this repo today, as a customer I have to read in them what changed and then determine to the best of my ability if I need to sync and re-deploy to take advantage of those updates. The following documentation would help

Release notes
With each code update / PR a set of release notes should accompany the PR informing customers of the change and if those changes will affect deployment, operations, etc and if they should be deployed to the customer repo. If the customers should deploy the changes to their environment then please share code / or a script that should be run to deploy from their template repo to their environment (ensuring that deployment to the environment happens after the changes have been merged from the TRE-Deployment repository - see git Commands below).

git Commands
If the PR's being released to the TRE-Deployment updates should be replicated to the customers repo, then providing the git commands to add a git remote (the TRE-Deployment repo), create a branch from the TRE-Deployment remote repo and merge changes.

null Environment variable not checked.

started a Fresh CI/CD deployment but did not add new variables environment WORKSPACE_APP_SERVICE_PLAN_SKU.
Deployment proceeded until it failed because the SKU did not exist:

Error: creating Service Plan: (Serverfarm Name "plan-" / Resource Group "rg-"): web.AppServicePlansClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="Requested features are not supported in region. Please try another region." Details=["Message":"Requested features are not supported in region. Please try another region.","Code":"BadRequest","ErrorEntity":"Code":"BadRequest","ExtendedCode":"59911","Message":"Requested features are not supported in region. Please try another region.","MessageTemplate":"Requested features are not supported in region. Please try another region.","Parameters":[]***]

It would be nice to check that mandatory env variables have at least a non-null value.

Authentication error

We have deployed TRE, but not able to authenticate API from swagger, getting below error

Auth ErrorError: response status is 401, error: invalid_client, description: AADSTS700025: Client is public so neither 'client_assertion' nor 'client_secret' should be presented. Trace ID: 493d8809-f97d-404a-8b85-4e64fac8ba00 Correlation ID: 93c27642-619f-44b4-8ea9-1a711aa1bc24 Timestamp: 2023-02-27 09:13:07Z

Please suggest solution for above error.

Upgrade to AzureTRE v0.10.0 release

As an AzureTRE administrator,
I want to upgrade to the latest version of AzureTRE e.g 0.10.0
so that I can take advantage of new features

ENABLE_SWAGGER

I installed TRE today with ENABLE_SWAGGER to true
but i still got the error "Swagger is disabled. Set 'ENABLE_SWAGGER' to true in order to access Swagger." on /api/docs

How do I use additional env vars in the GitHub workflows?

The workflow files have a predefined set of secrets.

If I want to configure, API_APP_SERVICE_PLAN_SKU_SIZE, how should I do this?

I can edit the actions.yml file, but I don't want to diverge from this repo and ideally this should be read in from configuration so it can be changed.

Upgrade to AzureTRE v0.9.0 release

As an AzureTRE administrator,
I want to upgrade to the latest version of AzureTRE e.g 0.9.0
so that I can take advantage of new features

make bootstrap errors or on initial setup

Testing Deployment Repo

Certain make commands are necessary to initialize azure before the github actions will work

make bootstrap produces the following Terraform error

note: Tenant and Subscription ID's removed for privacy

@daemel ➜ /workspaces/AzureTRE-P3 (main) $ make bootstrap

»»» 🧩 Bootstrap Terraform...

╔══════════════════════════════════════╗
║ Azure TRE Makefile ║
╚══════════════════════════════════════╝

»»» ✅ Checking pre-reqs...

Checking for Azure CLI...

Loading local environment variables...
»»» 🔨 Azure details from logged on user
»»» • Subscription: Microsoft Azure Sponsorship
»»» • Tenant: ***

»»» 🤖 Creating resource group and storage account...
Location Name


northcentralus oss-mgmt36-rg
AccessTier AllowBlobPublicAccess CreationTime EnableHttpsTrafficOnly Kind Location MinimumTlsVersion Name PrimaryLocation ProvisioningState ResourceGroup StatusOfPrimary


Hot True 2022-09-28T15:47:03.514915+00:00 True StorageV2 northcentralus TLS1_0 tremgmt36 northcentralus Succeeded oss-mgmt36-rg available
Created

True
Created

True

»»» ✨ Terraform init...

Initializing the backend...

Successfully configured the backend "azurerm"! Terraform will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins...

  • Finding hashicorp/azurerm versions matching "3.12.0"...
  • Installing hashicorp/azurerm v3.12.0...
  • Installed hashicorp/azurerm v3.12.0 (signed by HashiCorp)

Terraform has been successfully initialized!

»»» 📤 Importing resources to state...
No instance found for the given address!

This command requires that the address references one specific instance.
To view the available instances, use "terraform state list". Please modify
the address to reference a specific instance.

~~
/subscriptions//resourceGroups/oss-mgmt36-rg
azurerm_resource_group.mgmt: Importing from ID "/subscriptions/
/resourceGroups/oss-mgmt36-rg"...
azurerm_resource_group.mgmt: Import prepared!
Prepared azurerm_resource_group for import
azurerm_resource_group.mgmt: Refreshing state... [id=/subscriptions/***/resourceGroups/oss-mgmt36-rg]

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

No instance found for the given address!

This command requires that the address references one specific instance.
To view the available instances, use "terraform state list". Please modify
the address to reference a specific instance.
azurerm_storage_account.state_storage: Importing from ID "/subscriptions//resourceGroups/oss-mgmt36-rg/providers/Microsoft.Storage/storageAccounts/tremgmt36"...
azurerm_storage_account.state_storage: Import prepared!
Prepared azurerm_storage_account for import
azurerm_storage_account.state_storage: Refreshing state... [id=/subscriptions/
/resourceGroups/oss-mgmt36-rg/providers/Microsoft.Storage/storageAccounts/tremgmt36]

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

State imported
@daemel ➜ /workspaces/AzureTRE-P3 (main) $

Documentation update for Azure Deployment instructions

Would it be possible to have an Azure Deployment section in the Readme.md file. Today for instance the readme.md contains the following

Congiguration Setup
The configuration files are required for the AzureTRE local deployment. Before setting up the configuration files make sure to follow the AzureTRE predeployment steps to setup and understand the required configuration.

It would help to have a section dedicated to Azure deployment rather than local deployment, ie something that points to https://microsoft.github.io/AzureTRE/using-tre/pipelines/pipelines/ along with a dedicated section for an Azure focused installation

bootstrap.sh Issues / Problems when using GitHub Actions

Two issues occur when running thought GitHub actions.

1st Issue - can be resolved by adding ARM_TENANT_ID to the GitHub Env variables.
2nd Issue - can be resolve by adding the following to Env Secrets

MGMT_RESOURCE_GROUP = Management Reource Group Name
STATE_STORAGE_ACCOUNT_NAME = Storage Account Name
TF_STATE_CONTAINER = tfstate (container name)
TRE_ADDRESS_SPACE: ${{ secrets.TRE_ADDRESS_SPACE }}

Testing:

  • Running bootstrap locally does work
  • Running bootstrap from the DevContainer (AzureTRE) will also work.
  • Running bootstrap via GitHub Actions will fail

Process

Start with the TRE Pipelines page
https://microsoft.github.io/AzureTRE/using-tre/pipelines/pipelines/

Create Environment (github settings)
https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#creating-an-environment

The following environment variables should be defined in your github environment:

Auth env vars - https://microsoft.github.io/AzureTRE/tre-admins/auth/##create_authentication_assets

Added to both GitHub Secrets and to templates/core/.env

TRE_ID =
AAD_TENANT_ID =
LOCATION =
AUTO_WORKSPACE_APP_REGISTRATION = true
AUTO_WORKSPACE_GROUP_CREATION = false

Core and Devops env vars - https://microsoft.github.io/AzureTRE/tre-admins/environment-variables/

Added to both GitHub Secrets and to devops/.env

LOCATION =
MGMT_RESOURCE_GROUP_NAME =
MGMT_STORAGE_ACCOUNT_NAME =
TERRAFORM_STATE_CONTAINER_NAME =
ACR_NAME =

Start Codespaces from Repo / main

Login to Azure
az login --tenant <TENANT_ID> --use-device-code (uses MFA)

Run make bootstrap - everything is ok.

Run make bootstrap via GitHub Actions and script fails multiple ways.

1st Problem: docs are missing a reference to ARM_TENANT_ID that needs to be set in GitHub Secrets
Error:
Run docker run --rm --mount \

»»» 🧩 Bootstrap Terraform...

╔══════════════════════════════════════╗
║ Azure TRE Makefile ║
╚══════════════════════════════════════╝

»»» ✅ Checking pre-reqs...

Checking for Azure CLI...
ERROR: usage error: --service-principal --username NAME -*** --tenant TENANT
ERROR: The subscription of '***' doesn't exist in cloud 'AzureCloud'.
ERROR: Please run 'az login' to setup account.
ERROR: Please run 'az login' to setup account.
ERROR: Please run 'az login' to setup account.

»»» ⚠️ You are not logged in to Azure!
make: *** [/home/vscode/AzureTRE/Makefile:27: bootstrap] Error 1
Error: Process completed with exit code 2.

2nd Problem:

»»» 🧩 Bootstrap Terraform...

╔══════════════════════════════════════╗
║ Azure TRE Makefile ║
╚══════════════════════════════════════╝

»»» ✅ Checking pre-reqs...

Checking for Azure CLI...

»»» 🔨 Azure details from logged on user
»»» • Subscription: Microsoft Azure Sponsorship
»»» • Tenant: ***

»»» 🤖 Creating resource group and storage account...
ERROR: (None) No HTTP resource was found that matches the request URI 'https://management.azure.com/subscriptions/***/resourcegroups/?api-version=2021-04-01'.
Code: None
Message: No HTTP resource was found that matches the request URI 'https://management.azure.com/subscriptions/***/resourcegroups/?api-version=2021-04-01'.
make: *** [/home/vscode/AzureTRE/Makefile:27: bootstrap] Error 3
Error: Process completed with exit code 2.

~~

Error: unable to pull bundle before installation\uninstall\upgrade

Hi,

Can anyone help. I have ran the 'make bundle-build\publish\register' on a workspace_service bundle. It registered with API. When I clicked on it to create a new Workspace Service I get the below error

Resource Id
: 583446c7-5081-44ba-8b20-22bd0b32fabd
Resource Path
: /workspaces/a3384f46-c377-44d8-95f8-de5d5d01a7c7/workspace-services/583446c7-5081-44ba-8b20-22bd0b32fabd
Resource Version
: 0
Status
: deployment_failed
Action
: install
Message
: 583446c7-5081-44ba-8b20-22bd0b32fabd: Error context message = Error: unable to pull bundle before installation: unable to pull bundle trect07acr.azurecr.io/tre-workspace-service-psstorage:v0.1.1: error reading porter.yaml for trect07acr.azurecr.io/tre-workspace-service-psstorage:v0.1.1: error unmarshaling custom action schemaVersion: yaml: unmarshal errors: line 1: cannot unmarshal !!str 1.0.0 into manifest.Steps az login --identity -u 7500626c-b78a-49c5-bd19-2e9a47807d08 && az acr login --name trect07acr && porter install "583446c7-5081-44ba-8b20-22bd0b32fabd" --reference trect07acr.azurecr.io/tre-workspace-service-psstorage:v0.1.1 --allow-docker-host-access --force --cred ./vmss_porter/arm_auth_local_debugging.json --cred ./vmss_porter/aad_auth.json

my Porter.yaml looks like this

schemaVersion: 1.0.0
name: tre-workspace-service-psstorage
version: 0.1.1
description: "A storage account workspace service"
dockerfile: Dockerfile.tmpl
registry: azuretre

Deployment Problems with Makefile

Receiving the following error during GitHub Action based deployments.

»»» 🤖 Creating resource group and storage account...
ERROR: (None) No HTTP resource was found that matches the request URI 'https://management.azure.com/subscriptions/***/resourcegroups/?api-version=2021-04-01'.
Code: None
Message: No HTTP resource was found that matches the request URI 'https://management.azure.com/subscriptions/***/resourcegroups/?api-version=2021-04-01'.
make: *** [/home/vscode/AzureTRE/Makefile:27: bootstrap] Error 3
Error: Process completed with exit code 2.

Steps to reproduce

  1. Use AzureTRE-Deployment as a template
  2. Store Env variables
  3. Manually trigger Deploy TRE workflow

Bug in Register Shared Bundle - Deploy Main Github CI/CD

Running Deploy Azure TRE workflow fails when creating sonatype-nexus-vm bundle.
All remaining bundles and workspace shared services were sucessful.

/bin/bash: line 4: cd: ה/templates/shared_services/sonatype-nexus-vm/: No such file or directory make: *** [/home/vscode/AzureTRE/Makefile:223: bundle-check-params-remote] Error 1 Error: Process completed with exit code 2.

The following modification were made to the deploy_tre_reusable.yml file for our deployment:

image
image
image
image

az acr login issue

When deploying TRE, if an ACR is being created for the first time, the sleep time is not sufficient to wait until the ACR is fully created and ready for login.

for i in ***1..3***; do az acr login --name "***" && ec=0 && break || ec=\$? && sleep 10 done Error: Process completed with exit code 2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.