Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 3.44 KB

File metadata and controls

46 lines (30 loc) · 3.44 KB

Challenge 9 - Leverage SignalR

Prerequisities

  1. Challenge 6 - Implement Azure AD B2C should be done successfuly.

Introduction

With this challenge you will deploy and add your own SmartBot by leveraging SignalR, you will add a new competitor in your games.

Challenges

  1. There is already the RockPaperScissorsBoom.ExampleBot project in your solution implementing a SignalR bot, let's just use it and deploy it!
  2. Ready to create your own Dockerfile-ExampleBot, here you are! We are asking you to deploy locally in Azure Cloud Shell this container once built. And then deployed it on new Azure Web App for Containers. Could be under the same App Service Plan or under a new one, up to you.

Success criteria

  1. In Azure Cloud Shell, make sure az webapp list and az acr repository show-tags are showing your Azure services properly.
  2. In your web browser, navigate to the main web app (Server), add this Bot as a new competitor and play a game, make sure it's working without any error.
  3. In GitHub, make sure you documented the different commands you have used to update or provision your infrastructure. It could be in a .md file or in .sh file. You will complete this script as you are moving forward with the further challenges.
  4. Be sure you don't commit any secrets/passwords into a public GitHub repo.
  5. In Azure DevOps (Boards), from the Boards view, you could now drag and drop the user story associated to this Challenge to the Resolved or Closed column, congrats! ;)

Tips

  1. Don't reinvent the wheels, just copy/paste the Dockerfile-Server file to your Dockerfile-ExampleBot and change the content accordingly. You could also add a new entry in the docker-compose.yaml file if you would like. Then you could run docker build or docker-compose up with the appropriate parameters.
  2. Revisit challenges Challenge 4 - Run the app on Azure and/or Challenge 7 - Build a CI/CD pipeline with Azure DevOps. For the latter, the recommendation is to create its own Build and Release definition (not impacting the ones already created for the Server).
  3. To edit or read files from within Azure Cloud Shell, you could run code . to graphically browse the current folder and its files and subfolders. FYI, cat or vi are other alternatives.
  4. To add this new Bot deployed in your Game, just navigate to the Competitors menu of your main web app (Server) and create a new competitor. You will have to provide the URL of your Bot by adding at the end of this URL: /decision.

Advanced challenges

Too comfortable? Eager to do more? Try this:

  1. Now let's add more capability to your SignalR project by adding an Azure SignalR service.
  2. Instead of leveraging Azure Web App Service for Containers, you could deploy your app in Azure Container Instance (ACI) or Azure Kubernetes Service (AKS).
  3. Instead of leveraging Azure CLI to provision your infrastructure, you could leverage instead Azure ARM Templates, Ansible for Azure or Terraform for Azure.

Learning resources

  1. SignalR
  2. Azure SignalR
  3. Leverage Azure SignalR
  4. The Twelve Factor App - checklist to build microservices-based solution

Next challenge (Leverage Azure CDN) >