forked from vvaldez/astapor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New branch multi-nodes adding a networker.pp for dedicated neutron ne…
…twork node Havana2+/Foreman1.2+ Initial commit
- Loading branch information
Showing
4 changed files
with
225 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,114 @@ | ||
# Common quickstack configurations | ||
class quickstack::compute ( | ||
$fixed_network_range = $quickstack::params::fixed_network_range, | ||
$floating_network_range = $quickstack::params::floating_network_range, | ||
$nova_db_password = $quickstack::params::nova_db_password, | ||
$nova_user_password = $quickstack::params::nova_user_password, | ||
$pacemaker_priv_floating_ip = $quickstack::params::pacemaker_priv_floating_ip, | ||
$private_interface = $quickstack::params::private_interface, | ||
$public_interface = $quickstack::params::public_interface, | ||
$verbose = $quickstack::params::verbose, | ||
$floating_network_range = $quickstack::params::floating_network_range, | ||
$neutron_db_password = $quickstack::params::neutron_db_password, | ||
$nova_db_password = $quickstack::params::nova_db_password, | ||
$nova_user_password = $quickstack::params::nova_user_password, | ||
$pacemaker_priv_floating_ip = $quickstack::params::pacemaker_priv_floating_ip, | ||
$pacemaker_pub_floating_ip = $quickstack::params::pacemaker_pub_floating_ip, | ||
$private_interface = $quickstack::params::private_interface, | ||
$public_interface = $quickstack::params::public_interface, | ||
$verbose = $quickstack::params::verbose, | ||
) inherits quickstack::params { | ||
|
||
# Configure Nova | ||
nova_config{ | ||
'DEFAULT/auto_assign_floating_ip': value => 'True'; | ||
#"DEFAULT/network_host": value => ${pacemaker_priv_floating_ip; | ||
"DEFAULT/network_host": value => "$::ipaddress"; | ||
"DEFAULT/libvirt_inject_partition": value => "-1"; | ||
#"DEFAULT/metadata_host": value => "$pacemaker_priv_floating_ip"; | ||
"DEFAULT/metadata_host": value => "$::ipaddress"; | ||
"DEFAULT/multi_host": value => "True"; | ||
# Configure Nova | ||
nova_config{ | ||
'DEFAULT/auto_assign_floating_ip': value => 'True'; | ||
#"DEFAULT/network_host": value => ${pacemaker_priv_floating_ip; | ||
"DEFAULT/network_host": value => "$::ipaddress"; | ||
"DEFAULT/libvirt_inject_partition": value => "-1"; | ||
#"DEFAULT/metadata_host": value => "$pacemaker_priv_floating_ip"; | ||
"DEFAULT/metadata_host": value => "$::ipaddress"; | ||
"DEFAULT/multi_host": value => "True"; | ||
} | ||
|
||
class { 'nova': | ||
sql_connection => "mysql:https://nova:${nova_db_password}@${pacemaker_priv_floating_ip}/nova", | ||
image_service => 'nova.image.glance.GlanceImageService', | ||
glance_api_servers => "http:https://$pacemaker_priv_floating_ip:9292/v1", | ||
rpc_backend => 'nova.openstack.common.rpc.impl_qpid', | ||
qpid_hostname => $pacemaker_priv_floating_ip, | ||
verbose => $verbose, | ||
} | ||
class { 'nova': | ||
sql_connection => "mysql:https://nova:${nova_db_password}@${pacemaker_priv_floating_ip}/nova", | ||
image_service => 'nova.image.glance.GlanceImageService', | ||
glance_api_servers => "http:https://${pacemaker_priv_floating_ip}:9292/v1", | ||
rpc_backend => 'nova.openstack.common.rpc.impl_qpid', | ||
qpid_hostname => $pacemaker_priv_floating_ip, | ||
verbose => $verbose, | ||
} | ||
|
||
# uncomment if on a vm | ||
# GSutclif: Maybe wrap this in a Facter['is-virtual'] test ? | ||
#file { "/usr/bin/qemu-system-x86_64": | ||
# ensure => link, | ||
# target => "/usr/libexec/qemu-kvm", | ||
# notify => Service["nova-compute"], | ||
#} | ||
#nova_config{ | ||
# "libvirt_cpu_mode": value => "none"; | ||
#} | ||
# uncomment if on a vm | ||
# GSutclif: Maybe wrap this in a Facter['is-virtual'] test ? | ||
#file { "/usr/bin/qemu-system-x86_64": | ||
# ensure => link, | ||
# target => "/usr/libexec/qemu-kvm", | ||
# notify => Service["nova-compute"], | ||
#} | ||
#nova_config{ | ||
# "libvirt_cpu_mode": value => "none"; | ||
#} | ||
|
||
class { 'nova::compute::libvirt': | ||
#libvirt_type => "qemu", # uncomment if on a vm | ||
vncserver_listen => "$::ipaddress", | ||
} | ||
class { 'nova::compute::libvirt': | ||
#libvirt_type => "qemu", # uncomment if on a vm | ||
vncserver_listen => $::ipaddress, | ||
} | ||
|
||
class {"nova::compute": | ||
enabled => true, | ||
vncproxy_host => "$pacemaker_priv_floating_ip", | ||
vncserver_proxyclient_address => "$ipaddress", | ||
} | ||
class {"nova::compute": | ||
enabled => true, | ||
vncproxy_host => $pacemaker_pub_floating_ip, | ||
vncserver_proxyclient_address => $::ipaddress, | ||
} | ||
|
||
class { 'nova::api': | ||
enabled => true, | ||
admin_password => "$nova_user_password", | ||
auth_host => "$pacemaker_priv_floating_ip", | ||
} | ||
class { 'nova::api': | ||
enabled => true, | ||
admin_password => $nova_user_password, | ||
auth_host => $pacemaker_priv_floating_ip, | ||
} | ||
|
||
class { 'nova::network': | ||
private_interface => "$private_interface", | ||
public_interface => "$public_interface", | ||
fixed_range => "$fixed_network_range", | ||
floating_range => "$floating_network_range", | ||
network_manager => "nova.network.manager.FlatDHCPManager", | ||
config_overrides => {"force_dhcp_release" => false}, | ||
create_networks => true, | ||
enabled => true, | ||
install_service => true, | ||
} | ||
#class { 'nova::network': | ||
# private_interface => "$private_interface", | ||
# public_interface => "$public_interface", | ||
# fixed_range => "$fixed_network_range", | ||
# floating_range => "$floating_network_range", | ||
# network_manager => "nova.network.manager.FlatDHCPManager", | ||
# config_overrides => {"force_dhcp_release" => false}, | ||
# create_networks => true, | ||
# enabled => true, | ||
# install_service => true, | ||
#} | ||
|
||
firewall { '001 nove compute incoming': | ||
proto => 'tcp', | ||
dport => '5900-5999', | ||
action => 'accept', | ||
} | ||
### Neutron | ||
class { '::neutron': | ||
allow_overlapping_ips => true, | ||
rpc_backend => 'neutron.openstack.common.rpc.impl_qpid', | ||
qpid_hostname => $pacemaker_priv_floating_ip, | ||
} | ||
|
||
# To be done by neutron module | ||
neutron_config { | ||
'database/connection': value => "mysql:https://neutron:${neutron_db_password}@${pacemaker_priv_floating_ip}/neutron"; | ||
} | ||
|
||
Neutron_config<||> | ||
|
||
# Plugin | ||
class { '::neutron::plugins::ovs': | ||
sql_connection => "mysql:https://neutron:${neutron_db_password}@${pacemaker_priv_floating_ip}/neutron", | ||
tenant_network_type => 'gre', | ||
} | ||
|
||
# Agent | ||
class { '::neutron::agents::ovs': | ||
local_ip => $::ipaddress, | ||
enable_tunneling => true, | ||
} | ||
|
||
class { '::nova::network::neutron': | ||
neutron_admin_password => $admin_password, | ||
neutron_admin_tenant_name => 'admin', | ||
neutron_admin_username => 'admin', | ||
neutron_url => 'http:https://192.168.0.11:9696', | ||
neutron_admin_auth_url => 'http:https://192.168.0.11:35357/v2.0', | ||
} | ||
|
||
firewall { '001 nova compute incoming': | ||
proto => 'tcp', | ||
dport => '5900-5999', | ||
action => 'accept', | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
|
||
class quickstack::networker ( | ||
$fixed_network_range = $quickstack::params::fixed_network_range, | ||
$floating_network_range = $quickstack::params::floating_network_range, | ||
$neutron_db_password = $quickstack::params::neutron_db_password, | ||
$nova_db_password = $quickstack::params::nova_db_password, | ||
$nova_user_password = $quickstack::params::nova_user_password, | ||
$pacemaker_priv_floating_ip = $quickstack::params::pacemaker_priv_floating_ip, | ||
$private_interface = $quickstack::params::private_interface, | ||
$public_interface = $quickstack::params::public_interface, | ||
$verbose = $quickstack::params::verbose, | ||
) inherits quickstack::params { | ||
|
||
### Neutron stuf | ||
# Configures everything in neutron.conf | ||
class { '::neutron': | ||
verbose => true, | ||
allow_overlapping_ips => true, | ||
rpc_backend => 'neutron.openstack.common.rpc.impl_qpid', | ||
qpid_hostname => $pacemaker_priv_floating_ip, | ||
} | ||
|
||
# To be done by neutron module | ||
neutron_config { | ||
'database/connection': value => "mysql:https://neutron:${neutron_db_password}@${pacemaker_priv_floating_ip}/neutron"; | ||
} | ||
|
||
Neutron_config<||> | ||
|
||
# OVS Plugin | ||
class { '::neutron::plugins::ovs': | ||
sql_connection => "mysql:https://neutron:${neutron_db_password}@${pacemaker_priv_floating_ip}/neutron", | ||
tenant_network_type => 'gre', | ||
} | ||
|
||
# Agents | ||
class { '::neutron::agents::ovs': | ||
local_ip => $::ipaddress, | ||
enable_tunneling => true, | ||
} | ||
|
||
class { '::neutron::agents::dhcp': } | ||
|
||
class { '::neutron::agents::l3': } | ||
|
||
#class { 'neutron::agents::lbaas': } | ||
|
||
#class { 'neutron::agents::fwaas': } | ||
|
||
# Neutron external network for br-ex | ||
#keystone_tenant { 'admin': | ||
# ensure => present, | ||
#} | ||
|
||
#neutron_network { 'public': | ||
# ensure => present, | ||
# router_external => 'True', | ||
# tenant_name => 'admin', | ||
|
||
#neutron_subnet { 'public_subnet': | ||
# ensure => 'present', | ||
# cidr => '10.16.16.0/22', | ||
# gateway_ip => '10.16.19.254', | ||
# allocation_pools => 'start=10.16.18.1,end=10.16.18.254', | ||
# network_name => 'public', | ||
# tenant_name => 'admin', | ||
#} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters