-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhostpool.yaml
112 lines (99 loc) · 3.15 KB
/
hostpool.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
tosca_definitions_version: cloudify_dsl_1_3
description: >
This blueprint creates a Kubernetes Cluster.
imports:
- http://www.getcloudify.org/spec/cloudify/4.3/types.yaml
- plugin:cloudify-diamond-plugin
- plugin:cloudify-fabric-plugin
- plugin:cloudify-utilities-plugin
- plugin:cloudify-host-pool-plugin
- imports/kubernetes.yaml
inputs:
hostpool_svc_endpoint:
type: string
agent_user:
type: string
default: centos
dsl_definitions:
_: &agent_installer
install:
implementation: agent.worker_installer.tasks.install
inputs:
cloudify_agent: &agent_config
user: { get_attribute: [SELF, agent_config, user] }
key: { get_attribute: [SELF, agent_config, key] }
port: { get_attribute: [SELF, agent_config, port] }
start:
implementation: agent.worker_installer.tasks.start
inputs:
cloudify_agent: *agent_config
stop:
implementation: agent.worker_installer.tasks.stop
inputs:
cloudify_agent: *agent_config
uninstall:
implementation: agent.worker_installer.tasks.uninstall
inputs:
cloudify_agent: *agent_config
restart:
implementation: agent.worker_installer.tasks.restart
inputs:
cloudify_agent: *agent_config
node_templates:
k8s_load_host:
type: cloudify.hostpool.nodes.LinuxHost
properties:
agent_config:
user: { get_input: agent_user }
install_method: remote
port: 22
key: { get_secret: agent_key_private }
interfaces:
cloudify.interfaces.lifecycle:
create:
inputs:
service_url: { get_input: hostpool_svc_endpoint }
delete:
inputs:
service_url: { get_input: hostpool_svc_endpoint }
cloudify.interfaces.worker_installer: *agent_installer
cloudify.interfaces.monitoring_agent:
install:
implementation: diamond.diamond_agent.tasks.install
inputs:
diamond_config:
interval: 1
start: diamond.diamond_agent.tasks.start
stop: diamond.diamond_agent.tasks.stop
uninstall: diamond.diamond_agent.tasks.uninstall
cloudify.interfaces.monitoring:
start:
implementation: diamond.diamond_agent.tasks.add_collectors
inputs:
collectors_config:
ProcessResourcesCollector:
config:
enabled: true
unit: B
measure_collector_time: true
cpu_interval: 0.5
process:
hyperkube:
name: hyperkube
groups:
k8s_load_group:
members:
- k8s_load_host
policies:
kubernetes_load_vms_scaling_policy:
type: cloudify.policies.scaling
properties:
default_instances: 1
targets: [k8s_load_group]
outputs:
deployment-type:
description: Deployment Type, Needed In order to determine if the kubernetes host is normal node or load balancer
value: load
deployment-node-data-type:
description: Cloudify node type needed in kubernetes cloudify provider
value: cloudify.nodes.ApplicationServer.kubernetes.LoadBalancer