[DCAE] Adapt DCAE blueprints to CFY DCAE K8S plugin version 3.x.x
[dcaegen2/platform/blueprints.git] / blueprints / k8s-hv-ves.yaml
index b85702e..d76922b 100644 (file)
@@ -1,9 +1,10 @@
 # -*- indent-tabs-mode: nil -*- # vi: set expandtab:
 #
-# ============LICENSE_START====================================================
-# =============================================================================
+# ============LICENSE_START========================================================
+# =================================================================================
 # Copyright (C) 2018-2019 NOKIA
-# =============================================================================
+# Modifications copyright (c) 2020 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
 # 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======================================================
+# ============LICENSE_END==========================================================
 
 tosca_definitions_version: cloudify_dsl_1_3
 
 imports:
   - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
-  - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml
+  - plugin:k8splugin?version=3.3.0
 
 inputs:
   tag_version:
     type: string
     default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.4.0'
-  hv_ves_name:
+  service_component_type:
     type: string
     default: 'dcae-hv-ves-collector'
+  service_id:
+    type: string
+    default: "dcae-hv-ves-collector"
   replicas:
     type: integer
     description: number of instances
@@ -65,7 +69,7 @@ inputs:
     default: 5
   security_ssl_disable:
     type: boolean
-    default: true
+    default: false
   security_keys_key_store_file:
     type: string
     default: '/etc/ves-hv/ssl/cert.jks'
@@ -78,6 +82,9 @@ inputs:
   security_keys_trust_store_password_file:
     type: string
     default: '/etc/ves-hv/ssl/trust.pass'
+  use_tls:
+    type: boolean
+    default: true
 node_templates:
   hv-ves:
     interfaces:
@@ -85,7 +92,7 @@ node_templates:
         start:
           inputs:
             envs:
-              JAVA_OPTS: { concat: [ '-Dlogback.configurationFile=/etc/ONAP/', { get_input: hv_ves_name }, '/logback.xml' ] }
+              JAVA_OPTS: { concat: [ '-Dlogback.configurationFile=/etc/ONAP/', { get_input: service_component_type }, '/logback.xml' ] }
     properties:
       application_config:
         logLevel: { get_input: log_level }
@@ -112,15 +119,15 @@ node_templates:
           script: "/opt/ves-hv-collector/healthcheck.sh"
           interval: 15s
           timeout: 2s
+        ports:
+          - { concat: [ { get_input: container_port }, ':', { get_input: host_port } ] }
       image: { get_input: tag_version }
       replicas: { get_input: replicas }
-      name: { get_input: hv_ves_name }
-      dns_name: { get_input: hv_ves_name }
-      container_port: { get_input: container_port }
-      host_port: { get_input: host_port }
+      service_component_type: { get_input: service_component_type }
+      service_id: { get_input: service_id }
       log_info:
-        log_directory: { concat: [ '/var/log/ONAP/', { get_input: hv_ves_name } ] }
+        log_directory: { concat: [ '/var/log/ONAP/', { get_input: service_component_type } ] }
       tls_info:
         cert_directory: '/etc/ves-hv/ssl'
-        use_tls: true
-    type: dcae.nodes.ContainerizedPlatformComponent
+        use_tls: { get_input: use_tls }
+    type: dcae.nodes.ContainerizedServiceComponent