Azure storage: staging vs . production

后端 未结 3 1890
面向向阳花
面向向阳花 2021-02-04 15:32

I want to maintain a staging as well as a production environment in azure. Each should have it\'s own blob storage and sql storage. What wod be the best way to achive this? setu

3条回答
  •  -上瘾入骨i
    2021-02-04 16:10

    Not really an answer, but I needed more characters than allowed in comments :)

    I'm also dealing with the same problem. Having separate storage accounts and database server is the way to go however the challenge is to pick appropriate storage account/database from your configuration file as you could be deploying your code in either staging or production environment. The RoleInstance class does not have a way to distinguish between staging and production.

    Only option you're left with is to invoke the Service Management API and figure out which storage account/database to pick. Add one more complication to this equation is when you do VIP Swap and all of a sudden your staging slot becomes production slot (and vice versa) and now you have to switch your storage account/database connection strings based on the new environment.

    I would be very interested in hearing what other folks are doing.

提交回复
热议问题