Create manifests directory for common bits
Change-Id: Ibf7d3aa962e2e0727f0593f70186521602c48ca6
This commit is contained in:
parent
8bfe93fde5
commit
e1c20c9b1f
@ -68,6 +68,10 @@ mod 'nova',
|
||||
:git => 'https://git.openstack.org/openstack/puppet-nova',
|
||||
:ref => 'master'
|
||||
|
||||
mod 'openstack_integration',
|
||||
:git => 'https://git.openstack.org/openstack/puppet-openstack-integration',
|
||||
:ref => 'master'
|
||||
|
||||
mod 'openstack_extras',
|
||||
:git => 'https://git.openstack.org/openstack/puppet-openstack_extras',
|
||||
:ref => 'master'
|
||||
|
@ -14,81 +14,24 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
Exec { logoutput => 'on_failure' }
|
||||
include ::openstack_integration
|
||||
include ::openstack_integration::repos
|
||||
include ::openstack_integration::rabbitmq
|
||||
include ::openstack_integration::mysql
|
||||
include ::openstack_integration::keystone
|
||||
|
||||
# Common resources
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
include ::apt
|
||||
class { '::openstack_extras::repo::debian::ubuntu':
|
||||
release => 'liberty',
|
||||
package_require => true,
|
||||
}
|
||||
$package_provider = 'apt'
|
||||
}
|
||||
'RedHat': {
|
||||
class { '::openstack_extras::repo::redhat::redhat':
|
||||
release => 'liberty',
|
||||
}
|
||||
package { 'openstack-selinux': ensure => 'latest' }
|
||||
$package_provider = 'yum'
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily (${::osfamily})")
|
||||
}
|
||||
}
|
||||
|
||||
# Deploy MySQL Server
|
||||
class { '::mysql::server': }
|
||||
|
||||
# Deploy RabbitMQ
|
||||
class { '::rabbitmq':
|
||||
delete_guest_user => true,
|
||||
package_provider => $package_provider,
|
||||
}
|
||||
rabbitmq_vhost { '/':
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['rabbitmq'],
|
||||
}
|
||||
rabbitmq_user { ['neutron', 'nova', 'cinder', 'ceilometer', 'glance', 'trove']:
|
||||
admin => true,
|
||||
password => 'an_even_bigger_secret',
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['rabbitmq'],
|
||||
require => Class['::rabbitmq'],
|
||||
}
|
||||
rabbitmq_user_permissions { ['neutron@/', 'nova@/', 'cinder@/', 'ceilometer@/', 'glance@/', 'trove@/']:
|
||||
configure_permission => '.*',
|
||||
write_permission => '.*',
|
||||
read_permission => '.*',
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['rabbitmq'],
|
||||
}
|
||||
|
||||
# Deploy Keystone
|
||||
class { '::keystone::client': }
|
||||
class { '::keystone::cron::token_flush': }
|
||||
class { '::keystone::db::mysql':
|
||||
password => 'keystone',
|
||||
}
|
||||
class { '::keystone':
|
||||
verbose => true,
|
||||
debug => true,
|
||||
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
|
||||
admin_token => 'admin_token',
|
||||
enabled => true,
|
||||
service_name => 'httpd',
|
||||
}
|
||||
include ::apache
|
||||
class { '::keystone::wsgi::apache':
|
||||
ssl => false,
|
||||
workers => 2,
|
||||
}
|
||||
class { '::keystone::roles::admin':
|
||||
email => 'test@example.tld',
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::keystone::endpoint':
|
||||
default_domain => 'admin',
|
||||
require => Class['::rabbitmq'],
|
||||
}
|
||||
|
||||
# Deploy Glance
|
||||
|
@ -14,81 +14,24 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
Exec { logoutput => 'on_failure' }
|
||||
include ::openstack_integration
|
||||
include ::openstack_integration::repos
|
||||
include ::openstack_integration::rabbitmq
|
||||
include ::openstack_integration::mysql
|
||||
include ::openstack_integration::keystone
|
||||
|
||||
# Common resources
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
include ::apt
|
||||
class { '::openstack_extras::repo::debian::ubuntu':
|
||||
release => 'liberty',
|
||||
package_require => true,
|
||||
}
|
||||
$package_provider = 'apt'
|
||||
}
|
||||
'RedHat': {
|
||||
class { '::openstack_extras::repo::redhat::redhat':
|
||||
release => 'liberty',
|
||||
}
|
||||
package { 'openstack-selinux': ensure => 'latest' }
|
||||
$package_provider = 'yum'
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily (${::osfamily})")
|
||||
}
|
||||
}
|
||||
|
||||
# Deploy MySQL Server
|
||||
class { '::mysql::server': }
|
||||
|
||||
# Deploy RabbitMQ
|
||||
class { '::rabbitmq':
|
||||
delete_guest_user => true,
|
||||
package_provider => $package_provider,
|
||||
}
|
||||
rabbitmq_vhost { '/':
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['rabbitmq'],
|
||||
}
|
||||
rabbitmq_user { ['glance', 'nova', 'neutron', 'sahara', 'heat']:
|
||||
admin => true,
|
||||
password => 'an_even_bigger_secret',
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['rabbitmq'],
|
||||
require => Class['::rabbitmq'],
|
||||
}
|
||||
rabbitmq_user_permissions { ['glance@/', 'nova@/', 'neutron@/', 'sahara@/', 'heat@/']:
|
||||
configure_permission => '.*',
|
||||
write_permission => '.*',
|
||||
read_permission => '.*',
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['rabbitmq'],
|
||||
}
|
||||
|
||||
# Deploy Keystone
|
||||
class { '::keystone::client': }
|
||||
class { '::keystone::cron::token_flush': }
|
||||
class { '::keystone::db::mysql':
|
||||
password => 'keystone',
|
||||
}
|
||||
class { '::keystone':
|
||||
verbose => true,
|
||||
debug => true,
|
||||
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
|
||||
admin_token => 'admin_token',
|
||||
enabled => true,
|
||||
service_name => 'httpd',
|
||||
}
|
||||
include ::apache
|
||||
class { '::keystone::wsgi::apache':
|
||||
ssl => false,
|
||||
workers => 2,
|
||||
}
|
||||
class { '::keystone::roles::admin':
|
||||
email => 'test@example.tld',
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::keystone::endpoint':
|
||||
default_domain => 'admin',
|
||||
require => Class['::rabbitmq'],
|
||||
}
|
||||
|
||||
# Deploy Glance
|
||||
|
@ -36,6 +36,10 @@ EOF
|
||||
--zuul-branch $ZUUL_BRANCH \
|
||||
--zuul-url $ZUUL_URL \
|
||||
git://git.openstack.org $project_names
|
||||
|
||||
# Because openstack-integration can't be a class name.
|
||||
# https://projects.puppetlabs.com/issues/5268
|
||||
mv $PUPPETFILE_DIR/openstack-integration $PUPPETFILE_DIR/openstack_integration
|
||||
}
|
||||
|
||||
# Install all Puppet modules with r10k
|
||||
|
5
manifests/init.pp
Normal file
5
manifests/init.pp
Normal file
@ -0,0 +1,5 @@
|
||||
class openstack_integration {
|
||||
|
||||
Exec { logoutput => 'on_failure' }
|
||||
|
||||
}
|
29
manifests/keystone.pp
Normal file
29
manifests/keystone.pp
Normal file
@ -0,0 +1,29 @@
|
||||
class openstack_integration::keystone {
|
||||
|
||||
class { '::keystone::client': }
|
||||
class { '::keystone::cron::token_flush': }
|
||||
class { '::keystone::db::mysql':
|
||||
password => 'keystone',
|
||||
}
|
||||
class { '::keystone':
|
||||
verbose => true,
|
||||
debug => true,
|
||||
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
|
||||
admin_token => 'admin_token',
|
||||
enabled => true,
|
||||
service_name => 'httpd',
|
||||
}
|
||||
include ::apache
|
||||
class { '::keystone::wsgi::apache':
|
||||
ssl => false,
|
||||
workers => 2,
|
||||
}
|
||||
class { '::keystone::roles::admin':
|
||||
email => 'test@example.tld',
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::keystone::endpoint':
|
||||
default_domain => 'admin',
|
||||
}
|
||||
|
||||
}
|
5
manifests/mysql.pp
Normal file
5
manifests/mysql.pp
Normal file
@ -0,0 +1,5 @@
|
||||
class openstack_integration::mysql {
|
||||
|
||||
class { '::mysql::server': }
|
||||
|
||||
}
|
24
manifests/rabbitmq.pp
Normal file
24
manifests/rabbitmq.pp
Normal file
@ -0,0 +1,24 @@
|
||||
class openstack_integration::rabbitmq {
|
||||
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
$package_provider = 'apt'
|
||||
}
|
||||
'RedHat': {
|
||||
$package_provider = 'yum'
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily (${::osfamily})")
|
||||
}
|
||||
}
|
||||
|
||||
class { '::rabbitmq':
|
||||
delete_guest_user => true,
|
||||
package_provider => $package_provider,
|
||||
}
|
||||
rabbitmq_vhost { '/':
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['::rabbitmq'],
|
||||
}
|
||||
|
||||
}
|
24
manifests/repos.pp
Normal file
24
manifests/repos.pp
Normal file
@ -0,0 +1,24 @@
|
||||
class openstack_integration::repos {
|
||||
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
include ::apt
|
||||
class { '::openstack_extras::repo::debian::ubuntu':
|
||||
release => 'liberty',
|
||||
package_require => true,
|
||||
}
|
||||
$package_provider = 'apt'
|
||||
}
|
||||
'RedHat': {
|
||||
class { '::openstack_extras::repo::redhat::redhat':
|
||||
release => 'liberty',
|
||||
}
|
||||
package { 'openstack-selinux': ensure => 'latest' }
|
||||
$package_provider = 'yum'
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily (${::osfamily})")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user