autobahn and docker

#1

One of the things that is hard to do with Autobahn (in my experience) is get everything set up. Docker has a pretty good packaging / deploying model. I put together an example docker-compose for an autobahn project I have been working on. If you have docker installed, (and docker compose) you can download a single file:

https://github.com/lgfausak/abroute_docker/blob/master/docker-compose.yml

which looks like:

abdata:
image: tacodata/abroute-docker-db
command: 8080
expose:

  • 8080
    pg:
    image: tacodata/abroute-docker-postgres
    links:
  • abdata
    volumes_from:
  • abdata
    command: absql
    router:
    image: tacodata/abroute-docker-autobahn
    ports:
  • “8080:8080”
    links:
  • pg
    rpc:
    image: tacodata/abroute-docker-rpc
    links:
  • router

then, a single command:

docker-compose up -d

initializes a postgres database, creates a postgres server, create an autobahn router and then creates a client which does a bunch of pub/sub and register/calls. All 4 of these need to be up before the system can be used. once up, the command line can be exercised, like:

docker run --link abroutedocker_router_1:router --rm tacodata/abroute-docker-adm -u sys -s 123test user list

This makes deploying a completely running, many node ecosystem easy. I haven’t done this with Crossbar, but, it should work.

All of this without installing postgres, autobahn, python, etc… I just thought I’d share :slight_smile:

-g

0 Likes