Azure / AI-in-a-Box

AI-in-a-Box leverages the expertise of Microsoft across the globe to develop and provide AI and ML solutions to the technical community. Our intent is to present a curated collection of solution accelerators that can help engineers establish their AI/ML environments and solutions rapidly and with minimal friction.
MIT License
525 stars 180 forks source link

Website with given name func-aibx-mlw already exists - MLOps in-abox #97

Open cjpark-sapcsa opened 5 months ago

cjpark-sapcsa commented 5 months ago

Hi Team,

in the steps of Create Azure ML Workspace - 01-create-workspace.yml

build faced keep showing the error or the below build Process completed with exit code 1.

where i can add maul change of - pre-define "Website with given name func-aibx-mlw already exists." ??

B. Rgds

ChanJIn

ERROR: "status":"Failed","error":"code":"DeploymentFailed","target":"/subscriptions/xxxx/resourceGroups/aibx-ml-cj/providers/Microsoft.Resources/deployments/main","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":["code":"ResourceDeploymentFailure","target":"/subscriptions//resourceGroups/aibx-ml-cj/providers/Microsoft.Resources/deployments/func-aibx-mlw","message":"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.","details":["code":"DeploymentFailed","target":"/subscriptions//resourceGroups/aibx-ml-cj/providers/Microsoft.Resources/deployments/func-aibx-mlw","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":["code":"Conflict","target":"/subscriptions//resourceGroups/aibx-ml-cj/providers/Microsoft.Web/sites/func-aibx-mlw","message":"\r\n \"Code\": \"Conflict\",\r\n \"Message\": \"Website with given name func-aibx-mlw already exists.\",\r\n \"Target\": null,\r\n \"Details\": [\r\n \r\n \"Message\": \"Website with given name func-aibx-mlw already exists.\"\r\n ,\r\n \r\n \"Code\": \"Conflict\"\r\n ,\r\n \r\n \"ErrorEntity\": \r\n \"ExtendedCode\": \"54001\",\r\n \"MessageTemplate\": \"Website with given name 0 already exists.\",\r\n \"Parameters\": [\r\n \"func-aibx-mlw\"\r\n ],\r\n \"Code\": \"Conflict\",\r\n \"Message\": \"Website with given name func-aibx-mlw already exists.\"\r\n \r\n \r\n ],\r\n \"Innererror\": null\r\n"]]]***

MarcoABCardoso commented 5 months ago

Hello @cjpark-sapcsa ! Thank you for filing an issue.

This makes sense - since function apps need unique names, only one deployment with that name can exist (and someone else likely has created the default).

We should add a unique suffix to all resource names to fix this. @Welasco FYI

cjpark-sapcsa commented 5 months ago

@MarcoABCardoso @Welasco what I did as fix or workaround is as below,

/2. Deploy Azure Function App (Used to handle Azure Alerts and Invoke GitHub Actions) // https://docs.microsoft.com/en-us/azure/templates/microsoft.web/sites?tabs=bicep module functionApp './modules/functionApp.bicep' = { name: 'func-CJ-${amlworkspace}-${uniqueSuffix}' params: { functionname: 'func-${amlworkspace}-${uniqueSuffix}'** location: resourceLocation existingStorageAccountName: stg.name gitHub_FunctionDeploymentZip: gitHub_FunctionDeploymentZip gitHub_PAT: gitHub_PAT gitHub_repoName: gitHub_repoName gitHub_repoOwnerName: gitHub_repoOwnerName gitHub_workflowId: gitHub_workflowId resource_group: resourceGroupName aml_workspace: amlworkspace aml_flow_deployment_name: aml_flow_deployment_name aml_endpoint_name: aml_endpoint_name aml_model_name: aml_model_name } }

MarcoABCardoso commented 5 months ago

That looks good! It follows the pattern in other accelerators and should take care of the issue for any future users. We'll work to get that included in this accelerator, appreciate your input!