First - lets run a container that writes a file on one node:
$ docker run -ti \
--v testdata:/data \
--volume-driver flocker \
busybox sh -c "echo hello > /data/file.txt"Then - on another node - lets read the data from the same volume:
First - lets run a container that writes a file on one node:
$ docker run -ti \
--v testdata:/data \
--volume-driver flocker \
busybox sh -c "echo hello > /data/file.txt"Then - on another node - lets read the data from the same volume:
| #!/bin/sh | |
| cat /usr/local/etc/init.d/docker | sed 's/unix:\/\/ /unix:\/\/\/var\/run\/docker.real.sock /g' > /tmp/docker | |
| sudo cp /tmp/docker /usr/local/etc/init.d/docker | |
| sudo chmod a+x /usr/local/etc/init.d/docker | |
| sudo /usr/local/etc/init.d/docker restart | |
| sudo rm -f /var/run/docker.sock |
| #!/bin/sh | |
| while ! grep -q ^1$ /sys/class/net/ethwe/carrier 2>/dev/null | |
| do sleep 1 | |
| done | |
| $@ |
| #!/bin/bash | |
| # uses imagemagick to stich together all images in a folder and | |
| # then writes a css file with the correct offsets along with a | |
| # test html page for verification that its all good | |
| if [ $# -gt 0 ] | |
| then | |
| if [ $3 ] |
| #!/bin/bash | |
| git config --global user.name "YOUR NAME HERE" | |
| git config --global user.email "YOUR EMAIL HERE" | |
| git config --global credential.helper 'cache --timeout=3600' | |
| git config --global push.default simple | |
| git config --global alias.add-commit '!git add -A && git commit' |
| sudo add-apt-repository ppa:rquillo/ansible -y | |
| sudo apt-get update -y | |
| sudo apt-get install ansible -y | |
| echo localhost > myhosts | |
| export ANSIBLE_HOSTS=$(pwd)/myhosts | |
| ansible all -m ping -u ubuntu |
| // this is the factory function that acts as a constructor | |
| function factory(options){ | |
| var denominator = options.denominator || 1; | |
| // here is our actual worker function | |
| return function divider(input){ | |
| return input / denominator; | |
| } | |
| } |
| var amqp = require('amqp'); | |
| var connection = amqp.createConnection({ host: "localhost", port: 5672 }); | |
| var count = 1; | |
| connection.on('ready', function () { | |
| connection.exchange("my_exchange", options={type:'fanout'}, function(exchange) { | |
| var sendMessage = function(exchange, payload) { | |
| console.log('about to publish') | |
| var encoded_payload = JSON.stringify(payload); |