Name: example-guestbook-wercker
Owner: Deis
Description: A simple PHP app for Deis Workflow, with back-end and wercker integration
Created: 2016-04-19 12:09:58.0
Updated: 2017-05-10 21:22:07.0
Pushed: 2017-05-10 21:59:32.0
Homepage: https://deis.com
Size: 17
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This example shows how to build a simple, multi-tier web application using Helm Classic, Deis Workflow and Wercker for Continuous Deployment
The example consists of:
master
(for storage) with a replicated set of Redis slaves
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, Deis Workflow and you have an account with Wercker.
-
1) We add the remote repo to Helm Classic:
lmc up
lmc repo add demo-charts https://github.com/deis/demo-charts
lmc up
2) We install our back-end chart
lmc fetch demo-charts/redis-guestbook
lmc install redis-guestbook
1) Create guestbook App:
is create guestbook --no-remote
Note: We are creating the App with --no-remote
, as later one we are going to use docker image built by Wercker
2) Set env vars
so the App knows where to connect to redis cluster:
is config:set GET_HOSTS_FROM=env REDIS_MASTER_SERVICE_HOST=redis-master.default REDIS_SLAVE_SERVICE_HOST=redis-slave.default -a guestbook
1) Fork the repo https://github.com/deis/example-guestbook-wercker.git
to your Gihub account
2) Clone the repo:
t clone https://github.com/your_github_account/example-guestbook-wercker.git
3) Create a new Wercker App and connect to your App's Github repo
4) Under App's Settings->Environment variables create the values below:
ER_USERNAME: dockerhub or other hosted docker registry account name
ER_PASSWORD: your docker registry account password
ER_REPO: your docker repository e.g. your_docker_hub_user_name/wercker-demo-app
_CONTROLLER: Deis Workflow controller URL e.g. http://deis.example.com
_TOKEN: your Deis Workflow user token, which you can get from ~/.deis/client.json file
The Environment variables
above will be used by Wercker App you have created reading pipeline steps from the wercker.yml in your App's repository
5) Make changes to your code, push to Github and Wercker will do the following:
ild the docker image
g it
sh to your docker registry repository
ll the new docker image on your remote Deis Workflow
-
With this example App you have learned how to set the multi-tier web application up using Helm Classic and Deis Workflow and then with Wercker's help to deploy your App to Deis Workflow