### IRC channel
-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].
+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
installing them easy.
```
-[~/puppet-opendaylight]$ sudo yum install -y rubygems ruby-devel gcc-c++ zlib-devel \
- patch redhat-rpm-config make
-[~/puppet-opendaylight]$ gem install bundler
-[~/puppet-opendaylight]$ bundle install
-[~/puppet-opendaylight]$ bundle update
+$ 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
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
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
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
To verify that the Puppet module behaves as desired once applied to a real,
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][14]
-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][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:
+
+```
+$ bundle exec rake cent_6test_vm
+```
+
+To do the same tests in a CentOS container:
```
-[~/puppet-opendaylight]$ bundle exec rake centos
+$ bundle exec rake cent_6test_dock
```
-There are a number of pre-defined rake tasks to simplify running common
-Beaker tests.
+To run VM or container-based tests for all OSs:
```
-[~/puppet-opendaylight]$ bundle exec rake centos_7_docker
-[~/puppet-opendaylight]$ bundle exec rake centos
-[~/puppet-opendaylight]$ bundle exec rake centos_tarball
-[~/puppet-opendaylight]$ bundle exec rake fedora_22
-[~/puppet-opendaylight]$ bundle exec rake ubuntu_1404
-[~/puppet-opendaylight]$ bundle exec rake ubuntu_1404_docker
+$ 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
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][15].
[18]: www.virtualbox.org/wiki/Linux_Downloads
[19]: http://webchat.freenode.net/?channels=opendaylight-integration
+
+[20]: https://docs.docker.com/engine/installation/
- [Deb Repo](#deb-repo)
- [Ports](#ports)
- [Log Verbosity](#log-verbosity)
-- [Enabling ODL OVSDB HA](#enabling-odl-ovsdb-ha)
+- [Enabling ODL HA](#enabling-odl-ha)
5. [Reference ](#reference)
6. [Limitations](#limitations)
Getting started with the OpenDaylight Puppet module is as simple as declaring
the `::opendaylight` class.
-The [vagrant-opendaylight][11] project provides an easy way to experiment
-with [applying the ODL Puppet module][12] to CentOS 7, Fedora 22, Fedora
-23 and Ubuntu 16.04 Vagrant boxes.
+The [vagrant-opendaylight][11] project provides an easy way to experiment with
+[applying the ODL Puppet module][12] to VMs.
```
# Provision a CentOS VM using puppet-opendaylight
$ vagrant up cent7_pup_rpm
$ vagrant ssh cent7_pup_rpm
-[vagrant@localhost ~]$ sudo systemctl is-active opendaylight
+$ sudo systemctl is-active opendaylight
active
```
```puppet
class { 'opendaylight':
- extra_features => ['odl-ovsdb-plugin', 'odl-ovsdb-openstack'],
+ extra_features => ['odl-netvirt-openstack'],
}
```
}
```
-### Enabling ODL OVSDB HA
+### Enabling ODL HA
-To enable ODL OVSDB HA, use the `enable_ha` flag. It's disabled by default.
+To enable ODL HA, use the `enable_ha` flag. It's disabled by default.
When `enable_ha` is set to true the `ha_node_ips` should be populated with the
-IP addresses that ODL will listen on for each node in the OVSDB HA cluster and
+IP addresses that ODL will listen on for each node in the HA cluster and
`ha_node_index` should be set with the index of the IP address from
`ha_node_ips` for the particular node that puppet is configuring as part of the
HA cluster.
##### `enable_ha`
-Enable or disable ODL OVSDB High Availablity.
+Enable or disable ODL High Availablity.
Default: `false`
Requires: `ha_node_ips`, `ha_node_index`
-The ODL OVSDB Clustering XML for HA are configured and enabled.
+The ODL Clustering XML for HA are configured and enabled.
##### `ha_node_ips`
## Limitations
-- Tested on Fedora 22, 23, CentOS 7 and Ubuntu 16.04.
-- CentOS 7 is currently the most stable OS option.
+- Tested on CentOS 7 and Ubuntu 16.04.
+- Fedora is allowed but not well-tested, no Beaker coverage.
## Development
[9]: https://github.com/dfarrell07/opendaylight-systemd/
-[10]: https://github.com/dfarrell07/puppet-opendaylight/blob/master/files/upstart.odl.conf
-
[11]: https://github.com/dfarrell07/vagrant-opendaylight/
[12]: https://github.com/dfarrell07/vagrant-opendaylight/tree/master/manifests
[18]: http://cbs.centos.org/repos/nfv7-opendaylight-40-release/x86_64/os/Packages/ "OpenDaylight Beryllium CentOS CBS repo"
-[19]: https://wiki.opendaylight.org/view/Deployment#RPM "OpenDaylight RPMs and their repos"
+[18]: https://wiki.opendaylight.org/view/Deployment#RPM "OpenDaylight RPMs and their repos"
[20]: https://launchpad.net/~odl-team/+archive/ubuntu/boron