📖 Part 1. Deploying Pacman with Helm

  1. Using the bastion host, begin by creating a new namespace for your application:

     oc create namespace pacman
    
  2. Add the repository to install Pacman:

     helm repo add pacman https://shuguet.github.io/pacman/
     helm repo update
    
  3. Run the following to install the pacman/pacman Helm Chart:

     helm install pacman pacman/pacman -n pacman \
     --set route.create=true \
     --set mongodb.containerSecurityContext.enabled=false \
     --set mongodb.podSecurityContext.enabled=false \
     --set containerSecurityContext.runAsNonRoot=true
    

    It will take a few moments for the command to return, this is normal!

  4. Return to the OpenShift Console in your browser and verify the Chart has successfully provisioned 3 Pods, pacman-* and pacman-mongodb-*

    pacman pods

    Ensure you have the pacman project selected in the Project drop-down

📖 Part 2. Let’s Play some Pacman

  1. Now that our pacman application has been deployed, let’s play some pacman. First we need to access the Pacman front end. To find the URL, within the OpenShift console and navigate within the OpenShift console to Networking > Routes

  2. Ensure you have the pacman project selected. You should see an entry named pacman-route

    pacman route

  3. Click on the Location to launch pacman

    If pacman doesn’t load in the browser, ensure that the address bar is using HTTP (http://pacman-route-pacman), not HTTPS Occasionally browsers may try to force you to an HTTPS page which will not work for our default pacman app

  4. Play a short game, and enter your name once you’re done to add your name to the leaderboard.

    pacman game

    pacman leaderboard

🏁 Part 3. Takeaways

  • Deploying applications from helm charts is quick and easy
  • OpenShift makes exposing applications via routes simple
  • Pacman is still fun
Continue to LAB 2