2017-08-14 Release 4.2.0
- Add param to config SNAT mechanism
2017-10-11 Release 5.0.0
-- Only support stateful security mode. Remove all related configs
\ No newline at end of file
+- Only support stateful security mode. Remove all related configs
+2017-11-15 Release 6.0.0
+- Allow full customization of ODL RPM repo
```puppet
class { 'opendaylight':
- rpm_repo => 'opendaylight-61-release',
+ rpm_repo => 'https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-$basearch-devel',
}
```
-The naming convention follows the naming convention of the CentOS Community
-Build System, which is where upstream ODL hosts its RPMs. The
-`opendaylight-61-release` example above would install OpenDaylight Carbon SR1
-6.1.0 from the [nfv7-opendaylight-61-release][2] repo. Repo names ending in
-`-release` will always contain well-tested, officially released versions of
-OpenDaylight. Repos ending in `-testing` contain frequent, but unstable and
-unofficial, releases. The ODL version given in repo names shows which major
-and minor version it is pinned to. The `opendaylight-61-release` repo will
-always provide OpenDaylight Carbon SR1 6.1, whereas `opendaylight-4-release`
-will provide the latest release with major version 6 (which could include
-Service Releases, like SR2 6.2).
+The URL should be formatted like a baseurl in RPM .repo config files. In
+particular, note the $basearch variable, which should be left form the
+package manager (yum, dnf) to populate.
For additional information about ODL RPM repos, see the [Integration/Packaging
RPM repositories documentation][3].
##### `rpm_repo`
-OpenDaylight CentOS CBS repo to install RPM from (opendaylight-6-testing,
-opendaylight-6-release, ...).
+Repo URL to install ODL RPM from, in .repo baseurl format.
##### `deb_repo`
sh "metadata-json-lint metadata.json"
end
-# CentOS VMs
+# CentOS CBS VM
+desc "Beaker tests against CentOS 7 VM with latest Oxygen testing RPM from CentOS CBS repo"
+task :cent_8test_cbs_vm do
+ sh "RS_SET=centos-7 RPM_REPO='http://cbs.centos.org/repos/nfv7-opendaylight-8-testing/$basearch/os/' bundle exec rake beaker"
+end
-desc "Beaker tests against CentOS 7 VM with latest Carbon testing RPM"
-task :cent_6test_vm do
- sh "RS_SET=centos-7 RPM_REPO='opendaylight-7-testing' bundle exec rake beaker"
+# CentOS CBS Container
+desc "Beaker tests against CentOS 7 container with latest Oxygen testing RPM from CentOS CBS repo"
+task :cent_8test_cbs_dock do
+ sh "RS_SET=centos-7-docker RPM_REPO='http://cbs.centos.org/repos/nfv7-opendaylight-8-testing/$basearch/os/' bundle exec rake beaker"
end
-# CentOS Containers
+# CentOS Nexus VM
+desc "Beaker tests against CentOS 7 VM with latest Oxygen testing RPM from ODL Nexus repo"
+task :cent_8test_nexus_vm do
+ sh "RS_SET=centos-7 RPM_REPO='https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-$basearch-devel' bundle exec rake beaker"
+end
-desc "Beaker tests against CentOS 7 container with latest Carbon testing RPM"
-task :cent_6test_dock do
- sh "RS_SET=centos-7-docker RPM_REPO='opendaylight-7-testing' bundle exec rake beaker"
+# CentOS Nexus Container
+desc "Beaker tests against CentOS 7 container with latest Oxygen testing RPM from ODL Nexus repo"
+task :cent_8test_nexus_dock do
+ sh "RS_SET=centos-7-docker RPM_REPO='https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-$basearch-devel' bundle exec rake beaker"
end
# Ubuntu VMs
-
desc "Beaker tests against Ubuntu 16.04 Container with Boron release Deb"
task :ubuntu_6test_vm do
sh "RS_SET=ubuntu-16 DEB_REPO='ppa:odl-team/carbon' bundle exec rake beaker"
end
# Ubuntu Containers
-
desc "Beaker tests against Ubuntu 16.04 Container with Boron release Deb"
task :ubuntu_6test_dock do
sh "RS_SET=ubuntu-16-docker DEB_REPO='ppa:odl-team/carbon' bundle exec rake beaker"
desc "Quick and important tests"
task :sanity=> [
:test,
- :cent_6test_dock,
+ :cent_8test_cbs_dock,
]
+# TODO: Add cent_8test_nexus_vm when INTPAK-10 is fixed
desc "All tests, use VMs for Beaker tests"
task :acceptance_vm => [
:test,
:ubuntu_6test_vm,
- :cent_6test_vm,
+ :cent_8test_cbs_vm,
]
+# TODO: Add cent_8test_nexus_dock when INTPAK-10 is fixed
desc "All tests, use containers for Beaker tests"
task :acceptance_dock => [
:test,
:ubuntu_6test_dock,
- :cent_6test_dock,
+ :cent_8test_cbs_dock,
]
# [*odl_bind_ip *]
# IP for ODL northbound REST interface to bind to.
# [*rpm_repo*]
-# OpenDaylight CentOS CBS repo to install RPM from (opendaylight-4-testing,
-# opendaylight-40-release, ...).
+# Repo URL to install ODL RPM from, in .repo baseurl format.
# [*deb_repo*]
# OpenDaylight Launchpad PPA repo to install .deb from (ppa:odl-team/boron,
# ppa:odl-team/carbon, ...).
$extra_features = []
$odl_rest_port = '8080'
$odl_bind_ip = '0.0.0.0'
- $rpm_repo = 'opendaylight-6-testing'
+ $rpm_repo = 'http://cbs.centos.org/repos/nfv7-opendaylight-8-testing/$basearch/os/'
$deb_repo = 'ppa:odl-team/carbon'
$log_levels = {}
$enable_ha = false
# == Class: opendaylight::repos
#
-# Manages the installation of the OpenDaylight repositories for RedHat and
-# Debian
+# Manages installation of OpenDaylight repositories for RPMs and Debs.
#
# === Parameters
#
# [*deb_repo*]
-# The name of the debppa repo to configure. Ignored if on a RHEL based system.
+# Deb PPA repo to install ODL from. Ignored if on a RPM-based system.
# Defaults to $::opendaylight::deb_repo
#
# [*rpm_repo*]
-# The name of the rpm repo to configure. Ignored if on a Debian based system
+# Repo URL to install ODL RPM from, in .repo baseurl format. Ignored if on a
+# Debian-based system.
# Defaults to $::opendaylight::rpm_repo
#
# [*rpm_repo_enabled*]
-# Flag to indicate if the the rpm repo should be enabled or disabled.
+# Flag to indicate if the the RPM repo should be enabled or disabled.
# Defualts to 1.
#
# [*rpm_repo_gpgcheck*]
-# Flag to indicate if the rpm repo should be configured with gpgcheck.
+# Flag to indicate if the RPM repo should be configured with gpgcheck.
# Defaults to 0.
#
class opendaylight::repos (
) inherits ::opendaylight {
if $::osfamily == 'RedHat' {
# Add OpenDaylight's Yum repository
- yumrepo { $rpm_repo:
- # 'ensure' isn't supported with Puppet <3.5
- # Seems to default to present, but docs don't say
- # https://docs.puppetlabs.com/references/3.4.0/type.html#yumrepo
- # https://docs.puppetlabs.com/references/3.5.0/type.html#yumrepo
- baseurl => "http://cbs.centos.org/repos/nfv7-${rpm_repo}/\$basearch/os/",
+ yumrepo { 'opendaylight':
+ ensure => present,
+ baseurl => $rpm_repo,
descr => 'OpenDaylight SDN Controller',
enabled => $rpm_repo_enabled,
# NB: RPM signing is an active TODO, but is not done. We will enable
{
"name": "opendaylight-opendaylight",
- "version": "5.0.0",
+ "version": "6.0.0",
"author": "Daniel Farrell",
"summary": "Puppet module that installs and configures the OpenDaylight SDN controller",
"license": "BSD-2-Clause",
context "with defaults" do
it { should contain_class('opendaylight::repos') }
it {
- should contain_yumrepo('opendaylight-6-testing').with(
- :baseurl => 'http://cbs.centos.org/repos/nfv7-opendaylight-6-testing/$basearch/os/',
+ should contain_yumrepo('opendaylight').with(
+ :baseurl => 'http://cbs.centos.org/repos/nfv7-opendaylight-8-testing/$basearch/os/',
:enabled => 1,
:gpgcheck => 0,
)
context "with custom rpm repo options" do
let(:params) do
{
- :rpm_repo => 'testing',
+ :rpm_repo => 'foo_fake_repo',
:rpm_repo_enabled => 0,
:rpm_repo_gpgcheck => 1,
}
end
it {
- should contain_yumrepo('testing').with(
- :baseurl => 'http://cbs.centos.org/repos/nfv7-testing/$basearch/os/',
+ should contain_yumrepo('opendaylight').with(
+ :baseurl => 'foo_fake_repo',
:enabled => 0,
:gpgcheck => 1,
)
operatingsystemrelease = '7.0'
operatingsystemmajrelease = '7'
- context 'installing default RPM' do
+ context 'installing from default repo' do
let(:facts) {{
:osfamily => osfamily,
:operatingsystem => operatingsystem,
rpm_install_tests
end
- context 'installing Beryllium RPM' do
- rpm_repo = 'opendaylight-40-release'
+ context 'installing from Nexus repo' do
+ rpm_repo = 'https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-$basearch-devel'
let(:facts) {{
:osfamily => osfamily,
:operatingsystem => operatingsystem,
def rpm_install_tests(options = {})
# Extract params
- rpm_repo = options.fetch(:rpm_repo, 'opendaylight-6-testing')
+ rpm_repo = options.fetch(:rpm_repo, 'http://cbs.centos.org/repos/nfv7-opendaylight-8-testing/$basearch/os/')
java_opts = options.fetch(:java_opts, '-Djava.net.preferIPv4Stack=true')
# Default to CentOS 7 Yum repo URL
# Confirm presence of RPM-related resources
- it { should contain_yumrepo(rpm_repo) }
+ it { should contain_yumrepo('opendaylight') }
it { should contain_package('opendaylight') }
# Confirm relationships between RPM-related resources
- it { should contain_package('opendaylight').that_requires("Yumrepo[#{rpm_repo}]") }
- it { should contain_yumrepo(rpm_repo).that_comes_before('Package[opendaylight]') }
+ it { should contain_package('opendaylight').that_requires('Yumrepo[opendaylight]') }
+ it { should contain_yumrepo('opendaylight').that_comes_before('Package[opendaylight]') }
# Confirm properties of RPM-related resources
# NB: These hashes don't work with Ruby 1.8.7, but we
# don't support 1.8.7 so that's okay. See issue #36.
it {
- should contain_yumrepo(rpm_repo).with(
+ should contain_yumrepo('opendaylight').with(
'enabled' => '1',
'gpgcheck' => '0',
'descr' => 'OpenDaylight SDN Controller',
- 'baseurl' => "http://cbs.centos.org/repos/nfv7-#{rpm_repo}/$basearch/os/",
+ 'baseurl' => "#{rpm_repo}",
)
}
it {
def unsupported_os_tests(options = {})
# Extract params
expected_msg = options.fetch(:expected_msg)
- rpm_repo = options.fetch(:rpm_repo, 'opendaylight-6-testing')
+ rpm_repo = options.fetch(:rpm_repo, 'http://cbs.centos.org/repos/nfv7-opendaylight-8-testing/$basearch/os/')
# Confirm that classes fail on unsupported OSs
it { expect { should contain_class('opendaylight') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
it { expect { should contain_class('opendaylight::service') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
# Confirm that other resources fail on unsupported OSs
- it { expect { should contain_yumrepo(rpm_repo) }.to raise_error(Puppet::Error, /#{expected_msg}/) }
+ it { expect { should contain_yumrepo('opendaylight') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
it { expect { should contain_package('opendaylight') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
it { expect { should contain_service('opendaylight') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
it { expect { should contain_file('org.apache.karaf.features.cfg') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
# class, which are defined in opendaylight::params
# TODO: Remove this possible source of bugs^^
# Extract params if given, defaulting to odl class defaults if not
- extra_features = options.fetch(:extra_features, [])
+ extra_features = options.fetch(:extra_features, ['odl-restconf'])
default_features = options.fetch(:default_features, ['standard', 'wrap', 'ssh'])
odl_rest_port = options.fetch(:odl_rest_port, 8080)
odl_bind_ip = options.fetch(:odl_bind_ip, '0.0.0.0')
def rpm_validations()
rpm_repo = ENV['RPM_REPO']
- describe yumrepo(rpm_repo) do
+ describe yumrepo('opendaylight') do
it { should exist }
it { should be_enabled }
end