Open jonoabroad opened 2 weeks ago
I believe this is being worked on by @ellismg
@jonoabroad could you share the azure.yaml? cc @weikanglim @vhvb1989
Suspecting you have Aspire + non-Aspire services/projects described in azure.yaml. This is not supported today.
Aspire + azd is supported From an aspire project and azd POV, you should be having only this in azure.yaml
name: aspire-starter
services:
app:
language: dotnet
project: ./aspire-starter.AppHost/aspire-starter.AppHost.csproj
host: containerapp
Aspire + non-Aspire + azd is not supported. The below azure.yaml wouldn't work. Instead, you could try moving non-Aspire to Aspire services/projects described in app-host project model itself.
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
name: aspire-starter
services:
app:
language: dotnet
project: ./aspire-starter.AppHost/aspire-starter.AppHost.csproj
host: containerapp
web:
project: <path to your web project>
module: <name of azure prov template>
language: js
host: containerapp
api:
project: <path to your api project>
module: <name of azure prov template>
language: csharp
host: containerapp
Hey @rajeshkamal5050 my azure.yaml looks like the latter.
I can't remember what generated it, but it wasn't me. I assume it was the --init
command.
Should I be using a different command to create the azure.yaml definition?
my azure.yaml looks like the latter. I can't remember what generated it, but it wasn't me. I assume it was the --init command.
Not sure what got you into that state @weikanglim @vhvb1989 any idea?
I have a single AppHost with 3 deployable applications, azd init runs fine.
@jonoabroad
If a complete aspire solution, then having the azure.yaml ex: like below based on your env name and project path/details should work.
name: aspire-starter
services:
app:
language: dotnet
project: ./aspire-starter.AppHost/aspire-starter.AppHost.csproj
host: containerapp
Also, you could try following the steps documented here with aspire starter project - https://learn.microsoft.com/en-us/dotnet/aspire/deployment/azure/aca-deployment-azd-in-depth and build on it.
Running through the deploy in depth link and I get the expected output.
Let me try nuking my azure, .azure and infra files and directories and see what happens.
My project started from the azure starter project circa preview 4 and then I pulled in my projects from a non aspire project.
I do have a functions project, which I have leavered into the solution. It was working, Aspire had a few issues with it, but otherwise not deeply painful.
my azure.yaml looks like the latter. I can't remember what generated it, but it wasn't me. I assume it was the --init command.
Not sure what got you into that state @weikanglim @vhvb1989 any idea?
I have a single AppHost with 3 deployable applications, azd init runs fine.
@jonoabroad
- Are all of the services/apps described in the AppHost's program.cs? something like - https://github.com/dotnet/aspire-samples/blob/main/samples/AspireShop/AspireShop.AppHost/Program.cs can you share it?
- Could you share your azure.yaml too?
If a complete aspire solution, then having the azure.yaml ex: like below based on your env name and project path/details should work.
name: aspire-starter services: app: language: dotnet project: ./aspire-starter.AppHost/aspire-starter.AppHost.csproj host: containerapp
Also, you could try following the steps documented here with aspire starter project - https://learn.microsoft.com/en-us/dotnet/aspire/deployment/azure/aca-deployment-azd-in-depth and build on it.
Okay interestingly,
Running through with the starter it isn't in the same order as the link, and I don't get an option to expose containers to public traffic.
azd did upgrade itself to azd version 1.8.2 (commit 14600c7a54edac4f54397413f8638431f5c16327) at one point.
with my project, it didn't discover the aspire project, but now has the option to add undiscovered projects, so I manually added it and removed all other projects.
Still getting the same error when I attempt to run azd up
azd up
? Select an Azure Subscription to use: 2. SUB_NAME(SUB_GUID)
? Select an Azure location to use: 48. (US) West Central US (westcentralus)
ERROR: resolving bicep parameters file: substituting environment variables inside parameter file: missing closing brace
I'll attempt to update the starter project showing what I am seeing and share it.
calling azd up
on the Aspire Starter solution I get the following
azd up
? Select an Azure Subscription to use: 2. SUBSCRIPTION_NAME (SUBSCRIPTION_GUID)
? Select an Azure location to use: 48. (US) West Central US (westcentralus)
Packaging services (azd package)
SUCCESS: Your application was packaged for Azure in less than a second.
Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.
Subscription: SUBSCRIPTION_NAME (SUBSCRIPTION_GUIDb)
Location: West Central US
You can view detailed progress in the Azure Portal:
https://portal.azure.com/#view/HubsExtension/DeploymentDetailsBlade/~/overview/id/%2Fsubscriptions%2FSUBSCRIPTION_GUID%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fdevelop-REDACT
(✓) Done: Resource group: rg-develop
(✓) Done: Container Registry: acruhypt7zq7gd2y
(✓) Done: Log Analytics workspace: law-uhypt7zq7gd2y
(x) Failed: Container Apps Environment: cae-uhypt7zq7gd2y
ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:
Deployment Error Details:
NoRegisteredProviderFound: No registered resource provider found for location 'westcentralus' and API version '2024-02-02-preview' for type 'managedEnvironments'. The supported api-versions are '2024-02-02-preview, 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview, 2023-05-01, 2023-05-02-preview, 2023-08-01-preview, 2023-11-02-preview, 2024-03-01'. The supported locations are 'northcentralusstage, westus2, southeastasia, swedencentral, canadacentral, westeurope, northeurope, eastus, eastus2, eastasia, australiaeast, germanywestcentral, japaneast, uksouth, westus, centralus, northcentralus, southcentralus, koreacentral, brazilsouth, westus3, francecentral, southafricanorth, norwayeast, switzerlandnorth, uaenorth, canadaeast, westcentralus, ukwest, centralindia, italynorth, polandcentral'.
TraceID: c16ccbbf3cf469633c82d83ed058cb5a
ERROR: error executing step command 'provision': deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:
Deployment Error Details:
NoRegisteredProviderFound: No registered resource provider found for location 'westcentralus' and API version '2024-02-02-preview' for type 'managedEnvironments'. The supported api-versions are '2024-02-02-preview, 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview, 2023-05-01, 2023-05-02-preview, 2023-08-01-preview, 2023-11-02-preview, 2024-03-01'. The supported locations are 'northcentralusstage, westus2, southeastasia, swedencentral, canadacentral, westeurope, northeurope, eastus, eastus2, eastasia, australiaeast, germanywestcentral, japaneast, uksouth, westus, centralus, northcentralus, southcentralus, koreacentral, brazilsouth, westus3, francecentral, southafricanorth, norwayeast, switzerlandnorth, uaenorth, canadaeast, westcentralus, ukwest, centralindia, italynorth, polandcentral'.
TraceID: c16ccbbf3cf469633c82d83ed058cb5a
Output from
azd version
azd version 1.8.1 (commit 88369c36ce2a0d60794389aad9b10de938f587e1)Describe the bug I have a single AppHost with 3 deployable applications, azd init runs fine.
To Reproduce azd infra synth
Expected behavior A clear and concise description of what you expected to happen.
Environment .NET SDK: Version: 8.0.300-preview.24203.14 Commit: b7e38f457d Workload version: 8.0.300-manifests.1f2e3bea MSBuild version: 17.10.0+4f6b1bb28
Windows 11 23H2
Additional context
the Orchestration projects are in the root of solution, other projects are in a src directory