Merge pull request #791 from dmitryilyin/havana

Update Murano and Heat for Havana
This commit is contained in:
Vladimir Kuklin 2013-11-08 05:47:26 -08:00
commit fe1a2a0b15
15 changed files with 188 additions and 29 deletions

View File

@ -9,7 +9,6 @@ class heat::db (
Package<| title == 'heat-common' |> -> Class['heat::db']
Class['heat::db::mysql'] -> Class['heat::db']
Class['heat::cli'] -> Class['heat::db']
validate_re($sql_connection,
'(mysql):\/\/(\S+:\S+@\S+\/\S+)?')

View File

@ -56,9 +56,6 @@ class heat(
class { 'heat::install' :
}
class { 'heat::cli' :
}
class { 'heat::client' :
}

View File

@ -7,7 +7,6 @@ class heat::params {
$api_cfn_package_name = 'openstack-heat-api-cfn'
$engine_package_name = 'openstack-heat-engine'
$common_package_name = 'openstack-heat-common'
$heat_cli_package_name = 'openstack-heat-cli'
$deps_pbr_package_name = 'python-pbr'
$deps_routes_package_name = 'python-routes'
$client_package_name = 'python-heatclient'

View File

View File

@ -0,0 +1,22 @@
Puppet::Type.type(:murano_repository_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
resource[:name].split('/', 2).first
end
def setting
resource[:name].split('/', 2).last
end
def separator
'='
end
def file_path
'/etc/murano/murano-repository.conf'
end
end

View File

@ -0,0 +1,19 @@
Puppet::Type.newtype(:murano_repository_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from conductor.conf'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
end
end

View File

@ -0,0 +1,7 @@
class murano::common {
include murano::params
package { 'murano_common':
ensure => installed,
name => $::murano::params::murano_common_package_name,
}
}

View File

@ -1,9 +1,10 @@
class murano::dashboard (
$settings_py = '/usr/share/openstack-dashboard/openstack_dashboard/settings.py',
$modify_config = '/usr/bin/modify-horizon-config.sh',
$collect_static_script = '/usr/share/openstack-dashboard/manage.py',
$murano_url_string = $::murano::params::default_url_string,
$local_settings = $::murano::params::local_settings_path,
$settings_py = '/usr/share/openstack-dashboard/openstack_dashboard/settings.py',
$modify_config = '/usr/bin/modify-horizon-config.sh',
# $collect_static_script = '/usr/share/openstack-dashboard/manage.py',
$murano_url_string = $::murano::params::default_url_string,
$murano_metadata_url_string = $::murano::params::default_metadata_url_string,
$local_settings = $::murano::params::local_settings_path,
) {
include murano::params
@ -38,11 +39,11 @@ class murano::dashboard (
$apache_user = 'www-data'
}
exec { 'collect_static':
command => "${collect_static_script} collectstatic --noinput",
user => $apache_user,
group => $apache_user,
}
# exec { 'collect_static':
# command => "${collect_static_script} collectstatic --noinput",
# user => $apache_user,
# group => $apache_user,
# }
package { 'murano_dashboard':
ensure => present,
@ -53,7 +54,8 @@ class murano::dashboard (
ensure => installed,
}
Package[$dashboard_deps] -> Package['murano_dashboard'] -> File[$modify_config] -> Exec['fix_horizon_config'] -> Exec['collect_static'] -> Service <| title == 'httpd' |>
# Package[$dashboard_deps] -> Package['murano_dashboard'] -> File[$modify_config] -> Exec['fix_horizon_config'] -> Exec['collect_static'] -> Service <| title == 'httpd' |>
Package[$dashboard_deps] -> Package['murano_dashboard'] -> File[$modify_config] -> Exec['fix_horizon_config'] -> Service <| title == 'httpd' |>
Package['murano_dashboard'] ~> Service <| title == 'httpd' |>
Exec['fix_horizon_config'] ~> Service <| title == 'httpd' |>

View File

@ -42,8 +42,13 @@ class murano (
$murano_db_user = 'murano',
$murano_db_host = 'localhost',
$murano_db_allowed_hosts = ['localhost','%'],
#
$murano_metadata_bind_host = '127.0.0.1',
$murano_metadata_bind_port = '8084',
) {
Class['mysql::server'] -> Class['murano::db::mysql'] -> Class['murano::rabbitmq'] -> Class['murano::common'] -> Class['murano::conductor'] -> Class['murano::api'] -> Class['murano::metadataclient'] -> Class['murano::repository'] -> Class['murano::python_muranoclient'] -> Class['murano::dashboard']
$murano_keystone_auth_url = "${murano_keystone_protocol}://${murano_keystone_host}:${murano_keystone_port}/v2.0"
class { 'murano::db::mysql':
@ -54,6 +59,27 @@ class murano (
allowed_hosts => $murano_db_allowed_hosts,
}
class { 'murano::common':
}
class { 'murano::metadataclient':
}
class { 'murano::repository':
verbose => $murano_debug,
debug => $murano_verbose,
repository_auth_host => $murano_keystone_host,
repository_auth_port => $murano_keystone_port,
repository_auth_protocol => $murano_keystone_protocol,
repository_admin_user => $murano_keystone_user,
repository_admin_password => $murano_keystone_password,
repository_admin_tenant_name => $murano_keystone_tenant,
}
class { 'murano::python_muranoclient':
}
class { 'murano::conductor' :
debug => $murano_debug,
verbose => $murano_verbose,
@ -61,7 +87,6 @@ class murano (
data_dir => $murano_data_dir,
max_environments => $murano_max_environments,
auth_url => $murano_keystone_auth_url,
rabbit_host => $murano_rabbit_host,
rabbit_port => $murano_rabbit_port,
rabbit_ssl => $murano_rabbit_ssl,
@ -109,9 +134,10 @@ class murano (
}
class { 'murano::dashboard' :
settings_py => '/usr/share/openstack-dashboard/openstack_dashboard/settings.py',
collect_static_script => '/usr/share/openstack-dashboard/manage.py',
murano_url_string => "MURANO_API_URL = 'http://${murano_api_host}:${murano_api_bind_port}'",
settings_py => '/usr/share/openstack-dashboard/openstack_dashboard/settings.py',
#collect_static_script => '/usr/share/openstack-dashboard/manage.py',
murano_url_string => "MURANO_API_URL = 'http://${murano_api_host}:${murano_api_bind_port}'",
murano_metadata_url_string => "MURANO_METADATA_URL = 'http://${murano_metadata_host}:${murano_metadata_bind_port}'",
}
class { 'murano::rabbitmq' :
@ -121,6 +147,6 @@ class murano (
rabbitmq_main_port => $murano_rabbit_port,
}
Class['mysql::server'] -> Class['murano::db::mysql'] -> Class['murano::rabbitmq'] -> Class['murano::conductor'] -> Class['murano::api'] -> Class['murano::dashboard']
}

View File

@ -0,0 +1,7 @@
class murano::metadataclient {
include murano::params
package { 'murano_metadataclient':
ensure => installed,
name => $::murano::params::murano_metadataclient_package_name,
}
}

View File

@ -1,16 +1,23 @@
class murano::params {
# package names
$murano_conductor_package_name = 'openstack-murano-virtualenv-murano-conductor'
$murano_api_package_name = 'openstack-murano-virtualenv-murano-api'
$murano_dashboard_package_name = 'murano-dashboard'
$murano_conductor_package_name = 'murano-conductor'
$murano_api_package_name = 'murano-api'
$murano_dashboard_package_name = 'murano-dashboard'
$murano_common_package_name = 'murano-common'
$murano_metadataclient_package_name = 'murano-metadataclient'
$murano_repository_package_name = 'murano-repository'
$python_muranoclient_package_name = 'python-muranoclient'
$murano_dashboard_deps = [ 'python-babel' ]
# service names
$murano_conductor_service_name = 'openstack-murano-conductor'
$murano_api_service_name = 'openstack-murano-api'
$murano_conductor_service_name = 'openstack-murano-conductor'
$murano_api_service_name = 'openstack-murano-api'
$murano_repository_service_name = 'openstack-murano-repository'
$default_url_string = "MURANO_API_URL = 'http://127.0.0.1:8082'"
$default_url_string = "MURANO_API_URL = 'http://127.0.0.1:8082'"
$default_metadata_url_string = "MURANO_METADATA_URL = 'http://127.0.0.1:8084'"
case $::osfamily {
'RedHat': {

View File

@ -0,0 +1,7 @@
class murano::python_muranoclient {
include murano::params
package { 'murano_python_muranoclient':
ensure => installed,
name => $::murano::params::python_muranoclient_package_name,
}
}

View File

@ -0,0 +1,67 @@
class murano::repository (
$pacemaker = false,
$verbose = 'True',
$debug = 'True',
$repository_host = '0.0.0.0',
$repository_port = '8084',
$repository_manifests = 'Services',
$repository_ui = 'ui_forms',
$repository_workflows = 'workflows',
$repository_heat = 'heat_templates',
$repository_agent = 'agent_templates',
$repository_scripts = 'scripts',
$repository_output_ui = 'service_forms',
$repository_output_workflows = 'workflows',
$repository_output_heat = 'templates/cf',
$repository_output_agent = 'templates/agent',
$repository_output_scripts = 'templates/agent/scripts',
$repository_auth_host = '127.0.0.1',
$repository_auth_port = '5000',
$repository_auth_protocol = 'http',
$repository_admin_user = 'admin',
$repository_admin_password = 'swordfish',
$repository_admin_tenant_name = 'admin',
) {
include murano::params
package { 'murano_repository':
ensure => installed,
name => $::murano::params::murano_repository_package_name,
}
service { 'murano_repository':
ensure => 'running',
name => $::murano::params::murano_repository_service_name,
enable => true,
hasstatus => true,
hasrestart => true,
}
murano_repository_config {
'DEFAULT/host' : value => $repository_host;
'DEFAULT/port' : value => $repository_port;
'DEFAULT/manifests' : value => $repository_manifests;
'DEFAULT/ui' : value => $repository_ui;
'DEFAULT/workflows' : value => $repository_workflow;
'DEFAULT/heat' : value => $repository_heat;
'DEFAULT/agent' : value => $repository_agent;
'DEFAULT/scripts' : value => $repository_scripts;
'output/ui' : value => $repository_ui;
'output/workflows' : value => $repository_output_workflow;
'output/heat' : value => $repository_output_heat;
'output/agent' : value => $repository_output_agent;
'output/scripts' : value => $repository_output_scripts;
'keystone/auth_host' : value => $repository_auth_host;
'keystone/auth_port' : value => $repository_auth_port;
'keystone/auth_protocol' : value => $repository_auth_protocol;
'keystone/admin_user' : value => $repository_admin_user;
'keystone/admin_password' : value => $repository_admin_password;
'keystone/admin_tenant_name' : value => $repository_admin_tenant_name
}
Murano_repository_config<||> ~> Service['murano_repository']
Package['murano_repository'] -> Murano_repository_config<||>
Package['murano_repository'] -> Service['murano_repository']
}

View File

View File

@ -1,10 +1,10 @@
class savanna::params {
# package names
$savanna_package_name = 'openstack-savanna-virtualenv-savanna'
$savanna_package_name = 'savanna'
# dashboard package
$savanna_dashboard_package_name = 'savanna-dashboard'
# service names
$savanna_service_name = 'openstack-savanna-api'
$savanna_service_name = 'savanna-api'
$settings_path = '/usr/share/openstack-dashboard/openstack_dashboard/settings.py'
$default_url_string = "SAVANNA_URL = 'http://localhost:8386/v1.0'"