#devoxx@pchaussalet / @ericlemerdy
#devoxx@pchaussalet / @ericlemerdy
None of this stuff is really new.
What has changed is we developed new patterns and practices and
we have new tools that enable us to do this.
- Jez Humble, oct. 2012
#devoxx@pchaussalet / @ericlemerdy
#devoxx@pchaussalet / @ericlemerdy
cd front
docker build --rm -t mepc/front:1 .
docker run -d -t -p 2222:22 -p 8080:80 --name front mepc/front
npm install
grunt package
grunt deploy
#devoxx@pchaussalet / @ericlemerdy
mv index.html foobar.html
grunt package
grunt deploy
#devoxx@pchaussalet / @ericlemerdy
docker run -d -p 6379:6379 -p 8080:80 --name rp hipache
redis-cli -h 10.0.2.2 rpush frontend:mepc.io app
docker run -d --expose 27017 --name db mepc/db
docker run -d --expose 8080 --name app-blue mepc/app:1.0
Every build is a Release Candidate
- Jez Humble
docker build -t mepc/app:1.0 .
docker save -o mepc_app-1.0.tar mepc/app:1.0
curl --data-binary @mepc_app-1.0.tar -H 'Transfer-encoding: chunked' -H 'Content-type: plain/text' "http://10.0.2.2:4243/images/load"
curl --data-binary '{"Image":"mepc/app:1.0","ExposedPorts":{"8080/tcp":{}}, "Cmd": ["/usr/bin/java", "-jar", "/opt/mepc-server.jar"]}' -H 'Content-Type: application/json' \
'http://10.0.2.2:4243/containers/create?name=app-blue'
curl --data-binary '{ "Links": [ "db:db" ] }' -H 'Content-Type: application/json' 'http://10.0.2.2:4243/containers/app-blue/start'
redis-cli -h 10.0.2.2 linsert frontend:appserver AFTER app http://`curl http://10.0.2.2:4243/containers/test_foo/json |sed 's/.*IPAddress":"\([0-9\.]*\).*/\1/'`:8080
redis-cli -h 10.0.2.2 ltrim frontend:appserver 0 1