Sha256: ac9561b41bb6532af0ec55435da73b4a3f7f710dcb6b6f156f2e180974751430

Contents?: true

Size: 1.32 KB

Versions: 12

Compression:

Stored size: 1.32 KB

Contents

# Bosh::Bootstrap::Commander

The sequence of commands that are run on an Inception VM can be either invoked locally on the Inception VM or from a remote machine. The `Commander` provides a DSL for describing the commands to be run and allows them to be sequentially run against a local or remote server.

Remote servers are accessed via SSH commands.

Example commands:
``` ruby
commands = Bosh::Bootstrap::Commander::Commands.new do |server|
  server.create "vcap user", <<-BASH
    #!/usr/bin/env bash
    
    groupadd vcap 
    useradd vcap -m -g vcap
    mkdir -p /home/vcap/.ssh
    chown -R vcap:vcap /home/vcap/.ssh
  BASH

  server.install "rvm & ruby", <<-BASH
    #!/usr/bin/env bash
    
    if [[ -x rvm ]]
    then
      rvm get stable
    else
      curl -L get.rvm.io | bash -s stable
      source /etc/profile.d/rvm.sh
    fi
    command rvm install 1.9.3 # oh god this takes a long time
    rvm 1.9.3
    rvm alias create default 1.9.3
  BASH
end

@local_machine.run(commands)
@server.run(commands)
```

There is a set of predefined command methods which give nicer text output. You can also invoke any method upon `server` and it will be supported as the command name. The name of the method invoked is semantically meaningless; it is a convenience. 

* `assign`
* `create`
* `download`
* `install`
* `provision`
* `store`
* `validate`

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bosh-bootstrap-0.10.2 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.10.1 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.10.0 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.9.0 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.8.2 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.8.1 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.8.0 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.7.1 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.7.0 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.6.0 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.5.1 lib/bosh-bootstrap/commander/README.md
bosh-bootstrap-0.5.0 lib/bosh-bootstrap/commander/README.md