Rename some scripts
This commit is contained in:
parent
e99a537ec2
commit
817aa3e0fc
7
Makefile
7
Makefile
|
@ -287,11 +287,10 @@ fmt: fmt-c fmt-go fmt-python fmt-terraform fmt-web # Format all code
|
||||||
|
|
||||||
### Infrastructure
|
### Infrastructure
|
||||||
|
|
||||||
packer-web: supervisor # Build and publish a new webserver AMI
|
packer: supervisor # Build and publish a new webserver AMI
|
||||||
tools/packer-build-web.bash
|
tools/packer-build.bash
|
||||||
|
|
||||||
|
|
||||||
packer-ci: # Build and publish a new CI AMI
|
|
||||||
tools/packer-build-ci.bash
|
|
||||||
|
|
||||||
### Miscellaneous
|
### Miscellaneous
|
||||||
|
|
||||||
|
|
|
@ -111,8 +111,8 @@ API. Generate one randomly with `pwgen -s 30 1`.
|
||||||
## Build web AMI
|
## Build web AMI
|
||||||
|
|
||||||
You'll want to run `set -a; . .env` to load in the new variables from
|
You'll want to run `set -a; . .env` to load in the new variables from
|
||||||
`.env`. Now run `make packer-web`. This will take up to 10 minutes to
|
`.env`. Now run `make packer`. This will take up to 10 minutes to
|
||||||
build a timestamped AMI with a name like `riju-web-20210711223158`.
|
build a timestamped AMI with a name like `riju-20210711223158`.
|
||||||
|
|
||||||
## Create local configuration (part 2 of 3)
|
## Create local configuration (part 2 of 3)
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ Add to `.env` the following contents:
|
||||||
|
|
||||||
```
|
```
|
||||||
# Terraform
|
# Terraform
|
||||||
AMI_NAME=riju-web-20210711223158
|
AMI_NAME=riju-20210711223158
|
||||||
AWS_REGION=us-west-1
|
AWS_REGION=us-west-1
|
||||||
DOMAIN=your.domain
|
DOMAIN=your.domain
|
||||||
S3_BUCKET=yourname-riju
|
S3_BUCKET=yourname-riju
|
||||||
|
@ -129,7 +129,7 @@ S3_CONFIG_PATH=config.json
|
||||||
|
|
||||||
### AMI\_NAME
|
### AMI\_NAME
|
||||||
|
|
||||||
This is the AMI name from `make packer-web`.
|
This is the AMI name from `make packer`.
|
||||||
|
|
||||||
### AWS\_REGION
|
### AWS\_REGION
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ infrastructure.
|
||||||
follow these steps:*
|
follow these steps:*
|
||||||
|
|
||||||
1. Update `.env` and make sure it is sourced (`set -a; . .env`).
|
1. Update `.env` and make sure it is sourced (`set -a; . .env`).
|
||||||
2. Run `make packer-web` and get the name of the new AMI.
|
2. Run `make packer` and get the name of the new AMI.
|
||||||
3. Update it in `.env` under `AMI_NAME` and make sure the update is
|
3. Update it in `.env` under `AMI_NAME` and make sure the update is
|
||||||
sourced (`set -a; . .env`).
|
sourced (`set -a; . .env`).
|
||||||
4. Run `terraform apply`.
|
4. Run `terraform apply`.
|
||||||
|
|
|
@ -63,7 +63,7 @@ locals {
|
||||||
}
|
}
|
||||||
|
|
||||||
source "amazon-ebs" "ubuntu" {
|
source "amazon-ebs" "ubuntu" {
|
||||||
ami_name = "riju-web-${local.timestamp}"
|
ami_name = "riju-${local.timestamp}"
|
||||||
instance_type = "t3.small"
|
instance_type = "t3.small"
|
||||||
source_ami = "${data.amazon-ami.ubuntu.id}"
|
source_ami = "${data.amazon-ami.ubuntu.id}"
|
||||||
ssh_username = "ubuntu"
|
ssh_username = "ubuntu"
|
||||||
|
@ -80,7 +80,7 @@ source "amazon-ebs" "ubuntu" {
|
||||||
|
|
||||||
tag {
|
tag {
|
||||||
key = "Name"
|
key = "Name"
|
||||||
value = "riju-web-${local.timestamp}"
|
value = "riju-${local.timestamp}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,6 +155,6 @@ build {
|
||||||
"SENTRY_DSN=${var.sentry_dsn}",
|
"SENTRY_DSN=${var.sentry_dsn}",
|
||||||
"SUPERVISOR_ACCESS_TOKEN=${var.supervisor_access_token}",
|
"SUPERVISOR_ACCESS_TOKEN=${var.supervisor_access_token}",
|
||||||
]
|
]
|
||||||
script = "provision-web.bash"
|
script = "provision.bash"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue