From 1c1ab2c5aaee0a07e4c77cc6a72d8b491d714c70 Mon Sep 17 00:00:00 2001 From: Nikita Koshikov Date: Wed, 8 Apr 2015 15:08:11 +0300 Subject: [PATCH] Fixes for Centos support added Change-Id: I8406b7daa5fc667edbe827f65de2d71aed629126 --- .../puppet/modules/apic/manifests/params.pp | 11 ++++++++--- .../puppet/modules/gbp/manifests/heat.pp | 2 +- .../puppet/modules/gbp/manifests/horizon.pp | 17 +++++++++++++++-- .../puppet/modules/gbp/manifests/params.pp | 6 ++++++ .../puppet/modules/horizon/manifests/params.pp | 2 +- .../modules/neutron/manifests/config_apic.pp | 6 +++++- environment_config.yaml | 4 ++++ metadata.yaml | 2 +- 8 files changed, 41 insertions(+), 9 deletions(-) diff --git a/deployment_scripts/puppet/modules/apic/manifests/params.pp b/deployment_scripts/puppet/modules/apic/manifests/params.pp index ac59e53..12dd496 100644 --- a/deployment_scripts/puppet/modules/apic/manifests/params.pp +++ b/deployment_scripts/puppet/modules/apic/manifests/params.pp @@ -1,14 +1,19 @@ #Class apic::params class apic::params { + $package_apic_api = 'python-apicapi' + $package_apic_svc = 'neutron-driver-apic-svc' + $package_apic_agent = 'neutron-driver-apic-agent' + $service_apic_svc_agent = 'neutron-apic-service-agent' + $service_apic_host_agent = 'neutron-apic-host-agent' + case $::osfamily { 'RedHat': { + $service_apic_svc_agent = 'neutron-apic-service-agent' + $service_apic_host_agent = 'neutron-apic-host-agent' } 'Debian': { - $package_apic_svc = 'neutron-driver-apic-svc' - $package_apic_agent = 'neutron-driver-apic-agent' - $package_apic_api = 'python-apicapi' $service_apic_svc_agent = 'neutron-driver-apic-svc' $service_apic_host_agent = 'neutron-driver-apic-agent' } diff --git a/deployment_scripts/puppet/modules/gbp/manifests/heat.pp b/deployment_scripts/puppet/modules/gbp/manifests/heat.pp index 366a1cb..48f62f6 100644 --- a/deployment_scripts/puppet/modules/gbp/manifests/heat.pp +++ b/deployment_scripts/puppet/modules/gbp/manifests/heat.pp @@ -12,7 +12,7 @@ class gbp::heat ( } heat_config{ - 'DEFAULT/plugin_dirs' : value => '/usr/lib/python2.7/dist-packages/gbpautomation/heat'; + 'DEFAULT/plugin_dirs' : value => $::gbp::params::gbp_heat_plugin_path; } } diff --git a/deployment_scripts/puppet/modules/gbp/manifests/horizon.pp b/deployment_scripts/puppet/modules/gbp/manifests/horizon.pp index 2779081..94f5f05 100644 --- a/deployment_scripts/puppet/modules/gbp/manifests/horizon.pp +++ b/deployment_scripts/puppet/modules/gbp/manifests/horizon.pp @@ -11,7 +11,20 @@ class gbp::horizon ( name => $::gbp::params::package_gbp_horizon, } - horizon::project{$enable_project: - project_dir => $::gbp::params::gbp_horizon_project, + case $::osfamily { + 'RedHat': { + include horizon::service + Package['gbp_horizon'] ~> Service['httpd'] + } + + 'Debian': { + horizon::project{$enable_project: + project_dir => $::gbp::params::gbp_horizon_project, + } + } + + default: { + fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian") + } } } diff --git a/deployment_scripts/puppet/modules/gbp/manifests/params.pp b/deployment_scripts/puppet/modules/gbp/manifests/params.pp index 81e9f4d..db8d73d 100644 --- a/deployment_scripts/puppet/modules/gbp/manifests/params.pp +++ b/deployment_scripts/puppet/modules/gbp/manifests/params.pp @@ -5,6 +5,11 @@ class gbp::params { case $::osfamily { 'RedHat': { + $package_gbp_client = 'python-gbpclient' + $package_gbp_manage = 'openstack-neutron-gbp' + $package_gbp_heat = 'openstack-heat-gbp' + $package_gbp_horizon = 'openstack-dashboard-gbp' + $gbp_heat_plugin_path = '/usr/lib/python2.6/site-packages/gbpautomation/heat' } 'Debian': { @@ -13,6 +18,7 @@ class gbp::params { $package_gbp_heat = 'python-group-based-policy-automation' $package_gbp_horizon = 'python-group-based-policy-ui' $gbp_horizon_project = '/usr/lib/python2.7/dist-packages/gbpui' + $gbp_heat_plugin_path = '/usr/lib/python2.7/site-packages/gbpautomation/heat' } default: { diff --git a/deployment_scripts/puppet/modules/horizon/manifests/params.pp b/deployment_scripts/puppet/modules/horizon/manifests/params.pp index 29b7402..fcc1383 100644 --- a/deployment_scripts/puppet/modules/horizon/manifests/params.pp +++ b/deployment_scripts/puppet/modules/horizon/manifests/params.pp @@ -9,7 +9,7 @@ class horizon::params { $http_service = 'httpd' } 'Debian': { - $http_service = 'apache2' + $http_service = 'apache2' } default: { fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian") diff --git a/deployment_scripts/puppet/modules/neutron/manifests/config_apic.pp b/deployment_scripts/puppet/modules/neutron/manifests/config_apic.pp index 5023e57..3be5582 100644 --- a/deployment_scripts/puppet/modules/neutron/manifests/config_apic.pp +++ b/deployment_scripts/puppet/modules/neutron/manifests/config_apic.pp @@ -19,7 +19,11 @@ class neutron::config_apic ( 'ml2_cisco_apic/apic_username': value => $apic_username; 'ml2_cisco_apic/apic_password': value => $apic_password; 'ml2_cisco_apic/apic_name_mapping': value => 'use_name' ; - 'ml2_cisco_apic/root_helper': value => 'sudo'; + } + if $::osfamily == 'RedHat' { + neutron_plugin_ml2_cisco { + 'ml2_cisco_apic/root_helper': value => 'sudo'; + } } if !empty($additional_config) { file_line{ 'additional_config': diff --git a/environment_config.yaml b/environment_config.yaml index 70d972e..a12d85d 100644 --- a/environment_config.yaml +++ b/environment_config.yaml @@ -1,4 +1,8 @@ attributes: + metadata: + restrictions: + - condition: "not (cluster:net_provider == 'neutron' and networking_parameters:segmentation_type == 'vlan')" + action: hide use_gbp: type: "checkbox" weight: 30 diff --git a/metadata.yaml b/metadata.yaml index 794d06f..9ed530f 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -24,7 +24,7 @@ releases: version: 2014.2-6.1 mode: ['ha', 'multinode'] deployment_scripts_path: deployment_scripts/ - repository_path: repositories/ubuntu + repository_path: repositories/centos - os: ubuntu version: 2014.2-6.1 mode: ['ha', 'multinode']