Deploying a project to Azure

So, now that I’ve got all the Azure resources I need for the project, it’s time to actually deploy.  Again, following the instructions at Useful Development Blog, I’ll create the necessary objects in Visual Studio and then publish them to my Azure environment.

 
First, I’ll create the Web API project.  Since the article actually called for creating the resources inline with the project creation, I’ll actually skip the step where we create the Azure app itself.  Instead, I’ll just connect to the resources that are already there once the project is created.

CreateWebAPI

 
Second, I’ll install the Angular SPA package outlined in the article.  I am a complete Angular noob but am looking forward to tinkering with the framework as a lot of developers I know make great use of it.  Angular will install several dependencies such as jQuery.  Once this is installed, you can move on to the publishing step.

InstallAngular
Lastly, we’ll actually publish the newly created app ‘To The Cloud’.  You’ll go to the Publish dialog for your project and select Azure App Service to create a publishing profile.  I’ll look for the web app node previously created and ensure that it’s available for publishing.

PublishtoWebApp

WebAppValidation

 
Then I’ll add the connection criteria for the SQL database.  Please note, you will need to go into the Firewall settings for your Azure SQL Server and add your client IP in order to use SSMS or another tool to connect directly to the DB.  This includes the dialog for setting up the connection string for the app.  Once all your settings are in place, you can click Publish.

SQLConnection

PublishPreview

The publish may take a short while but once it’s complete, you can then navigate to the site and see the results.  If you’d like to take a look at mine, you can find it at http://jkbtestapp.azurewebsites.net/welcome

Finished

As you can see, once you get the hang of standing up the basic PaaS components, it’s very easy to deploy to an Azure environment. If any of you have suggestions around deploying to Azure or have any questions or comments, please feel free to add them here or address them to john@benedettitech.com.

Thanks for looking in!