This repository has been archived by the owner on Dec 30, 2017. It is now read-only.
forked from cloudify-examples/puppet-server-agent-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aws-ec2-blueprint-local.yaml
115 lines (94 loc) · 2.97 KB
/
aws-ec2-blueprint-local.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
tosca_definitions_version: cloudify_dsl_1_3
imports:
- http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
- http://www.getcloudify.org/spec/aws-plugin/1.4.3/plugin.yaml
- http://www.getcloudify.org/spec/fabric-plugin/1.2/plugin.yaml
- types/local/aws.yaml
inputs:
install_agent:
description: >
Set to none for a local workflow.
default: remote
agent_user:
description: >
The agent user (ubuntu for ubuntu, root for centos, etc).
default: ''
image_id:
description: >
The Cloud Provider Image ID.
default: ''
instance_type:
description: >
The Cloud Provider instance_type/size/flavor.
default: ''
key_name:
default: puppet_server_example
key_path:
default: ~/.ssh/puppet_server_example.pem
aws_access_key_id:
default: ''
aws_secret_access_key:
default: ''
ec2_region_name:
default: ''
node_templates:
puppet_server:
type: puppet.types.Server
relationships:
- type: cloudify.relationships.contained_in
target: puppet_server_host
puppet_agent:
type: puppet.types.Agent
relationships:
- type: cloudify.relationships.contained_in
target: puppet_agent_host
- type: puppet.relationships.agent_connected_to_server
target: puppet_server
puppet_server_host:
type: puppet.types.Host
properties:
aws_config: { get_property: [ aws_configuration, aws_config ] }
relationships:
- type: cloudify.aws.relationships.instance_connected_to_security_group
target: puppet_group
- type: cloudify.aws.relationships.instance_connected_to_keypair
target: puppet_keypair
puppet_agent_host:
type: puppet.types.Host
properties:
aws_config: { get_property: [ aws_configuration, aws_config ] }
relationships:
- type: cloudify.aws.relationships.instance_connected_to_security_group
target: puppet_group
- type: cloudify.aws.relationships.instance_connected_to_keypair
target: puppet_keypair
puppet_keypair:
type: cloudify.aws.nodes.KeyPair
properties:
aws_config: { get_property: [ aws_configuration, aws_config ] }
resource_id: { get_input: key_name }
private_key_path: { get_input: key_path }
puppet_group:
type: cloudify.aws.nodes.SecurityGroup
properties:
aws_config: { get_property: [ aws_configuration, aws_config ] }
description: Puppet Group
rules:
- ip_protocol: tcp
from_port: 22
to_port: 22
cidr_ip: 0.0.0.0/0
- ip_protocol: tcp
from_port: 8140
to_port: 8140
cidr_ip: 0.0.0.0/0
aws_configuration:
type: aws_configuration
properties:
aws_config:
aws_access_key_id: { get_input: aws_access_key_id }
aws_secret_access_key: { get_input: aws_secret_access_key }
ec2_region_name: { get_input: ec2_region_name }
outputs:
nodecellar_endpoint:
value: { get_attribute: [ puppet_server_host, public_ip_address ] }