-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
63 lines (52 loc) · 1.59 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
MAKEFLAGS += --no-print-directory
# Do not remove this block. It is used by the 'help' rule when
# constructing the help output.
# help:
# help: GCP Feast Demo Makefile help
# help:
SHELL:=/bin/bash
# help: help - Display this makefile's help information
.PHONY: help
help:
@grep "^# help\:" Makefile | grep -v grep | sed 's/\# help\: //' | sed 's/\# help\://'
# help:
# help: Commands
# help: -------------
# help: env - Create an ENV file for secrets and credentials
.PHONY: env
env:
@echo "Generate ENV file"
@rm -rf .env
@./env.sh
# help:
.PHONY: tf-deploy
tf-deploy:
cp .env re-gcp-mp/env; \
cd re-gcp-mp; \
terraform init; \
terraform plan; \
terraform apply --auto-approve; \
echo 'REDIS_CONNECTION_STRING='`terraform output db_public_endpoint` >> env; \
echo 'REDIS_PASSWORD='`terraform output db_password` >> env; \
cp env ../.env
# help:
.PHONY: tf-destroy
tf-destroy:
cd re-gcp-mp && terraform destroy --auto-approve
# help: docker - Build required docker images
.PHONY: docker
docker:
@docker build -t redisventures/redis-feast-gcp:1.0.0 -f docker/Dockerfile.base .
@docker compose build --no-cache
# help: setup - Setup GCP Infra and Feast feature store
.PHONY: setup
setup:
@docker compose run setup sh -c "./setup/setup.sh"
# help: jupyter - Spin up a jupyter notebook to explore dataset and model
.PHONY: jupyter
jupyter:
@docker compose run --service-ports jupyter
# help: teardown - Teardown GCP infra and Feast
.PHONY: teardown
teardown:
@docker compose run setup sh -c "./setup/teardown.sh"