![21 21](http://lh3.googleusercontent.com/-KtKK7oxjO0M/VbuJSRMN69I/AAAAAAAAFb8/7-_jgsf_hpk/21_thumb%25255B1%25255D.png?imgmax=800)
![22 22](http://lh3.googleusercontent.com/-VCEXT-1l1AA/VbuJUl8lrQI/AAAAAAAAFcM/C1OClBpnd2Y/22_thumb%25255B1%25255D.png?imgmax=800)
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.
![23 23](http://lh3.googleusercontent.com/-wzLr6ChJM0o/VbuJXOBV59I/AAAAAAAAFcc/wNGOJm1FT08/23_thumb%25255B1%25255D.png?imgmax=800)
Next step is setting up an Azure DB. To do this create an SQL database in Azure management portal.
![24 24](http://lh3.googleusercontent.com/-xdEO1FRhq1g/VbuJZ2zvkkI/AAAAAAAAFcs/RruuHQmrmnQ/24_thumb%25255B1%25255D.png?imgmax=800)
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.
![25 25](http://lh3.googleusercontent.com/-L6acWOWQtj8/VbuJcugSOLI/AAAAAAAAFc8/nHr0m87MM-A/25_thumb%25255B1%25255D.png?imgmax=800)
Database created in Azure with above options.
![26 26](http://lh3.googleusercontent.com/-qCTInqLiKWA/VbuJe7eV2tI/AAAAAAAAFdM/oDA3q3wWv4M/26_thumb%25255B1%25255D.png?imgmax=800)
A web app in Azure is created to deploy the web application.
![27 27](http://lh3.googleusercontent.com/-KM-aXy_sg40/VbuJheA4xvI/AAAAAAAAFdc/sRVYEKZ3vTs/27_thumb%25255B2%25255D.png?imgmax=800)
![28 28](http://lh3.googleusercontent.com/-6aP-AA2kLEg/VbuJj1tXAII/AAAAAAAAFds/GwgIJMNG-MA/28_thumb%25255B1%25255D.png?imgmax=800)
![32 32](http://lh3.googleusercontent.com/-ELt2in-WsTM/VbuJmBKUU9I/AAAAAAAAFd8/P2GHhQETBec/32_thumb%25255B1%25255D.png?imgmax=800)
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.
![28.1 28.1](http://lh3.googleusercontent.com/-PoNPT1f8T_s/VbuJoNsZ4qI/AAAAAAAAFeM/1iTLICGJDBQ/28.1_thumb%25255B1%25255D.png?imgmax=800)
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;
![28.2 28.2](http://lh3.googleusercontent.com/-to3zk3dXLDk/VbuJqlIc_rI/AAAAAAAAFec/Zg1ZiCVwNjc/28.2_thumb%25255B2%25255D.png?imgmax=800)
In the Web App download the publish profile.
![29 29](http://lh3.googleusercontent.com/-jP3Szl3p4hw/VbuJs_7wRWI/AAAAAAAAFes/UxlzHmrG7Is/29_thumb%25255B1%25255D.png?imgmax=800)
From the publish profile copy the values and set the parameters in the Release Management template.
![30 30](http://lh3.googleusercontent.com/-KWrf3oF0JgU/VbuJxBu9rKI/AAAAAAAAFe8/Lh55iqeZsAQ/30_thumb%25255B1%25255D.png?imgmax=800)
- 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
![31 31](http://lh3.googleusercontent.com/-9XAyVrQf2oU/VbuJzQtK4WI/AAAAAAAAFfM/CwCZzIiSJ6M/31_thumb%25255B1%25255D.png?imgmax=800)
With this template a release can be triggered using the build (Part 1).
![33 33](http://lh3.googleusercontent.com/-133H8sRkliI/VbuJ2HOIAeI/AAAAAAAAFfc/5BtnZIVij-E/33_thumb%25255B1%25255D.png?imgmax=800)
Web Application gets deployed.
![34 34](http://lh3.googleusercontent.com/-iDiT3v2f4mY/VbuJ4iuWQsI/AAAAAAAAFfs/SIlPAGCXS3s/34_thumb%25255B1%25255D.png?imgmax=800)
![image image](http://lh3.googleusercontent.com/-OUoIHPQ0kDc/VbuJ7Mr89UI/AAAAAAAAFf8/CNS35hIUwCI/image_thumb%25255B1%25255D.png?imgmax=800)
Database deployed with Web App.
![35 35](http://lh3.googleusercontent.com/-Nez_glDVC4g/VbuJ9m3dYdI/AAAAAAAAFgM/TATk_ERNFOw/35_thumb%25255B2%25255D.png?imgmax=800)
Created Azure DB can be viewed in SQL Object Explorer in VS.
![36 36](http://lh3.googleusercontent.com/-jMAitDBkyz0/VbuJ_9SlpmI/AAAAAAAAFgc/SXYbeytKXlk/36_thumb%25255B1%25255D.png?imgmax=800)
Allow the IP if prompt.
![37 37](http://lh3.googleusercontent.com/-6ChEV5s23X4/VbuKCrBtUhI/AAAAAAAAFgs/LJb6jDw47x4/37_thumb%25255B2%25255D.png?imgmax=800)
![38 38](http://lh3.googleusercontent.com/-LQ50qkoa5iQ/VbuKFri4Y8I/AAAAAAAAFg8/ermJh-1gW7U/38_thumb%25255B1%25255D.png?imgmax=800)
![39 39](http://lh3.googleusercontent.com/-fAO1Xv61Ax8/VbuKHscyLWI/AAAAAAAAFhM/5ZbH0uylauU/39_thumb%25255B1%25255D.png?imgmax=800)
No comments:
Post a Comment