Continuous deployment to Dev/TestProd on Azure

172 Views Asked by At

I have a project which consists of multiple components: two SPA clients, one API, ElasticSearch server, RabbitMQ Server, ThinkTecture Identity Server etc. etc. and would like to deploy this to Azure. All the code is stored in Git (Bitbucket to be precise), in multiple repositories.

Ideally, I would like to be able to deploy certain branches, i.e one to a test/staging environment, and another to production.

Are there any samples/tutorials available which describe the steps needed to accomplish this?

Regards, Daníel

1

There are 1 best solutions below

5
On BEST ANSWER

let`s see if i can offer some helpful information:

Azure App Service will be a great platform for your to deploy your SPA clients and API web app.

Azure App Service come with build-in continuous deployment support, included Bitbucket, which can build and deploy your app. And support a wide range of language (.Net, NodeJs, Go, Python, PHP, Java and so on ...)

Another good thing about Azre App Service is that we have slot feature, where you can setup CI with your staging slot, do testing there, since good then swap with your PROD deployment. If you have settings/configurations that specific to a slot, e.g different slot connect to different database, you can put them into Application Settings, once you create a site, from "https://portal.azure.com" -> "Navigate to your site" -> "All Setttings" -> "Application Settings", under app setting section, you can specific your slot specific settings, e.g database connection string where dev slot only use test database, and production slot use the real one.

Since you are using bitbucket, there is a "Deploy to Azure" Add-On, where you can deploy your code from a pull request/branch, easy for verifying code during code review

enter image description here

Also there is WebJob feature where you can run background task by utilize your site compute power.

Last but not least, to have your app available globally across region, Azure Traffic Manager will be a great service, where you can hook up your web app from Azure App Service and let traffic manager distribute request for you.


Deploy To Azure Button in Bitbucket:

enter image description here


Update 2016-02-05 PST

Azure App Service also support virtual directory, where you can deploy multiple apps into one site. (https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/)

however, if you choose to do this, by default continuous deployment only deploy one app for you and deploy to your wwwroot. to enable continuous deployment to deploy multiple app in one site you will have to code up your own deployment script. (https://github.com/projectkudu/kudu/wiki/Custom-Deployment-Script, http://blog.amitapple.com/post/38417491924/azurewebsitecustomdeploymentpart1)