puppet-openstack-integration/manifests/sahara.pp
Alex Schultz ddcb1b4786 Switch to default_transport_url
The rabbit_host, rabbit_hosts, rabbit_userid, rabbit_password,
rabbit_port and rabbit_virtual_host parameters are being deprecated.
This change updates the p-o-i tests to use the default_transport_url for
the rabbit connection instead.

Change-Id: Icb15ad3b5d75a35afcb685f4ae03c5755031fc3d
Depends-On: I43ac3079da9e52179457ca1a34f4faee60d5617b
Depends-On: Ie63457370ae37ef5af5878b1a97b8bafa80a8189
Depends-On: Ia0c5b5072431bbc186c8b96b7f034e68e9248af3
Depends-On: I43500ac7be4296ea534266fa14ca37fc700b0092
Depends-On: If4dfe8b82518fc4e590731a805ee3115b11f4f47
Depends-On: I00d4782693c1f67b82673624d4d36822c9762303
Depends-On: If83c0f0e61a08061334536399a42767a305966b7
2016-11-30 11:06:33 -07:00

89 lines
3.1 KiB
Puppet

class openstack_integration::sahara {
include ::openstack_integration::config
include ::openstack_integration::params
rabbitmq_user { 'sahara':
admin => true,
password => 'an_even_bigger_secret',
provider => 'rabbitmqctl',
require => Class['::rabbitmq'],
}
rabbitmq_user_permissions { 'sahara@/':
configure_permission => '.*',
write_permission => '.*',
read_permission => '.*',
provider => 'rabbitmqctl',
require => Class['::rabbitmq'],
}
class { '::sahara::db::mysql':
password => 'sahara',
}
class { '::sahara::keystone::auth':
# SSL does not seem to work in Sahara
# https://bugs.launchpad.net/sahara/+bug/1565082
public_url => "http://${::openstack_integration::config::ip_for_url}:8386/v1.1/%(tenant_id)s",
internal_url => "http://${::openstack_integration::config::ip_for_url}:8386/v1.1/%(tenant_id)s",
admin_url => "http://${::openstack_integration::config::ip_for_url}:8386/v1.1/%(tenant_id)s",
password => 'a_big_secret',
}
class { '::sahara':
host => $::openstack_integration::config::host,
database_connection => 'mysql+pymysql://sahara:sahara@127.0.0.1/sahara?charset=utf8',
default_transport_url => os_transport_url({
'transport' => 'rabbit',
'host' => $::openstack_integration::config::host,
'port' => $::openstack_integration::config::rabbit_port,
'username' => 'sahara',
'password' => 'an_even_bigger_secret',
}),
rabbit_use_ssl => $::openstack_integration::config::ssl,
rpc_backend => 'rabbit',
admin_password => 'a_big_secret',
admin_user => 'sahara',
admin_tenant_name => 'services',
debug => true,
auth_uri => "${::openstack_integration::config::keystone_admin_uri}/v2.0",
identity_uri => $::openstack_integration::config::keystone_admin_uri,
memcached_servers => $::openstack_integration::config::memcached_servers,
}
class { '::sahara::service::api':
api_workers => 2,
}
class { '::sahara::service::engine': }
class { '::sahara::client': }
class { '::sahara::notify':
enable_notifications => true,
}
# for ubuntu we need saharaclient >= 0.15.0
if $::osfamily == 'RedHat' {
# create simple sahara templates
sahara_node_group_template { 'master':
ensure => present,
plugin => 'vanilla',
plugin_version => '2.7.1',
flavor => 'm1.micro',
node_processes => [ 'namenode', 'resourcemanager' ],
}
sahara_node_group_template { 'worker':
ensure => present,
plugin => 'vanilla',
plugin_version => '2.7.1',
flavor => 'm1.micro',
node_processes => [ 'datanode', 'nodemanager' ],
}
sahara_cluster_template { 'cluster':
ensure => present,
node_groups => [ 'master:1', 'worker:2' ]
}
Nova_flavor<||> -> Sahara_node_group_template<||>
Class['::sahara::keystone::auth'] -> Sahara_node_group_template<||>
Class['::openstack_extras::auth_file'] -> Sahara_node_group_template<||>
}
}