Sha256: ed7bb546977bea8a2c555aec6d0c5516673f50f31c1a417c3da27040ae0e6454

Contents?: true

Size: 1.51 KB

Versions: 146

Compression:

Stored size: 1.51 KB

Contents

Each host in a host configuration file is defined to have one or more roles.  Beaker supports the roles `master`, `agent`, `frictionless`, `dashboard` and `database`.  These roles indicate what Puppet responsibilities the host will assume.  If puppet is installed as part of the Beaker test execution then the roles will be honored (ie, the host defined as `master` will become the puppet master node).  Other than puppet installation, the roles provide short cuts to node access.  In tests you can refer to nodes by role:

    on master, "echo hello"
    on database, "echo hello"

## Creating Your Own Roles
Arbitrary role creating is supported in Beaker.  New roles are created as they are discovered in the host/config file provided at runtime.

### Example User Role Creation
```
HOSTS:
  pe-ubuntu-lucid:
    roles:
      - agent
      - dashboard
      - database
      - master
      - nodes
      - ubuntu
    vmname : pe-ubuntu-lucid
    platform: ubuntu-10.04-i386
    snapshot : clean-w-keys
    hypervisor : fusion
  pe-centos6:
    roles:
      - agent
      - nodes
      - centos
    vmname : pe-centos6
    platform: el-6-i386
    hypervisor : fusion
    snapshot: clean-w-keys
CONFIG:
  nfs_server: none
  consoleport: 443
```

In this case I've created the new roles `nodes`, `centos` and `ubuntu`.  These roles can now be used to call any Beaker DSL methods that require a host.

```
on centos, 'echo I'm the centos box'
on ubuntu, 'echo I'm the ubuntu box'
on nodes, 'echo this command will be executed on both defined hosts'
```

Version data entries

146 entries across 146 versions & 1 rubygems

Version Path
beaker-2.48.0 docs/concepts/roles_what_are_they.md
beaker-2.47.1 docs/Roles-What-Are-They.md
beaker-2.47.0 docs/Roles-What-Are-They.md
beaker-2.46.0 docs/Roles-What-Are-They.md
beaker-2.45.0 docs/Roles-What-Are-They.md
beaker-2.44.0 docs/Roles-What-Are-They.md
beaker-2.43.0 docs/Roles-What-Are-They.md
beaker-2.42.0 docs/Roles-What-Are-They.md
beaker-2.41.0 docs/Roles-What-Are-They.md
beaker-2.40.0 docs/Roles-What-Are-They.md
beaker-2.39.0 docs/Roles-What-Are-They.md
beaker-2.38.1 docs/Roles-What-Are-They.md
beaker-2.38.0 docs/Roles-What-Are-They.md
beaker-2.37.0 docs/Roles-What-Are-They.md
beaker-2.36.0 docs/Roles-What-Are-They.md
beaker-2.35.0 docs/Roles-What-Are-They.md
beaker-2.34.0 docs/Roles-What-Are-They.md
beaker-2.33.0 docs/Roles-What-Are-They.md
beaker-2.32.1 docs/Roles-What-Are-They.md
beaker-2.32.0 docs/Roles-What-Are-They.md