forked from segmentio/pingdummy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (37 loc) · 969 Bytes
/
Makefile
File metadata and controls
49 lines (37 loc) · 969 Bytes
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
43
44
45
46
47
48
49
DEPS= frontend/node_modules \
common/node_modules \
beacon/node_modules \
db/node_modules
bucket:
@test "${BUCKET}" || (echo '$$BUCKET name required' && exit 1)
aws s3 mb s3://$(BUCKET)
remote:
@test "${BUCKET}" || (echo '$$BUCKET name required' && exit 1)
@terraform remote config \
-backend=s3 \
-backend-config="bucket=$(BUCKET)" \
-backend-config="key=/terraform"
.terraform:
terraform get -update=true
plan:
terraform plan --out plan
apply:
terraform apply plan
copy-key:
@test "${IP}" || (echo 'bastion $$IP required' && exit 1)
@scp -i keys/bastion-ssh \
keys/bastion-ssh \
ubuntu@${IP}:/home/ubuntu/.ssh/key.pem
keys:
mkdir -p keys
ssh-keygen \
-C 'Generated by Stack' \
-f 'keys/bastion-ssh'
docker: $(DEPS)
@docker build -t frontend .
@docker build -t beacon ./beacon
${DEPS}:
@cd `dirname $@` && npm i
clean:
@rm -rf plan .terraform terraform.tfstate.backup
.PHONY: remote update plan apply .terraform clean