diff --git a/docker/services/nova-libvirt.yaml b/docker/services/nova-libvirt.yaml index ea5b682ee5..aac9a0ed40 100644 --- a/docker/services/nova-libvirt.yaml +++ b/docker/services/nova-libvirt.yaml @@ -58,8 +58,10 @@ parameters: type: number NovaEnableRbdBackend: default: false - description: Whether to enable or not the Rbd backend for Nova + description: Whether to enable the Rbd backend for Nova ephemeral storage. type: boolean + tags: + - role_specific CinderEnableRbdBackend: default: false description: Whether to enable or not the Rbd backend for Cinder @@ -148,12 +150,19 @@ conditions: need_libvirt_secret: or: - - equals: - - {get_param: NovaEnableRbdBackend} - - true - - equals: - - {get_param: CinderEnableRbdBackend} - - true + - equals: + - {get_param: [RoleParameters, NovaEnableRbdBackend]} + - true + - and: + - equals: + - {get_param: [RoleParameters, NovaEnableRbdBackend]} + - '' + - equals: + - {get_param: NovaEnableRbdBackend} + - true + - equals: + - {get_param: CinderEnableRbdBackend} + - true use_tls_for_vnc: and: diff --git a/docker/services/octavia/octavia-deployment-config.yaml b/docker/services/octavia/octavia-deployment-config.yaml index df7b986a47..5ecfebdce8 100644 --- a/docker/services/octavia/octavia-deployment-config.yaml +++ b/docker/services/octavia/octavia-deployment-config.yaml @@ -67,8 +67,10 @@ parameters: provides a convenient way to e.g. debug load balancing services. NovaEnableRbdBackend: default: false - description: Whether to enable or not the Rbd backend for Nova + description: Whether to enable the Rbd backend for Nova ephemeral storage. type: boolean + tags: + - role_specific OctaviaControlNetwork: description: The name for the neutron network used for the amphora control network diff --git a/environments/ceph-ansible/ceph-ansible-per-role.yaml b/environments/ceph-ansible/ceph-ansible-per-role.yaml new file mode 100644 index 0000000000..6740f815b3 --- /dev/null +++ b/environments/ceph-ansible/ceph-ansible-per-role.yaml @@ -0,0 +1,14 @@ +resource_registry: + OS::TripleO::Services::CephMgr: ../../docker/services/ceph-ansible/ceph-mgr.yaml + OS::TripleO::Services::CephMon: ../../docker/services/ceph-ansible/ceph-mon.yaml + OS::TripleO::Services::CephOSD: ../../docker/services/ceph-ansible/ceph-osd.yaml + OS::TripleO::Services::CephClient: ../../docker/services/ceph-ansible/ceph-client.yaml + +parameter_defaults: + CinderEnableIscsiBackend: false + CinderEnableRbdBackend: true + CinderBackupBackend: ceph + GlanceBackend: rbd + GnocchiBackend: rbd + GlanceShowMultipleLocations: true + # NovaEnableRbdBackend can be set on individual roles to choose RBD or local ephemeral storage diff --git a/puppet/services/glance-api.yaml b/puppet/services/glance-api.yaml index 845fd1648b..69a52ad864 100644 --- a/puppet/services/glance-api.yaml +++ b/puppet/services/glance-api.yaml @@ -129,7 +129,15 @@ parameters: type: string NovaEnableRbdBackend: default: false - description: Whether to enable or not the Rbd backend for Nova + description: Whether to enable the Rbd backend for Nova ephemeral storage. + type: boolean + tags: + - role_specific + GlanceShowMultipleLocations: + default: false + description: | + Whether to show multiple image locations e.g for copy-on-write support on + RBD or Netapp backends. Potential security risk, see glance.conf for more information. type: boolean GlanceEnabledImportMethods: default: 'web-download' @@ -193,13 +201,17 @@ conditions: service_debug_unset: {equals : [{get_param: GlanceDebug}, '']} cinder_backend_enabled: {equals: [{get_param: GlanceBackend}, cinder]} glance_multiple_locations: - and: - - equals: - - get_param: GlanceBackend - - rbd - - equals: - - get_param: NovaEnableRbdBackend - - true + or: + - {equals : [{get_param: GlanceShowMultipleLocations}, true]} + - and: + # Keep this for compat, but ignore NovaEnableRbdBackend if it's a role param + - equals: + - get_param: GlanceBackend + - rbd + - equals: + - get_param: NovaEnableRbdBackend + - true + resources: diff --git a/puppet/services/nova-compute.yaml b/puppet/services/nova-compute.yaml index e10ac21b02..bfda036605 100644 --- a/puppet/services/nova-compute.yaml +++ b/puppet/services/nova-compute.yaml @@ -95,8 +95,10 @@ parameters: type: boolean NovaEnableRbdBackend: default: false - description: Whether to enable or not the Rbd backend for Nova + description: Whether to enable the Rbd backend for Nova ephemeral storage. type: boolean + tags: + - role_specific NovaComputeLibvirtVifDriver: default: '' description: Libvirt VIF driver configuration for the network @@ -217,7 +219,10 @@ conditions: - equals: [{get_param: NovaNfsEnabled}, true] - equals: [{get_param: [RoleParameters, NovaNfsEnabled]}, ''] - equals: [{get_param: [RoleParameters, NovaNfsEnabled]}, true] - - equals: [{get_param: NovaEnableRbdBackend}, true] + - equals: [{get_param: [RoleParameters, NovaEnableRbdBackend]}, true] + - and: + - equals: [{get_param: [RoleParameters, NovaEnableRbdBackend]}, ''] + - equals: [{get_param: NovaEnableRbdBackend}, true] resources: NovaBase: @@ -253,6 +258,7 @@ resources: nova::compute::libvirt::mem_stats_period_seconds: NovaLibvirtMemStatsPeriodSeconds nova::compute::resume_guests_state_on_host_boot: NovaResumeGuestsStateOnHostBoot resume_guests_state_on_host_boot: NovaResumeGuestsStateOnHostBoot + nova::compute::rbd::ephemeral_storage: NovaEnableRbdBackend - values: {get_param: [RoleParameters]} - values: NovaVcpuPinSet: {get_param: NovaVcpuPinSet} @@ -267,6 +273,7 @@ resources: NovaNfsVersion: {get_param: NovaNfsVersion} NovaLibvirtMemStatsPeriodSeconds: {get_param: NovaLibvirtMemStatsPeriodSeconds} NovaResumeGuestsStateOnHostBoot: {get_param: NovaResumeGuestsStateOnHostBoot} + NovaEnableRbdBackend: {get_param: NovaEnableRbdBackend} outputs: role_data: diff --git a/roles/ComputeLocalEphemeral.yaml b/roles/ComputeLocalEphemeral.yaml new file mode 100644 index 0000000000..e642b1ee40 --- /dev/null +++ b/roles/ComputeLocalEphemeral.yaml @@ -0,0 +1,62 @@ +############################################################################### +# Role: ComputeLocalEphemeral # +############################################################################### +- name: ComputeLocalEphemeral + description: | + Per-role compute storage backend - basic Compute Node with local ephemeral disks + CountDefault: 0 + networks: + - InternalApi + - Tenant + - Storage + HostnameFormatDefault: '%stackname%-novacompute-local-%index%' + RoleParametersDefault: + TunedProfileName: "virtual-host" + NovaEnableRbdBackend: false + ServicesDefault: + - OS::TripleO::Services::Aide + - OS::TripleO::Services::AuditD + - OS::TripleO::Services::CACerts + - OS::TripleO::Services::CephClient + - OS::TripleO::Services::CephExternal + - OS::TripleO::Services::CertmongerUser + - OS::TripleO::Services::Collectd + - OS::TripleO::Services::ComputeCeilometerAgent + - OS::TripleO::Services::ComputeNeutronCorePlugin + - OS::TripleO::Services::ComputeNeutronL3Agent + - OS::TripleO::Services::ComputeNeutronMetadataAgent + - OS::TripleO::Services::ComputeNeutronOvsAgent + - OS::TripleO::Services::Docker + - OS::TripleO::Services::Fluentd + - OS::TripleO::Services::IpaClient + - OS::TripleO::Services::Ipsec + - OS::TripleO::Services::Iscsid + - OS::TripleO::Services::Kernel + - OS::TripleO::Services::LoginDefs + - OS::TripleO::Services::MetricsQdr + - OS::TripleO::Services::MySQLClient + - OS::TripleO::Services::NeutronBgpVpnBagpipe + - OS::TripleO::Services::NeutronLinuxbridgeAgent + - OS::TripleO::Services::NeutronVppAgent + - OS::TripleO::Services::NovaCompute + - OS::TripleO::Services::NovaLibvirt + - OS::TripleO::Services::NovaLibvirtGuests + - OS::TripleO::Services::NovaMigrationTarget + - OS::TripleO::Services::Ntp + - OS::TripleO::Services::ContainersLogrotateCrond + - OS::TripleO::Services::OpenDaylightOvs + - OS::TripleO::Services::Rhsm + - OS::TripleO::Services::RsyslogSidecar + - OS::TripleO::Services::Securetty + - OS::TripleO::Services::SensuClient + - OS::TripleO::Services::SkydiveAgent + - OS::TripleO::Services::Snmp + - OS::TripleO::Services::Sshd + - OS::TripleO::Services::Timezone + - OS::TripleO::Services::TripleoFirewall + - OS::TripleO::Services::TripleoPackages + - OS::TripleO::Services::Tuned + - OS::TripleO::Services::Vpp + - OS::TripleO::Services::OVNController + - OS::TripleO::Services::OVNMetadataAgent + - OS::TripleO::Services::Ptp diff --git a/roles/ComputeRBDEphemeral.yaml b/roles/ComputeRBDEphemeral.yaml new file mode 100644 index 0000000000..6a5298b214 --- /dev/null +++ b/roles/ComputeRBDEphemeral.yaml @@ -0,0 +1,62 @@ +############################################################################### +# Role: ComputeRBDEphemeral # +############################################################################### +- name: ComputeRBDEphemeral + description: | + Per-role compute storage backend - basic Compute Node with RBD ephemeral disks + CountDefault: 0 + networks: + - InternalApi + - Tenant + - Storage + HostnameFormatDefault: '%stackname%-novacompute-rbd-%index%' + RoleParametersDefault: + TunedProfileName: "virtual-host" + NovaEnableRbdBackend: true + ServicesDefault: + - OS::TripleO::Services::Aide + - OS::TripleO::Services::AuditD + - OS::TripleO::Services::CACerts + - OS::TripleO::Services::CephClient + - OS::TripleO::Services::CephExternal + - OS::TripleO::Services::CertmongerUser + - OS::TripleO::Services::Collectd + - OS::TripleO::Services::ComputeCeilometerAgent + - OS::TripleO::Services::ComputeNeutronCorePlugin + - OS::TripleO::Services::ComputeNeutronL3Agent + - OS::TripleO::Services::ComputeNeutronMetadataAgent + - OS::TripleO::Services::ComputeNeutronOvsAgent + - OS::TripleO::Services::Docker + - OS::TripleO::Services::Fluentd + - OS::TripleO::Services::IpaClient + - OS::TripleO::Services::Ipsec + - OS::TripleO::Services::Iscsid + - OS::TripleO::Services::Kernel + - OS::TripleO::Services::LoginDefs + - OS::TripleO::Services::MetricsQdr + - OS::TripleO::Services::MySQLClient + - OS::TripleO::Services::NeutronBgpVpnBagpipe + - OS::TripleO::Services::NeutronLinuxbridgeAgent + - OS::TripleO::Services::NeutronVppAgent + - OS::TripleO::Services::NovaCompute + - OS::TripleO::Services::NovaLibvirt + - OS::TripleO::Services::NovaLibvirtGuests + - OS::TripleO::Services::NovaMigrationTarget + - OS::TripleO::Services::Ntp + - OS::TripleO::Services::ContainersLogrotateCrond + - OS::TripleO::Services::OpenDaylightOvs + - OS::TripleO::Services::Rhsm + - OS::TripleO::Services::RsyslogSidecar + - OS::TripleO::Services::Securetty + - OS::TripleO::Services::SensuClient + - OS::TripleO::Services::SkydiveAgent + - OS::TripleO::Services::Snmp + - OS::TripleO::Services::Sshd + - OS::TripleO::Services::Timezone + - OS::TripleO::Services::TripleoFirewall + - OS::TripleO::Services::TripleoPackages + - OS::TripleO::Services::Tuned + - OS::TripleO::Services::Vpp + - OS::TripleO::Services::OVNController + - OS::TripleO::Services::OVNMetadataAgent + - OS::TripleO::Services::Ptp diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index e99548bc40..314d6c363c 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -351,7 +351,7 @@ def validate_controller_no_ceph_role(filename, tpl): return 1 return 0 -def validate_with_compute_role_services(role_filename, role_tpl, exclude_service): +def validate_with_compute_role_services(role_filename, role_tpl, exclude_service=()): cmpt_filename = os.path.join(os.path.dirname(role_filename), './Compute.yaml') cmpt_tpl = yaml.load(open(cmpt_filename).read()) @@ -777,6 +777,10 @@ def validate(filename, param_map): if filename.startswith('./roles/ControllerNoCeph.yaml'): retval = validate_controller_no_ceph_role(filename, tpl) + if filename in ('./roles/ComputeLocalEphemeral.yaml', + './roles/ComputeRBDEphemeral.yaml'): + retval |= validate_with_compute_role_services(filename, tpl) + if filename.startswith('./network_data_'): retval = validate_network_data_file(filename)