Last active
August 29, 2015 14:16
-
-
Save ianblenke/039239d856554a213032 to your computer and use it in GitHub Desktop.
Building a custom deis-router image and using it
This file contains hidden or 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
git config --global push.default simple | |
git clone [email protected]:ianblenke/deis ianblenke-deis | |
cd ianblenke-deis/router | |
git checkout -b ianblenke/router | |
cd router | |
cp -pR ../Godeps . | |
docker build -t router-build . | |
docker cp `docker run -d router-build`:/nginx.tgz image/ | |
docker cp `docker run -d router-build`:/go/bin/boot image/bin/ | |
docker build -t deis/router:ianblenke image | |
rm image/nginx.tgz | |
rm image/bin/boot | |
imageid=$(docker images -a | grep deis/router | grep ianblenke | grep -v 5000 | awk '{print $3}') | |
# Then I find my internal ELB | |
elb=$(aws elb describe-load-balancers | grep elb.amazonaws.com | grep DNS | grep -i dock | cut -d'"' -f4) | |
# Now I can tag the docker image and push it: | |
docker tag $imageid $elb:5000/deis/router:ianblenke | |
docker push $elb:5000/deis/router:ianblenke | |
# Now I point my /deis/router/image at it | |
deisctl config router set image=$elb:5000/deis/router:ianblenke | |
# etcdctl get /deis/router/image | |
fleetctl list-units -fields=unit -no-legend | grep router | xargs -l1 -i% bash -c 'fleetctl stop % ; fleetctl start %' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment