Composable Midonet for Neutron
Depends-On: I2393fc3c360f5f5786411f64dbcd06f380376093 Change-Id: I606cb1f7ef7d651b5d145bfa10ef3aa1561b1590 Partially-implements: blueprint composable-services-within-roles
This commit is contained in:
parent
88f83fe8cc
commit
800ee92b75
@ -4,6 +4,8 @@ resource_registry:
|
||||
OS::TripleO::Controller::Net::SoftwareConfig: ../net-config-linux-bridge.yaml # We have to avoid any ovs bridge. MidoNet is incompatible with its datapath
|
||||
OS::TripleO::Services::NeutronL3Agent: OS::Heat::None
|
||||
OS::TripleO::Services::NeutronOvsAgent: OS::Heat::None
|
||||
# Override the NeutronCorePlugin to use Nuage
|
||||
OS::TripleO::Services::NeutronCorePlugin: OS::TripleO::Services::NeutronCorePluginMidonet
|
||||
|
||||
parameter_defaults:
|
||||
EnableZookeeperOnController: true
|
||||
|
@ -28,6 +28,7 @@ resource_registry:
|
||||
OS::TripleO::Services::NeutronCorePluginPlumgrid: ../puppet/services/pacemaker/neutron-plugin-plumgrid.yaml
|
||||
OS::TripleO::Services::NeutronCorePluginNuage: ../puppet/services/pacemaker/neutron-plugin-nuage.yaml
|
||||
OS::TripleO::Services::NeutronCorePluginOpencontrail: ../puppet/services/pacemaker/neutron-plugin-opencontrail.yaml
|
||||
OS::TripleO::Services::NeutronCorePluginMidonet: ../puppet/services/pacemaker/neutron-midonet.yaml
|
||||
OS::TripleO::Services::NeutronOvsAgent: ../puppet/services/pacemaker/neutron-ovs-agent.yaml
|
||||
OS::TripleO::Services::RabbitMQ: ../puppet/services/pacemaker/rabbitmq.yaml
|
||||
OS::TripleO::Services::HAproxy: ../puppet/services/pacemaker/haproxy.yaml
|
||||
|
@ -151,6 +151,7 @@ resource_registry:
|
||||
OS::TripleO::Services::NeutronCorePluginPlumgrid: puppet/services/neutron-plugin-plumgrid.yaml
|
||||
OS::TripleO::Services::NeutronCorePluginNuage: puppet/services/neutron-plugin-nuage.yaml
|
||||
OS::TripleO::Services::NeutronCorePluginOpencontrail: puppet/services/neutron-plugin-opencontrail.yaml
|
||||
OS::TripleO::Services::NeutronCorePluginMidonet: puppet/services/neutron-midonet.yaml
|
||||
OS::TripleO::Services::NeutronOvsAgent: puppet/services/neutron-ovs-agent.yaml
|
||||
OS::TripleO::Services::RabbitMQ: puppet/services/rabbitmq.yaml
|
||||
OS::TripleO::Services::HAproxy: puppet/services/haproxy.yaml
|
||||
|
@ -87,66 +87,6 @@ if hiera('step') >= 4 {
|
||||
}
|
||||
include ::nova::config
|
||||
|
||||
if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
|
||||
|
||||
# TODO(devvesa) provide non-controller ips for these services
|
||||
$zookeeper_node_ips = hiera('neutron_api_node_ips')
|
||||
$cassandra_node_ips = hiera('neutron_api_node_ips')
|
||||
|
||||
# Run zookeeper in the controller if configured
|
||||
if hiera('enable_zookeeper_on_controller') {
|
||||
class {'::tripleo::cluster::zookeeper':
|
||||
zookeeper_server_ips => $zookeeper_node_ips,
|
||||
# TODO: create a 'bind' hiera key for zookeeper
|
||||
zookeeper_client_ip => hiera('neutron::bind_host'),
|
||||
zookeeper_hostnames => hiera('controller_node_names')
|
||||
}
|
||||
}
|
||||
|
||||
# Run cassandra in the controller if configured
|
||||
if hiera('enable_cassandra_on_controller') {
|
||||
class {'::tripleo::cluster::cassandra':
|
||||
cassandra_servers => $cassandra_node_ips,
|
||||
# TODO: create a 'bind' hiera key for cassandra
|
||||
cassandra_ip => hiera('neutron::bind_host'),
|
||||
}
|
||||
}
|
||||
|
||||
class {'::tripleo::network::midonet::agent':
|
||||
zookeeper_servers => $zookeeper_node_ips,
|
||||
cassandra_seeds => $cassandra_node_ips
|
||||
}
|
||||
|
||||
class {'::tripleo::network::midonet::api':
|
||||
zookeeper_servers => $zookeeper_node_ips,
|
||||
vip => hiera('public_virtual_ip'),
|
||||
keystone_ip => hiera('public_virtual_ip'),
|
||||
keystone_admin_token => hiera('keystone::admin_token'),
|
||||
# TODO: create a 'bind' hiera key for api
|
||||
bind_address => hiera('neutron::bind_host'),
|
||||
admin_password => hiera('admin_password')
|
||||
}
|
||||
|
||||
# TODO: find a way to get an empty list from hiera
|
||||
# TODO: when doing the composable midonet plugin, don't forget to
|
||||
# set service_plugins to an empty array in Hiera.
|
||||
class {'::neutron':
|
||||
service_plugins => []
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# If the value of core plugin is set to 'midonet',
|
||||
# skip all the ML2 configuration
|
||||
if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
|
||||
|
||||
class {'::neutron::plugins::midonet':
|
||||
midonet_api_ip => hiera('public_virtual_ip'),
|
||||
keystone_tenant => hiera('neutron::server::auth_tenant'),
|
||||
keystone_password => hiera('neutron::server::password')
|
||||
}
|
||||
}
|
||||
|
||||
# Ceilometer
|
||||
$ceilometer_backend = downcase(hiera('ceilometer_backend'))
|
||||
case $ceilometer_backend {
|
||||
|
@ -281,63 +281,6 @@ MYSQL_HOST=localhost\n",
|
||||
|
||||
include ::nova::config
|
||||
|
||||
if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
|
||||
|
||||
# TODO(devvesa) provide non-controller ips for these services
|
||||
$zookeeper_node_ips = hiera('neutron_api_node_ips')
|
||||
$cassandra_node_ips = hiera('neutron_api_node_ips')
|
||||
|
||||
# Run zookeeper in the controller if configured
|
||||
if hiera('enable_zookeeper_on_controller') {
|
||||
class {'::tripleo::cluster::zookeeper':
|
||||
zookeeper_server_ips => $zookeeper_node_ips,
|
||||
# TODO: create a 'bind' hiera key for zookeeper
|
||||
zookeeper_client_ip => hiera('neutron::bind_host'),
|
||||
zookeeper_hostnames => split(hiera('controller_node_names'), ',')
|
||||
}
|
||||
}
|
||||
|
||||
# Run cassandra in the controller if configured
|
||||
if hiera('enable_cassandra_on_controller') {
|
||||
class {'::tripleo::cluster::cassandra':
|
||||
cassandra_servers => $cassandra_node_ips,
|
||||
# TODO: create a 'bind' hiera key for cassandra
|
||||
cassandra_ip => hiera('neutron::bind_host'),
|
||||
}
|
||||
}
|
||||
|
||||
class {'::tripleo::network::midonet::agent':
|
||||
zookeeper_servers => $zookeeper_node_ips,
|
||||
cassandra_seeds => $cassandra_node_ips
|
||||
}
|
||||
|
||||
class {'::tripleo::network::midonet::api':
|
||||
zookeeper_servers => $zookeeper_node_ips,
|
||||
vip => hiera('public_virtual_ip'),
|
||||
keystone_ip => hiera('public_virtual_ip'),
|
||||
keystone_admin_token => hiera('keystone::admin_token'),
|
||||
# TODO: create a 'bind' hiera key for api
|
||||
bind_address => hiera('neutron::bind_host'),
|
||||
admin_password => hiera('admin_password')
|
||||
}
|
||||
|
||||
# Configure Neutron
|
||||
# TODO: when doing the composable midonet plugin, don't forget to
|
||||
# set service_plugins to an empty array in Hiera.
|
||||
class {'::neutron':
|
||||
service_plugins => []
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
|
||||
class {'::neutron::plugins::midonet':
|
||||
midonet_api_ip => hiera('public_virtual_ip'),
|
||||
keystone_tenant => hiera('neutron::server::auth_tenant'),
|
||||
keystone_password => hiera('neutron::server::password')
|
||||
}
|
||||
}
|
||||
|
||||
# Ceilometer
|
||||
case downcase(hiera('ceilometer_backend')) {
|
||||
/mysql/: {
|
||||
@ -519,49 +462,6 @@ password=\"${mysql_root_password}\"",
|
||||
Pacemaker::Resource::Ocf['openstack-core']],
|
||||
}
|
||||
|
||||
if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
|
||||
pacemaker::resource::service {'tomcat':
|
||||
clone_params => 'interleave=true',
|
||||
}
|
||||
}
|
||||
if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
|
||||
#midonet-chain chain keystone-->neutron-server-->dhcp-->metadata->tomcat
|
||||
pacemaker::constraint::base { 'neutron-server-to-dhcp-agent-constraint':
|
||||
constraint_type => 'order',
|
||||
first_resource => "${::neutron::params::server_service}-clone",
|
||||
second_resource => "${::neutron::params::dhcp_agent_service}-clone",
|
||||
first_action => 'start',
|
||||
second_action => 'start',
|
||||
require => [Pacemaker::Resource::Service[$::neutron::params::server_service],
|
||||
Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service]],
|
||||
}
|
||||
pacemaker::constraint::base { 'neutron-dhcp-agent-to-metadata-agent-constraint':
|
||||
constraint_type => 'order',
|
||||
first_resource => "${::neutron::params::dhcp_agent_service}-clone",
|
||||
second_resource => "${::neutron::params::metadata_agent_service}-clone",
|
||||
first_action => 'start',
|
||||
second_action => 'start',
|
||||
require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
|
||||
Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
|
||||
}
|
||||
pacemaker::constraint::base { 'neutron-metadata-agent-to-tomcat-constraint':
|
||||
constraint_type => 'order',
|
||||
first_resource => "${::neutron::params::metadata_agent_service}-clone",
|
||||
second_resource => 'tomcat-clone',
|
||||
first_action => 'start',
|
||||
second_action => 'start',
|
||||
require => [Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service],
|
||||
Pacemaker::Resource::Service['tomcat']],
|
||||
}
|
||||
pacemaker::constraint::colocation { 'neutron-dhcp-agent-to-metadata-agent-colocation':
|
||||
source => "${::neutron::params::metadata_agent_service}-clone",
|
||||
target => "${::neutron::params::dhcp_agent_service}-clone",
|
||||
score => 'INFINITY',
|
||||
require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
|
||||
Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
|
||||
}
|
||||
}
|
||||
|
||||
# Nova
|
||||
pacemaker::constraint::base { 'keystone-then-nova-consoleauth-constraint':
|
||||
constraint_type => 'order',
|
||||
|
48
puppet/services/neutron-midonet.yaml
Normal file
48
puppet/services/neutron-midonet.yaml
Normal file
@ -0,0 +1,48 @@
|
||||
heat_template_version: 2016-04-08
|
||||
|
||||
description: >
|
||||
OpenStack Neutron Midonet plugin and services
|
||||
|
||||
parameters:
|
||||
EndpointMap:
|
||||
default: {}
|
||||
description: Mapping of service endpoint -> protocol. Typically set
|
||||
via parameter_defaults in the resource registry.
|
||||
type: json
|
||||
NeutronPassword:
|
||||
description: The password for the neutron service and db account, used by neutron agents.
|
||||
type: string
|
||||
hidden: true
|
||||
AdminPassword:
|
||||
description: The password for the keystone admin account, used for monitoring, querying neutron etc.
|
||||
type: string
|
||||
hidden: true
|
||||
AdminToken:
|
||||
description: The keystone auth secret and db password.
|
||||
type: string
|
||||
hidden: true
|
||||
EnableZookeeperOnController:
|
||||
label: Enable Zookeeper On Controller
|
||||
description: 'Whether enable Zookeeper cluster on Controller'
|
||||
type: boolean
|
||||
default: false
|
||||
EnableCassandraOnController:
|
||||
label: Enable Cassandra On Controller
|
||||
description: 'Whether enable Cassandra cluster on Controller'
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Neutron Midonet plugin and services
|
||||
value:
|
||||
config_settings:
|
||||
tripleo::profile::base::neutron::midonet::admin_password: {get_param: AdminPassword}
|
||||
tripleo::profile::base::neutron::midonet::keystone_admin_token: {get_param: AdminToken}
|
||||
tripleo::profile::base::neutron::midonet::neutron_auth_password: {get_param: NeutronPassword}
|
||||
tripleo::profile::base::neutron::midonet::zk_on_controller: {get_param: EnableZookeeperOnController}
|
||||
tripleo::profile::base::neutron::midonet::neutron_auth_tenant: 'service'
|
||||
enable_cassandra_on_controller: {get_param: EnableCassandraOnController}
|
||||
neutron::service_plugins: []
|
||||
step_config: |
|
||||
include tripleo::profile::base::neutron::plugins::midonet
|
28
puppet/services/pacemaker/neutron-midonet.yaml
Normal file
28
puppet/services/pacemaker/neutron-midonet.yaml
Normal file
@ -0,0 +1,28 @@
|
||||
heat_template_version: 2016-04-08
|
||||
|
||||
description: >
|
||||
OpenStack Neutron Midonet with Pacemaker configured with Puppet
|
||||
|
||||
parameters:
|
||||
EndpointMap:
|
||||
default: {}
|
||||
description: Mapping of service endpoint -> protocol. Typically set
|
||||
via parameter_defaults in the resource registry.
|
||||
type: json
|
||||
|
||||
resources:
|
||||
|
||||
NeutronMidonetBase:
|
||||
type: ../neutron-midonet.yaml
|
||||
properties:
|
||||
EndpointMap: {get_param: EndpointMap}
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Neutron Midonet plugin.
|
||||
value:
|
||||
config_settings:
|
||||
map_merge:
|
||||
- get_attr: [NeutronMidonetBase, role_data, config_settings]
|
||||
step_config: |
|
||||
include ::tripleo::profile::pacemaker::neutron::plugins::midonet
|
Loading…
x
Reference in New Issue
Block a user