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