Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the config of ceph backends to a template file, gating++ #1666

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 2 additions & 106 deletions hooks/playbooks/control_plane_ceph_backends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,110 +21,6 @@
state: directory

- name: Create kustomization to add Ceph as backend
ansible.builtin.copy:
ansible.builtin.template:
dest: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane/90-ceph-backends-kustomization.yaml"
content: |-
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
namespace: {{ cifmw_install_yamls_defaults['NAMESPACE'] }}
patches:
- target:
kind: OpenStackControlPlane
patch: |-
- op: add
path: /spec/extraMounts
value:
- name: v1
region: r1
extraVol:
- propagation:
- CinderVolume
- CinderBackup
- GlanceAPI
- ManilaShare
extraVolType: Ceph
volumes:
- name: ceph
projected:
sources:
- secret:
name: ceph-conf-files
mounts:
- name: ceph
mountPath: "/etc/ceph"
readOnly: true

- op: replace
path: /spec/cinder/template/cinderBackup/replicas
value: {{ cifmw_services_cinder_bkp_replicas | default(1) }}

- op: add
path: /spec/cinder/template/cinderBackup/customServiceConfig
value: |
[DEFAULT]
backup_driver = cinder.backup.drivers.ceph.CephBackupDriver
backup_ceph_pool = backups
backup_ceph_user = openstack

- op: replace
path: /spec/cinder/template/cinderVolumes/volume1/replicas
value: {{ cifmw_services_cinder_vol_replicas | default(1) }}

- op: add
path: /spec/cinder/template/cinderVolumes/volume1/customServiceConfig
value: |
[DEFAULT]
enabled_backends=ceph
[ceph]
volume_backend_name=ceph
volume_driver=cinder.volume.drivers.rbd.RBDDriver
rbd_ceph_conf=/etc/ceph/ceph.conf
rbd_user=openstack
rbd_pool=volumes
rbd_flatten_volume_from_snapshot=False
report_discard_supported=True
backend_host=hostgroup
rbd_secret_uuid={{ cifmw_ceph_fsid }}

- op: replace
path: /spec/glance/template/glanceAPIs/default/replicas
value: {{ cifmw_services_glance_apis_replicas | default(1) }}

- op: add
path: /spec/glance/template/customServiceConfig
value: |
[DEFAULT]
enabled_backends = default_backend:rbd
[glance_store]
default_backend = default_backend
[default_backend]
rbd_store_ceph_conf = /etc/ceph/ceph.conf
store_description = "RBD backend"
rbd_store_pool = images
rbd_store_user = openstack

- op: replace
path: /spec/glance/template/glanceAPIs/default/type
value: split

- op: add
path: /spec/manila/enabled
value: {{ cifmw_services_manila_enabled | default('false') }}

- op: add
path: /spec/manila/template/customServiceConfig
value: |
[DEFAULT]
enabled_share_backends=cephfs
enabled_share_protocols=cephfs
debug=True
[cephfs]
driver_handles_share_servers=False
share_backend_name=cephfs
share_driver=manila.share.drivers.cephfs.driver.CephFSDriver
cephfs_conf_path=/etc/ceph/ceph.conf
cephfs_auth_id=openstack
cephfs_cluster_name=ceph
cephfs_volume_mode=0755
cephfs_protocol_helper_type=CEPHFS
src: "config_ceph_backends.yaml.j2"
104 changes: 104 additions & 0 deletions hooks/playbooks/templates/config_ceph_backends.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
namespace: {{ cifmw_install_yamls_defaults['NAMESPACE'] }}
patches:
- target:
kind: OpenStackControlPlane
patch: |-
- op: add
path: /spec/extraMounts
value:
- name: v1
region: r1
extraVol:
- propagation:
- CinderVolume
- CinderBackup
- GlanceAPI
- ManilaShare
extraVolType: Ceph
volumes:
- name: ceph
projected:
sources:
- secret:
name: ceph-conf-files
mounts:
- name: ceph
mountPath: "/etc/ceph"
readOnly: true

- op: replace
path: /spec/cinder/template/cinderBackup/replicas
value: {{ cifmw_services_cinder_bkp_replicas | default(1) }}

- op: add
path: /spec/cinder/template/cinderBackup/customServiceConfig
value: |
[DEFAULT]
backup_driver = cinder.backup.drivers.ceph.CephBackupDriver
backup_ceph_pool = backups
backup_ceph_user = openstack

- op: replace
path: /spec/cinder/template/cinderVolumes/volume1/replicas
value: {{ cifmw_services_cinder_vol_replicas | default(1) }}

- op: add
path: /spec/cinder/template/cinderVolumes/volume1/customServiceConfig
value: |
[DEFAULT]
enabled_backends=ceph
[ceph]
volume_backend_name=ceph
volume_driver=cinder.volume.drivers.rbd.RBDDriver
rbd_ceph_conf=/etc/ceph/ceph.conf
rbd_user=openstack
rbd_pool=volumes
rbd_flatten_volume_from_snapshot=False
report_discard_supported=True
backend_host=hostgroup
rbd_secret_uuid={{ cifmw_ceph_fsid }}

- op: replace
path: /spec/glance/template/glanceAPIs/default/replicas
value: {{ cifmw_services_glance_apis_replicas | default(1) }}

- op: add
path: /spec/glance/template/customServiceConfig
value: |
[DEFAULT]
enabled_backends = default_backend:rbd
[glance_store]
default_backend = default_backend
[default_backend]
rbd_store_ceph_conf = /etc/ceph/ceph.conf
store_description = "RBD backend"
rbd_store_pool = images
rbd_store_user = openstack

- op: replace
path: /spec/glance/template/glanceAPIs/default/type
value: split

- op: add
path: /spec/manila/enabled
value: {{ cifmw_services_manila_enabled | default('false') }}

- op: add
path: /spec/manila/template/customServiceConfig
value: |
[DEFAULT]
enabled_share_backends=cephfs
enabled_share_protocols=cephfs
debug=True
[cephfs]
driver_handles_share_servers=False
share_backend_name=cephfs
share_driver=manila.share.drivers.cephfs.driver.CephFSDriver
cephfs_conf_path=/etc/ceph/ceph.conf
cephfs_auth_id=openstack
cephfs_cluster_name=ceph
cephfs_volume_mode=0755
cephfs_protocol_helper_type=CEPHFS
34 changes: 0 additions & 34 deletions hooks/templates/service_config_ceph.yaml.j2

This file was deleted.

3 changes: 3 additions & 0 deletions zuul.d/edpm_multinode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@
cephfs_enabled: true
ceph_nfs_enabled: true
files:
- ^hooks/playbooks/control_plane_ceph_backends.yml
- ^hooks/playbooks/control_plane_hci_pre_deploy.yml
- ^hooks/playbooks/templates/config_ceph_backends.yaml.j2
- ^playbooks/06-deploy-edpm.yml
- ^playbooks/ceph.yml
- ^roles/edpm_deploy/(?!meta|README).*
Expand Down
1 change: 1 addition & 0 deletions zuul.d/project-templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
- cifmw-molecule
- podified-multinode-edpm-deployment-crc: *content_provider
- cifmw-crc-podified-edpm-baremetal: *content_provider
- podified-multinode-hci-deployment-crc: *content_provider

- project-template:
name: data-plane-adoption-ci-framework-pipeline
Expand Down