Pin Coala to <0.11 to avoid bug
[integration/packaging/puppet-opendaylight.git] / CONTRIBUTING.markdown
index 09d02f7e96839be17d452e681c87d89312b76747..4d1a6eb5655d30781e661d732137da403cf2bf92 100644 (file)
@@ -4,17 +4,18 @@ We work to make contributing easy. Please let us know if you spot something
 we can do better.
 
 #### Table of Contents
+
 1. [Overview](#overview)
-1. [Communication](#communication)
-    * [Issues](#issues)
-    * [Gitter](#gitter)
-1. [Patches](#patches)
-1. [Testing](#testing)
-    * [Test Dependencies](#test-dependencies)
-    * [Syntax and Style Tests](#syntax-and-style-tests)
-    * [Unit Tests](#unit-tests)
-    * [System Tests](#system-tests)
-    * [Tests in Continuous Integration](#tests-in-continuous-integration)
+2. [Communication](#communication)
+   - [Issues](#issues)
+   - [IRC channel](#irc-channel)
+3. [Patches](#patches)
+4. [Testing](#testing)
+   - [Test Dependencies](#test-dependencies)
+   - [Syntax and Style Tests](#syntax-and-style-tests)
+   - [Unit Tests](#unit-tests)
+   - [System Tests](#system-tests)
+   - [Tests in Continuous Integration](#tests-in-continuous-integration)
 
 ## Overview
 
@@ -62,59 +63,61 @@ referencing the issue's number (`#42`) will link the commit and issue. Issues
 can also be closed from commit messages with `closes #42` (and [a variety
 of other key words][6]).
 
-### Gitter
-
-We're experimenting with Gitter, a GitHub-driven chat service that works on a
-per-repo basis.
+### IRC channel
 
-Feel free to hop in [our room][7] and test it out with us.
+Feel free to join us at **#opendaylight-integration** on `chat.freenode.net`.
+You can also use web client for Freenode to join us at [webchat][19].
 
 ## Patches
 
 Please use [Pull Requests][2] to submit patches.
 
 Basics of a pull request:
-* Use the GitHub web UI to fork our repo.
-* Clone your fork to your local system.
-* Make your changes.
-* Commit your changes, using a [good commit message][8] and referencing any
-applicable issues.
-* Push your commit.
-* Submit a pull request against the project, again using GitHub's web UI.
-* We'll give feedback and get your changed merged ASAP.
-* You contributed! [Thank you][9]!
+
+- Use the GitHub web UI to fork our repo.
+- Clone your fork to your local system.
+- Make your changes.
+- Commit your changes, using a [good commit message][7] and referencing any
+  applicable issues.
+- Push your commit.
+- Submit a pull request against the project, again using GitHub's web UI.
+- We'll give feedback and get your changed merged ASAP.
+- You contributed! [Thank you][8]!
 
 Other tips for submitting excellent pull requests:
-* If you'd like to make more than one logically distinct change, please submit
-them as different pull requests (if they don't depend on each other) or
-different commits in the same PR (if they do).
-* If your PR contains a number of commits that provide one logical change,
-please squash them using `git rebase`.
-* Please provide test coverage for your changes.
-* If applicable, please provide documentation updates to reflect your changes.
+
+- If you'd like to make more than one logically distinct change, please submit
+  them as different pull requests (if they don't depend on each other) or
+  different commits in the same PR (if they do).
+- If your PR contains a number of commits that provide one logical change,
+  please squash them using `git rebase`.
+- Please provide test coverage for your changes.
+- If applicable, please provide documentation updates to reflect your changes.
 
 ## Testing
 
 ### Test Dependencies
 
-The testing tools have a number of dependencies. We use [Bundler][10] to make
+The testing tools have a number of dependencies. We use [Bundler][9] to make
 installing them easy.
 
 ```
-[~/puppet-opendaylight]$ sudo yum install -y rubygems ruby-devel gcc-c++ zlib-devel patch
-[~/puppet-opendaylight]$ gem install bundler
-[~/puppet-opendaylight]$ bundle install
+$ sudo yum install -y rubygems ruby-devel gcc-c++ zlib-devel patch \
+    redhat-rpm-config make
+$ gem install bundler
+$ bundle install
+$ bundle update
 ```
 
 ### Syntax and Style Tests
 
-We use [Puppet Lint][11], [Puppet Syntax][12] and [metadata-json-lint][13] to
+We use [Puppet Lint][10], [Puppet Syntax][11] and [metadata-json-lint][12] to
 validate the module's syntax and style.
 
 ```
-[~/puppet-opendaylight]$ bundle exec rake lint
-[~/puppet-opendaylight]$ bundle exec rake syntax
-[~/puppet-opendaylight]$ bundle exec rake metadata
+$ bundle exec rake lint
+$ bundle exec rake syntax
+$ bundle exec rake metadata
 ```
 
 ### Unit Tests
@@ -124,7 +127,7 @@ We use rspec-puppet to provide unit test coverage.
 To run the unit tests and generate a coverage report, use:
 
 ```
-[~/puppet-opendaylight]$ bundle exec rake spec
+$ bundle exec rake spec
 # Snip test output
 Finished in 10.08 seconds (files took 0.50776 seconds to load)
 537 examples, 0 failures
@@ -140,7 +143,7 @@ Note that we have a very large number of tests and 100% test coverage.
 To run the syntax, style and unit tests in one rake task (recommended), use:
 
 ```
-[~/puppet-opendaylight]$ bundle exec rake test
+$ bundle exec rake test
 ```
 
 ### System Tests
@@ -148,32 +151,36 @@ To run the syntax, style and unit tests in one rake task (recommended), use:
 While the [unit tests](#unit-tests) are able to quickly find many errors,
 they don't do much more than checking that the code compiles to a given state.
 To verify that the Puppet module behaves as desired once applied to a real,
-running system, we use [Beaker][14].
+running system, we use [Beaker][13].
 
-Beaker stands up virtual machines using Vagrant, applies the OpenDaylight
-Puppet module with various combinations of params and uses [Serverspec][15]
-to validate the resulting system state.
+Beaker stands up virtual machines or containers using Vagrant or Docker,
+applies the OpenDaylight Puppet module with various combinations of params
+and uses [Serverspec][14] to validate the resulting system state.
 
-Beaker depends on Vagrant ([Vagrant downloads page][18]) for managing VMs,
-which in turn depends on VirtualBox ([VirtualBox downloads page][19]) and
+Beaker depends on Vagrant ([Vagrant downloads page][17]) for managing VMs,
+which in turn depends on VirtualBox ([VirtualBox downloads page][18]) and
 the `kmod-VirtualBox` package.
 
-To run our Beaker tests against the primary target OS (CentOS 7) using the
-recommended RPM-based install method, use:
+Beaker depends on [Docker][20] for managing containers.
+
+To run Beaker tests against CentOS 7 in a VM using the latest OpenDaylight
+Carbon RPM, use:
 
 ```
-[~/puppet-opendaylight]$ bundle exec rake centos
+$ bundle exec rake cent_6test_vm
 ```
 
-There are a number of pre-defined rake tasks to simplify running common
-Beaker tests.
+To do the same tests in a CentOS container:
 
 ```
-[~/puppet-opendaylight]$ bundle exec rake centos
-[~/puppet-opendaylight]$ bundle exec rake centos_tarball
-[~/puppet-opendaylight]$ bundle exec rake fedora_20
-[~/puppet-opendaylight]$ bundle exec rake fedora_21
-[~/puppet-opendaylight]$ bundle exec rake ubuntu
+$ bundle exec rake cent_6test_dock
+```
+
+To run VM or container-based tests for all OSs:
+
+```
+$ bundle exec rake acceptance_vm
+$ bundle exec rake acceptance_dock
 ```
 
 If you'd like to preserve the Beaker VM after a test run, perhaps for manual
@@ -181,54 +188,69 @@ inspection or a quicker follow-up test run, use the `BEAKER_destroy`
 environment variable.
 
 ```
-[~/puppet-opendaylight]$ BEAKER_destroy=no bundle exec rake centos
+$ BEAKER_destroy=no bundle exec rake centos
 ```
 
 You can then connect to the VM by navigating to the directory that contains
 its Vagrantfile and using standard Vagrant commands.
 
 ```
-[~/puppet-opendaylight]$ cd .vagrant/beaker_vagrant_files/centos-7.yml
-[~/puppet-opendaylight/.vagrant/beaker_vagrant_files/centos-7.yml]$ vagrant status
+$ cd .vagrant/beaker_vagrant_files/centos-7.yml
+$ vagrant status
 Current machine states:
 
 centos-7                  running (virtualbox)
-[~/puppet-opendaylight/.vagrant/beaker_vagrant_files/centos-7.yml]$ vagrant ssh
-[vagrant@centos-7 ~]$ sudo systemctl status opendaylight
-opendaylight.service - OpenDaylight SDN Controller
-   Loaded: loaded (/usr/lib/systemd/system/opendaylight.service; enabled)
-   Active: active (running) since Fri 2015-04-24 16:34:07 UTC; 1min 1s ago
-     Docs: https://wiki.opendaylight.org/view/Main_Page
-           http://www.opendaylight.org/
-[vagrant@centos-7 ~]$ logout
-[~/puppet-opendaylight/.vagrant/beaker_vagrant_files/centos-7.yml]$ vagrant destroy -f
+$ vagrant ssh
+$ sudo systemctl is-active opendaylight
+active
+$ logout
+$ vagrant destroy -f
 ```
 
-For more information about using Beaker, see [these docs][16].
+For more information about using Beaker, see [these docs][15].
 
 ### Tests in Continuous Integration
 
-We use [Travis CI][17] to run our unit, syntax and style tests against a
+We use [Travis CI][16] to run our unit, syntax and style tests against a
 matrix of supported Ruby and Puppet versions at every commit. This currently
 results in >8500 automated tests per commit.
 
-
 [1]: https://github.com/dfarrell07/puppet-opendaylight/issues
+
 [2]: https://github.com/dfarrell07/puppet-opendaylight/pulls
+
 [3]: https://github.com/dfarrell07/puppet-opendaylight/labels/good-for-beginners
+
 [4]: https://github.com/dfarrell07/puppet-opendaylight/labels/prio%3Ahigh
+
 [5]: https://github.com/dfarrell07/puppet-opendaylight/labels/prio%3Anormal
+
 [6]: https://help.github.com/articles/closing-issues-via-commit-messages/
-[7]: https://gitter.im/dfarrell07/puppet-opendaylight
-[8]: http://chris.beams.io/posts/git-commit/
-[9]: http://cdn3.volusion.com/74gtv.tjme9/v/vspfiles/photos/Delicious%20Dozen-1.jpg
-[10]: http://bundler.io/
-[11]: http://puppet-lint.com/
-[12]: https://github.com/gds-operations/puppet-syntax
-[13]: https://github.com/puppet-community/metadata-json-lint
-[14]: https://github.com/puppetlabs/beaker
-[15]: http://serverspec.org/resource_types.html
-[16]: https://github.com/puppetlabs/beaker/wiki/How-to-Write-a-Beaker-Test-for-a-Module#typical-workflow
-[17]: https://travis-ci.org/dfarrell07/puppet-opendaylight
-[18]: https://www.vagrantup.com/downloads.html
-[19]: www.virtualbox.org/wiki/Linux_Downloads
+
+[7]: http://chris.beams.io/posts/git-commit/
+
+[8]: http://cdn3.volusion.com/74gtv.tjme9/v/vspfiles/photos/Delicious%20Dozen-1.jpg
+
+[9]: http://bundler.io/
+
+[10]: http://puppet-lint.com/
+
+[11]: https://github.com/gds-operations/puppet-syntax
+
+[12]: https://github.com/puppet-community/metadata-json-lint
+
+[13]: https://github.com/puppetlabs/beaker
+
+[14]: http://serverspec.org/resource_types.html
+
+[15]: https://github.com/puppetlabs/beaker/wiki/How-to-Write-a-Beaker-Test-for-a-Module#typical-workflow
+
+[16]: https://travis-ci.org/dfarrell07/puppet-opendaylight
+
+[17]: https://www.vagrantup.com/downloads.html
+
+[18]: www.virtualbox.org/wiki/Linux_Downloads
+
+[19]: http://webchat.freenode.net/?channels=opendaylight-integration
+
+[20]: https://docs.docker.com/engine/installation/