-
Notifications
You must be signed in to change notification settings - Fork 4
Challenge 4 (Implement continuous deployment (CD))
Now that you have successfully implemented continuous integration, it is time to show that you can deploy the container images that you have built for each of the four APIs to Azure App Service.
The code and tests for the APIs is available in the following GitHub repository:
Azure-Samples/openhack-devops-team Before you joined the event, each API of the MyDriving application was built and deployed to an existing Azure Container Registry using the following scripts:
POI API deployment script
echo "Building API-POI image..." echo "Changing directory to $GITOHTEAMDIRPATH/apis/poi/web..." cd "$GITOHTEAMDIRPATH/apis/poi/web" az acr build --image "devopsoh/api-poi:${BASEIMAGETAG}" --registry $ACRNAME --file Dockerfile . Trips API deployment script
echo "Building API-TRIPS image..." echo "Changing directory to $GITOHTEAMDIRPATH/apis/trips..." cd "$GITOHTEAMDIRPATH/apis/trips" az acr build --image "devopsoh/api-trips:${BASEIMAGETAG}" --registry $ACRNAME --file Dockerfile . User API deployment script
echo "Building API-USERPROFILE image..." echo "Changing directory to $GITOHTEAMDIRPATH/apis/userprofile..." cd "$GITOHTEAMDIRPATH/apis/userprofile" az acr build --image "devopsoh/api-userprofile:${BASEIMAGETAG}" --registry $ACRNAME --file Dockerfile . User-Java API deployment script
echo "Building API-USER-JAVA image..." echo "Changing directory to $GITOHTEAMDIRPATH/apis/user-java..." cd "$GITOHTEAMDIRPATH/apis/user-java" az acr build --image "devopsoh/api-user-java:${BASEIMAGETAG}" --registry $ACRNAME --file Dockerfile . Challenge Using the tooling that you have implemented so far, you must deploy each of the four APIs to your existing Azure App Service using Continuous Delivery (CD), but before you are able to deploy you will need to push the images to a container registry. Configuration steps will differ depending on whether your team decides to use Azure Container Registry or GitHub Packages to store your images.
Reminders:
The image tag should take the format of:
If using Azure Container Registry
/<ACR_repository_name>: where the ACR_repository_name follows the naming convention devopsoh/<image_name>:.
If using GitHub Packages
docker.pkg.github.com///: where image name should be the images you are building (eg: api-trips)
Tip: GitHub Actions provides you with a set of predefined variables that can help you
Login issue - Copied and Past line 31,32,33 in poi-CD.yml file