diff options
Diffstat (limited to 'testing/puppet-fdio/manifests/vpp')
-rw-r--r-- | testing/puppet-fdio/manifests/vpp/config.pp | 18 | ||||
-rw-r--r-- | testing/puppet-fdio/manifests/vpp/install.pp | 18 | ||||
-rw-r--r-- | testing/puppet-fdio/manifests/vpp/service.pp | 20 |
3 files changed, 56 insertions, 0 deletions
diff --git a/testing/puppet-fdio/manifests/vpp/config.pp b/testing/puppet-fdio/manifests/vpp/config.pp new file mode 100644 index 0000000..96c3497 --- /dev/null +++ b/testing/puppet-fdio/manifests/vpp/config.pp @@ -0,0 +1,18 @@ +# == Class fdio::vpp::config +# +# This class handles vpp config changes. +# +class fdio::vpp::config ( + $dpdk_pmd_type = $::fdio::params::dpdk_pmd_type, + $dpdk_pci_devs = $::fdio::params::dpdk_pci_devs, +){ + file { '/etc/vpp/startup.conf': + content => template('fdio/startup.conf.erb'), + } + + # ensure that uio-pci-generic is loaded + exec { 'modprobe uio-pci-generic': + unless => 'lsmod | grep uio-pci-generic', + path => '/bin:/sbin', + } +} diff --git a/testing/puppet-fdio/manifests/vpp/install.pp b/testing/puppet-fdio/manifests/vpp/install.pp new file mode 100644 index 0000000..3ae4f87 --- /dev/null +++ b/testing/puppet-fdio/manifests/vpp/install.pp @@ -0,0 +1,18 @@ +# == Class fdio::vpp::install +# +# Manages the installation of vpp. +# +class fdio::vpp::install ( + $install_method = $::fdio::params::install_method, +) inherits fdio::install { + if $install_method == 'rpm' { + # Install the VPP RPM + package { 'vpp': + ensure => present, + require => Yumrepo['fdio-master'], + } + } + else { + fail("Unknown install method: ${fdio::install_method}") + } +} diff --git a/testing/puppet-fdio/manifests/vpp/service.pp b/testing/puppet-fdio/manifests/vpp/service.pp new file mode 100644 index 0000000..7453695 --- /dev/null +++ b/testing/puppet-fdio/manifests/vpp/service.pp @@ -0,0 +1,20 @@ +# == Class fdio::vpp::service +# +# Starts the VPP systemd or Upstart service. +# +class fdio::vpp::service { + # TODO + # bring interfaces down before service start + # so vpp can bind + service { 'vpp': + ensure => running, + enable => true, + hasstatus => true, + hasrestart => true, + } + # TODO + #sudo vppctl set interface ip address TenGigabitEthernet7/0/0 192.168.21.21/24 + #sudo vppctl set interface state TenGigabitEthernet7/0/0 up + + +} |