Permalink
Browse files

Merge branch 'master' of github.com:cloudbuilders/openstack-puppet

  • Loading branch information...
rpedde committed Aug 1, 2011
2 parents 79bf493 + de3fc7e commit ff9a0bfd619f29199a49eb7e5ecc24402243f345
Showing with 755 additions and 75 deletions.
  1. +3 −3 lib/enc.py
  2. +14 −1 manifests/sitedefs.pp
  3. +6 −1 modules/dash/files/000-default
  4. +37 −4 modules/dash/manifests/install.pp
  5. +2 −1 modules/dash/templates/local_settings.py.erb
  6. +4 −4 modules/glance/files/initial_images.sh
  7. +17 −3 modules/glance/manifests/install.pp
  8. +17 −1 modules/keystone/manifests/install.pp
  9. +18 −15 modules/keystone/templates/initial_data.sh.erb
  10. +85 −0 modules/keystone/templates/keystone.conf.erb
  11. +24 −0 modules/munin-node-infra/manifests/config.pp
  12. +4 −0 modules/munin-node-infra/manifests/init.pp
  13. +3 −0 modules/munin-node-infra/manifests/install.pp
  14. +162 −0 modules/munin-node/manifests/config.pp
  15. +4 −0 modules/munin-node/manifests/init.pp
  16. +5 −0 modules/munin-node/manifests/install.pp
  17. +7 −0 modules/munin-node/manifests/service.pp
  18. +54 −0 modules/munin-node/templates/munin-node.conf.erb
  19. +10 −0 modules/munin/manifests/config.pp
  20. +4 −0 modules/munin/manifests/init.pp
  21. +16 −0 modules/munin/manifests/install.pp
  22. +33 −0 modules/munin/templates/apache.conf.erb
  23. +4 −4 modules/nova-api/files/api-paste.ini
  24. +7 −1 modules/nova-api/manifests/install.pp
  25. +2 −3 modules/nova-common/manifests/config.pp
  26. +1 −12 modules/nova-common/manifests/install.pp
  27. +4 −1 modules/nova-common/templates/nova.conf.erb
  28. +2 −1 modules/nova-compute/manifests/init.pp
  29. +2 −1 modules/nova-compute/manifests/install.pp
  30. +10 −10 modules/nova-db/manifests/install.pp
  31. +5 −1 modules/nova-network/manifests/install.pp
  32. +5 −2 modules/nova-network/manifests/service.pp
  33. +4 −1 modules/nova-scheduler/manifests/install.pp
  34. +5 −2 modules/nova-scheduler/manifests/service.pp
  35. +19 −0 modules/nova-vncproxy/files/nova-vncproxy.conf
  36. +12 −2 modules/nova-vncproxy/manifests/install.pp
  37. +4 −1 modules/openstackx/manifests/install.pp
  38. +3 −0 modules/rcb-common/manifests/init.pp
  39. +16 −0 modules/rcb-common/manifests/install.pp
  40. +5 −0 modules/sysctl/files/99-forwarding.conf
  41. +17 −0 modules/sysctl/manifests/config.pp
  42. +4 −0 modules/sysctl/manifests/init.pp
  43. +3 −0 modules/vm-vlan-network/manifests/init.pp
  44. +21 −0 modules/vm-vlan-network/manifests/install.pp
  45. +18 −0 modules/vm-vlan-network/templates/interfaces.erb
  46. +53 −0 nova_vms_launched
View
@@ -27,7 +27,7 @@
uri = config['kick_uri'],
user = config['kick_user'],
passwd = config['kick_pass'])
-
+
opener = urllib2.build_opener(auth_handler)
urllib2.install_opener(opener)
@@ -46,7 +46,7 @@
if not machine_info:
print "Can't find machine info"
sys.exit(1)
-
+
cluster_id = machine_info[0]['cluster_id']
# now, pull the short name of the cluster
@@ -98,7 +98,7 @@
if host not in machines_by_role[role]:
machines_by_role[role].append(host)
-
+
# Now generate the roles list
enc_manifest = { 'classes': [], 'parameters': {} }
View
@@ -7,26 +7,40 @@
$cluster_name="test"
+class one-vm-vlan {
+ include vm-vlan-network
+}
+
class base-node {
include ssh
include sudo
+ include sysctl
include ntp
+ include munin-node
include apt # additional repos only
}
class nova-base-node {
# include cloudkick
include base-node
+ include rcb-common
include nova-common
}
+class nova-network-node {
+ include nova-base-node
+ include nova-network
+}
+
class nova-compute-node {
include nova-base-node
include nova-compute
}
class nova-infra-node {
include nova-base-node
+ include munin
+ include munin-node-infra
# data services
include rabbitmq
@@ -37,7 +51,6 @@
# openstack services
include nova-api
- include nova-network
include nova-scheduler
include nova-vncproxy
@@ -18,7 +18,12 @@
allow from all
</Directory>
+ # Allow custom files to overlay the site (such as logo.png)
+ RewriteEngine On
+ RewriteCond /opt/dash/site_overlay%{REQUEST_FILENAME} -s
+ RewriteRule ^/(.+) /opt/dash/site_overlay/$1 [L]
+
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
-</VirtualHost>
+</VirtualHost>
@@ -3,7 +3,10 @@
$dash_common_packages = [ "git", "apache2", "libapache2-mod-wsgi" ]
package { "python-django":
- ensure => "1.3-2"
+ ensure => "1.3-2",
+ require => [
+ Apt::Source["rcb"]
+ ]
}
package { $dash_common_packages:
@@ -16,15 +19,16 @@
require => [
Package["libapache2-mod-wsgi"],
Package["python-django"],
- Package["apache2"]
+ Package["apache2"],
+ Package["keystone"],
+ Package["openstackx"]
]
}
package { "openstack-dashboard":
ensure => latest,
notify => Service["apache2"],
require => [
- Package["python-django"],
Package["django-openstack"]
]
}
@@ -49,7 +53,26 @@
file { "/var/lib/dash/dashboard/local":
ensure => link,
- target => "/var/lib/dash/local"
+ target => "/var/lib/dash/local",
+ require => [
+ Package["openstack-dashboard"]
+ ]
+ }
+
+ file { "/var/lib/dash/local":
+ owner => "www-data",
+ mode => 0755,
+ require => [
+ Package["openstack-dashboard"]
+ ]
+ }
+
+ file { "/var/lib/dash/local/dashboard_openstack.sqlite3":
+ owner => "www-data",
+ mode => 0600,
+ require => [
+ Exec["dash-db"]
+ ]
}
file { "local_settings.py":
@@ -75,6 +98,16 @@
]
}
+ # Enable mod_rewrite to allow the overlay of custom images and css
+ file {"/etc/apache2/mods-enabled/rewrite.load":
+ ensure => symlink,
+ target => "/etc/apache2/mods-available/rewrite.load",
+ notify => Service["apache2"],
+ require => [
+ Package["apache2"]
+ ]
+ }
+
exec { "dash-db":
command => "python /var/lib/dash/dashboard/manage.py syncdb",
user => "www-data",
@@ -22,7 +22,7 @@ CACHE_BACKEND = 'dummy://'
# EMAIL_HOST_PASSWORD = 'top-secret!'
OPENSTACK_ADMIN_TOKEN = "999888777666"
-OPENSTACK_KEYSTONE_URL = "http://localhost:8080/v2.0/"
+OPENSTACK_KEYSTONE_URL = "http://localhost:5000/v2.0/"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
# If you have external monitoring links
@@ -33,3 +33,4 @@ EXTERNAL_MONITORING = [
COMPUTE_HOST_RAM_GB = 96
SITE_BRANDING = "<%= site_branding %>"
+SWIFT_ENABLED = False
@@ -1,7 +1,7 @@
#!/bin/bash
-wget http://images.ansolabs.com/tty.tgz -O /tmp/tty.tgz
-mkdir /tmp/images
-tar -C /tmp/images -zxf /tmp/tty.tgz
+sudo -u nova wget http://images.ansolabs.com/tty.tgz -O /tmp/tty.tgz
+sudo -u nova mkdir /tmp/images
+sudo -u nova tar -C /tmp/images -zxf /tmp/tty.tgz
-nova-manage image convert /tmp/images
+sudo -u nova nova-manage image convert /tmp/images
@@ -1,21 +1,35 @@
class glance::install {
+
+ # TODO: Remove python-xattr once it is in glance packaging
$glance_packages = [ "glance", "python-glance" ]
- package { $glance_packages:
+ package { "python-xattr":
ensure => present
}
+ package { $glance_packages:
+ ensure => latest,
+ notify => [Service["apache2"], Service["nova-api"]],
+ require => [
+ Apt::Source["rcb"],
+ Package["nova-common"],
+ Package["python-xattr"]
+ ]
+ }
+
file { "/var/log/glance":
ensure => directory,
owner => "glance",
- mode => 0755
+ mode => 0755,
+ require => [Package["glance"], Package["python-glance"]]
}
file { "/var/log/glance/api.log":
ensure => present,
owner => "glance",
- mode => "600",
+ mode => 0600,
require => File["/var/log/glance"]
}
+
}
@@ -1,7 +1,22 @@
class keystone::install {
package { "keystone":
- ensure => present
+ ensure => latest,
+ notify => [Service["apache2"], Service["nova-api"]],
+ require => [
+ Apt::Source["rcb"],
+ Package["nova-common"]
+ ]
+ }
+
+ file { "keystone.conf":
+ path => "/etc/keystone/keystone.conf",
+ ensure => present,
+ owner => "keystone",
+ mode => 0600,
+ content => template("keystone/keystone.conf.erb"),
+ notify => Service["keystone"],
+ require => Package["keystone"]
}
file { "initial_data.sh":
@@ -20,6 +35,7 @@
unless => "keystone-manage user list | grep -q admin",
require => [
Package['keystone'],
+ File['keystone.conf'],
File["initial_data.sh"]
]
}
@@ -14,24 +14,27 @@ keystone-manage $* role add Member
keystone-manage $* role grant Admin admin
#endpointTemplates
-keystone-manage $* baseURLs add RegionOne swift http://<%= api_vip %>:8080/v1/AUTH_%tenant_id% http://<%= api_vip %>:8080/ http://<%= api_vip %>:8080/v1/AUTH_%tenant_id% 1
-keystone-manage $* baseURLs add RegionOne nova_compat http://<%= api_vip %>:8774/v1.0/ http://<%= api_vip %>:8774/v1.0 http://<%= api_vip %>:8774/v1.0 1
-keystone-manage $* baseURLs add RegionOne nova http://<%= api_vip %>:8774/v1.1/ http://<%= api_vip %>:8774/v1.1 http://<%= api_vip %>:8774/v1.1 1
-keystone-manage $* baseURLs add RegionOne glance http://<%= api_vip %>:9292/v1.1/%tenant_id% http://<%= api_vip %>:9292/v1.1/%tenant_id% http://<%= api_vip %>:9292/v1.1/%tenant_id% 1
-keystone-manage $* baseURLs add RegionOne keystone http://<%= api_vip %>:8080/v2.0 http://<%= api_vip %>:8081/v2.0 http://<%= api_vip %>:8080/v2.0 1
+keystone-manage $* endpointTemplates add RegionOne swift http://<%= api_vip %>:8080/v1/AUTH_%tenant_id% http://<%= api_vip %>:8080/ http://<%= api_vip %>:8080/v1/AUTH_%tenant_id% 1 1
+keystone-manage $* endpointTemplates add RegionOne nova_compat http://<%= api_vip %>:8774/v1.0/ http://<%= api_vip %>:8774/v1.0 http://<%= api_vip %>:8774/v1.0 1 1
+keystone-manage $* endpointTemplates add RegionOne nova http://<%= api_vip %>:8774/v1.1/ http://<%= api_vip %>:8774/v1.1 http://<%= api_vip %>:8774/v1.1 1 1
+keystone-manage $* endpointTemplates add RegionOne glance http://<%= api_vip %>:9292/v1.1/%tenant_id% http://<%= api_vip %>:9292/v1.1/%tenant_id% http://<%= api_vip %>:9292/v1.1/%tenant_id% 1 1
+keystone-manage $* endpointTemplates add RegionOne keystone http://<%= api_vip %>:8080/v2.0 http://<%= api_vip %>:8081/v2.0 http://<%= api_vip %>:8080/v2.0 1 1
+keystone-manage $* endpointTemplates add RegionOne identity http://<%= api_vip %>:5000/v2.0 http://<%= api_vip %>:5001/v2.0 http://<%= api_vip %>:5000/v2.0 1 1
# Tokens
keystone-manage $* token add 999888777666 admin admin 2015-02-05T00:00
#Tenant endpoints
-keystone-manage $* tenant_baseURL add admin 1
-keystone-manage $* tenant_baseURL add admin 2
-keystone-manage $* tenant_baseURL add admin 3
-keystone-manage $* tenant_baseURL add admin 4
-keystone-manage $* tenant_baseURL add admin 5
+keystone-manage $* endpoint add admin 1
+keystone-manage $* endpoint add admin 2
+keystone-manage $* endpoint add admin 3
+keystone-manage $* endpoint add admin 4
+keystone-manage $* endpoint add admin 5
+keystone-manage $* endpoint add admin 6
-keystone-manage $* tenant_baseURL add demo 1
-keystone-manage $* tenant_baseURL add demo 2
-keystone-manage $* tenant_baseURL add demo 3
-keystone-manage $* tenant_baseURL add demo 4
-keystone-manage $* tenant_baseURL add demo 5
+keystone-manage $* endpoint add demo 1
+keystone-manage $* endpoint add demo 2
+keystone-manage $* endpoint add demo 3
+keystone-manage $* endpoint add demo 4
+keystone-manage $* endpoint add demo 5
+keystone-manage $* endpoint add demo 6
@@ -0,0 +1,85 @@
+[DEFAULT]
+# Show more verbose log output (sets INFO log level output)
+verbose = False
+
+# Show debugging output in logs (sets DEBUG log level output)
+debug = False
+
+# Which backend store should Keystone use by default.
+# Default: 'sqlite'
+# Available choices are 'sqlite' [future will include LDAP, PAM, etc]
+default_store = sqlite
+
+# Log to this file. Make sure you do not set the same log
+# file for both the API and registry servers!
+log_file = /var/log/keystone/keystone.log
+
+#List of backends to be configured
+backends = keystone.backends.sqlalchemy,keystone.backends.alterdb
+
+#Dictionary Maps every service to a header.Missing services would get header X_(SERVICE_NAME) Key => Service Name, Value => Header Name
+service-header-mappings = {
+ 'nova' : 'X-Server-Management-Url',
+ 'swift' : 'X-Storage-Url',
+ 'cdn' : 'X-CDN-Management-Url'}
+
+# Address to bind the API server
+# TODO Properties defined within app not available via pipeline.
+service_host = 0.0.0.0
+
+# Port the bind the API server to
+service_port = 5000
+
+# Address to bind the Admin API server
+admin_host = 0.0.0.0
+
+# Port the bind the Admin API server to
+admin_port = 5001
+
+#Role that allows to perform admin operations.
+keystone-admin-role = Admin
+
+[keystone.backends.sqlalchemy]
+# SQLAlchemy connection string for the reference implementation
+# registry server. Any valid SQLAlchemy connection string is fine.
+# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
+sql_connection = sqlite:////var/lib/keystone/keystone.db
+backend_entities = ['UserGroupAssociation', 'UserRoleAssociation', 'Endpoints', 'Role', 'Tenant', 'User', 'Credentials', 'Group', 'EndpointTemplates']
+
+# Period in seconds after which SQLAlchemy should reestablish its connection
+# to the database.
+sql_idle_timeout = 30
+
+[keystone.backends.alterdb]
+# SQLAlchemy connection string for the reference implementation
+# registry server. Any valid SQLAlchemy connection string is fine.
+# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
+sql_connection = sqlite:////var/lib/keystone/keystone.token.db
+backend_entities = ['Token']
+
+# Period in seconds after which SQLAlchemy should reestablish its connection
+# to the database.
+sql_idle_timeout = 30
+
+[pipeline:admin]
+pipeline =
+ urlrewritefilter
+ admin_api
+
+[pipeline:keystone-legacy-auth]
+pipeline =
+ urlrewritefilter
+ legacy_auth
+ service_api
+
+[app:service_api]
+paste.app_factory = keystone.server:service_app_factory
+
+[app:admin_api]
+paste.app_factory = keystone.server:admin_app_factory
+
+[filter:urlrewritefilter]
+paste.filter_factory = keystone.middleware.url:filter_factory
+
+[filter:legacy_auth]
+paste.filter_factory = keystone.frontends.legacy_token_auth:filter_factory
Oops, something went wrong.

0 comments on commit ff9a0bf

Please sign in to comment.