Merge "Change neutron-metadata number of workers determination method"
[apex-tripleo-heat-templates.git] / docker / services / neutron-ovs-agent.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Neutron openvswitch service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerOpenvswitchImage:
12     description: image
13     default: 'centos-binary-neutron-openvswitch-agent:latest'
14     type: string
15   ServiceNetMap:
16     default: {}
17     description: Mapping of service_name -> network name. Typically set
18                  via parameter_defaults in the resource registry.  This
19                  mapping overrides those in ServiceNetMapDefaults.
20     type: json
21   DefaultPasswords:
22     default: {}
23     type: json
24   RoleName:
25     default: ''
26     description: Role name on which the service is applied
27     type: string
28   RoleParameters:
29     default: {}
30     description: Parameters specific to the role
31   EndpointMap:
32     default: {}
33     description: Mapping of service endpoint -> protocol. Typically set
34                  via parameter_defaults in the resource registry.
35     type: json
36
37 resources:
38
39   ContainersCommon:
40     type: ./containers-common.yaml
41
42   NeutronOvsAgentBase:
43     type: ../../puppet/services/neutron-ovs-agent.yaml
44     properties:
45       EndpointMap: {get_param: EndpointMap}
46       ServiceNetMap: {get_param: ServiceNetMap}
47       DefaultPasswords: {get_param: DefaultPasswords}
48       RoleName: {get_param: RoleName}
49       RoleParameters: {get_param: RoleParameters}
50
51 outputs:
52   role_data:
53     description: Role data for Neutron openvswitch service
54     value:
55       service_name: {get_attr: [NeutronOvsAgentBase, role_data, service_name]}
56       config_settings: {get_attr: [NeutronOvsAgentBase, role_data, config_settings]}
57       step_config: &step_config
58         get_attr: [NeutronOvsAgentBase, role_data, step_config]
59       puppet_config:
60         config_volume: neutron
61         puppet_tags: neutron_config,neutron_agent_ovs,neutron_plugin_ml2
62         step_config: *step_config
63         config_image: &neutron_ovs_agent_image
64           list_join:
65           - '/'
66           - [ {get_param: DockerNamespace}, {get_param: DockerOpenvswitchImage} ]
67       kolla_config:
68         /var/lib/kolla/config_files/neutron-openvswitch-agent.json:
69           command: /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
70           permissions:
71             - path: /var/log/neutron
72               owner: neutron:neutron
73               recurse: true
74       docker_config:
75         step_4:
76           neutronovsagent:
77             image: *neutron_ovs_agent_image
78             net: host
79             pid: host
80             privileged: true
81             restart: always
82             volumes:
83               list_concat:
84                 - {get_attr: [ContainersCommon, volumes]}
85                 -
86                   - /var/lib/kolla/config_files/neutron-openvswitch-agent.json:/var/lib/kolla/config_files/config.json:ro
87                   - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
88                   - /lib/modules:/lib/modules:ro
89                   - /run:/run
90                   - /var/log/containers/neutron:/var/log/neutron
91             environment:
92               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
93       host_prep_tasks:
94         - name: create persistent logs directory
95           file:
96             path: /var/log/containers/neutron
97             state: directory
98       upgrade_tasks:
99         - name: Stop and disable neutron_ovs_agent service
100           tags: step2
101           service: name=neutron-openvswitch-agent state=stopped enabled=no