Rename some scripts

This commit is contained in:
Radon Rosborough 2022-02-12 10:14:44 -08:00
parent e99a537ec2
commit 817aa3e0fc
4 changed files with 11 additions and 12 deletions

View File

@ -287,11 +287,10 @@ fmt: fmt-c fmt-go fmt-python fmt-terraform fmt-web # Format all code
### Infrastructure
packer-web: supervisor # Build and publish a new webserver AMI
tools/packer-build-web.bash
packer: supervisor # Build and publish a new webserver AMI
tools/packer-build.bash
packer-ci: # Build and publish a new CI AMI
tools/packer-build-ci.bash
### Miscellaneous

View File

@ -111,8 +111,8 @@ API. Generate one randomly with `pwgen -s 30 1`.
## Build web AMI
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
build a timestamped AMI with a name like `riju-web-20210711223158`.
`.env`. Now run `make packer`. This will take up to 10 minutes to
build a timestamped AMI with a name like `riju-20210711223158`.
## Create local configuration (part 2 of 3)
@ -120,7 +120,7 @@ Add to `.env` the following contents:
```
# Terraform
AMI_NAME=riju-web-20210711223158
AMI_NAME=riju-20210711223158
AWS_REGION=us-west-1
DOMAIN=your.domain
S3_BUCKET=yourname-riju
@ -129,7 +129,7 @@ S3_CONFIG_PATH=config.json
### AMI\_NAME
This is the AMI name from `make packer-web`.
This is the AMI name from `make packer`.
### AWS\_REGION
@ -169,7 +169,7 @@ infrastructure.
follow these steps:*
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
sourced (`set -a; . .env`).
4. Run `terraform apply`.

View File

@ -63,7 +63,7 @@ locals {
}
source "amazon-ebs" "ubuntu" {
ami_name = "riju-web-${local.timestamp}"
ami_name = "riju-${local.timestamp}"
instance_type = "t3.small"
source_ami = "${data.amazon-ami.ubuntu.id}"
ssh_username = "ubuntu"
@ -80,7 +80,7 @@ source "amazon-ebs" "ubuntu" {
tag {
key = "Name"
value = "riju-web-${local.timestamp}"
value = "riju-${local.timestamp}"
}
}
@ -155,6 +155,6 @@ build {
"SENTRY_DSN=${var.sentry_dsn}",
"SUPERVISOR_ACCESS_TOKEN=${var.supervisor_access_token}",
]
script = "provision-web.bash"
script = "provision.bash"
}
}