a2a6ddab59
It is best to avoid placing db creds on the compute nodes to limit the
exposure if an attacker succeeds in gaining access to the hypervisor
host.
Related patches in puppet-nova remove the credentials from nova.conf
however the current scope of db credential hieradata is all nova tripleo
services - so it will but written to the hieradata keys on compute
nodes.
This patch refactors the nova hieradata structure, splitting the
nova-api/nova database hieradata out into individual templates and
selectively including only where necessary, ensuring we have no db
creds on a compute node (unless it is an all-in-one api+compute node).
Conflicts:
deployment/nova/nova-manager-container-puppet.yaml
deployment/nova/nova-compute-common-container-puppet.yaml
Depends-On: I07caa3185427b48e6e7d60965fa3e6157457018c
Change-Id: Ia4a29bdd2cd8e894bcc7c0078cf0f0ab0f97de0a
Closes-bug: #1871482
(cherry picked from commit 9d82364de8
)
106 lines
3.2 KiB
YAML
106 lines
3.2 KiB
YAML
heat_template_version: rocky
|
|
|
|
description: >
|
|
OpenStack containerized nova-manage runner service
|
|
|
|
parameters:
|
|
ContainerNovaConductorImage:
|
|
description: image
|
|
type: string
|
|
EndpointMap:
|
|
default: {}
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
via parameter_defaults in the resource registry.
|
|
type: json
|
|
ServiceData:
|
|
default: {}
|
|
description: Dictionary packing service data
|
|
type: json
|
|
ServiceNetMap:
|
|
default: {}
|
|
description: Mapping of service_name -> network name. Typically set
|
|
via parameter_defaults in the resource registry. This
|
|
mapping overrides those in ServiceNetMapDefaults.
|
|
type: json
|
|
DefaultPasswords:
|
|
default: {}
|
|
type: json
|
|
RoleName:
|
|
default: ''
|
|
description: Role name on which the service is applied
|
|
type: string
|
|
RoleParameters:
|
|
default: {}
|
|
description: Parameters specific to the role
|
|
type: json
|
|
|
|
|
|
resources:
|
|
|
|
# Cannot control nova-manage logging so expect it to log to file
|
|
NovaLogging:
|
|
type: ../logging/files/nova-common.yaml
|
|
properties:
|
|
ContainerNovaImage: &nova_conductor_image {get_param: ContainerNovaConductorImage}
|
|
NovaServiceName: 'manager'
|
|
|
|
ContainersCommon:
|
|
type: ../containers-common.yaml
|
|
|
|
NovaConductorBase:
|
|
type: ./nova-conductor-container-puppet.yaml
|
|
properties:
|
|
ServiceData: {get_param: ServiceData}
|
|
ServiceNetMap: {get_param: ServiceNetMap}
|
|
DefaultPasswords: {get_param: DefaultPasswords}
|
|
EndpointMap: {get_param: EndpointMap}
|
|
RoleName: {get_param: RoleName}
|
|
RoleParameters: {get_param: RoleParameters}
|
|
|
|
|
|
outputs:
|
|
role_data:
|
|
description: Role data for the nova-manage runner service.
|
|
value:
|
|
service_name: nova_manager
|
|
config_settings:
|
|
get_attr: [NovaConductorBase, role_data, config_settings]
|
|
service_config_settings:
|
|
mysql:
|
|
get_attr: [NovaConductorBase, role_data, service_config_settings, mysql]
|
|
# BEGIN DOCKER SETTINGS
|
|
puppet_config:
|
|
get_attr: [NovaConductorBase, role_data, puppet_config]
|
|
kolla_config:
|
|
/var/lib/kolla/config_files/nova_manager.json:
|
|
command: "/bin/sleep infinity"
|
|
config_files:
|
|
- source: "/var/lib/kolla/config_files/src/*"
|
|
dest: "/"
|
|
merge: true
|
|
preserve_properties: true
|
|
permissions:
|
|
- path: /var/log/nova
|
|
owner: nova:nova
|
|
recurse: true
|
|
docker_config:
|
|
step_2:
|
|
get_attr: [NovaLogging, docker_config, step_2]
|
|
step_4:
|
|
nova_manager:
|
|
image: *nova_conductor_image
|
|
net: host
|
|
privileged: false
|
|
restart: always
|
|
volumes:
|
|
list_concat:
|
|
- {get_attr: [ContainersCommon, volumes]}
|
|
- {get_attr: [NovaLogging, volumes]}
|
|
-
|
|
- /var/lib/kolla/config_files/nova_manager.json:/var/lib/kolla/config_files/config.json:ro
|
|
- /var/lib/config-data/puppet-generated/nova:/var/lib/kolla/config_files/src:ro
|
|
environment:
|
|
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
|
host_prep_tasks:
|
|
get_attr: [NovaLogging, host_prep_tasks]
|