tech.paulcz.net/presentation-cloud-austin-deis Created by Paul Czarkowski / @pczarkowski
|
but it is newly hot.
Docker is part of the reason why.
* not docker based, but moving in that direction?
deploys [12 factor] applications
Best practices for building SAAS / SOA apps
Summary: Don't be wordpress.
Tooling to build and deploy polyglot web applications.
Example: minimal NodeJS app
example-nodejs-express
├── package.json
├── Procfile
└── server.js
* functionality moving to etcd + confd
http://twentypercentcooler.net/post/show/23858/2012-cannon-duo-earth_pony-eeveetachi-equine-eyewe
database, message queue, etc.
$ cd ~/paas/apps/nodejs
$ deis create --formation=demo --id=cloudaustin
Creating application... done, created cloudaustin
Warning: Permanently added the ECDSA host key for IP address '23.253.89.126' to the list of known hosts.
Git remote deis added
$ git push deis master
Counting objects: 181, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (86/86), done.
Writing objects: 100% (181/181), 28.53 KiB | 0 bytes/s, done.
Total 181 (delta 101), reused 165 (delta 92)
-----> Node.js app detected
-----> Requested node range: 0.10.x
-----> Resolved node version: 0.10.24
-----> Downloading and installing node
-----> Installing dependencies
Launching... done, v2
<< SNIP >>
-----> cloudaustin deployed to Deis
http://cloudaustin.deis.paulcz.net
$
$ cd ~/paas/apps/nodejs
$ vim server.js
...
...
$ git commit -am 'cloud austin'
$ git push origin deis
<< SNIP >>
-----> Node.js app detected
<< SNIP >>
-----> cloudaustin deployed to Deis
http://cloudaustin.deis.paulcz.net
$
$ deis info
=== cloudaustin Application
{
"updated": "2014-01-19T20:48:09.187Z",
"uuid": "a871873f-36cd-439f-a4cd-c84db752d598",
"created": "2014-01-19T20:48:09.187Z",
"formation": "demo",
"owner": "admin",
"id": "cloudaustin",
"containers": "{}"
}
=== cloudaustin Containers
--- web: `node server.js`
web.1 up 2014-01-19T20:50:02.125Z (demo-nodes-1)
$
$ deis logs
Jan 19 20:33:37 deis-controller cloudaustin: Config cloudaustin-v1 updated
Jan 19 20:33:37 deis-controller cloudaustin: Build cloudaustin- created
Jan 19 20:33:37 deis-controller cloudaustin: Release cloudaustin-v1 created
Jan 19 20:45:20 deis-controller cloudaustin: Config cloudaustin-v1 updated
Jan 19 20:45:20 deis-controller cloudaustin: Build cloudaustin- created
Jan 19 20:45:20 deis-controller cloudaustin: Release cloudaustin-v1 created
Jan 19 20:48:09 deis-controller cloudaustin: Config cloudaustin-v1 updated
Jan 19 20:48:09 deis-controller cloudaustin: Build cloudaustin- created
Jan 19 20:48:09 deis-controller cloudaustin: Release cloudaustin-v1 created
Jan 19 20:50:02 deis-controller cloudaustin: Build cloudaustin-7fb1163 created
Jan 19 20:50:02 deis-controller cloudaustin: Release cloudaustin-v2 created
Jan 19 20:50:02 deis-controller cloudaustin: Containers scaled web=1
Jan 19 20:50:14 demo-nodes cloudaustin[web.1]: Server listening on port 10001 in development mode
Jan 19 20:56:19 deis-controller cloudaustin: Build cloudaustin-f7e94ab created
Jan 19 20:56:19 deis-controller cloudaustin: Release cloudaustin-v3 created
Jan 19 20:56:39 demo-nodes cloudaustin[web.1]: Server listening on port 10001 in development mode
$
$ deis scale web=6
Scaling containers... but first, coffee!
done in 21s
=== cloudaustin Containers
--- web: `node server.js`
web.1 up 2014-01-19T20:50:02.125Z (demo-nodes-1)
web.2 up 2014-01-19T21:04:25.013Z (demo-nodes-2)
web.3 up 2014-01-19T21:04:25.023Z (demo-nodes-2)
web.4 up 2014-01-19T21:04:25.031Z (demo-nodes-1)
web.5 up 2014-01-19T21:04:25.040Z (demo-nodes-2)
web.6 up 2014-01-19T21:04:25.050Z (demo-nodes-1)
$
$ deis destroy --app=cloudaustin --confirm=cloudaustin
Destroying cloudaustin... done in 40s
Git remote deis removed
$
Install guide for Rackspace Public Cloud
http://www.thinkgeek.com/product/e5a7/