Skip to content

errygg/chefconf-2019

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chefconf-2019

This is the project that is used for my ChefConf 2019 talk on Consul and Habitat.

In all, this demo consists of 6 containers: counter service, dashboard service, Consul client, Consul server, and 2 Envoy sidecar containers.

Setup

  1. Ensure the consul:latest is pulled down locally.

  2. Ensure the errygg/consul package is built and pushed to Habitat Builder.

  3. First we'll build all the Habitat packages and export them as Docker containers

> cd services/counter
> hab studio enter
$ build
$ hab pkg export docker ./results/<.hart file>
> cd services/dashboard
> hab studio enter
$ build
$ hab pkg export docker ./results/<.hart file>
> cd services/consul-client
> hab studio enter
$ build
$ hab pkg export docker ./results/<.hart file>
  1. Run docker-compose to setup all the initial containers (without Envoy)
> cd compose
> docker-compose up
  1. Browse to all the services and ensure they are running

Consul Server: http://localhost:8500 Counter Service: http://localhost:8080 Dashboard Service: http://localhost:TBD

  1. Start the dashboard app and register it with Consul (with the Consul agent running alongside the counter app). Start the dashboard with COUNTING_SERVICE_URL set to the DNS endpoint for the counter app (counter.consul.service).
hab ...
  1. Deploy the Envoy proxy to each of the counter and dashboard habitat apps.
???
  1. Flip the switch in the consul config file to use Consul Connect
???

Great, now we know how Habitat apps work with Consul Connect and Envoy and we've secured our connections... on our laptop. What about a real environment.

  1. Spin up a K8 cluster with Consul Helm

  2. Spin up some VMs and register them with Consul in K8s

  3. Deploy the counter application to K8 w/ Consul and Envoy

  4. Deploy the dashboard application to the VMs w/ Consul and Envoy

  5. Show the awesomeness...

Demo Diagram

+-----------+ | Counter | | Service | | | +-----------++--------+ +---------+ | Consul | | Consul | | Agent +<----------->+ Server | | | | | +-----------++--------+ +---------+ | Dashboard | | Service | | | +-----------+

Resources

Guide on how to create Habitat Wrapper Plans

Example Habitat Wrapper Plan for Vault

Consul Service Checks

Current work-in-progress plan for modifications to core/consul

Consul Service Definitions

Consul Connect Demo

Consul and Docker blog

Consul 101 demo including the counting and dashboard services

Official Consul Docker image

Docker Compose

Example Consul Docker Compose file

Example Consul Client Habitat package

Creating TLS Certificates for Consul

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published