Continuous deployment with Web App for Containers using Azure Container Registry – Part 5
This Post is in continuation of Post : https://blogs.msdn.microsoft.com/paraspatidar/continuous-deployment-with-web-app-for-containers-using-azure-container-registry-part-4/ and it is Part 5 of the thread.
To start Over , please begin from Here
Our next steps are from Setting up Continuous Deployment for Azure Web app for container for that Image section .
16. Enable the auto deployment mode on Web app.
In the App settings, add an app setting called DOCKER_ENABLE_CI
with the value true
.
17. Get the service URL from publishing profile.
For the Webhook URL, you need to have the following endpoint: https://<publishingusername>:<publishingpwd>@<sitename>.scm.azurewebsites.net/docker/hook
.
You can obtain your publishingusername
and publishingpwd
by downloading the web app publish profile using the Azure portal.
So service url looks like :
https://<publishingusername>:<publishingpwd>@<sitename>.scm.azurewebsites.net/docker/hook
.
18. Go to Azure Container Registry & create Web hook.
Couple of values which you will require are :
Webhookname : any meaning full name
Service URI : the service uri from step number 17 something like below :
https://<publishingusername>:<publishingpwd>@<sitename>.scm.azurewebsites.net/docker/hook
.
Scope : this will be in format of Image:Tag (see point number 5,9 & 11 from previous posts)
Thus earlier we have been using Image as samples1/php and by default the tag was latest ,
Thus the value here will be samples1/php :latest
I have created one more image names samples1/php with tag latest and that what is being shown here in figure.
19. Fill up the values and save and do a test ping.
Sometime your kudu is down or process not running ,thus you may encounter error , please make sure your KUDU process is running while ping or deployment .
Now your continuous deployment is up and running, you can test it with deploying modified image or new image with same tag , lets see how to do it ?
Here, to setup and test auto deployment, either we can do:
Real life Practical Scenario :
1) Modify the locally residing nginx image
2) rebuild it so that changes are persistence
3) push the new image on Azure portal to verify it should auto deploy .
OR
Quickly do a tricky way , just to check auto deployment and get confident in it
1) Or we can do a trick by using another container image lets say phpmyadmin docker image.
2) tag it with same name/endpoint as nginx end point in docker/CMD cli.
3) Push that image so that it can be auto deploy to azure web app .
4) so now our Azure Web app will show phpmyadmin page on browsing, which is also a verification that auto deployment worked.
I am going to show second way by putting phpmyadmin image via continuous deployment , which will override the nginx image automatically if everything has been setup correctly , this will show that setup is successful.
in practical scenario , you will actually be modifying actual image and build and re-upload it , which we will see in this post Here :
Now in Next Post we will go through Verifying Continuous Deployment section here :
continuous deployment with web app for containers using azure container registry -part-6