Deploy Azure Mobile Apps backend from on-premises TC / Octopus to my Azure Portal


I develop a Azure Mobile Apps App. The Frontent is Xamarin.Forms and the backend is a C# one. Currently I am in development phase and build the backend inside VS2015 and publish it from inside VS2015. Now I have to setup 3 swimlanes:

I want to configure the build in my TC CI server with the Octopack nuget.

  • What do I have to inlude in the backend project except the Octo nuget?

Then I want to create a project in Octopus for that 3 Environments in my Azure Cloud Portal:

  • How can I do that?
    I have 2 AppSettings that vary between that 3 Environments(DEV,STAGE, PROD)
  • The backend Endpoint https://myendpoint-{ENV_VAR}
  • MY_AZURE_SQL_DATABASE: like tcp:mydatabase-{ENV_VAR}

I looked a bit to the Deplyoment Slot feature in azure but I don’t want to do it that way, because I always want all 3 Environments online without a SWAP.

Hope you can guide me.


Hi Eric,

Thanks for getting in touch!

To setup Octopack in your project and TeamCity, have a look at these docs.

We have a few Azure related guides that could be of help here and here

The short of it is, to setup your project with the three different environments running at the same time, you would have to

  • Create three separate Azure Mobile apps (one for each swimlane)
  • In Octopus create 3 environments representing your three swimlanes
  • In your Octopus project you would add
    • Your 2 app settings and scope them to each environment (so in total you would have 6 project variables)
    • A variable for which Mobile app to deploy to depending on which environment you are deploying to
  • Then you just configure your deployment process with an Azure web app step that uses the variable for the mobile app to specify which Azure resource to deploy to.

Hope that helps!

Thank you,