This example shows how to build a simple, multi-tier web application using Helm Classic and Deis Workflow.
The example consists of:
- A web frontend which is installed as a Deis Workflow
- And a back-end Redis
master
(for storage) with a replicated set of Redisslaves
The web frontend interacts with the Redis master
API via JavaScript calls.
This example requires a running Kubernetes cluster and you have installed Helm Classic and Deis Workflow.
- We add the remote repo to Helm:
$ helmc up
$ helmc repo add demo-charts https://github.com/deis/demo-charts
$ helmc up
- We install our back-end chart
$ helmc fetch demo-charts/redis-guestbook
$ helmc install redis-guestbook
- Clone the repo:
$ git clone https://github.com/deis/example-guestbook.git
$ cd example-guestbook
- Create guestbook App:
$ deis create guestbook
- Set env vars so the App knows where to connect to redis cluster:
$ deis config:set GET_HOSTS_FROM=env REDIS_MASTER_SERVICE_HOST=redis-master.default REDIS_SLAVE_SERVICE_HOST=redis-slave.default PORT=80 -a guestbook
- Push to remote git repo:
$ git push deis master
- Open the App in your browser:
$ deis open