Skip to content
Alan Graham edited this page Aug 11, 2016 · 5 revisions

Running a command in Cloudpad will generally take the following form:

$ bundle exec cap <stage> <command> <option flags>
$ bundle exec cap production docker:add type=job

Launcher

launcher:provision

Install docker, etcd, and puppet on the launcher node

$ bundle exec cap production launcher:provision

Nodes

nodes:add

Add a node to Cloudpad

$ bundle exec cap production nodes:add

nodes:provision

Provisions all Ubuntu nodes to ensure docker is installed and puppet manifests have been applied.

$ bundle exec cap production nodes:provision

Building Images

docker:build

Builds the docker images specified by your configuration, tags them as latest, and pushes them to the private registry. If a type or group is specified, only images belonging to that type/group will be built and pushed. If no type or group is specified, all images are built and pushed.

$ bundle exec cap production docker:build [image=<image>] [type=<type>] [group=<group>] [skip_update_repos=1] [run_repo_scripts=1]

Deploying Images

docker:update

Stop all running containers and start again with latest image (on same hosts). Useful for code updates after a build.

$ bundle exec cap production docker:update [type=<type>] [group=<group>]

docker:deploy

Build and update, in a single command.

$ bundle exec cap production docker:update [type=<type>] [group=<group>]

Accessing Images

docker:list

List all the running containers on all hosts.

$ bundle exec cap production docker:list

docker:ssh

SSH into a container with the specified name.

$ bundle exec cap production docker:ssh name=<name>

Clone this wiki locally