Skip to content

Commit

Permalink
add example profiles/roles to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Dec 4, 2013
1 parent 2a2b481 commit c691874
Showing 1 changed file with 82 additions and 1 deletion.
83 changes: 82 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Puppet selenium Module
2. [Description](#description)
3. [Usage](#usage)
* [Simple](#simple)
* [Example "profiles/roles"](#example-profiles/roles)
* [Files](#files)
* [`selenium`](#selenium)
* [`selenium::server`](#seleniumserver)
Expand Down Expand Up @@ -37,7 +38,7 @@ automation package. Support is provided for configuring Selenium Server in

The design intent of this module is to only manage Selenium server and not any
of the other packages that might be required to required to create a selenium
server [role](http://www.craigdunn.org/2012/05/239/).
server [profile/role](http://www.craigdunn.org/2012/05/239/).

Usage
-----
Expand All @@ -58,6 +59,86 @@ class { 'selenium::hub': }
class { 'selenium::node': }
```

### Example "profiles/roles"

Here are some examples "profiles" that might be used to compose a role per
[profile/role](http://www.craigdunn.org/2012/05/239/).

These examples assume the presence of these two modules in your Puppet
environment.

* [`puppetlabs-java`](https://github.com/puppetlabs/puppetlabs-java)
* [`p0deje/display`]https://github.com/p0deje/puppet-display)

#### Selenium Server Profile

```puppet
class mysite::profile::seleniumserver {
include java
# WSXGA+ 1680x1050 -- should nicely fit on a 1920x1280 screen
class { 'display':
width => 1680,
height => 1050,
} ->
class { 'selenium::server': }
Class['java'] -> Class['selenium::server']
}
```

#### Selenium Hub Profile

```puppet
class mysite::profile::seleniumhub {
include java
class { 'selenium::hub': }
Class['java'] -> Class['selenium::hub']
}
```

#### Selenium Node Profile

```puppet
class mysite::profile::seleniumnode {
include java
# WSXGA+ 1680x1050 -- should nicely fit on a 1920x1280 screen
class { 'display':
width => 1680,
height => 1050,
} ->
class { 'selenium::node':
# If your intending to have node(s) that don't sit on the same system as
# the hub, you need to point the node at a hub by passing in the hub's url
# in or using an exported resource from the hub system. Eg.
# hub => 'http://<myseleniumhub>:4444/grid/register',
}
Class['java'] -> Class['selenium::node']
}
```

#### Selenium Server Role

```puppet
class mysite::role::seleniumserver {
include mysite::profile::seleniumserver
}
```

#### Selenium Hub Role

```puppet
class mysite::role::seleniumhub {
include mysite::profile::seleniumhub
include mysite::profile::seleniumnode
}
```

### Files

Unless class `selenium` has `$install_root` changed from the default, these
Expand Down

2 comments on commit c691874

@xiankai
Copy link
Contributor

@xiankai xiankai commented on c691874 Dec 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Liking your style of documentation, it's very helpful and led me to pick your module out of all the others. Also a nice read-up on roles!

@jhoblitt
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I do need to expand the examples to be a little bit more functional -- actually installing a browser to test with would probably be useful. ;)

Please sign in to comment.