Skip to content

Commit

Permalink
Merge pull request #1033 from quadratichq/a-team-dba-2
Browse files Browse the repository at this point in the history
Reviewing infra some
  • Loading branch information
davidkircos committed Jan 29, 2024
2 parents 4650f33 + 078fcdc commit 2d90480
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
![Twitter Follow](https://img.shields.io/twitter/follow/QuadraticHQ)
![quadraticlogo4 1](https://user-images.githubusercontent.com/3479421/162037216-2fea1620-2310-4cfa-96fb-31299195e3a9.png)

## ![quardatic icon small](https://user-images.githubusercontent.com/3479421/162039117-02f85f2c-e382-4ed8-ac39-64efab17a144.svg) **_The data science spreadsheet_**
## ![quadratic icon small](https://user-images.githubusercontent.com/3479421/162039117-02f85f2c-e382-4ed8-ac39-64efab17a144.svg) **_The data science spreadsheet_**

Infinite data grid with Python, JavaScript, and SQL built-in. Data Connectors to pull in your data.

Expand Down
44 changes: 20 additions & 24 deletions infra/files/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const quadraticApiUri = config.require("quadratic-api-uri");

// Configuration from Pulumi ESC
const instanceSize = config.require("files-instance-size");
const domain = config.require("domain");


const instance = new aws.ec2.Instance("files-instance", {
tags: {
Expand All @@ -39,29 +41,23 @@ const instance = new aws.ec2.Instance("files-instance", {
),
});

// const domain = config.require("domain");
// // Get the hosted zone ID for domain
// const hostedZone = pulumi.output(
// aws.route53.getZone(
// {
// name: domain,
// },
// { async: true }
// )
// );
// Get the hosted zone ID for domain
const hostedZone = pulumi.output(
aws.route53.getZone(
{
name: domain,
},
{ async: true }
)
);

// // Create a Route 53 record pointing to EC2 instance
// const dnsRecord = new aws.route53.Record("multiplayer-r53-record", {
// zoneId: hostedZone.id,
// name: `${filesSubdomain}.${domain}`, // subdomain you want to use
// type: "A",
// aliases: [
// {
// name: instance.arn,
// zoneId: instance.availabilityZone.apply((az) => az),
// evaluateTargetHealth: true,
// },
// ],
// });
// Create a Route 53 record pointing to EC2 instance
const dnsRecord = new aws.route53.Record("files-r53-record", {
zoneId: hostedZone.id,
name: `${filesSubdomain}.${domain}`, // subdomain you want to use
type: "A",
ttl: 300,
records: [instance.publicIp],
});

export const filesPublicDns = instance.publicDns;
export const filesPublicDns = dnsRecord.fqdn;
1 change: 1 addition & 0 deletions infra/helpers/runDockerImageBashScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ sudo docker run -d \
--env-file .env \
${ecrRegistryUrl}/${imageRepositoryName}:${imageTag}
# TODO: In preview environments we should disable datadog
echo 'Setting up Datadog agent'
docker run -d --name datadog-agent \
--env-file .env \
Expand Down
4 changes: 2 additions & 2 deletions infra/shared/securityGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as aws from "@pulumi/aws";
export const filesEc2SecurityGroup = new aws.ec2.SecurityGroup("files-sg", {
ingress: [
// TODO: remove SSH Access
{ protocol: "tcp", fromPort: 22, toPort: 22, cidrBlocks: ["0.0.0.0/0"] },
// { protocol: "tcp", fromPort: 22, toPort: 22, cidrBlocks: ["0.0.0.0/0"] },
{
protocol: "tcp",
fromPort: 80,
Expand Down Expand Up @@ -41,7 +41,7 @@ export const multiplayerEc2SecurityGroup = new aws.ec2.SecurityGroup(
{
ingress: [
// TODO: remove SSH Access
{ protocol: "tcp", fromPort: 22, toPort: 22, cidrBlocks: ["0.0.0.0/0"] },
// { protocol: "tcp", fromPort: 22, toPort: 22, cidrBlocks: ["0.0.0.0/0"] },
{
protocol: "tcp",
fromPort: 80,
Expand Down

0 comments on commit 2d90480

Please sign in to comment.