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 I enable demos for a project?

To enable demos for a project you need:

  • A Dockerfile that builds and serves the application.
  • A konf/site.yaml that can be used by the konf snap to generate a working k8s configuration.
  • Give Bots write permissions to the repo like in here.
  • A webhook on the project repo like this one.

How do things tie together?

Once things are set-up in the project repo, 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.

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.
1 Like