Remove stolen examples

This commit is contained in:
vic 2013-02-28 21:39:44 +04:00
parent ce23b99e61
commit ee426e1eec
20 changed files with 106 additions and 1246 deletions

View File

@ -10,7 +10,6 @@ node glance {
}
node glance_keystone {
class { 'keystone::config::sqlite': }
class { 'keystone':
verbose => true,
debug => true,
@ -34,9 +33,7 @@ node glance_keystone_mysql {
class { 'keystone::roles::admin': }
class { 'role_glance_mysql': }
class { 'glance::keystone::auth': }
class { 'keystone::config::mysql':
password => 'keystone'
}
}
node default {

View File

@ -1,12 +1,9 @@
name 'puppetlabs-keystone'
version '0.2.0'
author 'Puppet Labs'
license 'Apache'
project_page 'http://github.com/puppetlabs/puppetlabs-keystone'
source 'git://github.com/puppetlabs/puppetlabs-keystone'
summary 'Keystone Puppet Module'
description 'Openstack Keystone module. Tested on Ubuntu and RHEL 6'
dependency 'ripienaar/concat', '>=0.2.0'
dependency 'puppetlabs/mysql', '>=0.5.0'
dependency 'puppetlabs/apt', '>=0.0.4'
name 'puppetlabs-keystone'
version '0.2.0'
author 'Puppet Labs'
license 'Apache'
project_page 'http://github.com/puppetlabs/puppetlabs-keystone'
source 'git://github.com/puppetlabs/puppetlabs-keystone'
summary 'Keystone Puppet Module'
description 'Openstack Keystone module. Tested on Ubuntu and RHEL 6'

View File

@ -7,4 +7,3 @@ project_page 'https://github.com/Tribily/puppet-mmm'
source 'https://github.com/Tribily/puppet-mmm'
summary 'A puppet module to manage MMM for MySQL'
description 'For more information about MMM for MySQL/MariaDB, see http://mysql-mmm.org'
dependency 'tribily/mariadb', '>=1.0'

View File

@ -1,23 +1,25 @@
$master_hostname = 'fuel-controller-01'
$which = $::hostname ? { $master_hostname => 0, default => 1 }
$galera_node_addresses = []
$galera_cluster_name = 'openstack'
$galera_master_ip = 'master_ip'
$galera_node_address = $galera_node_addresses[$which]
$master_hostname = 'fuel-controller-01'
$primary_controller = $::hostname ? {
$master_hostname => true,
default => false,
}
$galera_node_addresses = ['fuel-controller-01', 'fuel-controller-02']
$galera_cluster_name = 'openstack'
$galera_master_ip = 'master_ip'
$custom_mysql_setup_class = 'galera'
$mysql_root_password = 'nova'
$enabled = true
$mysql_root_password = 'nova'
$enabled = true
node /fuel-controller-[\d+]/ {
class { "mysql::server":
config_hash => {
# 'root_password' => $mysql_root_password,
'bind_address' => '0.0.0.0'
},
galera_cluster_name => $galera_cluster_name,
galera_master_ip => $galera_master_ip,
galera_node_address => $galera_node_address,
enabled => $enabled,
custom_setup_class => $custom_mysql_setup_class,
class { 'mysql::server':
config_hash => {
'bind_address' => '0.0.0.0'
}
,
galera_cluster_name => $galera_cluster_name,
primary_controller => $primary_controller,
galera_node_address => $::hostname,
enabled => $enabled,
custom_setup_class => $custom_mysql_setup_class,
}
}

View File

@ -7,6 +7,3 @@ project_page 'http://github.com/dhoppe/puppet-nagios'
source 'git://github.com/dhoppe/puppet-nagios'
summary 'Nagios Module'
description 'Nagios Module for Debian, Ubuntu'
dependency 'dhoppe/puppet', '>=0.0.1'
dependency 'dhoppe/role', '>=0.0.1'
dependency 'dhoppe/sudo', '>=0.0.1'

View File

@ -1,27 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>nova</name>
<comment></comment>
<projects>
<project>glance</project>
<project>keystone</project>
<project>lvm</project>
<project>quantum</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.cloudsmith.geppetto.pp.dsl.ui.puppetNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>nova</name>
<comment></comment>
<projects>
<project>glance</project>
<project>horizon</project>
<project>keystone</project>
<project>lvm</project>
<project>memcached</project>
<project>quantum</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.cloudsmith.geppetto.pp.dsl.ui.puppetNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>

View File

@ -1,17 +1,9 @@
name 'puppetlabs-nova'
name 'puppetlabs-nova'
version '0.2.0'
source 'https://github.com/puppetlabs/puppetlabs-nova'
author 'Puppet Labs'
author 'Puppet Labs'
license 'Apache License 2.0'
project_page 'https://github.com/puppetlabs/puppetlabs-nova'
source 'https://github.com/puppetlabs/puppetlabs-nova'
summary 'Puppet Labs Nova Module'
description 'Puppet module to install and configure the OpenStack Nova compute service'
project_page 'https://github.com/puppetlabs/puppetlabs-nova'
## Add dependencies, if any:
dependency 'puppetlabs/apt', '>= 0.0.3'
dependency 'puppetlabs/glance', '>= 0.2.0'
dependency 'puppetlabs/keystone', '>= 0.2.0'
dependency 'puppetlabs/mysql', '>= 0.3.0'
dependency 'puppetlabs/rabbitmq', '>= 2.0.0'
dependency 'puppetlabs/stdlib', '>= 2.3.0'
dependency 'duritong/sysctl', '>= 0.0.1'

View File

@ -1,230 +0,0 @@
$rabbit_password = 'rabbit_pw'
$rabbit_user = 'nova'
$glance_api_servers = '127.0.0.1:9292'
$mysql_root_password = 'sql_pass'
$keystone_db_password = 'keystone_pass'
$keystone_admin_token = 'keystone_admin_token'
$admin_email = 'dan@puppetlabs.com'
$admin_user_password = 'ChangeMe'
$nova_db_password = 'nova_pass'
$nova_user_password = 'nova_pass'
$glance_db_password = 'glance_pass'
$glance_user_password = 'glance_pass'
#
# indicates that all nova config entries that we did
# not specifify in Puppet should be purged from file
#
resources { 'nova_config':
purge => true,
}
#if $::osfamily == 'Debian' {
# # temporarily update this to use the
# # latest tested packages from precise
# # eventually, these packages need to be moved
# # to the openstack module
# stage { 'nova_ppa':
# before => Stage['main']
# }
#
# class { 'apt':
# stage => 'nova_ppa',
# }
# class { 'keystone::repo::trunk':
# stage => 'nova_ppa',
# }
#}
# this is a hack that I have to do b/c openstack nova
# sets up a route to reroute calls to the metadata server
# to its own server which fails
file { '/usr/lib/ruby/1.8/facter/ec2.rb':
ensure => absent,
}
# set up mysql server
class { 'mysql::server':
config_hash => {
# the priv grant fails on precise if I set a root password
# 'root_password' => $mysql_root_password,
'bind_address' => '127.0.0.1'
}
}
####### KEYSTONE ###########
# set up keystone database
class { 'keystone::db::mysql':
password => $keystone_db_password,
}
# set up keystone
class { 'keystone':
admin_token => $keystone_admin_token,
bind_host => '127.0.0.1',
verbose => true,
debug => true,
catalog_type => 'sql',
}
# set up keystone admin users
class { 'keystone::roles::admin':
email => $admin_email,
password => $admin_user_password,
}
# set up the keystone service and endpoint
class { 'keystone::endpoint': }
######## END KEYSTONE ##########
######## BEGIN GLANCE ##########
class { 'glance::keystone::auth':
password => $glance_user_password,
}
class { 'glance::db::mysql':
host => '127.0.0.1',
password => $glance_db_password,
}
class { 'glance::api':
verbose => 'True',
debug => 'True',
auth_type => 'keystone',
auth_host => '127.0.0.1',
auth_port => '35357',
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => $glance_user_password,
}
class { 'glance::backend::file': }
class { 'glance::registry':
verbose => 'True',
debug => 'True',
auth_type => 'keystone',
auth_host => '127.0.0.1',
auth_port => '35357',
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => $glance_user_password,
sql_connection => "mysql://glance:${glance_db_password}@127.0.0.1/glance",
}
######## END GLANCE ###########
######## BEGIN NOVA ###########
class { 'nova::keystone::auth':
password => $nova_user_password,
}
class { 'nova::rabbitmq':
userid => $rabbit_user,
password => $rabbit_password,
}
class { 'nova::db::mysql':
password => $nova_db_password,
host => 'localhost',
}
class { 'nova':
sql_connection => "mysql://nova:${nova_db_password}@localhost/nova",
rabbit_userid => $rabbit_user,
rabbit_password => $rabbit_password,
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => '127.0.0.1:9292',
network_manager => 'nova.network.manager.FlatDHCPManager',
}
class { 'nova::api':
enabled => true,
admin_password => $nova_user_password,
}
class { 'nova::scheduler':
enabled => true
}
class { 'nova::network':
enabled => true
}
nova::manage::network { "nova-vm-net":
network => '11.0.0.0/24',
available_ips => 128,
}
nova::manage::floating { "nova-vm-floating":
network => '10.128.0.0/24',
}
class { 'nova::objectstore':
enabled => true
}
class { 'nova::volume':
enabled => true
}
class { 'nova::volume::iscsi': }
class { 'nova::cert':
enabled => true
}
class { 'nova::consoleauth':
enabled => true
}
class { 'nova::vncproxy': }
class { 'nova::compute':
enabled => true,
vnc_enabled => true,
vncserver_proxyclient_address => '127.0.0.1',
vncproxy_host => $public_hostname,
}
class { 'nova::compute::libvirt':
libvirt_type => 'qemu',
vncserver_listen => '127.0.0.1',
}
nova::network::bridge { 'br100':
ip => '11.0.0.1',
netmask => '255.255.255.0',
}
######## Horizon ########
class { 'memcached':
listen_ip => '127.0.0.1',
}
class { 'horizon': }
######## End Horizon #####
######## Credentails and tests ###
# lay down a file with credentials stored in it
file { '/root/auth':
content =>
'
export OS_TENANT_NAME=openstack
export OS_USERNAME=admin
export OS_PASSWORD=ChangeMe
export OS_AUTH_URL="http://localhost:5000/v2.0/"
'
}
####### tests ###

View File

@ -1,256 +0,0 @@
# params needed by both the compute and controller
$rabbit_password = 'rabbit_pw'
$rabbit_user = 'nova'
$nova_db_password = 'nova_pass'
$nova_user_password = 'nova_pass'
#
# indicates that all nova config entries that we did
# not specifify in Puppet should be purged from file
#
resources { 'nova_config':
purge => true,
}
if $::osfamily == 'Debian' {
# temporarily update this to use the
# latest tested packages from precise
# eventually, these packages need to be moved
# to the openstack module
stage { 'nova_ppa':
before => Stage['main']
}
class { 'apt':
stage => 'nova_ppa',
}
class { 'keystone::repo::trunk':
stage => 'nova_ppa',
}
}
Exec {
logoutput => true,
}
# this is a hack that I have to do b/c openstack nova
# sets up a route to reroute calls to the metadata server
# to its own server which fails
file { '/usr/lib/ruby/1.8/facter/ec2.rb':
ensure => absent,
}
node /controller/ {
# hostname that works internally in ec2
$controller_host = $hostname
$glance_api_servers = "${controller_host}:9292"
$mysql_root_password = 'sql_pass'
$keystone_db_password = 'keystone_pass'
$keystone_admin_token = 'keystone_admin_token'
$admin_email = 'dan@puppetlabs.com'
$admin_user_password = 'ChangeMe'
$glance_db_password = 'glance_pass'
$glance_user_password = 'glance_pass'
$nova_db = "mysql://nova:${nova_db_password}@${controller_host}/nova"
# export all of the things that will be needed by the clients
@@nova_config { 'rabbit_host': value => $controller_host }
Nova_config <| title == 'rabbit_host' |>
@@nova_config { 'sql_connection': value => $nova_db }
Nova_config <| title == 'sql_connection' |>
@@nova_config { 'glance_api_servers': value => $glance_api_servers }
Nova_config <| title == 'glance_api_servers' |>
# set up mysql server
class { 'mysql::server':
config_hash => {
# the priv grant fails on precise if I set a root password
# 'root_password' => $mysql_root_password,
'bind_address' => '0.0.0.0'
}
}
####### KEYSTONE ###########
# set up keystone database
class { 'keystone::db::mysql':
password => $keystone_db_password,
}
# set up the keystone config for mysql
class { 'keystone::config::mysql':
password => $keystone_db_password,
}
# set up keystone
class { 'keystone':
admin_token => $keystone_admin_token,
bind_host => '127.0.0.1',
verbose => true,
debug => true,
catalog_type => 'sql',
}
# set up keystone admin users
class { 'keystone::roles::admin':
email => $admin_email,
password => $admin_user_password,
}
# set up the keystone service and endpoint
class { 'keystone::endpoint': }
######## END KEYSTONE ##########
######## BEGIN GLANCE ##########
class { 'glance::keystone::auth':
password => $glance_user_password,
}
class { 'glance::db::mysql':
host => '127.0.0.1',
password => $glance_db_password,
}
class { 'glance::api':
verbose => 'True',
debug => 'True',
auth_type => 'keystone',
auth_host => '127.0.0.1',
auth_port => '35357',
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => $glance_user_password,
}
class { 'glance::backend::file': }
class { 'glance::registry':
verbose => 'True',
debug => 'True',
auth_type => 'keystone',
auth_host => '127.0.0.1',
auth_port => '35357',
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => $glance_user_password,
sql_connection => "mysql://glance:${glance_db_password}@127.0.0.1/glance",
}
######## END GLANCE ###########
######## BEGIN NOVA ###########
class { 'nova::keystone::auth':
password => $nova_user_password,
}
class { 'nova::rabbitmq':
userid => $rabbit_user,
password => $rabbit_password,
}
class { 'nova::db::mysql':
password => $nova_db_password,
host => 'localhost',
allowed_hosts => ['%', $controller_host],
}
class { 'nova':
sql_connection => false,
# this is false b/c we are exporting
rabbit_host => false,
rabbit_userid => $rabbit_user,
rabbit_password => $rabbit_password,
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => false,
network_manager => 'nova.network.manager.FlatDHCPManager',
}
class { 'nova::api':
enabled => true,
admin_password => $nova_user_password,
}
class { 'nova::scheduler':
enabled => true,
}
class { 'nova::network':
enabled => true,
}
nova::manage::network { "nova-vm-net":
network => '11.0.0.0/24',
available_ips => 128,
}
nova::manage::floating { "nova-vm-floating":
network => '10.128.0.0/24',
}
class { 'nova::objectstore':
enabled => true
}
class { 'nova::volume':
enabled => true,
}
class { 'nova::volume::iscsi': }
######## Horizon ########
class { 'memcached':
listen_ip => '127.0.0.1',
}
class { 'horizon': }
######## End Horizon #####
######## Credentails and tests ###
# lay down a file with credentials stored in it
file { '/root/auth':
content =>
'
export OS_TENANT_NAME=openstack
export OS_USERNAME=admin
export OS_PASSWORD=ChangeMe
export OS_AUTH_URL="http://localhost:5000/v2.0/"
'
}
}
####### tests ###
node /compute/ {
class { 'nova':
# set sql and rabbit to false so that the resources will be collected
sql_connection => false,
rabbit_host => false,
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => false,
rabbit_userid => $rabbit_user,
rabbit_password => $rabbit_password,
network_manager => 'nova.network.manager.FlatDHCPManager',
admin_password => $nova_user_password,
}
class { 'nova::compute':
enabled => true,
}
class { 'nova::compute::libvirt':
libvirt_type => 'qemu',
flat_network_bridge_ip => '11.0.0.1',
flat_network_bridge_netmask => '255.255.255.0',
}
}

View File

@ -1,292 +0,0 @@
Exec {
logoutput => true,
path => '/usr/sbin:/usr/bin:/sbin:/bin'
}
$rabbit_password = 'rabbit_pw'
$rabbit_user = 'nova'
$glance_api_servers = '127.0.0.1:9292'
$mysql_root_password = 'sql_pass'
$keystone_db_password = 'keystone_pass'
$keystone_admin_token = 'keystone_admin_token'
$admin_email = 'dan@puppetlabs.com'
$admin_user_password = 'ChangeMe'
$nova_db_password = 'nova_pass'
$nova_user_password = 'nova_pass'
$glance_db_password = 'glance_pass'
$glance_user_password = 'glance_pass'
$public_ip = '172.18.66.100'
#
# indicates that all nova config entries that we did
# not specifify in Puppet should be purged from file
#
resources { 'nova_config':
purge => true,
}
## Configure repo
#if $::osfamily == 'Debian' {
# # temporarily update this to use the
# # latest tested packages from precise
# # eventually, these packages need to be moved
# # to the openstack module
# stage { 'nova_ppa':
# before => Stage['main']
# }
#
# class { 'apt':
# stage => 'nova_ppa',
# }
# class { 'keystone::repo::trunk':
# stage => 'nova_ppa',
# }
#}
stage {'repo-priority':
before => [Stage['main']]
}
class repo-priority {
package { 'yum-plugin-priorities':
ensure => present,
}->
yumrepo {'base':
priority => 10,
}->
yumrepo {'updates':
priority => 10,
}->
yumrepo {'extras':
priority => 10,
}
class { 'openstack::repo::yum':
repo_name => 'openstackci',
location => 'http://moc-ci.srt.mirantis.net/rpm',
key_source => 'http://moc-ci.srt.mirantis.net/gpg.pub',
}
}
class {'repo-priority':
stage => 'repo-priority',
}
# this is a hack that I have to do b/c openstack nova
# sets up a route to reroute calls to the metadata server
# to its own server which fails
file { '/usr/lib/ruby/1.8/facter/ec2.rb':
ensure => absent,
}
# set up mysql server
class { 'mysql::server':
config_hash => {
# the priv grant fails on precise if I set a root password
# 'root_password' => $mysql_root_password,
'bind_address' => '127.0.0.1'
}
}
####### KEYSTONE ###########
# set up keystone database
class { 'keystone::db::mysql':
password => $keystone_db_password,
}
# set up the keystone config for mysql
class { 'keystone::config::mysql':
password => $keystone_db_password,
}
# set up keystone
class { 'keystone':
admin_token => $keystone_admin_token,
bind_host => '127.0.0.1',
log_verbose => true,
log_debug => true,
catalog_type => 'sql',
}
# set up keystone admin users
class { 'keystone::roles::admin':
email => $admin_email,
password => $admin_user_password,
}
# set up the keystone service and endpoint
class { 'keystone::endpoint': }
######## END KEYSTONE ##########
######## BEGIN GLANCE ##########
class { 'glance::keystone::auth':
password => $glance_user_password,
}
class { 'glance::db::mysql':
host => '127.0.0.1',
password => $glance_db_password,
}
class { 'glance::api':
log_verbose => 'True',
log_debug => 'True',
auth_type => 'keystone',
auth_host => '127.0.0.1',
auth_port => '35357',
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => $glance_user_password,
}
class { 'glance::backend::file': }
class { 'glance::registry':
log_verbose => 'True',
log_debug => 'True',
auth_type => 'keystone',
auth_host => '127.0.0.1',
auth_port => '35357',
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => $glance_user_password,
sql_connection => "mysql://glance:${glance_db_password}@127.0.0.1/glance",
}
class {'openstack::img::cirros':
os_tenant_name => 'openstack',
os_username => 'admin',
os_password => 'ChangeMe',
os_auth_url => 'http://localhost:5000/v2.0/',
disk_format => 'qcow2',
container_format => 'bare',
require => Class['glance::backend::file'],
}
######## END GLANCE ###########
######## BEGIN NOVA ###########
class { 'nova::keystone::auth':
password => $nova_user_password,
}
class { 'nova::rabbitmq':
userid => $rabbit_user,
password => $rabbit_password,
}
class { 'nova::db::mysql':
password => $nova_db_password,
host => 'localhost',
}
class { 'nova':
sql_connection => "mysql://nova:${nova_db_password}@localhost/nova",
rabbit_userid => $rabbit_user,
rabbit_password => $rabbit_password,
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => '127.0.0.1:9292',
# network_manager => 'nova.network.manager.FlatDHCPManager',
# rabbit_nodes => 'node001', #rabbit ha
}
class { 'nova::api':
enabled => true,
admin_password => $nova_user_password,
}
class { 'nova::scheduler':
enabled => true
}
class { 'nova::network':
enabled => true,
private_interface => 'eth0',
fixed_range => '11.0.0.0/24'
}
nova::manage::floating { "nova-vm-floating":
network => '10.128.0.0/24',
}
class { 'nova::objectstore':
enabled => true
}
class { 'lvm':
# loopfile => '/tmp/nova-volumes.lvm',
vg => 'nova-volumes',
pv => '/dev/sdb',
before => Class['nova::volume'],
}
class { 'nova::volume':
enabled => true,
require => Class['lvm']
}
class { 'nova::volume::iscsi': }
class { 'nova::cert':
enabled => true
}
class { 'nova::consoleauth':
enabled => true
}
class { 'nova::vncproxy':
enabled => true,
}
class { 'nova::compute':
enabled => true,
vnc_enabled => true,
vncproxy_host => $public_ip,
}
class { 'nova::compute::libvirt':
# qemu for virtual machine work
# default type kvm
libvirt_type => 'qemu',
}
nova::network::bridge { 'br100':
ip => '11.0.0.1',
netmask => '255.255.255.0',
}
######## Horizon ########
class { 'memcached':
listen_ip => '127.0.0.1',
}
class { 'horizon':
secret_key => 'secrete'
}
######## End Horizon #####
######## Credentails and tests ###
# lay down a file with credentials stored in it
file { '/root/auth':
content =>
'
export OS_TENANT_NAME=openstack
export OS_USERNAME=admin
export OS_PASSWORD=ChangeMe
export OS_AUTH_URL="http://localhost:5000/v2.0/"
'
}
####### tests ###

View File

@ -1,19 +0,0 @@
$userid = 'guest'
$password = 'guest'
$port = '5672'
$virtual_host = '/'
$cluster = false
$cluster_nodes = ['10.10.0.1' , '10.10.0.2']
$enabled = true
node /fuel-controller-[\d+]/ {
class { nova::rabbitmq:
userid => $userid,
password => $password,
port => $port,
virtual_host => $virtual_host,
cluster => $cluster,
cluster_nodes => $cluster_nodes,
enabled => $enabled
}
}

View File

@ -1,198 +0,0 @@
$db_host = 'db'
$db_username = 'nova'
$db_name = 'nova'
$db_password = 'password'
$rabbit_user = 'nova'
$rabbit_password = 'nova'
$rabbit_vhost = '/'
$rabbit_host = 'rabbitmq'
$rabbit_port = '5672'
$glance_api_servers = 'glance:9292'
$api_server = 'controller'
resources { 'nova_config':
purge => true,
}
# temporarily update this to use the
# latest tested packages from precise
# eventually, these packages need to be moved
# to the openstack module
stage { 'nova_ppa':
before => Stage['main']
}
class { 'apt':
stage => 'nova_ppa',
}
class { 'keystone::repo::trunk':
stage => 'nova_ppa',
}
# this is a hack that I have to do b/c openstack nova
# sets up a route to reroute calls to the metadata server
# to its own server which fails
file { '/usr/lib/ruby/1.8/facter/ec2.rb':
ensure => absent,
}
node db {
class { 'mysql::server':
config_hash => {
'bind_address' => '0.0.0.0'
#'root_password' => 'foo',
#'etc_root_password' => true
}
}
class { 'mysql::ruby': }
class { 'nova::db::mysql':
password => $db_password,
dbname => $db_name,
user => $db_username,
host => $clientcert,
# does glance need access?
allowed_hosts => ['controller', 'glance', 'compute'],
}
}
node controller {
class { 'nova::controller':
db_password => $db_password,
db_name => $db_name,
db_user => $db_username,
db_host => $db_host,
rabbit_password => $rabbit_password,
rabbit_port => $rabbit_port,
rabbit_userid => $rabbit_user,
rabbit_virtual_host => $rabbit_vhost,
rabbit_host => $rabbit_host,
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => $glance_api_servers,
libvirt_type => 'qemu',
}
}
node compute {
class { 'nova::compute':
api_server => $api_server,
enabled => true,
api_port => 8773,
aws_address => '169.254.169.254',
}
class { 'nova::compute::libvirt':
libvirt_type => 'qemu',
flat_network_bridge => 'br100',
flat_network_bridge_ip => '11.0.0.1',
flat_network_bridge_netmask => '255.255.255.0',
}
class { "nova":
verbose => $verbose,
sql_connection => "mysql://${db_username}:${db_password}@${db_host}/${db_name}",
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => $glance_api_servers,
rabbit_host => $rabbit_host,
rabbit_port => $rabbit_port,
rabbit_userid => $rabbit_user,
rabbit_password => $rabbit_password,
rabbit_virtual_host => $rabbit_virtual_host,
}
}
node glance {
# set up glance server
class { 'glance::api': }
class { 'glance::registry': }
}
node rabbitmq {
if($::operatingsystem == 'Ubuntu') {
class { 'rabbitmq::repo::apt':
stage => 'nova_ppa',
}
}
class { 'nova::rabbitmq':
userid => $rabbit_user,
password => $rabbit_password,
port => $rabbit_port,
virtual_host => $rabbit_vhost,
}
}
node puppetmaster {
class { 'concat::setup': }
class { 'mysql::server':
config_hash => {'bind_address' => '127.0.0.1'}
}
class { 'mysql::ruby': }
package { 'activerecord':
ensure => '2.3.5',
provider => 'gem',
}
class { 'puppet::master':
modulepath => '/vagrant/modules',
manifest => '/vagrant/manifests/site.pp',
storeconfigs => true,
storeconfigs_dbuser => 'dan',
storeconfigs_dbpassword => 'foo',
storeconfigs_dbadapter => 'mysql',
storeconfigs_dbserver => 'localhost',
storeconfigs_dbsocket => '/var/run/mysqld/mysqld.sock',
version => installed,
puppet_master_package => 'puppet',
package_provider => 'gem',
autosign => 'true',
certname => $clientcert,
}
}
node all {
#
# This manifest installs all of the nova
# components on one node.
class { 'mysql::server': }
class { 'keystone::config::mysql':
password => 'keystone'
}
class { 'keystone':
verbose => true,
debug => true,
catalog_type => 'sql',
}->
class { 'keystone::mysql':
password => 'keystone',
}->
class { 'keystone::roles::admin': }
class { 'nova::all':
db_password => 'password',
db_name => 'nova',
db_user => 'nova',
db_host => 'localhost',
rabbit_password => 'rabbitpassword',
rabbit_port => '5672',
rabbit_userid => 'rabbit_user',
rabbit_virtual_host => '/',
rabbit_host => 'localhost',
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => $glance_api_servers,
libvirt_type => 'qemu',
}
}
node default {
fail("could not find a matching node entry for ${clientcert}")
}

View File

@ -1,22 +0,0 @@
resources { 'nova_config':
purge => true,
}
class { 'mysql::server': }
class { 'nova::all':
db_password => 'password',
db_name => 'nova',
db_user => 'nova',
db_host => 'localhost',
rabbit_password => 'rabbitpassword',
rabbit_port => '5672',
rabbit_userid => 'rabbit_user',
rabbit_virtual_host => '/',
rabbit_host => 'localhost',
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => 'localhost:9292',
libvirt_type => 'qemu',
}

View File

@ -1,10 +1,8 @@
class { 'nova':
sql_connection => 'mysql://root:<password>@127.0.0.1/nova',
}
class { 'mysql::server':
root_password => 'password'
}
class { 'nova::db':
class { 'nova::db::mysql':
password => 'password',
dbname => 'nova',
user => 'nova',

View File

@ -3,5 +3,4 @@ class { 'nova::rabbitmq':
password => 'password',
port => '1234',
virtual_host => 'my_queue',
install_repo => true,
}

View File

@ -1,28 +0,0 @@
/*
This test should configure everything needed to run openstack on a compute vm running
on a xenserver.
*/
Nova_config { target => '/etc/nova/nova.conf' }
resources { 'nova_config':
purge => true,
}
class { 'nova::rackspace::all':
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => "${ipaddress}:9292",
allow_admin_api => 'true',
host => $hostname,
xenapi_connection_url => 'https://<XenServer_IP>',
xenapi_connection_username => 'root',
xenapi_connection_password => 'password',
xenapi_inject_image => 'false',
db_password => 'password',
}
class { 'glance::api':
swift_store_user => 'foo_user',
swift_store_key => 'foo_pass',
}
class { 'glance::registry': }

View File

@ -1,22 +0,0 @@
#Nova_config { target => '/tmp/nova.config' }
resources { 'nova_config':
purge => true,
}
class { 'mysql::server':
config_hash => {'bind_address' => '127.0.0.1'}
}
class { 'nova::ubuntu::all':
flat_network_bridge => 'br100',
flat_network_bridge_ip => '11.0.0.1',
flat_network_bridge_netmask => '255.255.255.0',
nova_network => '11.0.0.0/24',
available_ips => '256',
db_password => 'password',
admin_user => 'admin',
project_name => 'novaproject',
}

View File

@ -1,37 +0,0 @@
# cc.pp
resources { 'nova_config':
purge => true,
}
class { 'mysql::server':
config_hash => { 'bind_address' => $ipaddress_eth0 }
}
class { 'nova::ubuntu::cc':
flat_network_bridge => 'br100',
flat_network_bridge_ip => '11.0.0.1',
flat_network_bridge_netmask => '255.255.255.0',
nova_network => '11.0.0.0/24',
available_ips => '256',
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => "${ipaddress}:9292",
db_password => 'password',
db_allowed_hosts => ['somehost', '10.0.0.2', '10.0.0.3', '10.0.0.5', '192.168.25.11'],
admin_user => 'admin',
project_name => 'novaproject',
}
class { "glance::api":
verbose => 'true',
debug => 'true',
}
class { "glance::registry":
log_verbose => 'true',
log_debug => 'true',
sql_connection => "mysql://nova:password@localhost/nova",
}

View File

@ -1,21 +0,0 @@
# compute.pp
resources { 'nova_config':
purge => true,
}
class { 'nova::ubuntu::compute':
api_server => '10.0.0.4',
rabbit_host => '10.0.0.4',
db_host => '10.0.0.4',
db_user => 'nova',
db_password => 'password',
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => '10.0.0.4:9292',
flat_network_bridge => 'br100',
flat_network_bridge_ip => '11.0.0.2',
flat_network_bridge_netmask => '255.255.255.0',
enabled => 'true',
}

View File

@ -1,38 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>openstack</name>
<comment></comment>
<projects>
<project>apt</project>
<project>cinder</project>
<project>firewall</project>
<project>glance</project>
<project>haproxy</project>
<project>keepalived</project>
<project>keystone</project>
<project>lvm</project>
<project>mysql</project>
<project>ntpd</project>
<project>quantum</project>
<project>rsyslog</project>
<project>stdlib</project>
<project>swift</project>
<project>sysctl</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.cloudsmith.geppetto.pp.dsl.ui.puppetNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>openstack</name>
<comment></comment>
<projects>
<project>apt</project>
<project>cinder</project>
<project>firewall</project>
<project>glance</project>
<project>haproxy</project>
<project>keepalived</project>
<project>keystone</project>
<project>l23network</project>
<project>lvm</project>
<project>mysql</project>
<project>nagios</project>
<project>ntpd</project>
<project>quantum</project>
<project>rsyslog</project>
<project>stdlib</project>
<project>swift</project>
<project>sysctl</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.cloudsmith.geppetto.pp.dsl.ui.puppetNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>