Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 2.1 KB

5. Fireworks-Exercise-P1.md

File metadata and controls

59 lines (39 loc) · 2.1 KB

Fireworks Challange

SignalR based application that allows website users to light fireworks and display on all the connected site users. You can light single or multi shot using the app. There is also a button that can stimulate a crash /home/admin. Pressing the button again will make the application run again.

The application can only run as a single instance and does not support scaleout at present, unless backpane is setup using SIGNALR_CS environment variable

Port Exposed

  • 80

Images:

  • Green: kunalbabre/fireworks:green

  • Blue: kunalbabre/fireworks:blue

  • Red: kunalbabre/fireworks:red

  • Yellow: kunalbabre/fireworks:yellow

  • Latest: kunalbabre/fireworks:latest

Trigger fireworks manually

  • Trigger Single - /home/singleshot
  • Trigger Multishot - /home/multishot

Health Monitoring

  • Liveness: /home/isRunning

    • returns HTTP 200 if the application is alive
    • returns HTTP 400 if the application has crashed
  • Readiness: /home/isRunning

    • returns HTTP 200 if the application is alive
    • returns HTTP 400 if the application has crashed

Environment variables:

  • SIGNALR_CS: (optional) if you wish to scale-out you can provide connection string for Redis or Azure SignalR
  • APP_COLOR: (works with latest tag) you can specify theme color for the app (red,green, blue, yellow)

Exercise Part 1

  1. Create Deployment for firework apps (using the green tag)
  2. Create Service to expose the app externally and name it fireservice
  3. Scale App to 4 instance
  4. Update Deployment to use Blue image, using Rolling update and 50% maxSurge
  5. Use Blue-Green Deployment technique to update the app with Red image
  6. Use the Canary Deployment technique to redirect 25% traffic to Blue image

Stretch Goal

  1. Configure the 'fireworks' pods to only accept traffic when ready and auto restart if crashed.

    hint

    Look for examples in the Kubernetes documentation.