I have an API that is hosted in a Pulumi.AzureNati...
# azure
l
I have an API that is hosted in a Pulumi.AzureNative.Web.WebApp using the "WEBSITE_RUN_FROM_PACKAGE" environment variable to point to binary hosted in blob storage. When I "pulumi up", to update the API, the blob is updated but I must "manually" stop/start the WebApp in the Azure portal in order to see the changes to my service. What is the recommended approach using Pulumi to restart these services without manual intervention?
t
Does the file name change every time?
l
Here is the plan:
Which file are you referring to? I'm publishing .net code using
dotnet publish
that codes is then packaged in a zip and deployed to blob storage.
t
I think
codeBlobUrl
needs to change so that Azure knows to reload it. I’m not sure whether that happens with this code, currently.
l
That doesn't do it. I added the current epoc date time to the end of the blob name and it was still necessary to restart the web app in the portal.
I get that using deployment slots is probably the best answer but still curious if this can work.
t
Hmm,,,
For all custom app-settings (custom app-settings = user-defined app-settings, like connection strings, other app-specific settings), and most system app-settings (system app-settings = app-settings defined by Azure App Service, which configure some features available to the site), an update of those app-settings only causes a “soft restart” – so the customer shouldn’t be seeing any downtime (assuming the site doesn’t have a very heavy initialization).
A “soft restart” involves an overlapped recycle of the site’s worker process, and for most sites, should avoid downtime altogether – requests being served by the new worker process might be a bit slow initially, depending upon how heavy the site initialization is.
l
Interesting, so if I'm reading that correctly it's stating that it does restart but it warms up the new instance before switching over. I'll have to let it sit for a while to see if that is the case.
Thank you
I waited several minutes (much longer than the warm-up period for the service) and it did not switch over. Do you have a link to the documentation you sited? Curious if there is something that must be setup for that to work or if there is a difference between the portal and API.