Demoservice

Demoservice

The demoservice is a service we use within the web and design team, that deploys a demo version of a website repository whenever a collaborator opens a pull request. You can find the web frontend under https://demos.haus.

What makes the demoservice?

How do things tie together?

Once a project is set-up, the next time a collaborator opens a pull request the proxy app will trigger the start-demo job with the appropriate parameters, that job will then be responsible to build the docker image and deploy the demo to the k8s cluster. When the pull request is closed the proxy app will trigger the stop-demo job, that will remove the deployment from the k8s cluster.

How do I set-up a project to get demos?

For demos to work there are some things that need to be set in a project:

  • A Dockerfile that builds and serves the application
  • A deploy/site.yaml that can be used by the konf snap to generate a working k8s configuration
  • A webhook set to hit k8s.demo.haus/hook/gh and make sure you only select pull request events

Can I start/stop demos manually?

Yes you can, just use the jenkins jobs directly if for some reason the webhooks did not work.

My demo is not working what do I do?

Here are some things you can do if your demo is not working:

  • Check for failing start-demo jobs and check the console output
  • If you don’t find anything and if you have the kubectl credentials for the demo cluster you can check the state of your demo pods to see what is going on
  • If you don’t have the crendentials ask in #web&design for help