The <ahref="https://gitweb.torproject.org/metrics-cloud.git/tree/cloudformation/identify_user.sh">identify_user.sh</a> script prints out the name of the SSH public key to be used based on either:
...
...
@@ -385,9 +385,78 @@ SSH keys are managed through the <a href="https://console.aws.amazon.com/ec2/v2/
The <ahref="https://gitweb.torproject.org/metrics-cloud.git/tree/cloudformation/billing-alerts.yml"><code>billing-alerts</code> template</a> sends notifications to the subscribed individuals whenever the predicted spend for the month will be
over 50USD. Email addresses can be added here if other people should be notified too.
The <ahref="https://gitweb.torproject.org/metrics-cloud.git/tree/cloudformation/metrics-vpc.yml"><code>metrics-vpc</code> template</a> contains shared resources for Tor Metrics development templates. This includes:
</p>
</div>
<olclass="org-ol">
<li><aid="orga95cb3e"></a>MetricsVPC and MetricsSubnet<br/>
<divclass="outline-text-5"id="text-2-2-3-1">
<p>
The subnet should be referenced by any resource that requires it. Use of the default VPC should be avoided as we
share the AWS account with other Tor teams.
</p>
<p>
For example, to create an EC2 instance:
</p>
<divclass="org-src-container">
<preclass="src src-yaml">Instance:
Type: AWS::EC2::Instance
Properties:
AvailabilityZone: !Select [ 0, !GetAZs ]
ImageId: ami-01db78123b2b99496
InstanceType: t2.large
SubnetId:
Fn::ImportValue: 'MetricsSubnet'
KeyName: !Ref myKeyPair
SecurityGroupIds:
- Fn::ImportValue: 'MetricsInternetSecurityGroup'
- Fn::ImportValue: 'MetricsPingableSecurityGroup'
- Fn::ImportValue: 'MetricsHTTPASecurityGroup'
</pre>
</div>
<p>
Note also that the availability zone is not hardcoded to allow for portability between regions if we ever want that.