tripleo-heat-templates/deployment/openvswitch/openvswitch-dpdk-netcontrold-container-ansible.yaml
Alex Schultz ebab335f38 Role specific container support
We may want to be able to specific different containers at a role level.
This requires switching the container image parameters to be role
specific too allow for role based overrides.

Change-Id: I4090e889a32abd51e7c11139737a7a18e27d18e7
2022-01-21 14:18:02 -07:00

93 lines
3.0 KiB
YAML

heat_template_version: wallaby
description: >
netcontrold configuration for ovs-dpdk
parameters:
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. Use
parameter_merge_strategies to merge it with the defaults.
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
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
ContainerOpenvswitchNetcontroldImage:
description: netcontrold container image
type: string
tags:
- role_specific
DockerOpenvswitchUlimit:
default: ['nofile=16384']
description: ulimit for Openvswitch Container
type: comma_delimited_list
resources:
ContainersCommon:
type: ../containers-common.yaml
RoleParametersValue:
type: OS::Heat::Value
properties:
type: json
value:
map_replace:
- map_replace:
- ContainerOpenvswitchNetcontroldImage: ContainerOpenvswitchNetcontroldImage
- values: {get_param: [RoleParameters]}
- values:
ContainerOpenvswitchNetcontroldImage: {get_param: ContainerOpenvswitchNetcontroldImage}
outputs:
role_data:
description: Role data for the netcontrold service
value:
service_name: openvswitch_dpdk_netcontrold
kolla_config:
/var/lib/kolla/config_files/ovs_dpdk_netcontrold.json:
command: "/usr/local/bin/ncd_watch"
docker_config:
step_5:
openvswitch_dpdk_netcontrold:
image: {get_attr: [RoleParametersValue, value, ContainerOpenvswitchNetcontroldImage]}
net: host
pid: host
privileged: true
security_opt:
- label=disable
restart: always
depends_on:
- openvswitch.service
ulimit: {get_param: DockerOpenvswitchUlimit}
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
- - /var/lib/kolla/config_files/ovs_dpdk_netcontrold.json:/var/lib/kolla/config_files/config.json:ro
- /lib/modules:/lib/modules:ro
- /sys/kernel/debug:/sys/kernel/debug
- /run/openvswitch:/run/openvswitch:shared,z
- /var/log/containers/netcontrold:/var/log/netcontrold:z
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
host_prep_tasks:
- name: create persistent directories - /var/log/containers/netcontrold
file:
path: "/var/log/containers/netcontrold"
state: directory
setype: "container_file_t"