Merge "Add docker keystone service"
[apex-tripleo-heat-templates.git] / docker / services / neutron-ovs-agent.yaml
1 heat_template_version: ocata
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   EndpointMap:
25     default: {}
26     description: Mapping of service endpoint -> protocol. Typically set
27                  via parameter_defaults in the resource registry.
28     type: json
29
30 resources:
31
32   NeutronOvsAgentBase:
33     type: ../../puppet/services/neutron-ovs-agent.yaml
34     properties:
35       EndpointMap: {get_param: EndpointMap}
36       ServiceNetMap: {get_param: ServiceNetMap}
37       DefaultPasswords: {get_param: DefaultPasswords}
38
39 outputs:
40   role_data:
41     description: Role data for Neutron openvswitch service
42     value:
43       service_name: {get_attr: [NeutronOvsAgentBase, role_data, service_name]}
44       config_settings: {get_attr: [NeutronOvsAgentBase, role_data, config_settings]}
45       step_config: {get_attr: [NeutronOvsAgentBase, role_data, step_config]}
46       docker_image: &neutron_ovs_agent_image
47         list_join:
48         - '/'
49         - [ {get_param: DockerNamespace}, {get_param: DockerOpenvswitchImage} ]
50       puppet_tags: neutron_config,neutron_agent_ovs,neutron_plugin_ml2
51       config_volume: neutron
52       config_image: *neutron_ovs_agent_image
53       kolla_config:
54         /var/lib/kolla/config_files/neutron-openvswitch-agent.json:
55            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
56            config_files:
57            - dest: /etc/neutron/neutron.conf
58              owner: neutron
59              perm: '0600'
60              source: /var/lib/kolla/config_files/src/etc/neutron/neutron.conf
61            - dest: /etc/neutron/plugins/ml2/openvswitch_agent.ini
62              owner: neutron
63              perm: '0600'
64              source: /var/lib/kolla/config_files/src/etc/neutron/plugins/ml2/openvswitch_agent.ini
65            - dest: /etc/neutron/plugins/ml2/ml2_conf.ini
66              owner: neutron
67              perm: '0600'
68              source: /var/lib/kolla/config_files/src/etc/neutron/plugins/ml2/ml2_conf.ini
69       docker_config:
70         step_4:
71           neutronovsagent:
72             image: *neutron_ovs_agent_image
73             net: host
74             pid: host
75             privileged: true
76             restart: always
77             volumes:
78               - /var/lib/kolla/config_files/neutron-openvswitch-agent.json:/var/lib/kolla/config_files/config.json:ro
79               - /var/lib/config-data/neutron:/var/lib/kolla/config_files/src:ro
80               - /etc/localtime:/etc/localtime:ro
81               - /lib/modules:/lib/modules:ro
82               - /run:/run
83             environment:
84               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS