From c9959a834a1bcdc7fe3ba586f9c46d4b1d037154 Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Thu, 11 Dec 2014 08:41:09 -0500 Subject: [PATCH 1/3] v2.0 of trystack puppet module, based on quickstack --- manifests/compute.pp | 37 ++++++++++ manifests/controller.pp | 156 ++++++++++++++++++++++++++++++++++++++++ manifests/init.pp | 2 + manifests/network.pp | 19 +++++ 4 files changed, 214 insertions(+) create mode 100644 manifests/compute.pp create mode 100644 manifests/controller.pp create mode 100644 manifests/init.pp create mode 100644 manifests/network.pp diff --git a/manifests/compute.pp b/manifests/compute.pp new file mode 100644 index 0000000..0cf0762 --- /dev/null +++ b/manifests/compute.pp @@ -0,0 +1,37 @@ +class trystack::compute { + class { "quickstack::compute_common": + auth_host => $private_ip, + glance_host => $private_ip, + libvirt_images_rbd_pool => 'volumes', + libvirt_images_rbd_ceph_conf => '/etc/ceph/ceph.conf', + libvirt_inject_password => 'false', + libvirt_inject_key => 'false', + libvirt_images_type => 'rbd', + mysql_ca => $quickstack::params::mysql_ca, + nova_host => $private_ip, + nova_db_password => $nova_db_password, + nova_user_password => $nova_user_password, + private_network => '', + private_iface => '', + private_ip => '', + rbd_user => 'volumes', + rbd_secret_uuid => '', + network_device_mtu => $quickstack::params::network_device_mtu, + + admin_password => $admin_password, + ssl => false, + + mysql_host => $mysql_ip, + amqp_host => $amqp_ip, + amqp_username => 'guest', + amqp_password => 'guest', + #amqp_nssdb_password => $quickstack::params::amqp_nssdb_password, + + ceilometer_metering_secret => $ceilometer_metering_secret, + ceilometer_user_password => $ceilometer_user_password, + + cinder_backend_gluster => $quickstack::params::cinder_backend_gluster, + + + } +} diff --git a/manifests/controller.pp b/manifests/controller.pp new file mode 100644 index 0000000..fee800e --- /dev/null +++ b/manifests/controller.pp @@ -0,0 +1,156 @@ +class trystack::controller { + + if $admin_email == '' { fail('admin_email is empty') } + if $admin_password == '' { fail('admin_password is empty') } + + if $public_ip == '' { fail('public_ip is empty') } + if $private_ip == '' { fail('private_ip is empty') } + + if $mysql_ip == '' { fail('mysql_ip is empty') } + if $mysql_root_password == '' { fail('mysql_root_password is empty') } + if $amqp_ip == '' { fail('mysql_ip is empty') } + + if $memcache_ip == '' { fail('memcache_ip is empty') } + if $neutron_ip == '' { fail('neutron_ip is empty') } + + if $keystone_admin_token == '' { fail('keystone_admin_token is empty') } + if $keystone_db_password == '' { fail('keystone_db_password is empty') } + + if $nova_db_password == '' { fail('nova_db_password is empty') } + if $cinder_db_password == '' { fail('cinder_db_password is empty') } + if $glance_db_password == '' { fail('glance_db_password is empty') } + if $neutron_db_password == '' { fail('neutron_db_password is empty') } + if $trystack_db_password == '' { fail('trystack_db_password is empty') } + + + if $nova_user_password == '' { fail('nova_user_password is empty') } + if $cinder_user_password == '' { fail('cinder_user_password is empty') } + if $glance_user_password == '' { fail('glance_user_password is empty') } + if $neutron_user_password == '' { fail('neutron_user_password is empty') } + if $ceilometer_user_password == '' { fail('ceilometer_user_password is empty') } + if $swift_user_password == '' { fail('swift_user_password is empty') } + + if $heat_user_password == '' { fail('heat_user_password is empty') } + if $heat_db_password == '' { fail('heat_db_password is empty') } + if $heat_auth_encrypt_key == '' { fail('heat_auth_encrypt_key is empty') } + + #class { "quickstack::controller_common": + # admin_email => $admin_email, + # admin_password => $admin_password, + # controller_admin_host => $private_ip, + # controller_priv_host => $private_ip, + # controller_pub_host => $public_ip, + # ssl => false, + # #support_profile => $quickstack::params::support_profile, + # #freeipa => $quickstack::params::freeipa, + + # mysql_host => $mysql_ip, + # mysql_root_password => $mysql_root_password, + # #amqp_provider => $amqp_provider, + # amqp_host => $amqp_ip, + # #amqp_username => $amqp_username, + # #amqp_password => $amqp_password, + # #amqp_nssdb_password => $quickstack::params::amqp_nssdb_password, + + # keystone_admin_token => $keystone_admin_token, + # keystone_db_password => $keystone_db_password, + + # ceilometer_metering_secret => $ceilometer_metering_secret, + # ceilometer_user_password => $ceilometer_user_password, + + # cinder_backend_gluster => $quickstack::params::cinder_backend_gluster, + # cinder_backend_gluster_name => $quickstack::params::cinder_backend_gluster_name, + # cinder_gluster_shares => $quickstack::params::cinder_gluster_shares, + # cinder_user_password => $cinder_user_password, + # cinder_db_password => $cinder_db_password, + + # glance_db_password => $glance_db_password, + # glance_user_password => $glance_user_password, + + # heat_cfn => true, + # heat_cloudwatch => true, + # heat_db_password => $heat_db_password, + # heat_user_password => $heat_user_password, + # heat_auth_encrypt_key => $heat_auth_encrypt_key, + + # horizon_secret_key => $horizon_secret_key, + # horizon_ca => $quickstack::params::horizon_ca, + # horizon_cert => $quickstack::params::horizon_cert, + # horizon_key => $quickstack::params::horizon_key, + + # neutron => true, + # neutron_metadata_proxy_secret => $neutron_metadata_shared_secret, + # neutron_db_password => $neutron_db_password, + # neutron_user_password => $neutron_user_password, + + # nova_db_password => $nova_db_password, + # nova_user_password => $nova_user_password, + + # swift_shared_secret => $swift_shared_secret, + # swift_admin_password => $swift_admin_password, + # swift_ringserver_ip => '192.168.203.1', + # swift_storage_ips => ["192.168.203.2","192.168.203.3","192.168.203.4"], + # swift_storage_device => 'device1', + #} + + + class { "quickstack::neutron::controller": + admin_email => $admin_email, + admin_password => $admin_password, + controller_admin_host => $private_ip, + controller_priv_host => $private_ip, + controller_pub_host => $public_ip, + ssl => false, + #support_profile => $quickstack::params::support_profile, + #freeipa => $quickstack::params::freeipa, + + mysql_host => $mysql_ip, + mysql_root_password => $mysql_root_password, + #amqp_provider => $amqp_provider, + amqp_host => $amqp_ip, + amqp_username => 'guest', + amqp_password => 'guest', + #amqp_nssdb_password => $quickstack::params::amqp_nssdb_password, + + keystone_admin_token => $keystone_admin_token, + keystone_db_password => $keystone_db_password, + + ceilometer_metering_secret => $ceilometer_metering_secret, + ceilometer_user_password => $ceilometer_user_password, + + cinder_backend_gluster => $quickstack::params::cinder_backend_gluster, + cinder_backend_gluster_name => $quickstack::params::cinder_backend_gluster_name, + cinder_gluster_shares => $quickstack::params::cinder_gluster_shares, + cinder_user_password => $cinder_user_password, + cinder_db_password => $cinder_db_password, + + glance_db_password => $glance_db_password, + glance_user_password => $glance_user_password, + + heat_cfn => true, + heat_cloudwatch => true, + heat_db_password => $heat_db_password, + heat_user_password => $heat_user_password, + heat_auth_encrypt_key => $heat_auth_encrypt_key, + + horizon_secret_key => $horizon_secret_key, + horizon_ca => $quickstack::params::horizon_ca, + horizon_cert => $quickstack::params::horizon_cert, + horizon_key => $quickstack::params::horizon_key, + + #neutron => true, + neutron_metadata_proxy_secret => $neutron_metadata_shared_secret, + neutron_db_password => $neutron_db_password, + neutron_user_password => $neutron_user_password, + + nova_db_password => $nova_db_password, + nova_user_password => $nova_user_password, + + swift_shared_secret => $swift_shared_secret, + swift_admin_password => $swift_admin_password, + swift_ringserver_ip => '192.168.203.1', + swift_storage_ips => ["192.168.203.2","192.168.203.3","192.168.203.4"], + swift_storage_device => 'device1', + } + +} diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..f8bef3b --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,2 @@ +class trystack { +} diff --git a/manifests/network.pp b/manifests/network.pp new file mode 100644 index 0000000..226d86b --- /dev/null +++ b/manifests/network.pp @@ -0,0 +1,19 @@ +class trystack::network { + class { "quickstack::neutron::networker": + neutron_metadata_proxy_secret => $neutron_metadata_shared_secret, + neutron_db_password => $neutron_db_password, + neutron_user_password => $neutron_user_password, + nova_db_password => $nova_db_password, + nova_user_password => $nova_user_password, + controller_priv_host => $private_ip, + ovs_tunnel_iface => 'em1', + ovs_tunnel_network => '', + ovs_l2_population => 'True', + mysql_host => $mysql_ip, + amqp_host => $amqp_ip, + amqp_username => 'guest', + amqp_password => 'guest', + external_network_bridge => 'br-ex', + tenant_network_type => 'vxlan', + } +} From 735a24b71ffe972753cec1ca13588ab44d29be7b Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Thu, 18 Dec 2014 09:45:36 -0500 Subject: [PATCH 2/3] finished up the trystack quickstack integration in test lab, ready to move to prod --- files/etc.hosts | 6 +++ manifests/compute.pp | 42 ++++++++++++++++++++- manifests/controller.pp | 81 ++++++++--------------------------------- manifests/init.pp | 3 ++ manifests/network.pp | 23 +++++++++++- 5 files changed, 85 insertions(+), 70 deletions(-) create mode 100644 files/etc.hosts diff --git a/files/etc.hosts b/files/etc.hosts new file mode 100644 index 0000000..1e6014c --- /dev/null +++ b/files/etc.hosts @@ -0,0 +1,6 @@ +127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 +::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 +10.1.254.2 control.example.com control +10.1.254.4 network.example.com control +10.1.254.5 compute1.example.com control +10.1.254.8 compute2.example.com control diff --git a/manifests/compute.pp b/manifests/compute.pp index 0cf0762..26f29b8 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -1,5 +1,21 @@ class trystack::compute { - class { "quickstack::compute_common": + + if $private_ip == '' { fail('private_ip is empty') } + if $mysql_ip == '' { fail('mysql_ip is empty') } + if $amqp_ip == '' { fail('mysql_ip is empty') } + + if $admin_password == '' { fail('admin_password is empty') } + + if $nova_user_password == '' { fail('nova_user_password is empty') } + if $nova_db_password == '' { fail('nova_db_password is empty') } + + if $neutron_user_password == '' { fail('nova_user_password is empty') } + if $neutron_db_password == '' { fail('nova_db_password is empty') } + + if $ceilometer_user_password == '' { fail('ceilometer_user_password is empty') } + if $ceilometer_metering_secret == '' { fail('ceilometer_user_password is empty') } + + class { "quickstack::neutron::compute": auth_host => $private_ip, glance_host => $private_ip, libvirt_images_rbd_pool => 'volumes', @@ -7,7 +23,6 @@ libvirt_inject_password => 'false', libvirt_inject_key => 'false', libvirt_images_type => 'rbd', - mysql_ca => $quickstack::params::mysql_ca, nova_host => $private_ip, nova_db_password => $nova_db_password, nova_user_password => $nova_user_password, @@ -22,16 +37,39 @@ ssl => false, mysql_host => $mysql_ip, + mysql_ca => $quickstack::params::mysql_ca, amqp_host => $amqp_ip, amqp_username => 'guest', amqp_password => 'guest', #amqp_nssdb_password => $quickstack::params::amqp_nssdb_password, + ceilometer => 'true', ceilometer_metering_secret => $ceilometer_metering_secret, ceilometer_user_password => $ceilometer_user_password, cinder_backend_gluster => $quickstack::params::cinder_backend_gluster, + agent_type => 'ovs', + enable_tunneling => true, + + neutron_db_password => $neutron_db_password, + neutron_user_password => $neutron_user_password, + neutron_host => $private_ip, + + #ovs_bridge_mappings = $quickstack::params::ovs_bridge_mappings, + #ovs_bridge_uplinks = $quickstack::params::ovs_bridge_uplinks, + #ovs_vlan_ranges = $quickstack::params::ovs_vlan_ranges, + ovs_tunnel_iface => 'em1', + ovs_tunnel_network => '', + ovs_l2_population => 'True', + + tenant_network_type => 'vxlan', + tunnel_id_ranges => '1:1000', + #ovs_vxlan_udp_port = $quickstack::params::ovs_vxlan_udp_port, + ovs_tunnel_types => ['vxlan'], + + verbose => $quickstack::params::verbose, + security_group_api => 'neutron', } } diff --git a/manifests/controller.pp b/manifests/controller.pp index fee800e..c803c7c 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -16,83 +16,32 @@ if $keystone_admin_token == '' { fail('keystone_admin_token is empty') } if $keystone_db_password == '' { fail('keystone_db_password is empty') } - if $nova_db_password == '' { fail('nova_db_password is empty') } - if $cinder_db_password == '' { fail('cinder_db_password is empty') } - if $glance_db_password == '' { fail('glance_db_password is empty') } - if $neutron_db_password == '' { fail('neutron_db_password is empty') } - if $trystack_db_password == '' { fail('trystack_db_password is empty') } - + if $horizon_secret_key == '' { fail('horizon_secret_key is empty') } + #if $trystack_db_password == '' { fail('trystack_db_password is empty') } if $nova_user_password == '' { fail('nova_user_password is empty') } + if $nova_db_password == '' { fail('nova_db_password is empty') } + if $cinder_user_password == '' { fail('cinder_user_password is empty') } + if $cinder_db_password == '' { fail('cinder_db_password is empty') } + if $glance_user_password == '' { fail('glance_user_password is empty') } + if $glance_db_password == '' { fail('glance_db_password is empty') } + if $neutron_user_password == '' { fail('neutron_user_password is empty') } + if $neutron_db_password == '' { fail('neutron_db_password is empty') } + if $neutron_metadata_shared_secret == '' { fail('neutron_metadata_shared_secret is empty') } + if $ceilometer_user_password == '' { fail('ceilometer_user_password is empty') } - if $swift_user_password == '' { fail('swift_user_password is empty') } + if $ceilometer_metering_secret == '' { fail('ceilometer_user_password is empty') } if $heat_user_password == '' { fail('heat_user_password is empty') } if $heat_db_password == '' { fail('heat_db_password is empty') } if $heat_auth_encrypt_key == '' { fail('heat_auth_encrypt_key is empty') } - #class { "quickstack::controller_common": - # admin_email => $admin_email, - # admin_password => $admin_password, - # controller_admin_host => $private_ip, - # controller_priv_host => $private_ip, - # controller_pub_host => $public_ip, - # ssl => false, - # #support_profile => $quickstack::params::support_profile, - # #freeipa => $quickstack::params::freeipa, - - # mysql_host => $mysql_ip, - # mysql_root_password => $mysql_root_password, - # #amqp_provider => $amqp_provider, - # amqp_host => $amqp_ip, - # #amqp_username => $amqp_username, - # #amqp_password => $amqp_password, - # #amqp_nssdb_password => $quickstack::params::amqp_nssdb_password, - - # keystone_admin_token => $keystone_admin_token, - # keystone_db_password => $keystone_db_password, - - # ceilometer_metering_secret => $ceilometer_metering_secret, - # ceilometer_user_password => $ceilometer_user_password, - - # cinder_backend_gluster => $quickstack::params::cinder_backend_gluster, - # cinder_backend_gluster_name => $quickstack::params::cinder_backend_gluster_name, - # cinder_gluster_shares => $quickstack::params::cinder_gluster_shares, - # cinder_user_password => $cinder_user_password, - # cinder_db_password => $cinder_db_password, - - # glance_db_password => $glance_db_password, - # glance_user_password => $glance_user_password, - - # heat_cfn => true, - # heat_cloudwatch => true, - # heat_db_password => $heat_db_password, - # heat_user_password => $heat_user_password, - # heat_auth_encrypt_key => $heat_auth_encrypt_key, - - # horizon_secret_key => $horizon_secret_key, - # horizon_ca => $quickstack::params::horizon_ca, - # horizon_cert => $quickstack::params::horizon_cert, - # horizon_key => $quickstack::params::horizon_key, - - # neutron => true, - # neutron_metadata_proxy_secret => $neutron_metadata_shared_secret, - # neutron_db_password => $neutron_db_password, - # neutron_user_password => $neutron_user_password, - - # nova_db_password => $nova_db_password, - # nova_user_password => $nova_user_password, - - # swift_shared_secret => $swift_shared_secret, - # swift_admin_password => $swift_admin_password, - # swift_ringserver_ip => '192.168.203.1', - # swift_storage_ips => ["192.168.203.2","192.168.203.3","192.168.203.4"], - # swift_storage_device => 'device1', - #} - + if $swift_user_password == '' { fail('swift_user_password is empty') } + if $swift_shared_secret == '' { fail('swift_shared_secret is empty') } + if $swift_admin_password == '' { fail('swift_admin_password is empty') } class { "quickstack::neutron::controller": admin_email => $admin_email, diff --git a/manifests/init.pp b/manifests/init.pp index f8bef3b..a99b7ff 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,2 +1,5 @@ class trystack { + file {'/etc/hosts': + content=> 'file:///modules/trystack/etc.hosts', + } } diff --git a/manifests/network.pp b/manifests/network.pp index 226d86b..006ec3a 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -1,19 +1,38 @@ class trystack::network { + + if $private_ip == '' { fail('private_ip is empty') } + if $mysql_ip == '' { fail('mysql_ip is empty') } + if $amqp_ip == '' { fail('amqp_ip is empty') } + + if $nova_user_password == '' { fail('nova_user_password is empty') } + if $nova_db_password == '' { fail('nova_db_password is empty') } + + if $neutron_user_password == '' { fail('neutron_user_password is empty') } + if $neutron_db_password == '' { fail('neutron_db_password is empty') } + if $neutron_metadata_shared_secret == '' { fail('neutron_metadata_shared_secret is empty') } + class { "quickstack::neutron::networker": neutron_metadata_proxy_secret => $neutron_metadata_shared_secret, neutron_db_password => $neutron_db_password, neutron_user_password => $neutron_user_password, nova_db_password => $nova_db_password, nova_user_password => $nova_user_password, + controller_priv_host => $private_ip, + + agent_type => 'ovs', + enable_tunneling => true, ovs_tunnel_iface => 'em1', ovs_tunnel_network => '', ovs_l2_population => 'True', + ovs_tunnel_types => ['vxlan'], + external_network_bridge => 'br-ex', + tenant_network_type => 'vxlan', + tunnel_id_ranges => '1:1000', + mysql_host => $mysql_ip, amqp_host => $amqp_ip, amqp_username => 'guest', amqp_password => 'guest', - external_network_bridge => 'br-ex', - tenant_network_type => 'vxlan', } } From a579b4c17f1febf109ade2542643508b8aba950d Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Tue, 20 Jan 2015 15:14:04 -0500 Subject: [PATCH 3/3] updating one of the variable checks --- manifests/controller.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/controller.pp b/manifests/controller.pp index c803c7c..c1d165d 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -8,7 +8,7 @@ if $mysql_ip == '' { fail('mysql_ip is empty') } if $mysql_root_password == '' { fail('mysql_root_password is empty') } - if $amqp_ip == '' { fail('mysql_ip is empty') } + if $amqp_ip == '' { fail('amqp_ip is empty') } if $memcache_ip == '' { fail('memcache_ip is empty') } if $neutron_ip == '' { fail('neutron_ip is empty') }