diff options
author | 2017-11-07 15:54:47 -0800 | |
---|---|---|
committer | 2017-11-07 17:33:53 -0800 | |
commit | 6b4f4a7389915f69d268f13d151bd32d39e8e23c (patch) | |
tree | d0fafd26f7fdc580fccfd07cf6ed382f127e7d9f /tools/cloudify/blueprints | |
parent | fd83878a3e018d0722143dbc91edb3665ef635f1 (diff) |
Add cloudify API method for demo start/stop
JIRA: MODELS-2
more bug fixes
Change-Id: Ic617fd5ca030eed0beb850f97f54fa213fee87e3
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
Diffstat (limited to 'tools/cloudify/blueprints')
-rw-r--r-- | tools/cloudify/blueprints/k8s-hello-world/blueprint.yaml | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/tools/cloudify/blueprints/k8s-hello-world/blueprint.yaml b/tools/cloudify/blueprints/k8s-hello-world/blueprint.yaml index bdfa80c..bdbba8c 100644 --- a/tools/cloudify/blueprints/k8s-hello-world/blueprint.yaml +++ b/tools/cloudify/blueprints/k8s-hello-world/blueprint.yaml @@ -1,5 +1,7 @@ tosca_definitions_version: cloudify_dsl_1_3 -# Following part based upon https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/blob/master/examples/simple-blueprint-defined-resource.yaml +# Based upon +# https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/blob/master/examples/simple-blueprint-defined-resource.yaml +# https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/blob/1.2.0/examples/example-blueprint.yaml imports: - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml @@ -7,6 +9,12 @@ imports: inputs: + spec_port: + default: 80 + + container_port: + default: 80 + kubernetes_configuration_file_content: default: kube.config @@ -55,12 +63,31 @@ inputs: default: { get_input: kubernetes_master_configuration } node_templates: - master: + kubernetes_master: type: cloudify.kubernetes.nodes.Master properties: configuration: file_content: { get_input: kubernetes_configuration_file_content } + nginx_service: + type: cloudify.kubernetes.resources.Service + properties: + definition: + apiVersion: v1 + metadata: + name: nginx-service + spec: + type: NodePort + ports: + - port: { get_input: spec_port } + selector: + app: nginx + relationships: + - type: cloudify.kubernetes.relationships.managed_by_master + target: kubernetes_master + - type: cloudify.relationships.depends_on + target: nginx_pod + # Following part based upon http://docs.getcloudify.org/4.1.0/plugins/kubernetes/ nginx_pod: type: cloudify.kubernetes.resources.Pod @@ -69,12 +96,14 @@ node_templates: apiVersion: v1 metadata: name: nginx + labels: + app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - - containerPort: 80 + - containerPort: { get_input: container_port } relationships: - type: cloudify.kubernetes.relationships.managed_by_master - target: master + target: kubernetes_master |