fuel-ccp-heat/service/heat-api.yaml

75 lines
2.5 KiB
YAML

service:
name: heat-api
ports:
- heat_api_port
containers:
- name: heat-api
image: heat-api
# TODO(drusskikh): add probes
probes:
readiness: "true"
liveness: "true"
pre:
- name: heat-db-create
dependencies:
- mariadb
type: single
command:
mysql -u root -p{{ db_root_password }} -h mariadb -e "create database {{ heat_db_name }};
grant all privileges on {{ heat_db_name }}.* to '{{ heat_db_username }}'@'%' identified by '{{ heat_db_password }}';"
- name: heat-db-sync
files:
- heat-conf
dependencies:
- heat-db-create
type: single
command: heat-manage db_sync
- name: heat-user-create
dependencies:
- keystone-create-project
type: single
command:
openstack user create --domain default --password {{ heat_password }} {{ heat_user }}
- name: heat-role-add
dependencies:
- heat-user-create
type: single
command:
openstack role add --project {{ openstack_project_name }} --user {{ heat_user }} admin
- name: heat-service-create
dependencies:
- keystone-create-project
type: single
command:
openstack service create --name heat --description "OpenStack orchestration service" orchestration
- name: heat-public-endpoint-create
dependencies:
- heat-service-create
type: single
command:
openstack endpoint create --region RegionOne orchestration public http://heat-api:{{ heat_api_port }}/v1/%\(tenant_id\)s
- name: heat-internal-endpoint-create
dependencies:
- heat-service-create
type: single
command:
openstack endpoint create --region RegionOne orchestration internal http://heat-api:{{ heat_api_port }}/v1/%\(tenant_id\)s
- name: heat-admin-endpoint-create
dependencies:
- heat-service-create
type: single
command:
openstack endpoint create --region RegionOne orchestration admin http://heat-api:{{ heat_api_port }}/v1/%\(tenant_id\)s
daemon:
name: heat-api
dependencies:
- rabbitmq
files:
- heat-conf
command: heat-api --config-file /etc/heat/heat.conf
files:
heat-conf:
path: /etc/heat/heat.conf
content: heat.conf.j2