initial commit
This commit is contained in:
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
modules
|
||||
Puppetfile.lock
|
||||
.librarian/
|
||||
.vagrant
|
||||
.tmp
|
||||
12
Puppetfile
12
Puppetfile
@@ -1,12 +1,12 @@
|
||||
forge "http://forge.puppetlabs.com"
|
||||
|
||||
mod 'bodepd/devstack', :git => 'git://github.com/bodepd/puppetlabs-devstack'
|
||||
mod 'puppetlabs/openstack', :git => 'git://github.com/puppetlabs/puppetlabs-openstack'
|
||||
mod 'puppetlabs/nova', :git => 'git://github.com/puppetlabs/puppetlabs-nova'
|
||||
mod 'puppetlabs/glance', :git => 'git://github.com/puppetlabs/puppetlabs-glance'
|
||||
mod 'puppetlabs/openstack', :git => 'git://github.com/bodepd/puppetlabs-openstack', :ref => 'folsom'
|
||||
mod 'puppetlabs/nova', :git => 'git://github.com/bodepd/puppetlabs-nova', :ref => 'folsom'
|
||||
mod 'puppetlabs/glance', :git => 'git://github.com/bodepd/puppetlabs-glance', :ref => 'folsom'
|
||||
mod 'puppetlabs/keystone', :git => 'git://github.com/bodepd/puppetlabs-keystone', :ref => 'folsom'
|
||||
mod 'puppetlabs/horizon', :git => 'git://github.com/bodepd/puppetlabs-horizon', :ref => 'folsom'
|
||||
mod 'puppetlabs/swift', :git => 'git://github.com/puppetlabs/puppetlabs-swift'
|
||||
mod 'puppetlabs/keystone', :git => 'git://github.com/puppetlabs/puppetlabs-keystone'
|
||||
mod 'puppetlabs/horizon', :git => 'git://github.com/puppetlabs/puppetlabs-horizon'
|
||||
mod 'bodepd/devstack', :git => 'git://github.com/bodepd/puppetlabs-devstac'k
|
||||
# openstack middleware
|
||||
mod 'puppetlabs/rabbitmq', :git => 'git://github.com/puppetlabs/puppetlabs-rabbitmq'
|
||||
mod 'puppetlabs/mysql', :git => 'git://github.com/puppetlabs/puppetlabs-mysql'
|
||||
|
||||
31
README
Normal file
31
README
Normal file
@@ -0,0 +1,31 @@
|
||||
This is a puppet project used to develop on the openstack modules.
|
||||
|
||||
It is currently being used to add folsom support.
|
||||
|
||||
All of the dependent modules can be installed by invoking
|
||||
|
||||
> librarian-puppet install
|
||||
|
||||
Too see a list of the virtual machines that are managed by vagrant, run
|
||||
|
||||
> vagrant status
|
||||
|
||||
The machines should be deployed in the following order:
|
||||
|
||||
1. mysql
|
||||
2. keystone
|
||||
3. glance
|
||||
4. nova_controller
|
||||
5. compute1
|
||||
|
||||
current status:
|
||||
|
||||
mysql, keystone, glance currently work
|
||||
|
||||
nova_controller partially works (vnc does not work)
|
||||
|
||||
nova_network does not work
|
||||
|
||||
cinder and quantum are not supported yet
|
||||
|
||||
openstack::controller and openstack::all have not been tested yet.
|
||||
46
Vagrantfile
vendored
46
Vagrantfile
vendored
@@ -15,7 +15,25 @@ Vagrant::Config.run do |config|
|
||||
{'devstack' =>
|
||||
{
|
||||
'memory' => 512,
|
||||
'ip1' => '172.16.0.6',
|
||||
'ip1' => '172.16.0.2',
|
||||
}
|
||||
},
|
||||
{'compute1' =>
|
||||
{
|
||||
'memory' => 2512,
|
||||
'ip1' => '172.16.0.4'
|
||||
}
|
||||
},
|
||||
{'nova_controller' =>
|
||||
{
|
||||
'memory' => 512,
|
||||
'ip1' => '172.16.0.5'
|
||||
}
|
||||
},
|
||||
{'glance' =>
|
||||
{
|
||||
'memory' => 512,
|
||||
'ip1' => '172.16.0.6'
|
||||
}
|
||||
},
|
||||
{'keystone' =>
|
||||
@@ -29,21 +47,20 @@ Vagrant::Config.run do |config|
|
||||
'memory' => 512,
|
||||
'ip1' => '172.16.0.8'
|
||||
}
|
||||
},
|
||||
{'controller' =>
|
||||
{'memory' => 512,
|
||||
'ip1' => '172.16.0.3'
|
||||
}
|
||||
},
|
||||
{'compute_1' =>
|
||||
{'ip1' => '172.16.0.4'}
|
||||
},
|
||||
{'compute_2' =>
|
||||
{'ip1' => '172.16.0.5'}
|
||||
#},
|
||||
#{'controller' =>
|
||||
# {'memory' => 512,
|
||||
# 'ip1' => '172.16.0.3'
|
||||
# }
|
||||
#},
|
||||
#{'compute_1' =>
|
||||
# {'ip1' => '172.16.0.4'}
|
||||
#},
|
||||
#{'compute_2' =>
|
||||
# {'ip1' => '172.16.0.5'}
|
||||
}
|
||||
].each do |hash|
|
||||
|
||||
ssh_forward_port = ssh_forward_port + 1
|
||||
|
||||
name = hash.keys.first
|
||||
props = hash.values.first
|
||||
@@ -51,7 +68,8 @@ Vagrant::Config.run do |config|
|
||||
raise "Malformed vhost hash" if hash.size > 1
|
||||
|
||||
config.vm.define name.intern do |agent|
|
||||
|
||||
ssh_forward_port = ssh_forward_port + 1
|
||||
agent.vm.forward_port(22, ssh_forward_port)
|
||||
# host only network
|
||||
agent.vm.network :hostonly, props['ip1'], :adapter => 2
|
||||
#agent.vm.customize ["modifyvm", :id, "--nicpromisc1", "allow-all"]
|
||||
|
||||
@@ -25,8 +25,13 @@ exec { '/usr/bin/apt-get update':
|
||||
#
|
||||
# specify a connection to the hardcoded puppet master
|
||||
#
|
||||
host { 'puppet':
|
||||
ip => '172.16.0.2',
|
||||
host {
|
||||
'puppet': ip => '172.16.0.2';
|
||||
'glance': ip => '172.16.0.6';
|
||||
'keystone': ip => '172.16.0.7';
|
||||
'mysql': ip => '172.16.0.8';
|
||||
'novacontroller': ip => '172.16.0.5';
|
||||
'compute1': ip => '172.16.0.4';
|
||||
}
|
||||
|
||||
group { 'puppet':
|
||||
@@ -36,3 +41,4 @@ group { 'puppet':
|
||||
# bring up the bridging interface explicitly
|
||||
#exec { '/sbin/ifconfig eth2 up': }
|
||||
|
||||
node default { }
|
||||
|
||||
@@ -11,31 +11,6 @@
|
||||
# be used in the deployment of multi and single node openstack
|
||||
# environments
|
||||
|
||||
# assumes that eth0 is the public interface
|
||||
$public_interface = 'eth0'
|
||||
# assumes that eth1 is the interface that will be used for the vm network
|
||||
# this configuration assumes this interface is active but does not have an
|
||||
# ip address allocated to it.
|
||||
$private_interface = 'eth2'
|
||||
# credentials
|
||||
$admin_email = 'root@localhost'
|
||||
$admin_password = 'keystone_admin'
|
||||
$keystone_db_password = 'keystone_db_pass'
|
||||
$keystone_admin_token = 'keystone_admin_token'
|
||||
$nova_db_password = 'nova_pass'
|
||||
$nova_user_password = 'nova_pass'
|
||||
$glance_db_password = 'glance_pass'
|
||||
$glance_user_password = 'glance_pass'
|
||||
$rabbit_password = 'openstack_rabbit_password'
|
||||
$rabbit_user = 'openstack_rabbit_user'
|
||||
$fixed_network_range = '10.0.0.0/24'
|
||||
$floating_network_range = '172.16.0.192/26'
|
||||
# switch this to true to have all service log at verbose
|
||||
$verbose = false
|
||||
# by default it does not enable atomatically adding floating IPs
|
||||
$auto_assign_floating_ip = false
|
||||
|
||||
|
||||
#### end shared variables #################
|
||||
|
||||
# all nodes whose certname matches openstack_all should be
|
||||
@@ -46,24 +21,24 @@ node /openstack-all/ {
|
||||
class { 'openstack::test_file': }
|
||||
|
||||
class { 'openstack::all':
|
||||
public_address => $ipaddress_eth1,
|
||||
public_interface => $public_interface,
|
||||
private_interface => $private_interface,
|
||||
admin_email => $admin_email,
|
||||
admin_password => $admin_password,
|
||||
keystone_db_password => $keystone_db_password,
|
||||
keystone_admin_token => $keystone_admin_token,
|
||||
nova_db_password => $nova_db_password,
|
||||
nova_user_password => $nova_user_password,
|
||||
glance_db_password => $glance_db_password,
|
||||
glance_user_password => $glance_user_password,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_user => $rabbit_user,
|
||||
libvirt_type => 'qemu',
|
||||
floating_range => $floating_network_range,
|
||||
fixed_range => $fixed_network_range,
|
||||
verbose => $verbose,
|
||||
auto_assign_floating_ip => $auto_assign_floating_ip,
|
||||
# public_address => $ipaddress_eth1,
|
||||
# public_interface => $public_interface,
|
||||
# private_interface => $private_interface,
|
||||
# admin_email => $admin_email,
|
||||
# admin_password => $admin_password,
|
||||
# keystone_db_password => $keystone_db_password,
|
||||
# keystone_admin_token => $keystone_admin_token,
|
||||
# nova_db_password => $nova_db_password,
|
||||
# nova_user_password => $nova_user_password,
|
||||
# glance_db_password => $glance_db_password,
|
||||
# glance_user_password => $glance_user_password,
|
||||
# rabbit_password => $rabbit_password,
|
||||
# rabbit_user => $rabbit_user,
|
||||
# libvirt_type => 'qemu',
|
||||
# floating_range => $floating_network_range,
|
||||
# fixed_range => $fixed_network_range,
|
||||
# verbose => $verbose,
|
||||
# auto_assign_floating_ip => $auto_assign_floating_ip,
|
||||
}
|
||||
|
||||
class { 'openstack::auth_file':
|
||||
@@ -81,103 +56,128 @@ node /mysql/ {
|
||||
keystone_db_password => 'keystone_password',
|
||||
glance_db_password => 'glance_password',
|
||||
nova_db_password => 'nova_password',
|
||||
allowed_hosts => ['keystone', 'glance', 'novacontroller', 'compute1', '%'],
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
node /keystone/ {
|
||||
|
||||
class { 'keystone':
|
||||
log_verbose => true,
|
||||
log_debug => true,
|
||||
sql_connection => 'mysql://keystone_admin:password@172.16.0.8/keystone',
|
||||
catalog_type => 'sql',
|
||||
nova_config {
|
||||
'DEFAULT/log_config': ensure => absent,
|
||||
}
|
||||
|
||||
class { 'openstack::keystone':
|
||||
db_host => '172.16.0.8',
|
||||
db_password => 'keystone_password',
|
||||
admin_token => 'service_token',
|
||||
admin_email => 'keystone@localhost',
|
||||
admin_password => 'ChangeMe',
|
||||
glance_user_password => 'glance_password',
|
||||
nova_user_password => 'nova_password',
|
||||
public_address => '172.16.0.7',
|
||||
admin_tenant => 'admin',
|
||||
glance_public_address => '172.16.0.6',
|
||||
nova_public_address => '172.16.0.5',
|
||||
verbose => 'true',
|
||||
}
|
||||
class { 'keystone::roles::admin': }
|
||||
}
|
||||
|
||||
node /controller/ {
|
||||
node /glance/ {
|
||||
|
||||
# deploy a script that can be used to test nova
|
||||
class { 'openstack::test_file': }
|
||||
|
||||
$controller_node_address = $ipaddress_eth1
|
||||
$controller_node_public = $controller_node_address
|
||||
$controller_node_internal = $controller_node_address
|
||||
|
||||
|
||||
# class { 'nova::volume': enabled => true }
|
||||
|
||||
# class { 'nova::volume::iscsi': }
|
||||
|
||||
class { 'openstack::controller':
|
||||
public_address => $controller_node_public,
|
||||
public_interface => $public_interface,
|
||||
private_interface => $private_interface,
|
||||
internal_address => $controller_node_internal,
|
||||
floating_range => $floating_network_range,
|
||||
fixed_range => $fixed_network_range,
|
||||
# by default it does not enable multi-host mode
|
||||
multi_host => true,
|
||||
# by default is assumes flat dhcp networking mode
|
||||
network_manager => 'nova.network.manager.FlatDHCPManager',
|
||||
verbose => $verbose,
|
||||
auto_assign_floating_ip => $auto_assign_floating_ip,
|
||||
mysql_root_password => $mysql_root_password,
|
||||
admin_email => $admin_email,
|
||||
admin_password => $admin_password,
|
||||
keystone_db_password => $keystone_db_password,
|
||||
keystone_admin_token => $keystone_admin_token,
|
||||
glance_db_password => $glance_db_password,
|
||||
glance_user_password => $glance_user_password,
|
||||
nova_db_password => $nova_db_password,
|
||||
nova_user_password => $nova_user_password,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_user => $rabbit_user,
|
||||
export_resources => false,
|
||||
class { 'openstack::glance':
|
||||
db_host => '172.16.0.8',
|
||||
glance_user_password => 'glance_password',
|
||||
glance_db_password => 'glance_password',
|
||||
keystone_host => '172.16.0.7',
|
||||
auth_uri => "http://172.16.0.7:5000/",
|
||||
verbose => true,
|
||||
}
|
||||
|
||||
class { 'openstack::auth_file':
|
||||
admin_password => $admin_password,
|
||||
keystone_admin_token => $keystone_admin_token,
|
||||
controller_node => $controller_node_internal,
|
||||
admin_password => 'ChangeMe',
|
||||
keystone_admin_token => 'service_token',
|
||||
controller_node => '172.16.0.7',
|
||||
admin_tenant => 'admin',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
node /nova-controller/ {
|
||||
|
||||
# deploy a script that can be used to test nova
|
||||
class { 'openstack::test_file': }
|
||||
|
||||
# class { 'nova::volume': enabled => true }
|
||||
# class { 'nova::volume::iscsi': }
|
||||
|
||||
class { 'openstack::nova::controller':
|
||||
public_address => '172.16.0.5',
|
||||
public_interface => 'eth0',
|
||||
private_interface => 'eth1',
|
||||
db_host => '172.16.0.8',
|
||||
rabbit_password => 'changeme',
|
||||
nova_user_password => 'nova_password',
|
||||
nova_db_password => 'nova_password',
|
||||
network_manager => 'nova.network.manager.FlatDHCPManager',
|
||||
verbose => 'True',
|
||||
multi_host => true,
|
||||
glance_api_servers => '172.16.0.6:9292',
|
||||
keystone_host => '172.16.0.7',
|
||||
#floating_range => $floating_network_range,
|
||||
#fixed_range => $fixed_network_range,
|
||||
}
|
||||
|
||||
class { 'openstack::horizon':
|
||||
secret_key => 'dummy_secret_key',
|
||||
cache_server_ip => '127.0.0.1',
|
||||
cache_server_port => '11211',
|
||||
swift => false,
|
||||
quantum => false,
|
||||
horizon_app_links => undef,
|
||||
keystone_host => '172.16.0.7',
|
||||
keystone_default_role => 'Member',
|
||||
}
|
||||
|
||||
class { 'openstack::auth_file':
|
||||
admin_password => 'ChangeMe',
|
||||
keystone_admin_token => 'service_token',
|
||||
controller_node => '172.16.0.7',
|
||||
admin_tenant => 'admin',
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
node /compute/ {
|
||||
|
||||
# deploy a script that can be used to test nova
|
||||
class { 'openstack::test_file': }
|
||||
# deploy a script that can be used to test nova
|
||||
class { 'openstack::test_file': }
|
||||
|
||||
# External lookups.
|
||||
$rabbit_connection_hash = collect_rabbit_connection('ipaddress_eth1', 'architecture=amd64')
|
||||
$nova_db_addr = collect_nova_db_connection('ipaddress_eth1', 'architecture=amd64')
|
||||
$vnc_proxy_addr = unique(query_nodes('Class[nova::vncproxy]', 'ipaddress_eth1'))
|
||||
$glance_api_addr = unique(query_nodes('Class[glance::api]', 'ipaddress_eth1'))
|
||||
# $rabbit_connection_hash = collect_rabbit_connection('ipaddress_eth1', 'architecture=amd64')
|
||||
# $nova_db_addr = collect_nova_db_connection('ipaddress_eth1', 'architecture=amd64')
|
||||
# $vnc_proxy_addr = unique(query_nodes('Class[nova::vncproxy]', 'ipaddress_eth1'))
|
||||
# $glance_api_addr = unique(query_nodes('Class[glance::api]', 'ipaddress_eth1'))
|
||||
|
||||
class { 'openstack::compute':
|
||||
public_interface => $public_interface,
|
||||
private_interface => $private_interface,
|
||||
internal_address => $ipaddress_eth1,
|
||||
public_interface => 'eth1',
|
||||
private_interface => 'eth0',
|
||||
internal_address => $::ipaddress_eth1,
|
||||
libvirt_type => 'qemu',
|
||||
fixed_range => $fixed_network_range,
|
||||
sql_connection => 'mysql://nova:nova_password@172.16.0.8/nova',
|
||||
fixed_range => '10.0.0.0/24',
|
||||
network_manager => 'nova.network.manager.FlatDHCPManager',
|
||||
multi_host => true,
|
||||
sql_connection => $nova_db_addr,
|
||||
nova_user_password => $nova_user_password,
|
||||
rabbit_host => $rabbit_connection_hash['host'],
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_user => $rabbit_user,
|
||||
glance_api_servers => ["${glance_api_addr}:9292"],
|
||||
vncproxy_host => $vnc_proxy_addr,
|
||||
nova_user_password => 'nova_password',
|
||||
rabbit_host => '172.16.0.5',
|
||||
rabbit_password => 'changeme',
|
||||
glance_api_servers => ["172.16.0.6:9292"],
|
||||
vncproxy_host => '172.16.0.5',
|
||||
vnc_enabled => true,
|
||||
verbose => $verbose,
|
||||
verbose => true,
|
||||
manage_volumes => true,
|
||||
nova_volume => 'nova-volumes'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
node /devstack/ {
|
||||
@@ -280,3 +280,7 @@ node /master/ {
|
||||
tag => ['pe']
|
||||
}
|
||||
}
|
||||
|
||||
node default {
|
||||
notify { $clientcert: }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user