Merge "FQDN validation"
[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: &step_config
46         get_attr: [NeutronOvsAgentBase, role_data, step_config]
47       docker_image: &neutron_ovs_agent_image
48         list_join:
49         - '/'
50         - [ {get_param: DockerNamespace}, {get_param: DockerOpenvswitchImage} ]
51       puppet_config:
52         config_volume: neutron
53         puppet_tags: neutron_config,neutron_agent_ovs,neutron_plugin_ml2
54         step_config: *step_config
55         config_image: *neutron_ovs_agent_image
56       kolla_config:
57         /var/lib/kolla/config_files/neutron-openvswitch-agent.json:
58            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
59            config_files:
60            - dest: /etc/neutron/neutron.conf
61              owner: neutron
62              perm: '0600'
63              source: /var/lib/kolla/config_files/src/etc/neutron/neutron.conf
64            - dest: /etc/neutron/plugins/ml2/openvswitch_agent.ini
65              owner: neutron
66              perm: '0600'
67              source: /var/lib/kolla/config_files/src/etc/neutron/plugins/ml2/openvswitch_agent.ini
68            - dest: /etc/neutron/plugins/ml2/ml2_conf.ini
69              owner: neutron
70              perm: '0600'
71              source: /var/lib/kolla/config_files/src/etc/neutron/plugins/ml2/ml2_conf.ini
72       docker_config:
73         step_4:
74           neutronovsagent:
75             image: *neutron_ovs_agent_image
76             net: host
77             pid: host
78             privileged: true
79             restart: always
80             volumes:
81               - /var/lib/kolla/config_files/neutron-openvswitch-agent.json:/var/lib/kolla/config_files/config.json:ro
82               - /var/lib/config-data/neutron:/var/lib/kolla/config_files/src:ro
83               - /etc/localtime:/etc/localtime:ro
84               - /lib/modules:/lib/modules:ro
85               - /run:/run
86             environment:
87               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
88       upgrade_tasks:
89         - name: Stop and disable neutron_ovs_agent service
90           tags: step2
91           service: name=neutron-openvswitch-agent state=stopped enabled=no