RPM
Automatically package every autorelease build
RPM
Daily latest-snapshot builds
RPM
Host on the CentOS Community Build System
RPM
Latest in [5,6]-testing repos
RPM
[opendaylight-6-testing]
name=CentOS CBS OpenDaylight Carbon testing repository
baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-6-testing/$basearch/os/
enabled=1
gpgcheck=0
RPM
Install ODL's repo
[~]$ sudo curl -o /etc/yum.repos.d/opendaylight-6-testing.repo \
<URL to repo config>
RPM
Install ODL
[~]$ sudo yum install -y opendaylight
<snip>
Installed:
opendaylight.noarch 0:6.0.0-0.1.20170405snap4741.el7
Complete!
RPM
Latest branch release/SR in [4,5]-release
RPM
Static releases/SRs in [50,51,52]-release
RPM
Manage service with systemd
[~]$ sudo systemctl start opendaylight
[~]$ sudo systemctl is-active opendaylight
active
RPM
Connect to Karaf shell, install features
$ ssh -p 8101 karaf@localhost
opendaylight-user@root>feature:install ...
Puppet
IPR underway to import into ODL-managed repos
Puppet
Well-developed API
class opendaylight::params {
$default_features = ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management']
$extra_features = []
$odl_rest_port = '8080'
$odl_bind_ip = '0.0.0.0'
$rpm_repo = 'opendaylight-6-testing'
$deb_repo = 'ppa:odl-team/boron'
$log_levels = {}
$enable_ha = false
$ha_node_ips = []
$ha_node_index = 0
$security_group_mode = 'stateful'
$vpp_routing_node = ''
$java_opts = '-Djava.net.preferIPv4Stack=true'
$manage_repositories = true
$username = 'admin'
$password = 'admin'
}
PUPPET
Syntax, rspec-puppet, Puppet linting
desc "Run syntax, lint, and spec tests."
task :test => [
:syntax,
:lint,
:metadata_lint,
:spec,
]
PUPPET
Coala linting
Executing section git...
Executing section spacing...
Executing section markdown...
Executing section rest...
Executing section yaml...
Executing section json...
Executing section xml...
Puppet
Beaker system testing
Puppet
Deploy against real containers/VMs
Puppet
Verify resulting state
Puppet
Repeat for various configs
Puppet
At a high level...
Puppet
Bringing machine 'centos-7' up with 'libvirt' provider...
centos-7 12:45:09$ yum install -y puppet
Puppet
centos-7 12:45:46$ puppet apply <test manifest>
Puppet
centos-7 12:49:37$ /bin/sh -c systemctl\ is-active\ opendaylight
active
centos-7 executed in 0.04 seconds
should be running
Puppet
centos-7 12:49:37$ /bin/sh -c id\ odl
uid=1001(odl) gid=1001(odl) groups=1001(odl)
centos-7 executed in 0.04 seconds
should exist
Puppet
centos-7 executed in 0.05 seconds
should match /^featuresBoot=standard,ssh/
Puppet
Finished in 5 minutes 22 seconds (files took 1 minute 10.87 seconds to load)
132 examples, 0 failures
Puppet
Beaker is pretty great
Puppet
Daily tests in ODL CI
Puppet
desc "All tests, use containers for Beaker tests"
task :acceptance_dock => [
:cent_5rel_dock,
:ubuntu_5rel_dock,
:cent_5test_dock,
:cent_6test_dock,
]
desc "All tests, use VMs for Beaker tests"
task :acceptance_vm => [
:cent_5rel_vm,
:ubuntu_5rel_vm,
:cent_5test_vm,
:cent_6test_vm,
]
Ansible
IPR underway to import into ODL-managed repos
Ansible
Good OS support
(CentOS, Fedora, Ubuntu 16.04)
Ansible
Daily tests in ODL CI
Ansible
Example: Vagrant provisioner
Ansible
At a high level...
Ansible
# Box that installs ODL via its Ansible role on CentOS 7
config.vm.define "cent7_ansible" do |cent7_ansible|
# Build Vagrant box based on CentOS 7
cent7_ansible.vm.box = "centos/7"
# Install ODL using the Ansible provisioner
cent7_ansible.vm.provision "ansible" do |ansible|
# Path to Ansible playbook that installs ODL using ODL's Ansible role
ansible.playbook = "provisioning/playbook.yml"
end
end
Ansible
ansible.playbook = "provisioning/playbook.yml"
ansible
Provision the box
Ansible
[~/vagrant-opendaylight]$ vagrant up cent7_ansible
ansible
At a high level...
Ansible
TASK: [opendaylight | Add ODL yum repo] **********************************
changed: [cent7_ansible]
TASK: [opendaylight | Install ODL via RPM repo] **************************
changed: [cent7_ansible]
Ansible
TASK: [opendaylight | Check if FirewallD service is running] *************
ok: [cent7_ansible]
TASK: [opendaylight | Open ODL NB REST port via FirewallD] ***************
skipping: [cent7_ansible]
Ansible
TASK: [opendaylight | Start ODL systemd service] *************************
changed: [cent7_ansible]
Ansible
[~/vagrant-opendaylight]$ vagrant ssh cent7_ansible
[vagrant@localhost ~]$
Ansible
[vagrant@localhost ~]$ sudo systemctl is-active opendaylight
active
Ansible
Example: Config change
Ansible
[~/vagrant-opendaylight]$ cat provisioning/playbook.yml
---
- hosts: all
sudo: yes
roles:
- role: opendaylight
extra_features: ['odl-netvirt-openstack']
Ansible
[~/vagrant-opendaylight]$ vagrant provision cent7_ansible
ansible
At a high level...
Ansible
TASK: [opendaylight | Configure ODL Karaf features] **********************
changed: [cent7_ansible]
Ansible
NOTIFIED: [opendaylight | Stop ODL] **************************************
changed: [cent7_ansible]
NOTIFIED: [opendaylight | Cleanup Karaf] *********************************
changed: [cent7_ansible]
NOTIFIED: [opendaylight | Start ODL] *************************************
changed: [cent7_ansible]
Ansible
[~/vagrant-opendaylight]$ vagrant ssh cent7_ansible
Ansible
[vagrant@localhost ~]$ sudo systemctl is-active opendaylight
active
Ansible
[vagrant@localhost ~]$ ssh -p 8101 karaf@localhost
# password "karaf"
Ansible
opendaylight-user@root>feature:list | grep odl-netvirt-openstack
odl-netvirt-openstack | 0.3.0-Boron | x | <snip>