forked from cloudify-incubator/kubernetes-node-blueprints
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vsphere.yaml
169 lines (138 loc) · 3.83 KB
/
vsphere.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
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-vsphere-plugin
- imports/kubernetes.yaml
inputs:
vcenter_user:
type: string
default: { get_secret: vcenter_user }
vcenter_password:
type: string
default: { get_secret: vcenter_password }
vcenter_ip:
type: string
default: { get_secret: vcenter_ip }
vcenter_port:
type: string
default: 443
vcenter_datacenter:
type: string
description: >
vcenter datacenter
default: Datacenter
vcenter_resource_pool:
description: >
Resource pool name
default: Resources
vsphere_auto_placement:
type: string
default: true
template_name:
type: string
description: >
"CentOS 7 template name"
default: "CentOS-7.2-x86_64-1511-tmpl"
cpus:
type: integer
default: 4
memory:
type: integer
description: RAM in MB
default: 4096
vcenter_network:
type: string
description: >
vcenter network
default: Internal
dns_servers:
type: string
description: >
DNS servers ip list
default:
- '8.8.8.8'
vcenter_datastore:
type: string
description: >
vcenter datastore
default: datastore1
agent_user:
default: root
type: string
agent_group:
default: root
dsl_definitions:
connection_config: &connection_config
username: { get_input: vcenter_user }
password: {get_input: vcenter_password }
host: { get_input: vcenter_ip }
port: { get_input: vcenter_port }
datacenter_name: {get_input: vcenter_datacenter }
resource_pool_name: { get_input: vcenter_resource_pool }
auto_placement: { get_input: vsphere_auto_placement }
allow_insecure: true
node_types:
kubernetes_host:
derived_from: cloudify.vsphere.nodes.Server
properties:
kubecpu:
# by default: amount of cpu's on vm avaible for kubepods,
# in most cases it must be same as full count of cpu on vm
default: { get_input: cpus }
kubemem:
# by default: amount of memory on vm avaible for kubepods,
# in most cases it must be same as full count of memory on vm
default: { get_input: memory }
connection_config:
default: *connection_config
server:
default:
name: kubernetes_vm
template: { get_input: template_name }
cpus: { get_input: cpus }
memory: { get_input: memory }
agent_config:
default:
install_method: remote
user: { get_input: agent_user }
key: { get_secret: agent_key_private }
networking:
default:
dns_servers: { get_input: dns_servers }
connect_networks:
- name: { get_input: vcenter_network }
node_templates:
k8s_node_base:
type: kubernetes_host
k8s_node_host:
type: cloudify.nodes.SoftwareComponent
interfaces:
cloudify.interfaces.lifecycle:
start:
implementation: scripts/vsphere/kubernetes.sh
relationships:
- target: k8s_node_base
type: cloudify.relationships.contained_in
groups:
k8s_node_group:
members:
- k8s_node_base
- k8s_node_host
policies:
kubernetes_node_vms_scaling_policy:
type: cloudify.policies.scaling
properties:
default_instances: 1
targets: [k8s_node_group]
outputs:
deployment-type:
description: Deployment Type, Needed In order to determine if the kubernetes host is normal node or load balancer
value: node
deployment-node-data-type:
description: Cloudify node type needed in kubernetes cloudify provider
value: cloudify.nodes.ApplicationServer.kubernetes.Node