1 heat_template_version: pike
4 OpenStack containerized Congress API service
7 DockerCongressApiImage:
10 DockerCongressConfigImage:
11 description: The container image to use for the congress config_volume
15 description: Mapping of service endpoint -> protocol. Typically set
16 via parameter_defaults in the resource registry.
20 description: Dictionary packing service data
24 description: Mapping of service_name -> network name. Typically set
25 via parameter_defaults in the resource registry. This
26 mapping overrides those in ServiceNetMapDefaults.
33 description: Role name on which the service is applied
37 description: Parameters specific to the role
43 type: ./containers-common.yaml
46 type: ../../puppet/services/database/mysql-client.yaml
49 type: ../../puppet/services/congress.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 Congress API role.
62 service_name: {get_attr: [CongressBase, role_data, service_name]}
65 - get_attr: [CongressBase, role_data, config_settings]
66 step_config: &step_config
69 - - {get_attr: [CongressBase, role_data, step_config]}
70 - {get_attr: [MySQLClient, role_data, step_config]}
71 service_config_settings: {get_attr: [CongressBase, role_data, service_config_settings]}
72 # BEGIN DOCKER SETTINGS
74 config_volume: congress
75 puppet_tags: congress_config
76 step_config: *step_config
77 config_image: {get_param: DockerCongressConfigImage}
79 /var/lib/kolla/config_files/congress_api.json:
80 command: /usr/bin/congress-server --config-file=/etc/congress/congress.conf --log-file=/var/log/congress/api.log
82 - source: "/var/lib/kolla/config_files/src/*"
85 preserve_properties: true
87 - path: /var/log/congress
88 owner: congress:congress
91 # db sync runs before permissions set by kolla_config
94 image: &congress_api_image {get_param: DockerCongressApiImage}
98 - /var/log/containers/congress:/var/log/congress
99 command: ['/bin/bash', '-c', 'chown -R congress:congress /var/log/congress']
102 image: *congress_api_image
109 - {get_attr: [ContainersCommon, volumes]}
111 # FIXME(mandre) mounting /etc rw to workaround LP1696283
112 # This should go away anyway and mount the exact files it
113 # needs or use kolla set_configs.py
114 - /var/lib/config-data/congress/etc/:/etc/
115 - /var/log/containers/congress:/var/log/congress
116 command: "/usr/bin/bootstrap_host_exec congress su congress -s /bin/bash -c 'congress-db-manage --config-file /etc/congress/congress.conf upgrade head'"
120 image: *congress_api_image
126 - {get_attr: [ContainersCommon, volumes]}
128 - /var/lib/kolla/config_files/congress_api.json:/var/lib/kolla/config_files/config.json:ro
129 - /var/lib/config-data/puppet-generated/congress/:/var/lib/kolla/config_files/src:ro
130 - /var/log/containers/congress:/var/log/congress
132 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
134 - name: create persistent logs directory
136 path: /var/log/containers/congress
139 - name: Stop and disable congress_api service
141 service: name=openstack-congress-server state=stopped enabled=no