diff options
author | 2017-10-18 06:54:02 -0700 | |
---|---|---|
committer | 2017-10-18 07:12:14 -0700 | |
commit | 8eecaf79377b31fa0911ab8d84208d9233a6fc6d (patch) | |
tree | 32c14a824f409a23d4ced1692c233149c6eb1ec1 /tools/cloudify/blueprints | |
parent | 5211bda0a619e87aae132af9bb031ead5731ca8c (diff) |
Add cloudify folder I forgot. Fix bug in b8s deploy script.
JIRA: MODELS-23
Few more tweaks to work with current deployment approach.
Change-Id: Ib5257f63f2f4e2948ec7c93aac5c40ae7bb6c37a
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
Diffstat (limited to 'tools/cloudify/blueprints')
-rw-r--r-- | tools/cloudify/blueprints/k8s-hello-world.yaml | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/tools/cloudify/blueprints/k8s-hello-world.yaml b/tools/cloudify/blueprints/k8s-hello-world.yaml new file mode 100644 index 0000000..bdfa80c --- /dev/null +++ b/tools/cloudify/blueprints/k8s-hello-world.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 |