Add heat-api-cfn service

Add heat-api-cfn service, which is used by Heat for some config
transports. It's necessary to support default  user_data_format
(HEAT_CFNTOOLS).

This change add new image heat-api-cfn and which will create new service
and necessary endpoints for it.

Two new options were added:
 - heat_waitcondition_server_url
 - heat_metadata_server_url

Change-Id: I725943f5034637554394c4a323d4dc9134b3ddb3
This commit is contained in:
Sergey Kraynev 2016-11-23 06:14:39 +00:00
parent d1e7a53c08
commit 1d5d38b6ae
4 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,4 @@
FROM {{ image_spec("heat-base") }}
MAINTAINER {{ maintainer }}
USER heat

View File

@ -3,6 +3,9 @@ configs:
api_port:
cont: 8004
ingress: orchestration
api_cfn_port:
cont: 8000
ingress: cloudformation
db:
username: heat
password: password

View File

@ -8,6 +8,9 @@ rpc_backend = rabbit
stack_domain_admin = {{ heat.domain.user }}
stack_domain_admin_password = {{ heat.domain.password }}
stack_user_domain_name = {{ heat.domain.name }}
heat_waitcondition_server_url = {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}/v1/waitcondition
heat_metadata_server_url = {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}
[clients]
endpoint_type = internalURL
@ -48,6 +51,11 @@ auth_uri = {{ address('keystone', keystone.public_port, with_scheme=True) }}
bind_host = {{ network_topology["private"]["address"] }}
bind_port = {{ heat.api_port.cont }}
[heat_api_cfn]
bind_host = {{ network_topology["private"]["address"] }}
bind_port = {{ heat.api_cfn_port.cont }}
[cache]
backend = oslo_cache.memcache_pool
enabled = True

51
service/heat-api-cfn.yaml Normal file
View File

@ -0,0 +1,51 @@
dsl_version: 0.1.0
service:
name: heat-api-cfn
ports:
- {{ heat.api_cfn_port }}
containers:
- name: heat-api-cfn
image: heat-api-cfn
probes:
readiness: "true"
liveness:
command: "true"
type: "exec"
pre:
- name: heat-cfn-service-create
dependencies:
- keystone-create-project
type: single
command:
openstack service create --name heat-cfn --description "Heat CloudFormation Service" cloudformation
- name: heat-cfn-public-endpoint-create
dependencies:
- heat-cfn-service-create
type: single
command:
openstack endpoint create --region RegionOne cloudformation public {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}/v1
- name: heat-cfn-internal-endpoint-create
dependencies:
- heat-cfn-service-create
type: single
command:
openstack endpoint create --region RegionOne cloudformation internal {{ address('heat-api-cfn', heat.api_cfn_port, with_scheme=True) }}/v1
- name: heat-cfn-admin-endpoint-create
dependencies:
- heat-cfn-service-create
type: single
command:
openstack endpoint create --region RegionOne cloudformation admin {{ address('heat-api-cfn', heat.api_cfn_port, with_scheme=True) }}/v1
daemon:
dependencies:
- rabbitmq
# heat-api in dependencies, because it prepares DB, which will be used
- heat-api
files:
- heat-conf
command: heat-api-cfn --config-file /etc/heat/heat.conf
files:
heat-conf:
path: /etc/heat/heat.conf
content: heat.conf.j2