In the Configuration Variables tab the newly added token __DemoAzureDBCon__ (adding the token in publish profile explained in Part 1) is set as a variable.
Next step is setting up an Azure DB. To do this create an SQL database in Azure management portal.
Select Create a new Azure DB server, to create a new DB server for Azure DB. Make sure to select Allow Azure services to access server option.
Database created in Azure with above options.
A web app in Azure is created to deploy the web application.
Copy the connection string (ADO.Net connection string) from the database connection strings and add it in the created web app settings, as a SQL Database connection.
Make sure to update the correct password to the connection string (Copied one has {your_password_here}).
Server=tcp:ch-demodbsvr01.database.windows.net,1433;Database=DemoAzureDB1;User ID=ch-dbsvradmin@ch-demodbsvr01;Password={your_password_here};Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
In the Web App download the publish profile.
From the publish profile copy the values and set the parameters in the Release Management template.
- WebAppName = Package zip file name (Package created with TFS build in Part 1).
- PublishUrl = Publish Profile –> PublishUrl.
- PublishUser = Publish Profile –> userName
- PublishPassword = Publish Profile –> userPWD
- AzureWebAppName = Publish Profile –> msdeploySite
- DemoAzureDBCon = Publish Profile –> SQLServerDBConnectionString
With this template a release can be triggered using the build (Part 1).
Web Application gets deployed.
Database deployed with Web App.
Created Azure DB can be viewed in SQL Object Explorer in VS.
Allow the IP if prompt.
No comments:
Post a Comment