Skip to content
Snippets Groups Projects
Commit 510d1d54 authored by Alessandro Costantini's avatar Alessandro Costantini
Browse files

Network modification to fit foreman ENC

parent 53595e30
No related branches found
No related tags found
No related merge requests found
class iaas::params (
#global variables
##Network
$public_interface = 'eth0',
$admin_interface = 'eth0',
$data_interface = 'eth0',
## Node -- base.pp
$dns_servers = ['131.154.3.1','131.154.1.3'],
$dns_searchdomain = 'cloud.cnaf.infn.it',
# Enable only if $public_interface != $external_device1
$public_gateway = undef,
$external_device1 = 'eth0',
$external_device2 = undef,
#CEPH
$ceph_fsid = 'f65809d3-7961-4cd7-b731-a9bc94bc6e9c',
# Uncomment if auth_type is different from 'cephx'
#ceph_authentication_type = 'cephx',
$ceph_mon_initial_members = 'ocp-05,ocp-06,ocp-07',
$ceph_mon_host = '10.10.98.43,10.10.98.44,10.10.98.45',
$ceph_osd_pool_default_pg_num = '100',
$ceph_osd_pool_default_pgp_num = '100',
$ceph_osd_pool_default_size = '3',
$ceph_osd_pool_default_min_size = '2',
$ceph_cluster_network = '10.10.98.0/24',
$ceph_public_network = '10.10.98.0/24',
$ceph_osd_journal_size = '2048',
#Openstack general
$verbose = false,
$debug = false,
$region = 'regionOne',
#VIP1
$main_hostname = '131.154.100.102', # VIP Hostname (public)
$main_address = '131.154.100.102', # The main virtual address pointing to the load-balancers
#VIP2
$admin_address = '131.154.100.102', # The private virtual address pointing to the load-balancers
#Endpoints
$endpoint_servers = [131.154.100.118, 131.154.100.120, 131.154.100.121],
#RabbitMQ
$rabbit_hosts = ['131.154.100.118:5672', '131.154.100.120:5672', '131.154.100.121:5672'],
$rabbit_user = 'openstack',
$rabbit_password = 'openstack',
#Mysql_params
#none
#Mongo_prams
$mongo_endpoint_coordination = ['131.154.100.118:27017','131.154.100.120:27017','131.154.100.121:27017'],
#MysqlDB
$db_keystone_user = 'keystone',
$db_keystone_password = 'keystone',
$db_glance_user = 'glance',
$db_glance_password = 'glance',
$db_cinder_user = 'cinder',
$db_cinder_password = 'cinder',
$db_nova_user = 'nova',
$db_nova_password ='nova',
$db_neutron_user = 'neutron',
$db_neutron_password = 'neutron',
$db_heat_user = 'heat',
$db_heat_password = 'heat',
#MongoDB
$db_ceilometer_user = 'ceilometer',
$db_ceilometer_password = 'ceilometer',
#Memcache
$memcache = ['10.10.98.107:11211','10.10.98.108:11211'],
#Neutron
$neutron_password = 'neutron',
$neutron_secret = 'neutron',
$neutron_core_plugin = 'ml2',
$neutron_service_plugins = ['router', 'lbaas', 'vpnaas', 'firewall', 'metering'],
#Nova
$nova_password = 'nova',
$nova_default_flotting_pool = 'ext-net',
#Ceilometer
$ceilometer_password = 'ceilometer',
$ceilometer_secret = 'ceilometer',
# Glance
$glance_password = 'glance',
#Cinder
$cinder_password = 'cinder',
$cinder_secret = '5e899071-df68-40d3-b0ea-6ec22b7c12a0',
#Heat
$heat_password = 'heat',
# https://bugs.launchpad.net/heat/+bug/1415887: "AES key must be either 16, 24, or 32 bytes long"
$heat_encryption_key = '12345678912345678912345678912345',
#Horizon
$horizon_secret = 'horizon',
#Controller (da spostare in controller.pp?)
$admin_token = '36c428a03be7d4f3cb0c',
$admin_email = 'alessandro.costantini@cnaf.infn.it',
$admin_password = 'Benza@CNAF',
$admin_tenant = 'admin',
){
}
class iaas::profile::base (
$dns_servers,
$dns_searchdomain,
$dns_servers = $iaas::params::dns_servers,
$dns_searchdomain = $iaas::params::dns_searchdomain,
# $ssh_public_key,
) {
......
class iaas::profile::neutron::common (
$core_plugin = undef,
$service_plugins = undef,
$public_interface = hiera('iaas::public_interface', undef),
$admin_interface = hiera('iaas::admin_interface', undef),
$external_device2 = hiera('iaas::profile::neutron::router::external_device2', undef),
$public_interface = $iaas::params::public_interface,
$admin_interface = $iaas::params::admin_interface,
$core_plugin = $iaas::params::neutron_core_plugin,
$service_plugins = $iaas::params::neutron_service_plugins,
$external_device2 = $iaas::params::external_device2,
##verbose, debug
$verbose = hiera('iaas::verbose', undef),
$debug = hiera('iaas::debug', undef),
$verbose = $iaas::params::verbose,
$debug = $iaas::params::debug,
$region = hiera('iaas::region', undef),
$region = $iaas::params::region,
##rhosts
# $endpoint = hiera('iaas::main_address', undef),
$rhosts = hiera('iaas::profile::rabbitmq::rhosts', undef),
$rabbitmq_user = hiera('iaas::profile::rabbitmq::user', undef),
$rabbitmq_password = hiera('iaas::profile::rabbitmq::password', undef),
$rhosts = $iaas::params::rabbit_hosts,
$rabbitmq_user = $iaas::params::rabbit_user,
$rabbitmq_password = $iaas::params::rabbit_password,
) {
file { 'etc_default_neutron-server':
......
#Multiple external networks supported
class iaas::profile::neutron::router (
$public_interface = hiera('iaas::public_interface', undef),
$data_interface = hiera('iaas::data_interface', undef),
$public_gateway = hiera('iaas::public_gateway', undef),
$public_interface = $iaas::params::public_interface,
$data_interface = $iaas::params::admin_interface,
$public_gateway = $iaas::params::public_gateway,
$external_device1 = undef,
$external_network1 = hiera('iaas::profile::neutron::external_network1', undef),
$external_gateway1 = hiera('iaas::profile::neutron::external_gateway1', undef),
$external_device1 = $iaas::params::external_device1,
$external_network1 = undef,
$external_gateway1 = undef,
$external_device2 = undef,
$external_network2 = hiera('iaas::profile::neutron::external_network2', undef),
$external_gateway2 = hiera('iaas::profile::neutron::external_gateway2', undef),
$external_device2 = $iaas::params::external_device2,
$external_network2 = undef,
$external_gateway2 = undef,
$neutron_password = hiera('iaas::profile::neutron::password', undef),
$neutron_secret = hiera('iaas::profile::neutron::secret', undef),
$neutron_password = $iaas::params::neutron_password,
$neutron_secret = $iaas::params::neutron_secret,
$region = hiera('iaas::region', undef),
$region = iaas::params::region,
#VIP1
$endpoint_main = hiera('iaas::main_address', undef),
$endpoint_main = $iaas::params::main_address,
#VIP2
$endpoint_admin = hiera('iaas::admin_address', undef),
$endpoint_admin = $iaas::params::admin_address,
$mtu = hiera('iaas::profile::neutron::router::mtu', 1438),
$mtu = '1438',
) {
......
class iaas::role::network (
##Network1 - external
$neutron_external_network1 = '10.10.98.0/24'
$neutron_external_gateway1 = '10.10.98.1'
##Network2 - external
$neutron_external_network2 = '131.154.100.0/24'
$neutron_external_gateway2 = '131.154.100.1'
$mtu = '1438',
){
# Base
class { 'iaas::profile::base': } ->
class { 'iaas::profile::neutron::router': }
class { 'iaas::profile::neutron::router':
mtu => $mtu,
external_network1 => $neutron_external_network1,
external_gateway1 => $neutron_external_gateway1,
external_network2 => $neutron_external_network2,
external_gateway2 => $neutron_external_gateway2,
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment