-
Notifications
You must be signed in to change notification settings - Fork 508
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
Publishing from the VS wizard walkthrough #3280
Comments
Oh, next I've noticed there's a different output log that's more relevant: ... which gives me an actual error:
Of course, it's unclear how to "run Now I clicked Publish back in VS again and this time it's doing more. It creates a deployment plan. It creates a resource group. It's looking good! But then: Back in the Azure Developer CLI output pane:
At this point I can see that the environment name Sadly it still fails in the same way, saying I don't have "permission to perform action 'Microsoft.Authorization/roleAssignments/write' at scope '/subscriptions/REDACTED_GUID/resourceGroups/rg-my-github-issue-search/providers/Microsoft.ContainerRegistry/registries/REDACTED_STRING/providers/Microsoft.Authorization/roleAssignments/REDACTED_GUID'.'" I'm unsure why I wouldn't have permission to perform an action on a resource group that I just created and will now go and look in the Azure portal in case there are clues. |
OK, so from poking around in Azure portal, I see clues indicating that I was using the wrong subscription. So I went through the above flow again using what I think is the correct subscription, and it's looking a lot better! It's pushing images to a container registry. And finally: Yay! So I click to go to the public Eventually I give up waiting and go look in the Azure portal and find (and BTW the page is still "loading" in my other browser tab): Several minutes later the page load fails: ... but by this time I can see the problem is in my own application code. The ACA page in Azure portal gives pretty clear log output:
Yes, it's my fault - I didn't put the DB file in the right place so it would be deployed. I realise I'm not actually sure how one is meant to deploy SQLite - where is the There is an issue Add SQLite Aspire Component which was moved out of v1. That certainly seems reasonable - it's not as high-priority as more common production databases. But I'm going to try to figure out how one would deal with this manually. |
After further investigation it seems unclear that there are any primitives available to ACA that would be suitable for a peristent SQLite database (e.g., see discussion). To understand if I could use a Volume Mount in the ACA container for persisting arbitrary files, I changed my Redis resource from using var redis = builder.AddRedis("redis-semantic-search")
.WithImage("redis/redis-stack-server").WithImageTag("latest")
.WithVolumeMount("redis-semantic-search-data", "/data"); This works fine locally, and in Docker Desktop I can see it's created and is using the volume mount: However, after republishing to Azure, I see no sign of there being any volume mounts on the container: I was expecting Aspire to create a volume mount on deployment, but perhaps I'm misunderstanding. Update: there's a related issue at #1676. It looks like there's support for emitting the volume information into the manifest, but that functionality isn't in the 8.0.0-preview.4.24156.9 build. Also even if it was, I don't know if that causes something to get deployed to Azure. |
I'm switching over to Postgres now and it works great locally, but my first deployment failed due to a SQLite The updated deployment still fails at runtime, which is fine - I probably have still done something wrong - but what's hyper-frustrating is I can't see the console output to diagnose the problem. Here's the list of "revisions with issues": Now, which of them is the old one and which is the new one? It doesn't say! So I click through the powjxqa one into its console logs and can see from those logs that it must be the old one (because I changed the log output in the new one). So I go back and click through the d5m7yrs one and into its console logs and am super confused because it's also still the old console output. Did Aspire fail to deploy my change? No, look more closely: Even though I clicked the link from the d5m7yrs replica, the portal is showing the output from the powjxqa replica. OK, just a UI bug, right? So I'll change the replica from the dropdown: Nope! For some reason I'm only allowed to see the powjxqa replica and hence can't diagnose what went wrong with d5m7yrs. Note that I re-checked that I clicked the right links multiple times, and found other paths through the portal UI to the logs, all of which also limited me to seeing the one from powjxqa. Again, maybe my mental model is wrong here, but it's unclear how to diagnose this fault. |
Thanks so much for the detailed write-up, @SteveSandersonMS. If you're on preview 2, try to get on the internal preview branch as we've resolved some of the earlier issues you had w.r.t. logging into azd on your command prompt. I've filed an issue to get the info bubble added about azd environments, too. Hadn't thought of that, but that's a great suggestion for folks new to the idea of azd environments. Do you think it'd be better if we defaulted the name? Something like |
@SteveSandersonMS (and everyone else) this error:
is typically due to the fact that your account lacks the appropriate Azure role required to assign Also, w.r.t your container apps question, that's simply the first publishing target we've enabled in VS. We plan on enabling more (no time lines yet), but targeted Container Apps first as we feel ACA is a great hosting spot for Aspire apps. |
Thanks @bradygaster! I know many of the friction points aren't Aspire-specific, but rather was just keeping a log of the deployment process in case any of it made someone think "Oh, Aspire could or should produce some different manifest/bicep/whatever that avoids this" or "I would expect to get a clearer error because X". For the ACR permissions issue I fully understand it's not something Aspire could magically solve. |
Great log of feedback @SteveSandersonMS! I think we've got some things already fixed in latest -- and some of these being Azure-specific we should see how we can surface them better if possible! /cc @abpiskunov |
OK, in the end it worked and my Aspire Blazor+SK+ONNX+Redis+Postgres app is finally running on ACA :) Summary of learnings/questions:
|
This is based on VS Version 17.10.0 Preview 2.0 and Aspire 8.0.0-preview.4.24156.9. My app is a
net8.0
Blazor Web app that makes use of a SQLite database, and aRedisResource
which it starts up in Docker locally.I don't know if the following is of any use to you all, nor whether the VS publishing flow is fully implemented and expected to work yet. Since it's in preview I fully appreciate that not all the details will be resolved yet, so maybe none of the following is news. Feel free to just close this if it doesn't contribute anything new (and no, I don't need you to debug my deployment for my own benefit - I'm only reporting this in case it's useful to the Aspire team).
Walkthrough
Right-clicked on the
AppHost
project and chose Publish. The only option is ACA. I'm unsure if that's because it's the only option ever or if this is something specific to what components I'm using in my app:In any case, ACA is what I wanted so I'm happy with this. Clicked Next.
It suggests I might not have an Azure subscription, though I certainly do. In fact I "re-entered my credentials" less than 30 mins ago because this happened before.
I clicked the button to re-enter credentials, which flickered the UI for a second and then it shows the subscription (without asking for any credentials). And then another half-second later the warning to "re-enter credentials" reappears for some reason:
I ignore that because it doesn't seem to stop me proceeding through the wizard.
I pick the subscription and deployment location, but have no idea what "Environment name" value to enter. Request: Could there be a help link here? Or one of those little "i" symbols that shows a tooltip with guidance?
After some web searching, I enter the environment name
prod
and continue. It correctly detects the service I want to expose publicly. Great!I continue, thinking it might publish now, but it completes the wizard saying it created an environment.
On the next dialog, I wait for this:
After a few minutes, it seems to complete successfully, so things are looking good. I click Publish, but after 10 seconds or so:
There's a link, "See logs in Output window", which highlights in white as you hover it and shows the "hand" pointer, clearly reaffirming that you can click it:
However when you click it... nothing happens. Maybe it's because the Output window was already on the screen anyway? Maybe we could move focus to it or something. Or if something else was meant to happen I'm not sure what.
Checking the Output window manually:
No indication of any failure, so at this point I'm unsure how to proceed.
Summary
To reiterate, I'm aware this is preview and don't know which parts of this are meant to be fully-functional yet. Please don't feel you have to help me fix my deployment. I'm only reporting this in case any of the issues are surprising.
The text was updated successfully, but these errors were encountered: