aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/templates/cba/Definitions
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2020-02-28 15:24:52 +0100
committerLukasz Rajewski <lukasz.rajewski@orange.com>2020-03-03 11:20:41 +0100
commit7d44d14b86dd4858afadb55c9ca38a4251e13dac (patch)
tree98400bf1750b9090f7bcb3bb9b4c53197d241625 /heat/vFW_CNF_CDS/templates/cba/Definitions
parent39fd16c1871136565aa464d097aa9e21856a1dfb (diff)
K8s Profile mod on demand
This change provides an example of modificatioin of k8s profile on demand. In here the ssh service of vPGN is created on demand and user can decide about the number of ssh exposed port Change-Id: Ie734e4f832d6a07ff53a0f108aed74a43d325b22 Issue-ID: INT-1458 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/cba/Definitions')
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json5
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json18
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json66
3 files changed, 80 insertions, 9 deletions
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json
index 52d89c17..988d059c 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json
@@ -383,6 +383,11 @@
"type" : "string",
"default" : "default"
},
+ "vpg-management-port" : {
+ "description" : "SSH external port of ssh. When 0 ssh service will not be exposed",
+ "type" : "string",
+ "default": "0"
+ },
"vnf_name" : {
"description" : "",
"required" : false,
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json
index ba31cfc8..17e4dcbb 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json
@@ -598,6 +598,24 @@
}
}
},
+ "vpg-management-port" : {
+ "tags" : "vpg-management-port",
+ "name" : "vpg-management-port",
+ "property" : {
+ "description" : "vpg-management-port",
+ "type" : "string"
+ },
+ "updated-by" : "Rajewski, Lukasz <lukasz.rajewski@orange.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ }
+ }
+ },
"key_name" : {
"tags" : "key_name",
"name" : "key_name",
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
index 0040e288..673c0864 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
@@ -34,10 +34,16 @@
"url" : "http://multicloud-k8s:9015"
},
"profile-upload-properties" : {
- "assignment-params" : {
+ "assignment-params": {
"get_attribute" : [ "resource-assignment", "assignment-params" ]
},
- "api-access" : "*multicloud-k8s-api"
+ "profile-modification-decision-data": {
+ "get_input" : "vpg-management-port"
+ },
+ "profile-artifacts": {
+ "get_attribute" : [ "profile-modification", "assignment-params" ]
+ },
+ "api-access": "*multicloud-k8s-api"
},
"config-deploy-properties" : {
"resolution-key" : {
@@ -58,17 +64,35 @@
"resource-assignment" : {
"description" : "Resource Assign Workflow",
"target" : "resource-assignment",
- "activities" : [ {
- "call_operation" : "ResourceResolutionComponent.process"
- } ],
- "on_success" : [ "profile-upload" ]
+ "activities": [
+ {
+ "call_operation": "ResourceResolutionComponent.process"
+ }
+ ],
+ "on_success": [
+ "profile-modification"
+ ]
+ },
+ "profile-modification" : {
+ "description" : "Profile Modification Resources",
+ "target" : "profile-modification",
+ "activities": [
+ {
+ "call_operation": "ResourceResolutionComponent.process"
+ }
+ ],
+ "on_success": [
+ "profile-upload"
+ ]
},
"profile-upload" : {
"description" : "Upload K8s Profile",
"target" : "profile-upload",
- "activities" : [ {
- "call_operation" : "ComponentScriptExecutor.process"
- } ]
+ "activities": [
+ {
+ "call_operation": "ComponentScriptExecutor.process"
+ }
+ ]
}
},
"inputs" : {
@@ -184,6 +208,30 @@
}
}
},
+ "profile-modification" : {
+ "type" : "component-resource-resolution",
+ "interfaces" : {
+ "ResourceResolutionComponent" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "artifact-prefix-names" : [ "ssh-service" ]
+ }
+ }
+ }
+ }
+ },
+ "artifacts" : {
+ "ssh-service-template" : {
+ "type" : "artifact-template-velocity",
+ "file" : "Templates/k8s-profiles/ssh-service-template.vtl"
+ },
+ "ssh-service-mapping" : {
+ "type" : "artifact-mapping-resource",
+ "file" : "Templates/k8s-profiles/ssh-service-mapping.json"
+ }
+ }
+ },
"profile-upload" : {
"type" : "component-script-executor",
"interfaces" : {