Skip to content

Commit 8355b01

Browse files
authored
Merge pull request #131 from AkshitaJha/master
Add .deb support to puppet-opendaylight
2 parents 46caef4 + 0ec1cc5 commit 8355b01

File tree

13 files changed

+285
-531
lines changed

13 files changed

+285
-531
lines changed

.fixtures.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
fixtures:
33
repositories:
44
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
5+
apt: "https://github.com/puppetlabs/puppetlabs-apt.git"
56
archive: "https://github.com/dfarrell07/puppet-archive"
67
java: "https://github.com/puppetlabs/puppetlabs-java"
78
symlinks:

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212
- PUPPET_VERSION="~> 4.6.0"
1313
- PUPPET_VERSION="~> 4.7.0"
1414
- PUPPET_VERSION="~> 4.8.0"
15+
- PUPPET_VERSION="~> 4.9.0"
1516
matrix:
1617
exclude:
1718
- rvm: 2.4.0

README.markdown

Lines changed: 81 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
- [Beginning with `opendaylight`](#beginning-with-opendaylight)
1313
4. [Usage](#usage)
1414
- [Karaf Features](#karaf-features)
15-
- [Install Method](#install-method)
1615
- [RPM Repo](#rpm-repo)
16+
- [Deb Repo](#deb-repo)
1717
- [Ports](#ports)
1818
- [Log Verbosity](#log-verbosity)
1919
- [Enabling ODL OVSDB HA](#enabling-odl-ovsdb-ha)
@@ -29,16 +29,15 @@ Networking (SDN) controller][7].
2929

3030
## Module Description
3131

32-
Deploys OpenDaylight to various OSs either via an RPM or directly from the
33-
ODL tarball release artifact.
32+
Deploys OpenDaylight to various OSs either via an RPM or a Deb.
3433

3534
All OpenDaylight configuration should be handled through the ODL Puppet
3635
module's [params](#parameters). If you need a new knob, [please raise an
3736
Issue][8].
3837

39-
The master branch installs OpenDaylight from the latest testing RPM repository
40-
by default. There are stable/<release> branches that install OpenDaylight
41-
releases and service releases, like Beryllium or Beryllium SR3.
38+
By default, the master branch installs OpenDaylight from the latest testing RPM repository
39+
or from the latest stable Deb repository depending on the OS. There are stable/<release>
40+
branches that install OpenDaylight releases and service releases, like Beryllium or Beryllium SR3.
4241

4342
## Setup
4443

@@ -47,45 +46,59 @@ releases and service releases, like Beryllium or Beryllium SR3.
4746
- Installs Java, which is required by ODL.
4847
- Creates `odl:odl` user:group if they don't already exist.
4948
- Installs [OpenDaylight][7].
50-
- Installs a [systemd unitfile][9] or [Upstart config file][10] for
51-
OpenDaylight.
49+
- Installs a [systemd unitfile][9] for OpenDaylight.
5250
- Manipulates OpenDaylight's configuration files according to the params
5351
passed to the `::opendaylight` class.
54-
- Starts the `opendaylight` systemd or Upstart service.
52+
- Starts the `opendaylight` systemd service.
5553

5654
### Beginning with `opendaylight`
5755

5856
Getting started with the OpenDaylight Puppet module is as simple as declaring
5957
the `::opendaylight` class.
6058

6159
The [vagrant-opendaylight][11] project provides an easy way to experiment
62-
with [applying the ODL Puppet module][12] to CentOS 7, Fedora 22 and Fedora
63-
23 Vagrant boxes.
60+
with [applying the ODL Puppet module][12] to CentOS 7, Fedora 22, Fedora
61+
23 and Ubuntu 16.04 Vagrant boxes.
6462

6563
```
6664
[~/vagrant-opendaylight]$ vagrant status
6765
Current machine states:
6866
69-
cent7 not created (libvirt)
70-
cent7_rpm_he_sr4 not created (libvirt)
71-
cent7_rpm_li_sr2 not created (libvirt)
72-
cent7_rpm_be not created (libvirt)
73-
cent7_ansible not created (libvirt)
74-
cent7_ansible_be not created (libvirt)
75-
cent7_ansible_path not created (libvirt)
76-
cent7_pup_rpm not created (libvirt)
77-
cent7_pup_custom_logs not created (libvirt)
78-
cent7_pup_tb not created (libvirt)
79-
f22_rpm_li not created (libvirt)
80-
f22_ansible not created (libvirt)
81-
f22_pup_rpm not created (libvirt)
82-
f23_rpm_li not created (libvirt)
83-
f23_rpm_li_sr1 not created (libvirt)
84-
f23_rpm_li_sr2 not created (libvirt)
85-
f23_rpm_li_sr3 not created (libvirt)
86-
f23_rpm_be not created (libvirt)
87-
f23_ansible not created (libvirt)
88-
f23_pup_rpm not created (libvirt)
67+
cent7_li_sr4 not created (virtualbox)
68+
cent7_be not created (virtualbox)
69+
cent7_be_sr1 not created (virtualbox)
70+
cent7_be_sr2 not created (virtualbox)
71+
cent7_rpm_he_sr4 not created (virtualbox)
72+
cent7_rpm_li_sr2 not created (virtualbox)
73+
cent7_rpm_li_sr3 not created (virtualbox)
74+
cent7_rpm_be not created (virtualbox)
75+
cent7_rpm_be_sr1 not created (virtualbox)
76+
cent7_rpm_be_sr2 not created (virtualbox)
77+
cent7_rpm_ve_latest not created (virtualbox)
78+
cent7_ansible not created (virtualbox)
79+
cent7_ansible_latest not created (virtualbox)
80+
cent7_ansible_path not created (virtualbox)
81+
cent7_pup_rpm not created (virtualbox)
82+
cent7_pup_custom_logs not created (virtualbox)
83+
cent7_pup_enable_l3 not created (virtualbox)
84+
cent7_pup_tb not created (virtualbox)
85+
f22_rpm_li not created (virtualbox)
86+
f22_ansible not created (virtualbox)
87+
f22_pup_rpm not created (virtualbox)
88+
f23_rpm_li not created (virtualbox)
89+
f23_rpm_li_sr1 not created (virtualbox)
90+
f23_rpm_li_sr2 not created (virtualbox)
91+
f23_rpm_li_sr3 not created (virtualbox)
92+
f23_rpm_be not created (virtualbox)
93+
f23_rpm_be_rel not created (virtualbox)
94+
f23_rpm_be_latest not created (virtualbox)
95+
f23_ansible not created (virtualbox)
96+
f23_pup_rpm not created (virtualbox)
97+
debian8_ansible_repo not created (virtualbox)
98+
debian8_ansible_path not created (virtualbox)
99+
ubuntu16_ansible_repo not created (virtualbox)
100+
ubuntu16_ansible_path not created (virtualbox)
101+
ubuntu16_pup_deb not created (virtualbox)
89102
90103
[~/vagrant-opendaylight]$ vagrant up cent7_pup_rpm
91104
# A CentOS 7 VM is created and configured using the ODL Puppet mod's defaults
@@ -128,30 +141,6 @@ class { 'opendaylight':
128141
}
129142
```
130143

131-
### Install Method
132-
133-
The `install_method` param, and the associated `tarball_url` and `unitfile_url`
134-
params, are intended for use by developers who need to install a custom-built
135-
version of OpenDaylight, or for automated build processes that need to consume
136-
a tarball build artifact.
137-
138-
It's recommended that most people use the default RPM-based install.
139-
140-
If you do need to install from a tarball, simply pass `tarball` as the value
141-
for `install_method` and optionally pass the URL to your tarball via the
142-
`tarball_url` param. The default value for `tarball_url` points at
143-
OpenDaylight's latest release. The `unitfile_url` param points at the
144-
OpenDaylight systemd .service file used by the RPM and should (very likely)
145-
not need to be overridden.
146-
147-
```puppet
148-
class { 'opendaylight':
149-
install_method => 'tarball',
150-
tarball_url => '<URL to your custom tarball>',
151-
unitfile_url => '<URL to your custom unitfile>',
152-
}
153-
```
154-
155144
### RPM Repo
156145

157146
The `rpm_repo` param can be used to configure which RPM repository
@@ -178,7 +167,26 @@ Service Releases, like SR2 4.2).
178167
For a full list of OpenDaylight releases and their CBS repos, see the
179168
[OpenDaylight Deployment wiki][19].
180169

181-
This is only read when `install_method` is `rpm`.
170+
This is only read for RedHat based operating systems. For Debian based OSs,
171+
this values is `none`.
172+
173+
### Deb Repo
174+
175+
The `deb_repo` param can be used to configure which Deb repository
176+
OpenDaylight is installed from.
177+
178+
```puppet
179+
class { 'opendaylight':
180+
deb_repo => 'ppa:odl-team/boron',
181+
}
182+
```
183+
184+
The naming convention is same as the naming convention of Launchpad PPA's,
185+
which is where ODL .debs are hosted. The `ppa:odl-team/boron` example above
186+
would install OpenDaylight Boron realease from the [odl-team's boron][20] repo.
187+
188+
This is only read for Debian based operating systems. For RedHat based OSs,
189+
this values is `none`.
182190

183191
### Ports
184192

@@ -232,7 +240,7 @@ class { 'opendaylight':
232240
#### Private classes
233241

234242
- `::opendaylight::params`: Contains default `opendaylight` class param values.
235-
- `::opendaylight::install`: Installs ODL from an RPM or tarball.
243+
- `::opendaylight::install`: Installs ODL from an RPM or a Deb.
236244
- `::opendaylight::config`: Manages ODL config, including Karaf features and
237245
REST port.
238246
- `::opendaylight::service`: Starts the OpenDaylight service.
@@ -261,17 +269,6 @@ Default: `[]`
261269

262270
Valid options: A list of Karaf feature names as strings.
263271

264-
##### `install_method`
265-
266-
Specifies the install method by which to install OpenDaylight.
267-
268-
The RPM install method is less complex, more frequently consumed and
269-
recommended.
270-
271-
Default: `'rpm'`
272-
273-
Valid options: The strings `'tarball'` or `'rpm'`.
274-
275272
##### `odl_rest_port`
276273

277274
Specifies the port for the ODL northbound REST interface to listen on.
@@ -280,6 +277,16 @@ Default: `'8080'`
280277

281278
Valid options: A valid port number as a string or integer.
282279

280+
##### `rpm_repo`
281+
282+
OpenDaylight CentOS CBS repo to install RPM from (opendaylight-4-testing,
283+
opendaylight-40-release, ...).
284+
285+
##### `deb_repo`
286+
287+
OpenDaylight Launchpad PPA repo to install .deb from (ppa:odl-team/boron,
288+
ppa:odl-team/carbon, ...).
289+
283290
##### `log_levels`
284291

285292
Custom OpenDaylight logger verbosity configuration.
@@ -350,27 +357,6 @@ Valid options: Index of a member of the array `ha_node_ips`: `0`.
350357

351358
Required by: `enable_ha`, `ha_node_ips`
352359

353-
##### `tarball_url`
354-
355-
Specifies the ODL tarball to use when installing via the tarball install
356-
method.
357-
358-
Default: `'https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.3.2-Lithium-SR2/distribution-karaf-0.3.2-Lithium-SR2.tar.gz'`
359-
360-
Valid options: A valid URL to an ODL tarball as a string.
361-
362-
##### `unitfile_url`
363-
364-
Specifies the ODL systemd .service file to use when installing via the tarball
365-
install method.
366-
367-
It's very unlikely that you'll need to override this.
368-
369-
Default: `'https://github.com/dfarrell07/opendaylight-systemd/archive/master/opendaylight-unitfile.tar.gz'`
370-
371-
Valid options: A valid URL to an ODL systemd .service file (archived in a
372-
tarball) as a string.
373-
374360
##### `security_group_mode`
375361

376362
Specifies the mode to use for security groups.
@@ -398,10 +384,8 @@ Valid options: A string of valid Java options.
398384

399385
## Limitations
400386

401-
- Tested on Fedora 22, 23, CentOS 7 and Ubuntu 14.04.
387+
- Tested on Fedora 22, 23, CentOS 7 and Ubuntu 16.04.
402388
- CentOS 7 is currently the most stable OS option.
403-
- The RPM install method is likely more reliable than the tarball install
404-
method.
405389

406390
## Development
407391

@@ -445,5 +429,8 @@ See our [git commit history][17] for contributor information.
445429

446430
[17]: https://github.com/dfarrell07/puppet-opendaylight/commits/master
447431

448-
[18]&#x3A; <http://cbs.centos.org/repos/nfv7-opendaylight-40-release/x86_64/os/Packages/> OpenDaylight Beryllium CentOS CBS repo
449-
[19]&#x3A; <https://wiki.opendaylight.org/view/Deployment#RPM> OpenDaylight RPMs and their repos
432+
[18]: <http://cbs.centos.org/repos/nfv7-opendaylight-40-release/x86_64/os/Packages/> "OpenDaylight Beryllium CentOS CBS repo"
433+
434+
[19]: <https://wiki.opendaylight.org/view/Deployment#RPM> "OpenDaylight RPMs and their repos"
435+
436+
[20]: https://launchpad.net/~odl-team/+archive/ubuntu/boron

Rakefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,21 @@ task :cent_5rel_dock do
8282
sh "RS_SET=centos-7-docker INSTALL_METHOD=rpm RPM_REPO='opendaylight-5-release' bundle exec rake beaker"
8383
end
8484

85+
# Ubuntu VMs
86+
87+
desc "Beaker tests against Ubuntu 16.04 VM with Boron release Deb"
88+
task :ubuntu_5rel_vm do
89+
sh "RS_SET=ubuntu-16 INSTALL_METHOD=deb DEB_REPO='ppa:odl-team/boron' bundle exec rake beaker"
90+
end
91+
92+
# Ubuntu Containers
93+
94+
desc "Beaker tests against Ubuntu 16.04 Container with Boron release Deb"
95+
task :ubuntu_5rel_dock do
96+
sh "RS_SET=ubuntu-16-docker INSTALL_METHOD=deb DEB_REPO='ppa:odl-team/boron' bundle exec rake beaker"
97+
end
98+
99+
85100
# Multi-test helpers
86101

87102
desc "Run syntax, lint, and spec tests."
@@ -103,6 +118,7 @@ desc "All tests, use VMs for Beaker tests"
103118
task :acceptance_vm => [
104119
:test,
105120
:cent_5rel_vm,
121+
:ubuntu_5rel_vm,
106122
:cent_5test_vm,
107123
:cent_6test_vm,
108124
]
@@ -111,6 +127,7 @@ desc "All tests, use containers for Beaker tests"
111127
task :acceptance_dock => [
112128
:test,
113129
:cent_5rel_dock,
130+
:ubuntu_5rel_dock,
114131
:cent_5test_dock,
115132
:cent_6test_dock,
116133
]

manifests/init.pp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@
1212
# Port for ODL northbound REST interface to listen on.
1313
# [*odl_bind_ip *]
1414
# IP for ODL northbound REST interface to bind to.
15-
# [*install_method *]
16-
# How to install OpenDaylight. Current options are "rpm" and "tarball",
17-
# default is RPM.
1815
# [*rpm_repo*]
1916
# OpenDaylight CentOS CBS repo to install RPM from (opendaylight-4-testing,
2017
# opendaylight-40-release, ...).
21-
# [*tarball_url*]
22-
# If installing from a tarball, use this one. Defaults to latest ODL.
23-
# [*unitfile_url*]
24-
# OpenDaylight .service file to use for tarball installs. Defaults to one
25-
# used by ODL RPM.
18+
# [*deb_repo*]
19+
# OpenDaylight Launchpad PPA repo to install .deb from (ppa:odl-team/boron,
20+
# ppa:odl-team/carbon, ...).
2621
# [*log_levels*]
2722
# Custom OpenDaylight logger verbosity configuration (TRACE, DEBUG, INFO, WARN, ERROR).
2823
# [*enable_ha*]
@@ -44,10 +39,8 @@
4439
$extra_features = $::opendaylight::params::extra_features,
4540
$odl_rest_port = $::opendaylight::params::odl_rest_port,
4641
$odl_bind_ip = $::opendaylight::params::odl_bind_ip,
47-
$install_method = $::opendaylight::params::install_method,
4842
$rpm_repo = $::opendaylight::params::rpm_repo,
49-
$tarball_url = $::opendaylight::params::tarball_url,
50-
$unitfile_url = $::opendaylight::params::unitfile_url,
43+
$deb_repo = $::opendaylight::params::deb_repo,
5144
$log_levels = $::opendaylight::params::log_levels,
5245
$enable_ha = $::opendaylight::params::enable_ha,
5346
$ha_node_ips = $::opendaylight::params::ha_node_ips,
@@ -89,9 +82,9 @@
8982
}
9083
}
9184
ubuntu: {
92-
if $::operatingsystemmajrelease != '14.04' {
93-
# Only tested on 14.04
94-
fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemmajrelease}")
85+
if $::operatingsystemrelease < '16.04' {
86+
# Only tested on 16.04
87+
fail("Unsupported OS: ${::operatingsystem} ${::operatingsystemrelease}")
9588
}
9689
}
9790
default: {

0 commit comments

Comments
 (0)