Using ACS in Azure Staging slot
Asked Answered
D

3

9

I am currently implementing a web application in Microsoft Azure. My concern is how to use the staging slot together with ACS.

I want to push my application to the staging slot, verify that it is working and then do a VIP-swap to production.

The approach is pretty straight forward, except the configuration of the ACS. Since the staging slot gets a random URL during deployment the ACS configuration needs to be done afterwards. The WebRole’s web.config and Relying Party Application in the ACS must be configured with the new staging slot URL.

Vittorio Bertocchi describes in his blog post how to update the web.config without redeploying and I guess that the ACS could be updated with a script after deployment to staging.

This approach seems quite complicated and brittle; I’m looking for a simple and solid solution for my deployment process. Is there something I have missed?

Since the ACS configuration is quite simple and straight forward in a production slot I have been thinking of skipping the testing of the application in the staging slot and only use it to perform the VIP-swap to production (the application would be tested in its own “QA” Hosted Service).

What do you think about this approach? Can there be any differences between hosted services in Azure?

Downpipe answered 8/12, 2011 at 11:19 Comment(0)
M
0

Perhaps your application could programmatically set the return URL when it redirects to the ACS. This would redirect the user to either the staging slot or the production slot after they authenticate.

This question shows you how to set the realm, but the return URL is just another parameter: WIF cross-domain on one IIS site, dynamically setting of realm

Megadeath answered 9/12, 2011 at 12:25 Comment(0)
S
0

I solved this by creating a new cloud service called "test". So, when I push my application to the staging slot, I also push another instance (with different web.config) to the production slot of my "test" service. If "test" application works properly, then I delete test app and swap my production-staging slots.

It is not the ideal solution, but it might solve your problem.

Sievers answered 16/8, 2013 at 10:59 Comment(0)
C
0

I just use hosts file entries to test staging instances. For example, let us say your service is hosted in myservice.cloudapp.net. Your staging slot will typically get a url like [guid].cloudapp.net but it also gets a public VIP (you can get this from the service's dashboard or by doing an nslookup [guid].cloudapp.net). You can add a hosts file entry as "[Public VIP] myservice.cloudapp.net". Once you do this, you can your staging instance just by using myservice.cloudapp.net and ACS configuration need not be changed.

Cacodemon answered 18/12, 2014 at 5:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.