Skip to content

Instantly share code, notes, and snippets.

@epcim
Forked from christophermaier/docker-compose.yml
Created July 18, 2018 13:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epcim/f2b250c3f03c27dbf29066cbda785b2f to your computer and use it in GitHub Desktop.
Save epcim/f2b250c3f03c27dbf29066cbda785b2f to your computer and use it in GitHub Desktop.
Habitat testing setup
version: '3.2'
services:
bastion:
image: christophermaier/test-probe:0.1.0-20180509175222
command:
- "run"
- "--listen-ctl=0.0.0.0:9632"
- "--permanent-peer"
hostname: bastion
domainname: habitat.dev
volumes:
- type: bind
source: ./CTL_SECRET
target: /hab/sup/default/CTL_SECRET
read_only: true
networks:
habitat:
aliases:
- bastion.habitat.dev
alpha:
image: christophermaier/test-probe:0.1.0-20180509175222
command:
- "run"
- "--listen-ctl=0.0.0.0:9632"
- "--peer=bastion.habitat.dev"
hostname: alpha
domainname: habitat.dev
volumes:
- type: bind
source: ./CTL_SECRET
target: /hab/sup/default/CTL_SECRET
read_only: true
networks:
habitat:
aliases:
- alpha.habitat.dev
beta:
image: christophermaier/test-probe:0.1.0-20180509175222
command:
- "run"
- "--listen-ctl=0.0.0.0:9632"
- "--peer=bastion.habitat.dev"
hostname: beta
domainname: habitat.dev
volumes:
- type: bind
source: ./CTL_SECRET
target: /hab/sup/default/CTL_SECRET
read_only: true
networks:
habitat:
aliases:
- beta.habitat.dev
gamma:
image: christophermaier/test-probe:0.1.0-20180509175222
command:
- "run"
- "--listen-ctl=0.0.0.0:9632"
- "--peer=bastion.habitat.dev"
hostname: gamma
domainname: habitat.dev
volumes:
- type: bind
source: ./CTL_SECRET
target: /hab/sup/default/CTL_SECRET
read_only: true
networks:
habitat:
aliases:
- gamma.habitat.dev
delta:
image: christophermaier/test-probe:0.1.0-20180509175222
command:
- "run"
- "--listen-ctl=0.0.0.0:9632"
- "--peer=bastion.habitat.dev"
hostname: delta
domainname: habitat.dev
volumes:
- type: bind
source: ./CTL_SECRET
target: /hab/sup/default/CTL_SECRET
read_only: true
networks:
habitat:
aliases:
- delta.habitat.dev
console:
image: christophermaier/test-probe:0.1.0-20180509175222
command: sh
volumes:
- type: bind
source: ./CTL_SECRET
target: /hab/sup/default/CTL_SECRET
read_only: true
networks:
habitat:
networks:
habitat:
docker-compose up bastion
docker-compose up alpha
docker-compose up beta
...
docker-compose run console
> hab svc load core/redis --remote-sup=alpha.habitat.dev
> hab svc load core/redis --remote-sup=beta.habitat.dev
> hab pkg install core/curl -b -f
> hab pkg install core/jq-static -b -f
> curl -s http://alpha.habitat.dev:9631/census | jq
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment