Skip to content

Commit

Permalink
Fixed up LWRP documentation, added Test Kitchen information in TESTIN…
Browse files Browse the repository at this point in the history
…G.md
  • Loading branch information
bflad committed May 11, 2013
1 parent 76f2445 commit 77f2cac
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 16 deletions.
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,45 +79,35 @@ Run a container:

docker_container "busybox" do
command "sleep 9999"
detach true
end

Stop a running container:

# Without container ID
docker_container "busybox" do
command "sleep 9999"
action :stop
end
# With container ID
docker_container "abc123" do
command "sleep 9999"
action :stop
end

Start a stopped container:

# Without container ID
docker_container "busybox" do
command "sleep 9999"
action :start
end
# With container ID
docker_container "abc123" do
command "sleep 9999"
action :start
end

Restart a container:

# Without container ID
docker_container "busybox" do
command "sleep 9999"
action :restart
end
# With container ID
docker_container "abc123" do

Remove a container:

docker_container "busybox" do
command "sleep 9999"
action :restart
action :remove
end

### docker_image
Expand Down Expand Up @@ -146,6 +136,8 @@ Remove image:

## Testing and Development

### Vagrant

Here's how you can quickly get testing or developing against the cookbook thanks to [Vagrant](http://vagrantup.com/) and [Berkshelf](http://berkshelf.com/).

vagrant plugin install vagrant-berkshelf
Expand All @@ -157,6 +149,10 @@ You can then SSH into the running VM using the `vagrant ssh BOX` command.

The VM can easily be stopped and deleted with the `vagrant destroy` command. Please see the official [Vagrant documentation](http://docs.vagrantup.com/v2/cli/index.html) for a more in depth explanation of available commands.

### Test Kitchen

Please see documentation in: [TESTING.md](TESTING.md)

## Contributing

Please use standard Github issues/pull requests and if possible, in combination with testing on the Vagrant boxes.
Expand Down
25 changes: 25 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
This cookbook includes support for running tests via Test Kitchen (1.0). This has some requirements.

1. You must be using the Git repository, rather than the downloaded cookbook from the Chef Community Site.
2. You must have Vagrant 1.1 installed.
3. You must have a "sane" Ruby 1.9.3 environment.

Once the above requirements are met, install the additional requirements:

Install the berkshelf plugin for vagrant, and berkshelf to your local Ruby environment.

vagrant plugin install vagrant-berkshelf
gem install berkshelf

Install Test Kitchen 1.0 (unreleased yet, use the alpha / prerelease version).

gem install test-kitchen --pre

Install the Vagrant driver for Test Kitchen.

gem install kitchen-vagrant

Once the above are installed, you should be able to run Test Kitchen:

kitchen list
kitchen test

0 comments on commit 77f2cac

Please sign in to comment.