diff options
author | 2017-10-18 08:22:28 -0700 | |
---|---|---|
committer | 2017-10-18 08:22:28 -0700 | |
commit | 9c5dfa096799b39dac2518b6b7d3160495a34251 (patch) | |
tree | 2383c6ac44cc601a502314a00d9370e70962b8cd /tools/cloudify/blueprints/k8s-hello-world | |
parent | 8eecaf79377b31fa0911ab8d84208d9233a6fc6d (diff) |
Move blueprint into its own folder
JIRA: MODELS-23
Change-Id: I1ca6b04e0f07af7125ae03a1ecbf27269b80c5dc
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
Diffstat (limited to 'tools/cloudify/blueprints/k8s-hello-world')
-rw-r--r-- | tools/cloudify/blueprints/k8s-hello-world/blueprint.yaml | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/tools/cloudify/blueprints/k8s-hello-world/blueprint.yaml b/tools/cloudify/blueprints/k8s-hello-world/blueprint.yaml new file mode 100644 index 0000000..bdfa80c --- /dev/null +++ b/tools/cloudify/blueprints/k8s-hello-world/blueprint.yaml @@ -0,0 +1,80 @@ +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 + +imports: + - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml + - https://raw.githubusercontent.com/cloudify-incubator/cloudify-kubernetes-plugin/1.2.1/plugin.yaml + +inputs: + + kubernetes_configuration_file_content: + default: kube.config + + kubernetes_master_ip: + type: string + default: { get_secret: kubernetes_master_ip } + + kubernetes_master_port: + type: string + default: { get_secret: kubernetes_master_port } + + kubernetes_certificate_authority_data: + default: { get_secret: kubernetes_certificate_authority_data } + + kubernetes-admin_client_certificate_data: + default: { get_secret: kubernetes-admin_client_certificate_data } + + kubernetes-admin_client_key_data: + default: { get_secret: kubernetes-admin_client_key_data } + + kubernetes_master_configuration: + default: + apiVersion: v1 + kind: Config + preferences: {} + current-context: kubernetes-admin@kubernetes + clusters: + - name: kubernetes + cluster: + certificate-authority-data: { get_input: kubernetes_certificate_authority_data } + server: { concat: [ 'https://', { get_input: kubernetes_master_ip}, ':', { get_input: kubernetes_master_port } ] } + contexts: + - name: kubernetes-admin@kubernetes + context: + cluster: kubernetes + user: kubernetes-admin + users: + - name: kubernetes-admin + user: + client-certificate-data: { get_input: kubernetes-admin_client_certificate_data } + client-key-data: { get_input: kubernetes-admin_client_key_data } + + kubernetes_configuration_file_content: + description: > + File content of kubernetes master YAML configuration + default: { get_input: kubernetes_master_configuration } + +node_templates: + master: + type: cloudify.kubernetes.nodes.Master + properties: + configuration: + file_content: { get_input: kubernetes_configuration_file_content } + +# Following part based upon http://docs.getcloudify.org/4.1.0/plugins/kubernetes/ + nginx_pod: + type: cloudify.kubernetes.resources.Pod + properties: + definition: + apiVersion: v1 + metadata: + name: nginx + spec: + containers: + - name: nginx + image: nginx:1.7.9 + ports: + - containerPort: 80 + relationships: + - type: cloudify.kubernetes.relationships.managed_by_master + target: master |