Cleaned up and added jinja templating to cinder.conf
This commit is contained in:
parent
8267564ce0
commit
93d77fd256
|
@ -104,7 +104,6 @@
|
|||
securityContext:
|
||||
privileged: true
|
||||
image: tripleoupstream/centos-binary-cinder-volume:latest
|
||||
image_pull_policy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: kolla-config
|
||||
mountPath: /var/lib/kolla/config_files/
|
||||
|
@ -165,7 +164,6 @@
|
|||
securityContext:
|
||||
privileged: true
|
||||
image: tripleoupstream/centos-binary-iscsid:latest
|
||||
image_pull_policy: IfNotPresent
|
||||
volumeMounts:
|
||||
- mountPath: /etc/localtime
|
||||
name: host-etc-localtime
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
containers:
|
||||
- name: cinder-volume
|
||||
image: tripleoupstream/centos-binary-cinder-volume:latest
|
||||
image_pull_policy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: kolla-config
|
||||
mountPath: /var/lib/kolla/config_files/
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
containers:
|
||||
- name: cinder-volume
|
||||
image: tripleoupstream/centos-binary-cinder-volume:latest
|
||||
image_pull_policy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: kolla-config
|
||||
mountPath: /var/lib/kolla/config_files/
|
||||
|
|
|
@ -2,23 +2,6 @@
|
|||
include_role:
|
||||
name: 'ansible-role-k8s-tripleo'
|
||||
vars:
|
||||
hieradata:
|
||||
tripleo::profile::base::cinder::volume::dellemc_xtremio_iscsi_backend: true
|
||||
tripleo::profile::base::cinder::volume::cinder_enable_iscsi_backend: true
|
||||
tripleo::profile::base::cinder::volume::cinder_enable_rbd_backend: false
|
||||
tripleo::profile::base::cinder::volume::cinder_enable_nfs_backend: false
|
||||
tripleo::profile::base::cinder::volume::iscsi::cinder_lvm_loop_device_size: 10280
|
||||
tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_helper: lioadm
|
||||
tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_address: iscsid
|
||||
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: volumes
|
||||
tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: openstack
|
||||
ceph::profile::params::fsid: 1611b996-d2d7-11e6-b1c2-5254004237d4
|
||||
cinder::rabbit_userid: guest
|
||||
cinder::rabbit_port: 5672
|
||||
cinder::rabbit_password: rabbitpass
|
||||
|
||||
|
||||
hieradata_file: '{{hiera_data_file}}'
|
||||
schema:
|
||||
cinder::api::bind_port: bind_port
|
||||
cinder::rabbit_userid: oslo_messaging_rabbit.rabbit_userid
|
||||
|
@ -32,6 +15,11 @@
|
|||
cinder::database_connection: database.connection
|
||||
cinder::db::database_max_retries: database.max_retries
|
||||
cinder::db::database_db_max_retries: database.db_max_retries
|
||||
cinder::db::mysql::dbname: database.dbname
|
||||
cinder::db::mysql::host: database.host
|
||||
cinder::db::mysql::password: database.password
|
||||
cinder::db::mysql::user: database.user
|
||||
|
||||
|
||||
tripleo::profile::base::cinder::volume::cinder_enable_iscsi_backend: cinder_enable_iscsi_backend
|
||||
tripleo::profile::base::cinder::volume::cinder_enable_nfs_backend: cinder_enable_nfs_backend
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
- name: Initialize an empty list for our backends
|
||||
set_fact:
|
||||
enabled_backends: []
|
||||
|
||||
- include: hiera.yml
|
||||
|
||||
- include: enabled_backends.yml
|
||||
|
||||
- name: Generate config files
|
||||
config_template:
|
||||
src: cinder.conf.j2
|
||||
dest: /tmp/cinder.conf
|
||||
config_overrides: '{{cinder_config}}'
|
||||
config_type: ini
|
||||
|
||||
- name: Generate config files
|
||||
template:
|
||||
src: cinder-volume-config.json.j2
|
||||
dest: /tmp/cinder-volume-config.json
|
||||
|
||||
- name: Read configs into memory
|
||||
slurp:
|
||||
src: "/tmp/cinder.conf"
|
||||
register: "cinder_conf"
|
||||
|
||||
- name: Read configs into memory
|
||||
slurp:
|
||||
src: "/tmp/cinder-volume-config.json"
|
||||
register: "cinder_volume_config_json"
|
||||
|
||||
- name: Create cinder configmaps
|
||||
ignore_errors: yes
|
||||
k8s_v1_config_map:
|
||||
name: cinder-api
|
||||
namespace: "{{ namespace }}"
|
||||
state: present
|
||||
debug: yes
|
||||
labels:
|
||||
service: cinder
|
||||
data:
|
||||
config.json: |
|
||||
{{cinder_volume_config_json['content'] | b64decode | to_json}}
|
||||
|
||||
cinder.conf: |
|
||||
{{cinder_conf['content'] | b64decode}}
|
||||
|
||||
|
|
@ -4,11 +4,11 @@ config_files:
|
|||
dest: "/etc/cinder/cinder.conf"
|
||||
owner: cinder
|
||||
perm: '0600'
|
||||
{% if result.conf_dict['cinder_enable_rbd_backend'] %}
|
||||
- source: "/var/lib/kolla/config_files/ceph.conf"
|
||||
dest: "/etc/ceph/ceph.conf"
|
||||
owner: root
|
||||
perm: '0644'
|
||||
{% if result.conf_dict['cinder_enable_rbd_backend'] %}
|
||||
- source: "/var/lib/kolla/config_files/ceph.client.{{result.conf_dict['cinder_rbd_user_name']}}.keyring"
|
||||
dest: "/etc/ceph/ceph.client.{{result.conf_dict['cinder_rbd_user_name']}}.keyring"
|
||||
owner: root
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[DEFAULT]
|
||||
glance_api_servers=none
|
||||
glance_api_version=2
|
||||
glance_api_servers={{result.conf_dict['glance_api_servers']}}
|
||||
glance_api_version={{result.conf_dict['glance_api_version']}}
|
||||
enable_v3_api=True
|
||||
storage_availability_zone=nova
|
||||
default_availability_zone=nova
|
||||
auth_strategy=noauth
|
||||
auth_strategy={{result.conf_dict['auth_strategy']}}
|
||||
enabled_backends={{ enabled_backends | join(",") }}
|
||||
nova_catalog_info=compute:nova:internalURL
|
||||
nova_catalog_admin_info=compute:nova:adminURL
|
||||
|
@ -12,14 +12,13 @@ scheduler_driver=cinder.scheduler.filter_scheduler.FilterScheduler
|
|||
osapi_volume_listen=0.0.0.0
|
||||
osapi_volume_workers=2
|
||||
log_dir=/var/log/cinder
|
||||
#transport_url=rabbit://guest:rabbitpass@rabbitmq:5672/?ssl=0
|
||||
transport_url=rabbit://{{result.conf_dict['oslo_messaging_rabbit']['rabbit_userid']}}:{{result.conf_dict['oslo_messaging_rabbit']['rabbit_password']}}@rabbitmq:{{result.conf_dict['oslo_messaging_rabbit']['rabbit_port']}}/?ssl=0
|
||||
rpc_backend=rabbit
|
||||
control_exchange=openstack
|
||||
api_paste_config=/etc/cinder/api-paste.ini
|
||||
|
||||
[database]
|
||||
connection=mysql+pymysql://cinder:cinderpass@mariadb:3306/cinder
|
||||
connection=mysql+pymysql://{{result.conf_dict['database']['user']}}:{{result.conf_dict['database']['password']}}@{{result.conf_dict['database']['host']}}:3306/{{result.conf_dict['database']['dbname']}}
|
||||
max_retries=-1
|
||||
db_max_retries=-1
|
||||
|
||||
|
@ -31,11 +30,11 @@ driver=messagingv2
|
|||
transport_url=rabbit://{{result.conf_dict['oslo_messaging_rabbit']['rabbit_userid']}}:{{result.conf_dict['oslo_messaging_rabbit']['rabbit_password']}}@rabbitmq:{{result.conf_dict['oslo_messaging_rabbit']['rabbit_port']}}/?ssl=0
|
||||
|
||||
[oslo_messaging_rabbit]
|
||||
ssl=False
|
||||
rabbit_port=5672
|
||||
rabbit_userid=guest
|
||||
rabbit_password=rabbitpass
|
||||
heartbeat_timeout_threshold=60
|
||||
ssl={{result.conf_dict['oslo_messaging_rabbit']['rabbit_use_ssl']}}
|
||||
rabbit_port={{result.conf_dict['oslo_messaging_rabbit']['rabbit_port']}}
|
||||
rabbit_userid={{result.conf_dict['oslo_messaging_rabbit']['rabbit_userid']}}
|
||||
rabbit_password={{result.conf_dict['oslo_messaging_rabbit']['rabbit_password']}}
|
||||
heartbeat_timeout_threshold={{result.conf_dict['oslo_messaging_rabbit']['rabbit_heartbeat_timeout_threshold']}}
|
||||
|
||||
[oslo_middleware]
|
||||
enable_proxy_headers_parsing=True
|
||||
|
@ -55,15 +54,15 @@ iscsi_protocol=iscsi
|
|||
|
||||
{% if result.conf_dict['dellemc_xtremio_iscsi_backend'] %}
|
||||
[xtremio]
|
||||
max_over_subscription_ratio = 40.0
|
||||
use_multipath_for_image_xfer=true
|
||||
max_over_subscription_ratio = {{result.conf_dict['xtremio']['max_over_subscription_ratio']}}
|
||||
use_multipath_for_image_xfer= {{result.conf_dict['xtremio']['use_multipath_for_image_xfer']}}
|
||||
volume_backend_name=xtremio
|
||||
volume_driver=cinder.volume.drivers.emc.xtremio.XtremIOISCSIDriver
|
||||
san_ip=10.35.146.7
|
||||
xtremio_cluster_name=RHEL-QE
|
||||
san_login=cinder
|
||||
san_password=qum5net
|
||||
image_volume_cache_enabled = false
|
||||
san_ip={{result.conf_dict['xtremio']['san_ip']}}
|
||||
xtremio_cluster_name={{result.conf_dict['xtremio']['xtremio_cluster_name']}}
|
||||
san_login={{result.conf_dict['xtremio']['san_login']}}
|
||||
san_password={{result.conf_dict['xtremio']['san_password']}}
|
||||
image_volume_cache_enabled={{result.conf_dict['xtremio']['image_volume_cache_enabled']}}
|
||||
{% endif %}
|
||||
|
||||
{% if result.conf_dict['cinder_enable_rbd_backend'] %}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
[xtremio]
|
||||
max_over_subscription_ratio=
|
||||
use_multipath_for_image_xfer=
|
||||
volume_backend_name=xtremio
|
||||
volume_driver=cinder.volume.drivers.emc.xtremio.XtremIOISCSIDriver
|
||||
san_ip=
|
||||
xtremio_cluster_name=
|
||||
san_login=
|
||||
san_password=
|
||||
image_volume_cache_enabled=
|
Loading…
Reference in New Issue