forked from neo4j-contrib/neo4j-puppet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cf_template.json
122 lines (119 loc) · 4.65 KB
/
cf_template.json
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
{
"Description": "Neo4j on AWS - creates a stack and deploys Neo4j on it",
"Parameters": {
"AcceptOracleLicense" : {
"Description" : "This parameter indicates that you accept the terms of Oracle's License Agreement for Java (see README)",
"Type" : "String",
"AllowedValues": ["true", "false"],
"Default": "true"
},
"Neo4jUserName": {
"Description" : "Username for the Neo4j REST API",
"Type" : "String"
},
"Neo4jPassword": {
"Description" : "Password for the Neo4j REST API",
"Type" : "String",
"NoEcho": "True"
},
"SSHKeyName": {
"Description" : "Name of the SSH key that you will use to access the server (must be on AWS US-EAST already)",
"Type" : "String",
"Default": "NEO4J"
},
"AwsAvailabilityZone": {
"Description": "Name of the AWS availability zone that you will deploy into",
"Type": "String",
"AllowedValues": ["us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d"],
"Default": "us-east-1d"
}
},
"Resources": {
"ElasticIP": {
"Type": "AWS::EC2::EIP",
"Properties": {
"InstanceId": {
"Ref": "Server"
}
}
},
"Server": {
"Type": "AWS::EC2::Instance",
"Properties": {
"AvailabilityZone": {"Ref": "AwsAvailabilityZone"},
"DisableApiTermination": "FALSE",
"ImageId": "ami-e7beec8e",
"InstanceType": "m1.large",
"KeyName": {"Ref": "SSHKeyName"},
"Monitoring": "false",
"SecurityGroups": [
{
"Ref": "sgNeo4jServer"
}
],
"Tags": [
{
"Key": "Name",
"Value": "Neo4j on AWS"
}
],
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"#!/bin/bash -v\n",
"wget -O /var/tmp/go https://raw.github.com/neo4j-contrib/neo4j-puppet/master/go\n",
"chmod +x /var/tmp/go\n",
"sudo /var/tmp/go ", { "Ref" : "AcceptOracleLicense" } , " ", {"Ref": "Neo4jUserName"}, " ", {"Ref": "Neo4jPassword"}, "\n"
]]}},
"Volumes" : [
{ "VolumeId" : { "Ref" : "EBSVolume" },
"Device" : "/dev/sdj"
}]
}
},
"EBSVolume": {
"Type": "AWS::EC2::Volume",
"Properties": {
"AvailabilityZone": {"Ref": "AwsAvailabilityZone"},
"Size": "100"
}
},
"sgNeo4jServer": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "Neo4j Ports",
"SecurityGroupIngress": [
{
"IpProtocol": "tcp",
"FromPort": "22",
"ToPort": "22",
"CidrIp": "0.0.0.0/0"
},
{
"IpProtocol": "tcp",
"FromPort": "7474",
"ToPort": "7474",
"CidrIp": "0.0.0.0/0"
}
]
}
}
},
"Outputs": {
"Neo4jWebadmin" : {
"Value" : { "Fn::Join" : ["", ["http://", { "Fn::GetAtt" : [ "Server", "PublicIp" ]}, ":7474"]] },
"Description" : "This is the address of your Neo4j server web administration console."
},
"Neo4jEndPoint" : {
"Value" : { "Fn::Join" : ["", ["http://", { "Fn::GetAtt" : [ "Server", "PublicIp" ]}, ":7474/db/data"]] },
"Description" : "This is the address of your Neo4j server, that your application will use."
},
"SshAccess": {
"Value" : {"Fn::Join" : ["", ["ssh -i ", {"Ref": "SSHKeyName"}, ".pem -l ubuntu ", { "Fn::GetAtt" : [ "Server", "PublicIp" ]}]]},
"Description" : "This is how you gain remote access to the machine."
},
"Note" :{
"Value" : "Your stack is probably still building. It takes 5-10 minutes to get Neo4j and dependencies built. Coffee time?",
"Description" : "Setting user expectations on timing."
}
},
"AWSTemplateFormatVersion": "2010-09-09"
}