summaryrefslogtreecommitdiffstats
path: root/blueprints/reference_templates/k8s-dashboard.yaml-template
blob: 1d0fa1048247c72ecbf1d37afc96df6f7428156c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# ============LICENSE_START====================================================
# org.onap.dcae
# =============================================================================
# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
# =============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END======================================================

tosca_definitions_version: cloudify_dsl_1_3

imports:
- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml"
- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"

inputs:
 database_cluster_name:
    type: string
    default: 'dcae-pg-primary.onap'
 database_cluster_fqdn:
    type: string
    default: 'dcae-pg-primary.onap.svc.cluster.local'
 database_name:
    type: string
    default: 'dashboard_pg'
 postgres_port:
    description: 'Postgres port for dashboard'
    default: '5432'
 dashboard_docker_image:
    description: 'Docker image for dashboard'
    default: 'nexus3.onap.org:10001/onap/org.onap.ccsdk.dashboard.ccsdk-app-os:1.1.0-SNAPSHOT-latest'
 cloudify_ip:
    type: string
    default: 'dcae-cloudify-manager'
 cloudify_user:
    type: string
    default: 'admin'
 cloudify_password:
    type: string
    default: 'admin'
 consul_url:
    type: string
    default: 'consul-server-ui'
 external_port:
    type: string
    description: Kubernetes node port for standard http
    default: "30418"
 external_tls_port:
    type: string
    description: Kubernetes node port for standard https
    default: "30419"
 replicas:
    type: integer
    description: number of instances
    default: 1
node_templates:
  pgaasdb:
    type: dcae.nodes.pgaas.database
    properties:
      writerfqdn: { get_input: database_cluster_name }
      name: { get_input: database_name }
  dashboard_deployment:
    type: dcae.nodes.ContainerizedPlatformComponent
    interfaces:
      cloudify.interfaces.lifecycle:
        start:
          inputs:
           envs:
            postgres_ip:
                { get_input: database_cluster_fqdn }
            postgres_db_name:
                { get_input: database_name }
            postgres_password_dashboard:
                { get_attribute: [ pgaasdb, admin, password ] }
            postgres_user_dashboard:
                { get_attribute: [ pgaasdb, admin, user ] }
            postgres_port: { get_input: postgres_port }
            cloudify_user: { get_input: cloudify_user }
            cloudify_password: { get_input: cloudify_password }
            #consul_url: http://consul-server.onap.svc.cluster.local
            consul_url:
               concat: ["http://", { get_input: consul_url },":8500"]
            #cfy_url: http://dcae-cloudify-manager:8080
            cfy_url:
               concat: ["http://", { get_input: cloudify_ip },"/api/v3.1"]
            inventory_url: http://inventory:8080
            dhandler_url: https://deployment-handler:8443
           ports:
             - concat: ["8080:", { get_input: external_port }]
             - concat: ["8443:", { get_input: external_tls_port }]
    properties:
      name:
        "dcae-dashboard"
      image:
        { get_input: dashboard_docker_image }
      replicas: {get_input: replicas}
      dns_name: 'dcae-dashboard'
      tls_info:
        cert_directory: '/usr/local/share/ca-certificates/'
        use_tls: true
      docker_config:
        healthcheck:
          endpoint: /ccsdk-app/health
          interval: 15s
          timeout: 1s
          type: http
    relationships:
      - type: cloudify.relationships.depends_on
        target: pgaasdb