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:
Dockerfilethat builds and serves the application.
konf/site.yamlthat 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: