Skip to content

Instantly share code, notes, and snippets.

@BlinkyStitt
Last active April 13, 2018 00:49
Show Gist options
  • Save BlinkyStitt/5b3b8728ab2ed75c51f421013e8130ee to your computer and use it in GitHub Desktop.
Save BlinkyStitt/5b3b8728ab2ed75c51f421013e8130ee to your computer and use it in GitHub Desktop.
testing out http://appswitch.io/
# docker-compose up -d appswitch
# docker-compose up -d test
# /opt/appswitch/sbin/ax run -- curl -I test:8000
# docker-compose up -d
# docker-compose logs -f consul-a # https://pastebin.com/3nPdMr5V
# /opt/appswitch/sbin/ax run -- curl -I consul-a:8500 # hangs
version: '2.3'
volumes:
consul_a_data:
consul_b_data:
consul_c_data:
appswitch_logs:
services:
appswitch:
image: appswitch/ax
pid: host
networks: []
privileged: true
volumes:
# TODO: upstream says to do /usr/bin, but i put it in opt and then other containers mount `/opt/appswitch/sbin/ax:/usr/sbin/ax:ro`
- /opt/appswitch/sbin:/usr/bin
- /var/run/appswitch:/var/run/appswitch
- appswitch_logs:/var/log
test:
image: python:alpine
entrypoint: /usr/sbin/ax run --name test
command: python -m http.server
# connect from the host with: /opt/appswitch/bin/ax run -- curl -I test:8000
privileged: true
networks: []
volumes:
- /opt/appswitch/sbin/ax:/usr/sbin/ax:ro
- /var/run/appswitch:/var/run/appswitch
consul-a:
image: consul:1.0.6
restart: always
privileged: true
hostname: consul-a
entrypoint: /usr/sbin/ax run --name consul-a consul
# connect from the host with: /opt/appswitch/bin/ax run -- curl -I consul-a:8500/ui/
command:
# TODO: is this really what we want for bind?
agent
-bind='127.0.0.1'
-client='127.0.0.1'
-bootstrap-expect=3
-data-dir=/consul/data
-server
-ui
networks: []
volumes:
- consul_a_data:/consul/data
- /opt/appswitch/sbin/ax:/usr/sbin/ax:ro
- /var/run/appswitch:/var/run/appswitch
consul-b:
image: consul:1.0.6
restart: always
privileged: true
hostname: consul-b
entrypoint: /usr/sbin/ax run --name consul-b consul
command:
# TODO: is this really what we want for bind?
agent
-bind='127.0.0.1'
-client='127.0.0.1'
-bootstrap-expect=3
-data-dir=/consul/data
-server
-retry-join consul-a
networks: []
volumes:
- consul_b_data:/consul/data
- /opt/appswitch/sbin/ax:/usr/sbin/ax:ro
- /var/run/appswitch:/var/run/appswitch
consul-c:
image: consul:1.0.6
restart: always
privileged: true
hostname: consul-c
entrypoint: /usr/sbin/ax run --name consul-c consul
command:
# TODO: is this really what we want for bind?
agent
-bind='127.0.0.1'
-client='127.0.0.1'
-bootstrap-expect=3
-data-dir=/consul/data
-server
-retry-join consul-a
networks: []
volumes:
- consul_c_data:/consul/data
- /opt/appswitch/sbin/ax:/usr/sbin/ax:ro
- /var/run/appswitch:/var/run/appswitch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment