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

83 lines
3.5 KiB
YAML

dsl_version: 0.1.0
service:
name: murano-api
ports:
- {{ murano.api_port }}
containers:
- name: murano-api
image: murano-api
probes:
readiness:
type: "httpGet"
port: {{ murano.api_port.cont }}
path: "/"
pre:
- name: murano-db-create
type: single
command: mysql -v -u root -p{{ db.root_password }} -h {{ address(service.database) }} -e 'create database `{{ murano.db.name }}`;
create user '{{ murano.db.username }}'@'%' identified by '{{ murano.db.password }}'
{% if percona.tls.enabled %} require ssl {% endif %};
grant all privileges on `{{ murano.db.name }}`.* to "{{ murano.db.username }}"@"%" identified by "{{ murano.db.password }}"
{% if percona.tls.enabled %} require ssl {% endif %};'
dependencies:
- {{ service.database }}
- name: murano-db-sync
type: single
command: murano-db-manage --config-file /etc/murano/murano.conf upgrade
dependencies:
- murano-db-create
files:
- murano.conf
- name: murano-user-create
type: single
command: openstack user create --domain {{ service_account.domain }} --password {{ murano.password }} {{ murano.username }}
dependencies:
- keystone-create-domain
- name: murano-role-add
type: single
command: openstack role add --project {{ service_account.project }} --user {{ murano.username }} admin
dependencies:
- murano-user-create
- name: murano-service-create
type: single
command: openstack service create --name murano --description "Application Catalog for OpenStack" application-catalog
dependencies:
- keystone
- name: murano-public-endpoint-create
type: single
command: openstack endpoint create --region RegionOne murano public {{ address('murano-api', murano.api_port, external=True, with_scheme=True) }}
dependencies:
- murano-service-create
- name: murano-internal-endpoint-create
type: single
command: openstack endpoint create --region RegionOne murano internal {{ address('murano-api', murano.api_port, with_scheme=True) }}
dependencies:
- murano-service-create
- name: murano-admin-endpoint-create
type: single
command: openstack endpoint create --region RegionOne murano admin {{ address('murano-api', murano.api_port, with_scheme=True) }}
dependencies:
- murano-service-create
daemon:
command: murano-api --config-file /etc/murano/murano.conf
files:
- murano.conf
dependencies:
- rabbitmq
post:
- name: murano-import-core
type: single
command: cd /murano/meta/io.murano; zip -r /tmp/murano-core.zip *;
murano --murano-url {{ address('murano-api', murano.api_port, with_scheme=True) }}
--os-username {{ murano.db.username }}
--os-password {{ murano.db.password }}
--os-auth-url {{ address('keystone', keystone.public_port, with_scheme=True) }}
--os-project-name service
package-import --is-public /tmp/murano-core.zip
files:
murano.conf:
path: /etc/murano/murano.conf
content: murano.conf.j2
perm: "0600"