-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello-world.yaml
97 lines (89 loc) · 3.43 KB
/
hello-world.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
tosca_definitions_version: cloudify_dsl_1_3
description: General hello world blueprint
imports:
- http://www.getcloudify.org/spec/cloudify/4.4.dev1/types.yaml
- hello_world/{{ impl }}.yaml
- hello_world/relationships.yaml
- hello_world/http_web_server.yaml
{% if not skip_monitoring %}
- http://www.getcloudify.org/spec/diamond-plugin/1.3.6/plugin.yaml
{% endif %}
inputs:
webserver_port:
description: The HTTP web server port
default: 8080
agent_user:
description: User name used when SSH-ing into the started machine
agent_private_key_path:
description: >
Path to a private key that resides on the management machine.
SSH-ing into agent machines will be done with this key.
node_templates:
vm:
type: cloudify.nodes.Server
properties:
agent_config:
user: { get_input: agent_user }
key: { get_input: agent_private_key_path }
install_method: {% if init_script %}init_script{% else %}remote{% endif %}
{% if windows and not init_script and impl != "singlehost" %}
{% if impl == "aws" %}
parameters:
{% elif impl == "openstack" %}
server:
{% endif %}
user_data: |
<powershell>
&winrm quickconfig -q
&winrm set winrm/config '@{MaxTimeoutms="1800000"}'
&winrm set winrm/config/winrs '@{MaxShellsPerUser="2147483647"}'
&winrm set winrm/config/service '@{AllowUnencrypted="true";MaxConcurrentOperationsPerUser="4294967295"}'
&winrm set winrm/config/service/auth '@{Basic="true"}'
&netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
&netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
Set-ExecutionPolicy Unrestricted
</powershell>
{% endif %}
# Singlehost blueprint doesn't require those relationships
{% if impl != "singlehost" %}
relationships:
- type: server_connected_to_ip
target: ip
- type: server_connected_to_security_group
target: security_group
- type: server_connected_to_keypair
target: keypair
- type: server_connected_to_network
target: network
{% endif %}
# By default, we want to enable monitoring
{% if not skip_monitoring %}
interfaces:
###########################################################
# We are infact telling cloudify to install a diamond
# monitoring agent on the server.
#
# (see https://github.com/BrightcoveOS/Diamond)
###########################################################
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:
CPUCollector: {}
MemoryCollector: {}
LoadAverageCollector: {}
DiskUsageCollector:
config:
devices: x?vd[a-z]+[0-9]*$
NetworkCollector: {}
{% endif %}