azure - Staging or Production Instance? -


is there anywhere in service runtime tell me if i'm running on 'staging' or 'production'? manually modifying config , production seems bit cumbersome.

you should not change configurations when you're based upon if you're in prod or staging. staging area not designed "qa" environment holding-area before production deployed.

when upload new deployment, current deployment slot upload package destroyed , down 10-15minutes while upload , start of vm's happening. if upload straight production, that's 15 minutes of production downtime. thus, staging area invented: upload staging, test stuff, , click "swap" button , staging environment magically becomes production (virtual ip swap). thus, staging should 100% same production.

what think you're looking qa/testing environment? should open new service testing environment own prod/staging. in case, want maintain multiple configuration file sets, 1 set per deployment environment (production, testing, etc.)

there many ways manage configuration-hell occurs, azure has on top of .config files, own *.cscfg files. way prefer azure project follows: setup small config project, create folders there match deployment types. inside each folder setup sets of *.config & *.cscfg files match particular deployment environment: debug, test, release... these setup in visual studio , build target types. have small xcopy command occurs during every compile of config project copies files build target folder of config project root folder of config project.

then every other project in solution, links .config or .cscfg file root folder of config project.

voila, configs magically adapt every build configuration automatically. use .config transformations manage debugging information release vs. non-release build targets.

if you've read , still want @ production vs. staging status @ runtime, then: deploymentid roleenvironment.deploymentid use management api proper x509 certificate @ azure structure of service , call getdeployments method (it's rest api there abstraction library).

hope helps

edit: blog post requested setup of configuration strings , switching between environments @ http://www.paraleap.com/blog/post/managing-environments-in-a-distributed-azure-or-other-cloud-based-net-solution.aspx


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -