Browse Source

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
Sergey Kraynev 2 years ago
parent
commit
1d5d38b6ae

+ 4
- 0
docker/heat-api-cfn/Dockerfile.j2 View File

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

+ 3
- 0
service/files/defaults.yaml View File

@@ -3,6 +3,9 @@ configs:
3 3
     api_port:
4 4
       cont: 8004
5 5
       ingress: orchestration
6
+    api_cfn_port:
7
+      cont: 8000
8
+      ingress: cloudformation
6 9
     db:
7 10
       username: heat
8 11
       password: password

+ 8
- 0
service/files/heat.conf.j2 View File

@@ -8,6 +8,9 @@ rpc_backend = rabbit
8 8
 stack_domain_admin = {{ heat.domain.user }}
9 9
 stack_domain_admin_password = {{ heat.domain.password }}
10 10
 stack_user_domain_name = {{ heat.domain.name }}
11
+heat_waitcondition_server_url = {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}/v1/waitcondition
12
+heat_metadata_server_url = {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}
13
+
11 14
 
12 15
 [clients]
13 16
 endpoint_type = internalURL
@@ -48,6 +51,11 @@ auth_uri = {{ address('keystone', keystone.public_port, with_scheme=True) }}
48 51
 bind_host = {{ network_topology["private"]["address"] }}
49 52
 bind_port = {{ heat.api_port.cont }}
50 53
 
54
+[heat_api_cfn]
55
+bind_host = {{ network_topology["private"]["address"] }}
56
+bind_port = {{ heat.api_cfn_port.cont }}
57
+
58
+
51 59
 [cache]
52 60
 backend = oslo_cache.memcache_pool
53 61
 enabled = True

+ 51
- 0
service/heat-api-cfn.yaml View File

@@ -0,0 +1,51 @@
1
+dsl_version: 0.1.0
2
+service:
3
+  name: heat-api-cfn
4
+  ports:
5
+    - {{ heat.api_cfn_port }}
6
+  containers:
7
+    - name: heat-api-cfn
8
+      image: heat-api-cfn
9
+      probes:
10
+        readiness: "true"
11
+        liveness:
12
+          command: "true"
13
+          type: "exec"
14
+      pre:
15
+        - name: heat-cfn-service-create
16
+          dependencies:
17
+            - keystone-create-project
18
+          type: single
19
+          command:
20
+            openstack service create --name heat-cfn --description "Heat CloudFormation Service" cloudformation
21
+        - name: heat-cfn-public-endpoint-create
22
+          dependencies:
23
+            - heat-cfn-service-create
24
+          type: single
25
+          command:
26
+            openstack endpoint create --region RegionOne cloudformation public {{ address('heat-api-cfn', heat.api_cfn_port, external=True, with_scheme=True) }}/v1
27
+        - name: heat-cfn-internal-endpoint-create
28
+          dependencies:
29
+            - heat-cfn-service-create
30
+          type: single
31
+          command:
32
+            openstack endpoint create --region RegionOne cloudformation internal {{ address('heat-api-cfn', heat.api_cfn_port, with_scheme=True) }}/v1
33
+        - name: heat-cfn-admin-endpoint-create
34
+          dependencies:
35
+            - heat-cfn-service-create
36
+          type: single
37
+          command:
38
+            openstack endpoint create --region RegionOne cloudformation admin {{ address('heat-api-cfn', heat.api_cfn_port, with_scheme=True) }}/v1
39
+      daemon:
40
+        dependencies:
41
+          - rabbitmq
42
+          # heat-api in dependencies, because it prepares DB, which will be used
43
+          - heat-api
44
+        files:
45
+          - heat-conf
46
+        command: heat-api-cfn --config-file /etc/heat/heat.conf
47
+
48
+files:
49
+  heat-conf:
50
+    path: /etc/heat/heat.conf
51
+    content: heat.conf.j2

Loading…
Cancel
Save