-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (29 loc) · 956 Bytes
/
Makefile
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
.PHONY: setup status deploy get-ip output connect logs destroy
setup:
sh scripts/entrypoint.sh setup
info:
sh scripts/entrypoint.sh info
update:
sh scripts/entrypoint.sh update
status:
sh scripts/entrypoint.sh status
deploy:
sh scripts/entrypoint.sh deploy
deploy-one:
sh scripts/entrypoint.sh deploy-one ${app}
get-ip:
sh scripts/entrypoint.sh get-ip ${app}
output:
sh scripts/entrypoint.sh output
connect:
sh scripts/entrypoint.sh connect ${app}
logs:
sh scripts/entrypoint.sh logs ${app}
destroy:
sh scripts/entrypoint.sh destroy
amis:
@echo "Getting last AMIs (Amazon Linux 2 x86_64) by region"
@for region in $$(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do \
AMI=$$(aws ec2 describe-images --owners amazon --filters "Name=name,Values=amzn2-ami-hvm-*-x86_64-gp2" --query 'sort_by(Images, &CreationDate)[-1].ImageId' --region $$region --output text); \
echo "$$region:\n AMI: $$AMI"; \
done