1 # ============LICENSE_START==========================================
2 # ===================================================================
3 # Copyright (c) 2017 AT&T
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #============LICENSE_END============================================
25 cloudify.nodes.Kubernetes:
26 derived_from: cloudify.nodes.Root
28 cloudify.interfaces.lifecycle:
30 implementation: scripts/create.py
32 cloudify.nodes.Kubernetes.Master:
33 derived_from: cloudify.nodes.Root
35 cloudify.interfaces.lifecycle:
37 implementation: scripts/create.py
39 implementation: scripts/kubernetes_master/configure.py
41 implementation: scripts/kubernetes_master/start.py
43 cloudify.nodes.Kubernetes.Node:
44 derived_from: cloudify.nodes.Root
46 cloudify.interfaces.lifecycle:
48 implementation: scripts/create.py
50 implementation: scripts/kubernetes_node/configure.py
52 implementation: fabric.fabric_plugin.tasks.run_task
55 default: scripts/tasks.py
60 hostname: { get_attribute: [ SELF, hostname ] }
61 labels: { get_input: labels }
64 host_string: { get_attribute: [ kubernetes_master_host, ip ] }
65 user: { get_input: agent_user }
66 key: { get_secret: agent_key_private }
68 implementation: fabric.fabric_plugin.tasks.run_task
71 default: scripts/tasks.py
76 hostname: { get_attribute: [ SELF, hostname ] }
79 host_string: { get_attribute: [ kubernetes_master_host, ip ] }
80 user: { get_input: agent_user }
81 key: { get_secret: agent_key_private }
83 implementation: fabric.fabric_plugin.tasks.run_task
86 default: scripts/tasks.py
91 hostname: { get_attribute: [ SELF, hostname ] }
94 host_string: { get_attribute: [ kubernetes_master_host, ip ] }
95 user: { get_input: agent_user }
96 key: { get_secret: agent_key_private }
101 type: cloudify.nodes.Kubernetes.Master
103 - type: cloudify.relationships.contained_in
104 target: kubernetes_master_host
107 type: cloudify.nodes.Kubernetes.Node
109 - type: cloudify.relationships.contained_in
110 target: kubernetes_node_host
111 - type: cloudify.relationships.depends_on
112 target: kubernetes_master
116 kubernetes_cluster_bootstrap_token:
117 value: { get_attribute: [ kubernetes_master, bootstrap_token ] }
119 kubernetes_cluster_master_ip:
120 value: { get_attribute: [ kubernetes_master, master_ip ] }
122 kubernetes-admin_client_certificate_data:
123 value: { get_attribute: [ kubernetes_master, kubernetes-admin_client_certificate_data ] }
125 kubernetes-admin_client_key_data:
126 value: { get_attribute: [ kubernetes_master, kubernetes-admin_client_key_data ] }
128 kubernetes_certificate_authority_data:
129 value: { get_attribute: [ kubernetes_master, kubernetes_certificate_authority_data ] }
133 source: policies/scale.clj
135 policy_operates_on_group:
138 description: regular expression that selects the metric to be measured
141 description: the moving window for individual sources in secs
144 description: the value to trigger scaling over aggregrated moving values
146 description: scaling limit
149 description: scale up ('<') or scale down ('>')
152 description: the time to wait before evaluating again after a scale
158 # members: [kubernetes_node_host]
161 # type: scale_policy_type
163 # policy_operates_on_group: true
165 # scale_direction: '<'
166 # scale_threshold: 30
167 # service_selector: .*kubernetes_node_host.*cpu.total.user
170 # execute_scale_workflow:
171 # type: cloudify.policies.triggers.execute_workflow
174 # workflow_parameters:
176 # scalable_entity_name: kubernetes_node_host
179 # members: [kubernetes_node_host]
182 # type: scale_policy_type
184 # policy_operates_on_group: true
186 # scale_direction: '<'
187 # scale_threshold: 30
188 # service_selector: .*kubernetes_node_host.*cpu.total.user
191 # execute_scale_workflow:
192 # type: cloudify.policies.triggers.execute_workflow
195 # workflow_parameters:
197 # scalable_entity_name: kubernetes_node_host
200 # members: [kubernetes_node_host]
202 # simple_autoheal_policy:
203 # type: cloudify.policies.types.host_failure
206 # - .*kubernetes_node_host.*.cpu.total.system
207 # - .*kubernetes_node_host.*.process.hyperkube.cpu.percent
208 # interval_between_workflows: 60
211 # type: cloudify.policies.triggers.execute_workflow
214 # workflow_parameters:
215 # node_instance_id: { 'get_property': [ SELF, node_id ] }
216 # diagnose_value: { 'get_property': [ SELF, diagnose ] }