-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathgraphistry.yml
156 lines (151 loc) · 4.38 KB
/
graphistry.yml
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
AWSTemplateFormatVersion: "2010-09-09"
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
-
Label:
default: "Network Configuration"
Parameters:
- GraphAppKitVPC
- GraphAppKitSubnet
-
Label:
default: "Server Configuration"
Parameters:
- GraphAppKitKeyPair
Parameters:
GraphAppKitKeyPair:
Type: AWS::EC2::KeyPair::KeyName
Description: "Enter an EC2 Key Pair for this instance"
GraphAppKitVPC:
Type: AWS::EC2::VPC::Id
Description: "Enter a web-accessible VPC. Ex: vpc-abc"
GraphAppKitSubnet:
Type: AWS::EC2::Subnet::Id
Description: "Enter a public subnet within the previously selected VPC. Ex: subnet-123"
InstanceType:
Type: String
Default: 'g4dn.xlarge'
Description: "Enter a RAPIDS.ai-compatible GPU instance type. Ex: g4dn.xlarge"
#2.35.9-11.0
#Generated with: src/bootstraps/scripts/graphistry-ami-list.sh
Mappings:
RegionMap:
eu-north-1:
"HVM64": "ami-020db5b9468605b1b"
ap-south-1:
"HVM64": "ami-0da292ae7221b4712"
eu-west-3:
"HVM64": "ami-097617b9ab348bd7d"
eu-west-2:
"HVM64": "ami-0fe4d7af59713cc8b"
eu-west-1:
"HVM64": "ami-04c579438e71c9b4e"
ap-northeast-2:
"HVM64": "ami-0a647fc9d83aaa798"
ap-northeast-1:
"HVM64": "ami-09408fd12167b1ddc"
sa-east-1:
"HVM64": "ami-0881a3b8d12b49dd0"
ca-central-1:
"HVM64": "ami-0046f23296157202d"
ap-southeast-1:
"HVM64": "ami-04a449007e7a22792"
ap-southeast-2:
"HVM64": "ami-02a981824c38b66dd"
eu-central-1:
"HVM64": "ami-010c9a3be1f3ae351"
us-east-1:
"HVM64": "ami-0322bad99c5e1eec8"
us-east-2:
"HVM64": "ami-07915b33d57ebde27"
us-west-1:
"HVM64": "ami-07d59135fe7222642"
us-west-2:
"HVM64": "ami-0fb7bf940df96836e"
Resources:
GraphAppKitSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Graphistry Graph App Kit Access 8501 22
Tags:
- Key: "name"
Value: "graph-app-kit-quicklaunch-a"
- Key: "kind"
Value: "graph-app-kit"
VpcId:
Ref: GraphAppKitVPC
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 8501
ToPort: 8501
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 22
ToPort: 22
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 80
ToPort: 80
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 443
ToPort: 443
CidrIp: 0.0.0.0/0
GraphAppKitEC2:
Type: AWS::EC2::Instance
Properties:
Tags:
- Key: "kind"
Value: "graph-app-kit-full"
- Key: Name
Value: Graphistry-Graph-App-Kit
ImageId: !FindInMap [RegionMap, !Ref "AWS::Region", HVM64]
InstanceType: !Ref InstanceType
SubnetId:
Ref: GraphAppKitSubnet
SecurityGroupIds:
-
Ref: GraphAppKitSecurityGroup
KeyName:
Ref: GraphAppKitKeyPair
BlockDeviceMappings:
- DeviceName: /dev/xvda
Ebs:
VolumeType: gp2
VolumeSize: '60'
DeleteOnTermination: 'true'
Encrypted: 'false'
UserData:
Fn::Base64:
Fn::Join:
- ''
- - "#!/bin/bash\n"
- "set -ex\n"
- "sudo usermod -a -G docker ubuntu\n"
- "echo '===== System check'\n"
- "nvidia-smi\n"
- "echo '===== Downloading graph-app-kit'\n"
- "cd /home/ubuntu\n"
- "mkdir -p graph-app-kit/public\n"
- "cd graph-app-kit/public\n"
- "git clone https://github.com/graphistry/graph-app-kit.git\n"
- "cp -r /home/ubuntu/graph-app-kit/public /home/ubuntu/graph-app-kit/private\n"
- "echo '===== Running graph-app-kit bootstraps'\n"
- "cd /home/ubuntu/graph-app-kit/public/graph-app-kit/src/bootstraps/core\n"
- "./graphistry.sh\n"
- "/opt/aws/bin/cfn-signal -e $? --stack "
- Ref: AWS::StackName
- " --resource GraphAppKitEC2 --region "
- Ref: AWS::Region
- "\n"
CreationPolicy:
ResourceSignal:
Count: 1
Timeout: "PT20M"
Outputs:
PublicIp:
Description: GraphAppKitEC2 Public IP
Value: !GetAtt GraphAppKitEC2.PublicIp
Export:
Name: !Sub "${AWS::StackName}-PublicIp"