1 heat_template_version: pike
4 OpenStack containerized Ovn DBs service
18 description: Mapping of service endpoint -> protocol. Typically set
19 via parameter_defaults in the resource registry.
23 description: Dictionary packing service data
27 description: Mapping of service_name -> network name. Typically set
28 via parameter_defaults in the resource registry. This
29 mapping overrides those in ServiceNetMapDefaults.
36 description: Role name on which the service is applied
40 description: Parameters specific to the role
46 type: ./containers-common.yaml
49 type: ../../puppet/services/ovn-dbs.yaml
51 EndpointMap: {get_param: EndpointMap}
52 ServiceData: {get_param: ServiceData}
53 ServiceNetMap: {get_param: ServiceNetMap}
54 DefaultPasswords: {get_param: DefaultPasswords}
55 RoleName: {get_param: RoleName}
56 RoleParameters: {get_param: RoleParameters}
60 description: Role data for the OVN Dbs role.
62 service_name: {get_attr: [OVNDbsBase, role_data, service_name]}
65 - get_attr: [OVNDbsBase, role_data, config_settings]
66 logging_source: {get_attr: [OVNDbsBase, role_data, logging_source]}
67 logging_groups: {get_attr: [OVNDbsBase, role_data, logging_groups]}
68 step_config: &step_config
69 get_attr: [OVNDbsBase, role_data, step_config]
70 # BEGIN DOCKER SETTINGS
71 # puppet_config is not required for this service since we configure
72 # the NB and SB DB servers to listen on the proper IP address/port
73 # in the docker_config section.
74 # puppet_config is defined to satisfy the pep8 validations.
78 step_config: *step_config
80 /var/lib/kolla/config_files/ovn_north_db_server.json:
84 - - '/usr/sbin/ovsdb-server'
85 - '/var/lib/openvswitch/ovnnb.db'
86 - '--pidfile=/run/openvswitch/ovnnb_db.pid'
87 - '-vconsole:emer -vsyslog:err -vfile:info'
88 - '--remote=punix:/run/openvswitch/ovnnb_db.sock'
89 - '--unixctl=/run/openvswitch/ovnnb_db.ctl'
90 - '--remote=db:OVN_Northbound,NB_Global,connections'
91 - '--private-key=db:OVN_Northbound,SSL,private_key'
92 - '--certificate=db:OVN_Northbound,SSL,certificate'
93 - '--ca-cert=db:OVN_Northbound,SSL,ca_cert'
94 - '--log-file=/var/log/openvswitch/ovsdb-server-nb.log'
96 - path: /var/log/openvswitch
99 /var/lib/kolla/config_files/ovn_south_db_server.json:
103 - - '/usr/sbin/ovsdb-server'
104 - '/var/lib/openvswitch/ovnsb.db'
105 - '--pidfile=/run/openvswitch/ovnsb_db.pid'
106 - '-vconsole:emer -vsyslog:err -vfile:info'
107 - '--remote=punix:/run/openvswitch/ovnsb_db.sock'
108 - '--unixctl=/run/openvswitch/ovnsb_db.ctl'
109 - '--remote=db:OVN_Southbound,SB_Global,connections'
110 - '--private-key=db:OVN_Southbound,SSL,private_key'
111 - '--certificate=db:OVN_Southbound,SSL,certificate'
112 - '--ca-cert=db:OVN_Southbound,SSL,ca_cert'
113 - '--log-file=/var/log/openvswitch/ovsdb-server-sb.log'
115 - path: /var/log/openvswitch
118 /var/lib/kolla/config_files/ovn_northd.json:
122 - - '/usr/bin/ovn-northd -vconsole:emer -vsyslog:err -vfile:info'
123 - '--ovnnb-db=unix:/run/openvswitch/ovnnb_db.sock'
124 - '--ovnsb-db=unix:/run/openvswitch/ovnsb_db.sock'
125 - '--log-file=/var/log/openvswitch/ovn-northd.log'
126 - '--pidfile=/run/openvswitch/ovn-northd.pid'
128 - path: /var/log/openvswitch
135 image: {get_param: DockerOvnNbDbImage}
141 - {get_attr: [ContainersCommon, volumes]}
143 - /var/lib/kolla/config_files/ovn_north_db_server.json:/var/lib/kolla/config_files/config.json:ro
144 - /lib/modules:/lib/modules:ro
145 - /var/lib/openvswitch/ovn:/var/lib/openvswitch
146 - /var/lib/openvswitch/ovn:/run/openvswitch
147 - /var/log/containers/openvswitch:/var/log/openvswitch
149 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
152 image: {get_param: DockerOvnSbDbImage}
158 - {get_attr: [ContainersCommon, volumes]}
160 - /var/lib/kolla/config_files/ovn_south_db_server.json:/var/lib/kolla/config_files/config.json:ro
161 - /lib/modules:/lib/modules:ro
162 - /var/lib/openvswitch/ovn:/var/lib/openvswitch
163 - /var/lib/openvswitch/ovn:/run/openvswitch
164 - /var/log/containers/openvswitch:/var/log/openvswitch
166 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
167 configure_ovn_north_db_server:
171 command: ['ovn_north_db_server', '/bin/bash', '-c', 'DBS_LISTEN_IP=`hiera ovn::northd::dbs_listen_ip -c /etc/puppet/hiera.yaml`; NB_DB_PORT=`hiera ovn::northbound::port -c /etc/puppet/hiera.yaml`; /usr/bin/bootstrap_host_exec ovn_dbs ovn-nbctl set-connection ptcp:$NB_DB_PORT:$DBS_LISTEN_IP']
172 configure_ovn_south_db_server:
176 command: ['ovn_south_db_server', '/bin/bash', '-c', 'DBS_LISTEN_IP=`hiera ovn::northd::dbs_listen_ip -c /etc/puppet/hiera.yaml`; SB_DB_PORT=`hiera ovn::southbound::port -c /etc/puppet/hiera.yaml`; /usr/bin/bootstrap_host_exec ovn_dbs ovn-sbctl set-connection ptcp:$SB_DB_PORT:$DBS_LISTEN_IP']
179 image: {get_param: DockerOvnNorthdImage}
185 - {get_attr: [ContainersCommon, volumes]}
187 - /var/lib/kolla/config_files/ovn_northd.json:/var/lib/kolla/config_files/config.json:ro
188 - /lib/modules:/lib/modules:ro
189 - /var/lib/openvswitch/ovn:/run/openvswitch
190 - /var/log/containers/openvswitch:/var/log/openvswitch
192 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
194 - name: create persistent directories
199 - /var/log/containers/openvswitch
200 - /var/lib/openvswitch/ovn
202 - name: Stop and disable ovn-northd service
204 service: name=ovn-northd state=stopped enabled=no