Created
July 1, 2014 00:56
-
-
Save jayd3e/63b4ec79e9ff3de26cdc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
IP_ADDR=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}') | |
# kill running flynn-host, if any | |
host=$(docker ps | grep flynn-host | cut -d" " -f 1) | |
if [ -n "$host" ]; then | |
docker kill $host | |
fi | |
# workaround https://github.com/dotcloud/docker/issues/5737 | |
ifconfig | grep veth | cut -d" " -f 1 | while read veth; do | |
sudo ip link delete $veth > /dev/null || true | |
done | |
sudo ip neigh flush all | |
docker run -d -v=/var/run/docker.sock:/var/run/docker.sock -p=1113:1113 flynn/host -external ${IP_ADDR} -force | |
sleep 5 | |
# populate arp cache with etcd (additional workaround for #5737) | |
# sudo arping -c 1 172.17.0.3 > /dev/null | |
docker run -e=DISCOVERD=${IP_ADDR}:1111 flynn/bootstrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
dest="/home/ubuntu/pkgs/src/github.com/flynn" | |
cd "$dest" | |
for f in *; do | |
echo "=====> Building $f..." | |
pushd $f > /dev/null | |
rm -rf /tmp/godep # work around godep bugs | |
if [ -f make ]; then | |
make | |
fi | |
popd > /dev/null | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
manifest="/home/ubuntu/manifest.txt" | |
manifest=$(readlink -f "$manifest") | |
while read line; do | |
repo=($line) | |
name=${repo[0]} | |
rev=${repo[1]} | |
if [ ! -d $name ]; then | |
go get github.com/flynn/$name | |
fi | |
done < "$manifest" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment