Principle: Deploy Independently & Consumer First
Configure Traffic Manager for Products and Order
- Open the PetShop.API of PetShop.API-AzFunction
- Right Click on the PetShop.Orders.API and click Publish
- Click on New Profile in the Publish screen and Select on “Create New” and click Publish
- On the Create APP service screen, name the orderapi(unique name) with postfix “Europe” and change location to North Europe.
- Click ok and click create
- To Publish to the new europe azure function click on the Manage Profile and select “Select existing” and the find the europe site and deploy it to the europe site
- Add Cosmos db primary key and url in application settings as you have added in the previous example.
- Sameway create a europe based azure function app for Product
- Login into portal.
- Click on + Icon, search for traffic manager
- Create traffic manager for petshop orders.
- Click on Endpoints and click add
- Give a name for the endpoint and select the Target resource type as “App Service”
- Do the same for india order azure function
- You will see two endpoints
- Click on Overview to get the DNS name.
- Copy the DNS name of order traffic manager and paste in environment.prod.ts of PetshopUI app
- Create a traffic manager for product azure function and then add endpoints as above
- Copy the DNS name of the product traffic manager and paste in environment.prod.ts of PetshopUI app
- Save your work.
- Run “ng build --prod”
- Right click on the app and click Deploy to Web App.
- Select the dist /PetshopUI by clicking on the Browse.
- Click Deploy on the popup and test the app.
Configure Application Insight for Products and Order