Simplify manifests

Installation the VMware_dvs driver to /usr/bin and
/usr/lib/python2.7/dist-packages provides simplifying manifests,
removes some stuff and reduces amount of actions.

Also by prebuild hook the fuel plugin builder will build and put in the
plugin the latest verstion of driver from github repo.

Change-Id: I548f4a6d0ac4b4725befb27e812546333833a8d9
This commit is contained in:
Igor Gajsin 2016-02-24 15:41:19 +03:00
parent 3b60a234dd
commit 7c7ae2b96a
9 changed files with 36 additions and 55 deletions

View File

@ -22,15 +22,12 @@ $vsphere_password = $computes['vc_password']
$neutron = hiera_hash('neutron_config', {})
$py_root = '/usr/lib/python2.7/dist-packages'
$ml2_driver_path = 'neutron/plugins/ml2/drivers/vmware_dvs'
$ml2_plugin_path = 'neutron/cmd/eventlet/plugins/dvs_neutron_agent.py'
$driver_path = "${py_root}/${ml2_driver_path}"
$plugin_path = "${py_root}/${ml2_plugin_path}"
class {'::vmware_dvs':
vsphere_hostname => $vsphere_hostname,
vsphere_login => $vsphere_login,
vsphere_password => $vsphere_password,
driver_path => $driver_path,
plugin_path => $plugin_path,
}

View File

@ -1,10 +0,0 @@
#!/usr/bin/python
# PBR Generated from u'console_scripts'
import sys
from neutron.cmd.eventlet.plugins.dvs_neutron_agent import main
if __name__ == "__main__":
sys.exit(main())

View File

@ -62,10 +62,10 @@ define vmware_dvs::agent(
$ocf_pid = "${ocf_pid_dir}/${agent_name}.pid"
if $use_fw_driver {
$fw_driver = 'mech_vmware_dvs.agentDVS.vCenter_firewall.DVSFirewallDriver'
$fw_driver = 'vmware_dvs.agent.firewalls.vcenter_firewall.DVSFirewallDriver'
}
else {
$fw_driver = 'mech_vmware_dvs.agentDVS.noop.vCenterNOOP'
$fw_driver = 'vmware_dvs.agent.firewalls.noop_firewall.NoopvCenterFirewallDriver'
}

View File

@ -40,47 +40,31 @@ class vmware_dvs(
$vsphere_hostname = '192.168.0.1',
$vsphere_login = 'administrator@vsphere.loc',
$vsphere_password = 'StrongPassword!',
$driver_path = 'neutron/plugins/ml2/drivers/vmware_dvs',
$plugin_path = 'neutron/cmd/eventlet/plugins/dvs_neutron_agent.py',
)
{
package { ['python-suds','python-vmware-dvs']:
ensure => present,
}->
file {'/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/vmware_dvs':
ensure => 'link',
target => '/usr/lib/python2.7/dist-packages/vmware_dvs'
}
file {'dvs_neutron_agent.py':
path => $plugin_path,
source => 'puppet:///modules/vmware_dvs/dvs_neutron_agent.py',
}
neutron_config {
'DEFAULT/notification_driver': value => 'messagingv2';
}->
neutron_plugin_ml2 {
'ml2_vmware/vsphere_hostname': value => $vsphere_hostname;
'ml2_vmware/vsphere_login': value => $vsphere_login;
'ml2_vmware/vsphere_password': value => $vsphere_password;
} ->
package { ['python-suds','python-vmware-dvs']:
ensure => present,
}->
file {$driver_path:
ensure => 'link',
target => '/usr/local/lib/python2.7/dist-packages/vmware_dvs',
}
file {'dvs_neutron_agent.py':
path => $plugin_path,
source => 'puppet:///modules/vmware_dvs/dvs_neutron_agent.py',
}
file {'neutron-dvs-agent':
path => '/usr/bin/neutron-dvs-agent',
source => 'puppet:///modules/vmware_dvs/neutron-dvs-agent',
owner => 'root',
group => 'root',
mode => '0755',
require => Package['python-vmware-dvs'],
}->
file {'/usr/local/bin/neutron-dvs-agent':
ensure => 'link',
target => '/usr/bin/neutron-dvs-agent',
}
file {'/etc/neutron/plugin.ini':
ensure => 'link',
target => '/etc/neutron/plugins/ml2/ml2_conf.ini',
}
}
neutron_plugin_ml2 {
'ml2_vmware/vsphere_hostname': value => $vsphere_hostname;
'ml2_vmware/vsphere_login': value => $vsphere_login;
'ml2_vmware/vsphere_password': value => $vsphere_password;
}
file {'/etc/neutron/plugin.ini':
ensure => 'link',
target => '/etc/neutron/plugins/ml2/ml2_conf.ini',
}
}

View File

@ -18,7 +18,7 @@ PROJECT_NAME=neutron
NAME=${PROJECT_NAME}-vmware-dvs-agent
CONFIG_FILE=<%= @agent_config %>
DAEMON=/usr/local/bin/neutron-dvs-agent
DAEMON=/usr/bin/neutron-dvs-agent
DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/ml2/ml2_conf.ini"
#!/bin/sh
# The content after this line comes from openstack-pkg-tools

View File

@ -33,6 +33,6 @@ script
[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=<%= @agent_log %>"
exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/local/bin/neutron-dvs-agent -- \
exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-dvs-agent -- \
--config-file=/etc/neutron/neutron.conf $CONF_ARG $DAEMON_ARGS
end script

View File

@ -1 +1,11 @@
#!/usr/bin/env sh
rm repositories/ubuntu/python-vmware-dvs*
git clone git@github.com:Mirantis/vmware-dvs.git
cd vmware-dvs
make
cp *.deb ../repositories/ubuntu
cd ..
rm -rf vmware-dvs