SyntaxHighlighter

Showing posts with label Weave. Show all posts
Showing posts with label Weave. Show all posts

Monday, March 13, 2017

Using the Docker Embedded DNS

this is an easy way I just discovered and am noting it here so I don't forget.

to leverage docker's embedded dns, you can setup a custom network and then each container can resolve to each other via the 'name' attribute.

for example;

1. docker network create internaldns
2. docker run --name rmq -p 15672:15672 --net=internaldns -d rabbitmq:management
3. docker run --name httpcontainer -p 8080:8080 --net=internaldns -d scbs/http-rmq

this gives you;
- ability to connect to the host network via bridge
- ability to have httpcontainer look up the rabbitmq container using the dns entry 'rmq'

i love weave.works and think weave net is particularly awesome, but if you're just doing dns lookup on 1 docker host, this seems pretty light and easy

Sunday, January 17, 2016

weave + marathon - network

weave + marathon - network

quick note, if you're using weave on marathon with docker, make sure NETWORK is set to BRIDGE ("network":"bridge")


Monday, December 21, 2015

trick for marathon for running docker + weave

weave DNS trick

a little trick with weave and marathon is the specification of the hostname.  unlike raw docker+weave, the hostname in weave DNS can be picked up by --name or --hostname.  But with the marathon json, hostname must have .weave.local as a suffix.  so, to deploy postgres via marathon and give it a weave DNS entry of postgres-server, the entry needs to be postures-server.weave.local


Tuesday, December 15, 2015

mesos + marathon + docker + weave

mesos + marathon + docker + weave

so here's a little configuration set of links for standing up a PaaS leveraging mesos, marathon, docker and weave (am using centos 7 on a VM);

  1. follow the install of the base platform here --> https://open.mesosphere.com/getting-started/install/
  2. install docker from here --> https://docs.docker.com/engine/installation/centos/
  3. use this weave script from here --> https://github.com/weaveworks/guides/blob/master/mesos-marathon/centos/weave
  4. use these service scripts in here --> https://github.com/weaveworks/guides/tree/master/mesos-marathon/centos
  5. but most importantly, add the following to /usr/lib/systemd/system/mesos-slave.service
Environment=MESOS_CONTAINERIZERS=docker,mesos
Environment=MESOS_DOCKER_SOCKET=/var/run/weave/weave.sock

now you can deploy normally with marathon and have your containers picked up in weave (and mapped)

Tuesday, July 28, 2015

docker & weave & photon

Putting Docker, Weave and Photon together


  1. appcatalyst vm create [your vm name]
  2. appcatalyst vmpower on [your vm name]
  3. (wait... 10 seconds or so)
  4. appcatalyst guest getip [your vm name]
  5. ssh -i /opt/vmware/appcatalyst/etc/appcatalyst_insecure_ssh_key photon@[ip_address]
now you're in the VM, let's get weave

  1. sudo curl -L git.io/weave -O /usr/local/bin/weave
  2. sudo chmod a+x /usr/local/bin/weave
  3. sudo -s
  4. /usr/local/bin/weave launch
  5. /usr/local/bin/weave launch-dns
  6. /usr/local/bin/weave launch-proxy
  7. eval $(/usr/local/bin/weave proxy-env)
now you can run docker commands have weave play "nice" (dynamic mapping of --name to weaveDNS, etc.)