Skip to content

learn-chef/hab-two-tier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hab-two-tier

This Habitat project illustrates a basic Apache web application (webapp) and HAProxy load balancer (haproxy).

The Docker Compose file brings up HAProxy and two load-balanced webapp instances.

Build and Export the packages (inside the studio)

$ hab studio enter
$ build webapp
# Grab the built artifact, i.e. "Artifact: /src/results/learn-chef-webapp-0.2.0-20180105200724-x86_64-linux.hart"
$ hab pkg export docker results/learn-chef-webapp-0.2.0-20180105200724-x86_64-linux.hart
$ build haproxy
# Grab the built artifact, i.e. "Artifact: /src/results/learn-chef-haproxy-1.6.11-20180105200724-x86_64-linux.hart"
$ hab pkg export docker results/learn-chef-haproxy-1.6.11-20180105200724-x86_64-linux.hart

Build and Export the packages (outside the studio)

$ hab pkg build webapp
# Grab the built artifact, i.e. "Artifact: results/learn-chef-webapp-0.2.0-20180105200724-x86_64-linux.hart"
$ hab pkg export docker results/learn-chef-webapp-0.2.0-20180105200724-x86_64-linux.hart

$ hab pkg build haproxy
# Grab the built artifact, i.e. "Artifact: results/learn-chef-haproxy-1.6.11-20180105200724-x86_64-linux.hart"
$ hab pkg export docker results/learn-chef-haproxy-1.6.11-20180105200724-x86_64-linux.hart

Run

$ HAB_LICENSE=accept-no-persist docker-compose up -d
$ curl localhost:8000/cgi-bin/hello-world
$ docker-compose down

About

Two tier web Habitat webapp for Learn Chef Rally

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages