epcim
7/18/2018 - 1:08 PM

Habitat testing setup

Habitat testing setup

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
...
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: