diff options
author | Steven Hardy <shardy@redhat.com> | 2015-07-15 13:36:48 -0400 |
---|---|---|
committer | Steven Hardy <shardy@redhat.com> | 2015-07-16 16:02:20 +0100 |
commit | 1f13f59726d7212fdb797f58ab5c70ab7f9cbcaa (patch) | |
tree | 1586e9d0530e202a5852cd3440292cbfb5a5d6b6 | |
parent | 71e9426f195cf3c17fc11adf17f14d41caa7cf30 (diff) |
Wire in hieradata overrides via ExtraConfig for NovaCompute
Adds support for global (ExtraConfig) and role-specific
(NovaComputeExtraConfig) hiera overrides, similar to those added
for the controller.
For example, you can pass an environment file like:
parameters:
NovaComputeExtraConfig:
nova::scheduler::filter::ram_allocation_ratio: 1.8
compute_classes:
- ::nova::scheduler::filter
This passes a hiera value for ram_allocation_ratio and enables
a class via the include added in https://review.openstack.org/#/c/197908/
Note this also requires https://review.openstack.org/#/c/188772/
or 40-hiera-datafiles incorrectly quotes the list and the
compute_classes part won't work.
Change-Id: Ic33eed1b5e9c33c0d2f6075c65c8d9649b82c8b4
-rw-r--r-- | puppet/compute-puppet.yaml | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index 02756925..aa0d26ac 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -32,40 +32,8 @@ parameters: ExtraConfig: default: {} description: | - Additional configuration to inject into the cluster. The JSON should have - the following structure: - {"FILEKEY": - {"config": - [{"section": "SECTIONNAME", - "values": - [{"option": "OPTIONNAME", - "value": "VALUENAME" - } - ] - } - ] - } - } - For instance: - {"nova": - {"config": - [{"section": "default", - "values": - [{"option": "force_config_drive", - "value": "always" - } - ] - }, - {"section": "cells", - "values": - [{"option": "driver", - "value": "nova.cells.rpc_driver.CellsRPCDriver" - } - ] - } - ] - } - } + Additional hiera configuration to inject into the cluster. Note + that NovaComputeExtraConfig takes precedence over ExtraConfig. type: json Flavor: description: Flavor for the nova compute node @@ -340,6 +308,8 @@ resources: hiera: hierarchy: - heat_config_%{::deploy_config_name} + - compute_extraconfig + - extraconfig - compute - ceph_cluster # provided by CephClusterConfig - ceph @@ -347,6 +317,10 @@ resources: - '"%{::osfamily}"' - common datafiles: + compute_extraconfig: + mapped_data: {get_param: NovaComputeExtraConfig} + extraconfig: + mapped_data: {get_param: ExtraConfig} common: raw_data: {get_file: hieradata/common.yaml} ceph: |