-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
42 lines (34 loc) · 1.4 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
OS := $(shell uname)
ifeq ($(OS),Darwin)
PREFIX =
else
PREFIX = sudo
endif
help:
@echo "Please use \`make <target>' where <target> is one of:"
@echo "--- Commands using an OpenShift Cluster ---"
@echo " setup-pull-secret setup the pull secret for the Red Hat registry (assumes OCP4/CRC)"
@echo " deploy-druid deploy the druid, postgresql and zookeeper"
@echo ""
@echo "--- Commands using Docker Compose ---"
@echo " docker-up run docker-compose up -d"
@echo " docker-down shut down all containers"
@echo " docker-logs connect to console logs for all services"
setup-pull-secret:
oc get secret pull-secret --namespace=openshift-config --export -o yaml | oc apply -f -
deploy-druid:
@cp -fr deploy/ testing/
@rm testing/environment
oc create -f testing/
docker-down:
docker-compose -f ../druid/distribution/docker/docker-compose.yml down
docker-logs:
docker-compose logs -f
docker-druid-setup:
@cp -fr deploy/ testing/
@sed -i "" 's/aws_access/'"${AWS_ACCESS_KEY_ID}"'/g' testing/environment
@sed -i "" 's/aws_secret/'"${AWS_SECRET_ACCESS_KEY}"'/g' testing/environment
@sed -i "" 's/aws_region/'"${AWS_REGION}"'/g' testing/environment
@cp -fr testing/environment ../druid/distribution/docker
docker-up: docker-druid-setup
docker-compose -f ../druid/distribution/docker/docker-compose.yml up -d