c9d6ce28f08bf61b20729218fb584c20a28fc90a
[dcaegen2/platform/blueprints.git] / blueprints / k8s-dashboard.yaml-template
1 #
2 # ============LICENSE_START====================================================
3 # org.onap.dcae
4 # =============================================================================
5 # Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
6 # =============================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #      http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END======================================================
19
20 tosca_definitions_version: cloudify_dsl_1_3
21
22 imports:
23 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.12/k8splugin_types.yaml"
24 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
25 inputs:
26  database_cluster_name:
27     type: string
28     default: 'dcae-pg-primary.onap'
29  database_cluster_fqdn:
30     type: string
31     default: 'dcae-pg-primary.onap.svc.cluster.local'
32  database_name:
33     type: string
34     default: 'dashboard_pg'
35  postgres_port:
36     description: 'Postgres port for dashboard'
37     default: '5432'
38  dashboard_docker_image:
39     description: 'Docker image for dashboard'
40     default: 'nexus3.onap.org:10001/onap/org.onap.ccsdk.dashboard.ccsdk-app-os:1.1.0-SNAPSHOT-latest'
41  cloudify_ip:
42     type: string
43     default: 'dcae-cloudify-manager'
44  cloudify_user:
45     type: string
46     default: 'admin'
47  cloudify_password:
48     type: string
49     default: 'admin'
50  consul_url:
51     type: string
52     default: 'consul-server.onap.svc.cluster.local'
53  external_port:
54     type: string
55     description: Kubernetes node port for standard http
56     default: "30418"
57  external_tls_port:
58     type: string
59     description: Kubernetes node port for standard https
60     default: "30419"
61  replicas:
62     type: integer
63     description: number of instances
64     default: 1
65 node_templates:
66   pgaasdb:
67     type: dcae.nodes.pgaas.database
68     properties:
69       writerfqdn: { get_input: database_cluster_name }
70       name: { get_input: database_name }
71   dashboard_deployment:
72     type: dcae.nodes.ContainerizedPlatformComponent
73     interfaces:
74       cloudify.interfaces.lifecycle:
75         start:
76           inputs:
77            envs:
78             postgres_ip:
79                 { get_input: database_cluster_fqdn }
80             postgres_db_name:
81                 { get_input: database_name }
82             postgres_password_dashboard:
83                 { get_attribute: [ pgaasdb, admin, password ] }
84             postgres_user_dashboard:
85                 { get_attribute: [ pgaasdb, admin, user ] }
86             postgres_port: { get_input: postgres_port }
87             cloudify_user: { get_input: cloudify_user }
88             cloudify_password: { get_input: cloudify_password }
89             consul_url: http://consul-server.onap.svc.cluster.local
90             #consul_url: concat: ["http://", { get_input: consul_url }]
91             cfy_url: http://dcae-cloudify-manager:8080
92             #cfy_url: concat: ["http://", { get_input: cloudify_ip },":8080"]
93             inventory_url: http://inventory:8080
94             dhandler_url: https://deployment-handler:8443
95            ports:
96              - concat: ["8080:", { get_input: external_port }]
97              - concat: ["8443:", { get_input: external_tls_port }]
98     properties:
99       name:
100         "dcae-dashboard"
101       image:
102         { get_input: dashboard_docker_image }
103       replicas: {get_input: replicas}
104       dns_name: 'dcae-dashboard'
105       docker_config:
106         healthcheck:
107           endpoint: /ccsdk-app/health
108           interval: 15s
109           timeout: 1s
110           type: http
111     relationships:
112       - type: cloudify.relationships.depends_on
113         target: pgaasdb
114