Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstack #1

Open
wants to merge 46 commits into
base: quickstack
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e9c946b
-Updated init to call repo
trozet Jan 21, 2015
fdbbb84
forgot to include init.pp
trozet Jan 21, 2015
c046cea
Added support for controller_networker consolidation and opendaylight.
trozet Feb 5, 2015
9827095
Added minor check to see if osfamily is redhat before trying to yum i…
trozet Feb 11, 2015
a326274
Fix for disabling selinux as well as minor change to staging.
trozet Feb 23, 2015
b69d627
Fixes issue with trying to provision a host inside of a firewall by c…
trozet Feb 23, 2015
63502fb
Adds tempest puppet module for a tempest host.
trozet Mar 9, 2015
f4d0cf0
Fixes duplicate this_agent and ml2_mechanism_drivers params.
trozet Mar 16, 2015
5b9af18
Added ceph repos to repolist
trozet Mar 30, 2015
526a429
Adds HA support for control node
trozet Mar 30, 2015
9c9ac7d
Adds HA and Ceph support for compute
trozet Mar 31, 2015
016fdfd
Removes opendaylight install and adds fixes
trozet Mar 31, 2015
2e78e55
Installs opendaylight via opendaylight puppet module
trozet Mar 31, 2015
c73bbf4
Changes keystone, sql, neutron_metadata to default to single_password
trozet Mar 31, 2015
d32a2a3
Fixes ha_flag to check to see if it is true instead of just exists
trozet Mar 31, 2015
1552f3f
Changes admin_password to default to single_password instead of being a
trozet Mar 31, 2015
111c02a
Fixes admin_password to be a default and checks for controller array to
trozet Mar 31, 2015
a6fde2d
Fixes various ordering issues and array usage problems
trozet Mar 31, 2015
58b3c90
Fixes array parsing issue with global parameter
trozet Apr 1, 2015
5899a53
Syntax change to make if statment more clear
trozet Apr 1, 2015
a05a34c
Fixes incorrect amqp variable usage
trozet Apr 1, 2015
1872037
Adds ceph_deploy class for deploying ceph mon+osd
trozet Apr 6, 2015
a347280
Adds ceph
trozet Apr 6, 2015
20343fd
Fixed variable references in parameters
trozet Apr 8, 2015
a0ebcf7
Fixes permissions so that OpenStack can contact the cluster + adds pool
trozet Apr 8, 2015
9a9c62d
Fixes osd_journal variable bug
trozet Apr 8, 2015
5941417
Ceph is actually included in EPEL for CentOS 7 and these repos are
trozet Apr 8, 2015
58a4aee
Adds python-rados which now replaces python ceph + includes NTP
trozet Apr 8, 2015
6e5d2f9
Changes HA to not use interface parameters
trozet Apr 16, 2015
16a02f9
Fixes missing glance_user_password
trozet Apr 29, 2015
271285d
Adds Heat to the HA deployment
trozet May 1, 2015
5c107c5
Adds external network setup functionality
trozet May 1, 2015
ec954a7
Adds working external network support
trozet May 20, 2015
40e3d4f
Moves external network presetup from init to controller_networker
trozet May 20, 2015
b67fcba
Compute nodes networking is stopping. I think this is because
trozet May 21, 2015
06fa22c
Fixes syntax error
trozet May 21, 2015
b2b6064
Modifies default values for quota with neutron
trozet May 22, 2015
f3067fe
Fixes missing neutron_metadata_proxy_secret variable
trozet Jun 2, 2015
05278b8
Adds provider router needed for rally tests to run correctly.
trozet Jun 2, 2015
edd8c48
Fixes external router "provider_router" so that it's external interface
trozet Jun 5, 2015
d36cf99
Simplifies the non-HA deployment for parameters
trozet Jun 9, 2015
a33ca8a
Simplifies parameters for compute.pp
trozet Jun 9, 2015
6a5d471
Fixes check for ha_flag being true as a boolean
trozet Jun 9, 2015
9cdc1ce
Fixes non-ha odl_control_ip var on compute, and adds keystonerc to no…
trozet Jun 11, 2015
3f7a754
Fixes variables to point to controller (controller_ip)
trozet Jun 12, 2015
b4bccac
Fixes nova_host to point to public ip of nova (for vncproxy access)
trozet Jun 17, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions manifests/ceph_deploy.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
class trystack::ceph_deploy (
$fsid = '904c8491-5c16-4dae-9cc3-6ce633a7f4cc',
$osd_pool_default_pg_num = '128',
$osd_pool_default_size = '1',
$osd_pool_default_min_size = '1',
$mon_initial_members = '',
$mon_host = '',
$cluster_network = "10.4.8.0/21",
$public_network = "10.4.8.0/21",
$osd_journal_size = '1000',
$osd_ip = '',
$mon_key = 'AQDcvhVV+H08DBAA5/0GGcfBQxz+/eKAdbJdTQ==',
$admin_key = 'AQDcvhVV+H08DBAA5/0GGcfBQxz+/eKAdbJdTQ==',
$images_key = 'AQAfHBdUKLnUFxAAtO7WPKQZ8QfEoGqH0CLd7A==',
$volumes_key = 'AQAfHBdUsFPTHhAAfqVqPq31FFCvyyO7oaOQXw==',
$boostrap_key = 'AQDcvhVV+H08DBAA5/0GGcfBQxz+/eKAdbJdTQ==',
) {

class { 'ceph':
fsid => $fsid,
osd_pool_default_pg_num => $osd_pool_default_pg_num,
osd_pool_default_size => $osd_pool_default_size,
osd_pool_default_min_size => $osd_pool_default_min_size,
mon_initial_members => $mon_initial_members,
mon_host => $mon_host,
cluster_network => $cluster_network,
public_network => $public_network,
}
->
ceph_config {
'global/osd_journal_size': value => $osd_journal_size;
}
->
ceph::mon { $::hostname:
public_addr => $osd_ip,
key => $mon_key,
}

Ceph::Key {
inject => true,
inject_as_id => 'mon.',
inject_keyring => "/var/lib/ceph/mon/ceph-${::hostname}/keyring",
}

ceph::key { 'client.admin':
secret => $admin_key,
cap_mon => 'allow *',
cap_osd => 'allow *',
cap_mds => 'allow',
mode => '0644',
}
ceph::key { 'client.images':
secret => $images_key,
cap_mon => 'allow r',
cap_osd => 'allow class-read object_prefix rbd_children, allow rwx pool=images',
inject => true,
mode => '0644',
}

ceph::key { 'client.volumes':
secret => $volumes_key,
cap_mon => 'allow r',
cap_osd => 'allow class-read object_prefix rbd_children, allow rwx pool=volumes',
inject => true,
mode => '0644',
}
ceph::key { 'client.bootstrap-osd':
secret => $boostrap_key,
cap_mon => 'allow profile bootstrap-osd',
keyring_path => '/var/lib/ceph/bootstrap-osd/ceph.keyring',
}
->
ceph::osd { '/osd0': }
->
exec { 'create volumes pool':
command => "/usr/bin/ceph osd pool create volumes $osd_pool_default_pg_num",
}
->
exec { 'create images pool':
command => "/usr/bin/ceph osd pool create images $osd_pool_default_pg_num",
}
}
172 changes: 126 additions & 46 deletions manifests/compute.pp
Original file line number Diff line number Diff line change
@@ -1,74 +1,154 @@
class trystack::compute {
if ($odl_flag != '') and str2bool($odl_flag) {
$ml2_mech_drivers = ['opendaylight']
$this_agent = 'opendaylight'
}
else {
$ml2_mech_drivers = ['openvswitch','l2population']
$this_agent = 'ovs'
}

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') }
##Common Parameters
if !$rbd_secret_uuid { $rbd_secret_uuid = '3b519746-4021-4f72-957e-5b9d991723be' }
if !$private_subnet { fail('private_subnet is empty')}
if !$ceph_public_network { $ceph_public_network = $private_subnet }
if !$ceph_fsid { $ceph_fsid = '904c8491-5c16-4dae-9cc3-6ce633a7f4cc' }
if !$ceph_images_key { $ceph_images_key = 'AQAfHBdUKLnUFxAAtO7WPKQZ8QfEoGqH0CLd7A==' }
if !$ceph_osd_journal_size { $ceph_osd_journal_size = '1000' }
if !$ceph_osd_pool_size { $ceph_osd_pool_size = '1' }
if !$ceph_volumes_key { $ceph_volumes_key = 'AQAfHBdUsFPTHhAAfqVqPq31FFCvyyO7oaOQXw==' }


##Most users will only care about a single user/password for all services
##so lets create one variable that can be used instead of separate usernames/passwords
if !$single_username { $single_username = 'octopus' }
if !$single_password { $single_password = 'octopus' }

if !$admin_password { $admin_password = $single_password }
if !$neutron_db_password { $neutron_db_password = $single_password }
if !$neutron_user_password { $neutron_user_password = $single_password }

if !$ceilometer_user_password { $ceilometer_user_password = $single_password }
if !$ceilometer_metering_secret { $ceilometer_metering_secret = $single_password }

##HA Global params
if $ha_flag and str2bool($ha_flag) {
if $private_network == '' { fail('private_network is empty') }
if !$keystone_private_vip { fail('keystone_private_vip is empty') }
if !$glance_private_vip { fail('glance_private_vip is empty') }
if !$nova_public_vip { fail('nova_public_vip is empty') }
if !$nova_db_password { $nova_db_password = $single_password }
if !$nova_user_password { $nova_user_password = $single_password }
if !$controllers_ip_array { fail('controllers_ip_array is empty') }
if !$controllers_hostnames_array { fail('controllers_hostnames_array is empty') }
$controllers_ip_array = split($controllers_ip_array, ',')
$controllers_hostnames_array = split($controllers_hostnames_array, ',')
if !$odl_control_ip { $odl_control_ip = $controllers_ip_array[0] }
if !$db_vip { fail('db_vip is empty') }
$mysql_ip = $db_vip
if !$amqp_vip { fail('amqp_vip is empty') }
$amqp_ip = $amqp_vip
if !$amqp_username { $amqp_username = $single_username }
if !$amqp_password { $amqp_password = $single_password }
if !$ceph_mon_initial_members { $ceph_mon_initial_members = $controllers_hostnames_array }
if !$ceph_mon_host { $ceph_mon_host = $controllers_ip_array }
if !$neutron_private_vip { fail('neutron_private_vip is empty') }

##Find private interface
$ovs_tunnel_if = get_nic_from_network("$private_network")

} else {
##non HA params
##Mandatory
if $private_network == '' { fail('private_network is empty') }
if ($odl_flag != '') and str2bool($odl_flag) {
if $odl_control_ip == '' { fail('odl_control_ip is empty') }
}
if $controller_ip == '' { fail('controller_ip is empty') }

##Optional
##Find private interface
$ovs_tunnel_if = get_nic_from_network("$private_network")
##Find private ip
$private_ip = get_ip_from_nic("$ovs_tunnel_if")

$keystone_private_vip = $controller_ip
$glance_private_vip = $controller_ip
$nova_public_vip = $controller_ip
$neutron_private_vip = $controller_ip

if !$nova_db_password { $nova_db_password = $single_password }
if !$nova_user_password { $nova_user_password = $single_password }
if !$mysql_ip { $mysql_ip = $controller_ip }
if !$amqp_ip { $amqp_ip = $controller_ip }
if !$amqp_username { $amqp_username = $single_username }
if !$amqp_password { $amqp_password = $single_password }
if !$ceph_mon_host { $ceph_mon_host= ["$private_ip"] }
if !$ceph_mon_initial_members { $ceph_mon_initial_members = ["$::hostname"] }
}

class { "quickstack::neutron::compute":
auth_host => $private_ip,
glance_host => $private_ip,
auth_host => $keystone_private_vip,
glance_host => $glance_private_vip,
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',
nova_host => $private_ip,
nova_db_password => $nova_db_password,
nova_user_password => $nova_user_password,
nova_host => $nova_public_vip,
nova_db_password => $nova_db_password,
nova_user_password => $nova_user_password,
private_network => '',
private_iface => '',
private_iface => $ovs_tunnel_if,
private_ip => '',
rbd_user => 'volumes',
rbd_secret_uuid => '',
rbd_secret_uuid => $rbd_secret_uuid,
network_device_mtu => $quickstack::params::network_device_mtu,

admin_password => $admin_password,
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',
admin_password => $admin_password,
ssl => false,

mysql_host => $mysql_ip,
mysql_ca => '/etc/ipa/ca.crt',
amqp_host => $amqp_ip,
amqp_username => $amqp_username,
amqp_password => $amqp_password,

ceilometer => 'false',
ceilometer_metering_secret => $ceilometer_metering_secret,
ceilometer_user_password => $ceilometer_user_password,

cinder_backend_gluster => $quickstack::params::cinder_backend_gluster,
cinder_backend_rbd => 'true',
glance_backend_rbd => 'true',
ceph_cluster_network => $ceph_public_network,
ceph_fsid => $ceph_fsid,
ceph_images_key => $ceph_images_key,
ceph_mon_host => $ceph_mon_host,
ceph_mon_initial_members => $ceph_mon_initial_members,
ceph_osd_pool_default_size => $ceph_osd_pool_size,
ceph_osd_journal_size => $ceph_osd_journal_size,
ceph_volumes_key => $ceph_volumes_key,

agent_type => $this_agent,
enable_tunneling => true,

ml2_mechanism_drivers => $ml2_mech_drivers,
odl_controller_ip => $odl_control_ip,

neutron_db_password => $neutron_db_password,
neutron_user_password => $neutron_user_password,
neutron_host => $private_ip,
neutron_host => $neutron_private_vip,

#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_iface => $ovs_tunnel_if,
ovs_tunnel_network => '',
ovs_l2_population => 'True',
ovs_l2_population => 'false',

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,
verbose => 'true',
security_group_api => 'neutron',

}
Expand Down
15 changes: 15 additions & 0 deletions manifests/controller.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
class trystack::controller {
###use 8081 as a default work around swift service
if $odl_rest_port == '' {$odl_rest_port = '8081'}

if ($odl_flag != '') and str2bool($odl_flag) {
$ml2_mech_drivers = ['opendaylight']
}
else {
$ml2_mech_drivers = ['openvswitch','l2population']
}


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 $odl_control_ip == '' { fail('odl_controL_ip is empty, should be the IP of your network node private interface') }

if $mysql_ip == '' { fail('mysql_ip is empty') }
if $mysql_root_password == '' { fail('mysql_root_password is empty') }
if $amqp_ip == '' { fail('amqp_ip is empty') }
Expand Down Expand Up @@ -87,13 +99,16 @@
horizon_cert => $quickstack::params::horizon_cert,
horizon_key => $quickstack::params::horizon_key,

ml2_mechanism_drivers => $ml2_mech_drivers,
#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,
odl_controller_ip => $odl_control_ip,
odl_controller_port => $odl_rest_port,

swift_shared_secret => $swift_shared_secret,
swift_admin_password => $swift_admin_password,
Expand Down
Loading