Fixed bugs and added jinja2 support for Ceph and cinder.conf
This commit is contained in:
parent
93d77fd256
commit
9020dc999a
|
@ -1,3 +1,25 @@
|
|||
- name: Generate config files
|
||||
config_template:
|
||||
src: rbd/ceph.conf.j2
|
||||
dest: /tmp/ceph.conf
|
||||
config_type: ini
|
||||
|
||||
- name: Read configs into memory
|
||||
slurp:
|
||||
src: "/tmp/ceph.conf"
|
||||
register: "ceph_conf"
|
||||
|
||||
- name: Generate config files
|
||||
config_template:
|
||||
src: rbd/ceph.client.cinder.keyring
|
||||
dest: /tmp/ceph.client.cinder.keyring
|
||||
config_type: ini
|
||||
|
||||
- name: Read configs into memory
|
||||
slurp:
|
||||
src: "/tmp/ceph.client.cinder.keyring"
|
||||
register: "ceph_client_cinder_keyring"
|
||||
|
||||
- name: Create cinder-volume-rbd configmaps
|
||||
ignore_errors: yes
|
||||
k8s_v1_config_map:
|
||||
|
@ -25,8 +47,8 @@
|
|||
"perm": "0644"
|
||||
},
|
||||
{
|
||||
"source": "/var/lib/kolla/config_files/ceph.client.wshed.keyring",
|
||||
"dest": "/etc/ceph/ceph.client.wshed.keyring",
|
||||
"source": "/var/lib/kolla/config_files/ceph.client.cinder.keyring",
|
||||
"dest": "/etc/ceph/ceph.client.cinder.keyring",
|
||||
"owner": "root",
|
||||
"perm": "0644"
|
||||
}
|
||||
|
@ -51,8 +73,9 @@
|
|||
ceph.conf: |
|
||||
{{ceph_conf['content'] | b64decode}}
|
||||
|
||||
ceph.client.wshed.keyring: |
|
||||
{{ceph_client_keyring['content'] | b64decode}}
|
||||
ceph.client.cinder.keyring: |
|
||||
{{ceph_client_cinder_keyring['content'] | b64decode}}
|
||||
|
||||
|
||||
- name: Create Cinder Volume Deployment
|
||||
k8s_apps_v1beta1_deployment:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- include: backends/iscsi.yml
|
||||
when: result.conf_dict['cinder_enable_iscsi_backend']
|
||||
- include: backends/rbd.yml
|
||||
- include: backends/ceph.yml
|
||||
when: result.conf_dict['cinder_enable_rbd_backend']
|
||||
- include: backends/xtremio.yml
|
||||
when: result.conf_dict['dellemc_xtremio_iscsi_backend']
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
name: 'ansible-role-k8s-tripleo'
|
||||
vars:
|
||||
schema:
|
||||
cinder::auth_strategy: DEFAULT.auth_strategy
|
||||
cinder::api::bind_port: bind_port
|
||||
cinder::rabbit_userid: oslo_messaging_rabbit.rabbit_userid
|
||||
cinder::rabbit_port: oslo_messaging_rabbit.rabbit_port
|
||||
|
@ -10,8 +11,8 @@
|
|||
cinder::rabbit_use_ssl: oslo_messaging_rabbit.rabbit_use_ssl
|
||||
cinder::rabbit_host: oslo_messaging_rabbit.rabbit_host
|
||||
cinder::rabbit_heartbeat_timeout_threshold: oslo_messaging_rabbit.rabbit_heartbeat_timeout_threshold
|
||||
cinder::glance::glance_api_servers: glance_api_servers
|
||||
cinder::glance::glance_api_version: glance_api_version
|
||||
cinder::glance::glance_api_servers: DEFAULT.glance_api_servers
|
||||
cinder::glance::glance_api_version: DEFAULT.glance_api_version
|
||||
cinder::database_connection: database.connection
|
||||
cinder::db::database_max_retries: database.max_retries
|
||||
cinder::db::database_db_max_retries: database.db_max_retries
|
||||
|
@ -20,7 +21,6 @@
|
|||
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
|
||||
tripleo::profile::base::cinder::volume::cinder_enable_rbd_backend: cinder_enable_rbd_backend
|
||||
|
@ -39,12 +39,13 @@
|
|||
cinder::backend::dellemc_xtremio_iscsi::max_over_subscription_ratio: xtremio.max_over_subscription_ratio
|
||||
cinder::backend::dellemc_xtremio_iscsi::use_multipath_for_image_xfer: xtremio.use_multipath_for_image_xfer
|
||||
cinder::backend::dellemc_xtremio_iscsi::volume_backend_name: xtremio.volume_backend_name
|
||||
cinder::backend::dellemc_xtremio_iscsi::scan_ip: xtremio.scan_ip
|
||||
cinder::backend::dellemc_xtremio_iscsi::san_ip: xtremio.san_ip
|
||||
cinder::backend::dellemc_xtremio_iscsi::xtremio_cluster_name: xtremio.xtremio_cluster_name
|
||||
cinder::backend::dellemc_xtremio_iscsi::san_login: xtremio.san_login
|
||||
cinder::backend::dellemc_xtremio_iscsi::san_password: xtremio.san_password
|
||||
cinder::backend::dellemc_xtremio_iscsi::image_volume_cache_enabled: xtremio.image_volume_cache_enabled
|
||||
|
||||
tripleo::profile::base::ceph::ceph_mon_host: ceph_mon_host
|
||||
ceph::profile::params::fsid: ceph_cluster_fsid
|
||||
|
||||
default: '{{cinder_config}}'
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[DEFAULT]
|
||||
glance_api_servers={{result.conf_dict['glance_api_servers']}}
|
||||
glance_api_version={{result.conf_dict['glance_api_version']}}
|
||||
glance_api_servers={{result.conf_dict['DEFAULT']['glance_api_servers']}}
|
||||
glance_api_version={{result.conf_dict['DEFAULT']['glance_api_version']}}
|
||||
enable_v3_api=True
|
||||
storage_availability_zone=nova
|
||||
default_availability_zone=nova
|
||||
auth_strategy={{result.conf_dict['auth_strategy']}}
|
||||
auth_strategy={{result.conf_dict['DEFAULT']['auth_strategy']}}
|
||||
enabled_backends={{ enabled_backends | join(",") }}
|
||||
nova_catalog_info=compute:nova:internalURL
|
||||
nova_catalog_admin_info=compute:nova:adminURL
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[global]
|
||||
fsid =
|
||||
mon_host =
|
||||
fsid = {{result.conf_dict['ceph_cluster_fsid']}}
|
||||
mon_host = {{result.conf_dict['ceph_mon_host']}
|
||||
auth_cluster_required = cephx
|
||||
auth_service_required = cephx
|
||||
auth_client_required = cephx
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
[tripleo_ceph]
|
||||
volume_backend_name=tripleo_ceph
|
||||
volume_driver=cinder.volume.drivers.rbd.RBDDriver
|
||||
rbd_ceph_conf=/etc/ceph/ceph.conf
|
||||
rbd_user=wshed
|
||||
rbd_pool=wshed_volumes
|
||||
rbd_secret_uuid=cd0d33e2-9e44-489d-8b5c-53e4fcb9a8ad
|
||||
backend_host=hostgroup
|
Loading…
Reference in New Issue