79 lines
2.6 KiB
Django/Jinja
79 lines
2.6 KiB
Django/Jinja
{% set cinder=salt["grains.filter_by"]({
|
|
"Debian":{
|
|
"name": "cinder",
|
|
"server_pkgs": ["cinder-api",
|
|
"cinder-scheduler",
|
|
"cinder-backup",
|
|
"python-cinderclient"],
|
|
"server_services": ["cinder-api",
|
|
"cinder-scheduler"],
|
|
"client_pkg": "python-cinderclient",
|
|
"cinder_volume": "cinder-volume",
|
|
"cinder_volume_service": "cinder-volume",
|
|
},
|
|
"RedHat":{
|
|
"name": "cinder",
|
|
"server_pkgs": ["openstack-cinder"],
|
|
"server_services": ["openstack-cinder-api",
|
|
"openstack-cinder-scheduler"],
|
|
"client_pkg": "python-cinderclient",
|
|
"cinder_volume": "openstack-cinder",
|
|
"cinder_volume_service": "openstack-cinder-volume",
|
|
},
|
|
"default":{
|
|
"name": "cinder",
|
|
"server_pkgs": ["cinder-api",
|
|
"cinder-scheduler",
|
|
"cinder-backup"],
|
|
"server_services": ["cinder-api",
|
|
"cinder-scheduler",
|
|
"cinder-backup"],
|
|
"client_pkg": "python-cinderclient",
|
|
"cinder_volume": "cinder-volume",
|
|
"cinder_volume_service": "cinder-volume",
|
|
}
|
|
}, merge=salt["pillar.get"]("cinder:lookup")) %}
|
|
|
|
{%- set cinder_config = {
|
|
"DEFAULT": {
|
|
"rootwrap_config": "/etc/cinder/rootwrap.conf",
|
|
"api_paste_confg": "/etc/cinder/api-paste.ini",
|
|
"iscsi_helper": "tgtadm",
|
|
"volume_name_template": "volume-%s",
|
|
"volume_group": "cinder-volumes",
|
|
"verbose": "False",
|
|
"auth_strategy": "keystone",
|
|
"state_path": "/var/lib/cinder",
|
|
"lock_path": "/var/lock/cinder",
|
|
"volumes_dir": "/var/lib/cinder/volumes",
|
|
|
|
"rpc_backend": "cinder.openstack.common.rpc.impl_kombu",
|
|
"rabbit_userid": salt["pillar.get"]("cinder:rabbitmq:name"),
|
|
"rabbit_password": salt["pillar.get"]("cinder:rabbitmq:password"),
|
|
},
|
|
"database": {
|
|
"connection": ("mysql://cinder:" + salt["pillar.get"]("cinder:mysql:password") + "@"
|
|
+ salt["pillar.get"]("cinder:mysql:ip", "localhost")
|
|
+ "/cinder?charset=utf8")
|
|
},
|
|
"keystone_authtoken":{
|
|
"auth_host": salt["pillar.get"]("cinder:keystone:host", "localhost"),
|
|
"auth_port": 5000,
|
|
"auth_protocol": "http",
|
|
"admin_tenant_name": "service",
|
|
"admin_user" : "cinder",
|
|
"admin_password": salt["pillar.get"]("cinder:keystone:password")
|
|
}
|
|
}
|
|
%}
|
|
|
|
{% for section, value in salt["pillar.get"]("cinder:config").iteritems() %}
|
|
{% if not cinder_config.has_key(section) %}
|
|
{% do cinder_config.update({ section:{} }) %}
|
|
{% endif %}
|
|
{% do cinder_config[section].update(value) %}
|
|
{% endfor %}
|
|
|
|
{#- vim:ft=sls
|
|
-#}
|