-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
57 lines (44 loc) · 1.6 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
PROJECT = ra_kv_store
PROJECT_DESCRIPTION = Experimental raft-based key/value store
PROJECT_VERSION = 0.1.0
PROJECT_MOD = ra_kv_store_app
ERLANG_VERSION_FOR_DOCKER_IMAGE ?= 26.2.5.4
define PROJECT_ENV
[
{port, 8080},
{nodes, [{ra_kv1, '[email protected]'}]},
{server_reference, ra_kv1},
{release_cursor_every, -1},
{node_reconnection_interval, 10000},
{restart_ra_cluster, false}
]
endef
dep_ra = git https://github.com/rabbitmq/ra.git main
DEPS = ra cowboy cowlib ranch
dep_cowboy_commit = 2.11.0
dep_cowlib = git https://github.com/ninenines/cowlib 2.12.1
dep_ranch = git https://github.com/ninenines/ranch 2.1.0
DEP_PLUGINS = cowboy
BUILD_DEPS = relx
clean-rel:
rm -rf _rel
clean-deps:
rm -rf deps
rel-docker: clean-rel clean-deps
docker run -it --rm --name erlang-inst1 -v "$(PWD)":/usr/src/ra_kv_store -w /usr/src/ra_kv_store pivotalrabbitmq/erlang-dev-bookworm make rel
rel-jepsen: rel-docker
cp _rel/ra_kv_store_release/*.tar.gz jepsen/jepsen.rakvstore/
rel-jepsen-local: rel
cp _rel/ra_kv_store_release/*.tar.gz jepsen/jepsen.rakvstore/
.PHONY: erlang-docker-image
erlang-docker-image: ## Build Erlang Docker (for local development)
@docker build \
--file Dockerfile-erlang \
--tag pivotalrabbitmq/erlang-dev-bookworm:$(ERLANG_VERSION_FOR_DOCKER_IMAGE) \
--tag pivotalrabbitmq/erlang-dev-bookworm:latest \
.
.PHONY: push-erlang-docker-image
push-erlang-docker-image: erlang-docker-image ## Push Erlang Docker image
@docker push pivotalrabbitmq/erlang-dev-bookworm:$(ERLANG_VERSION_FOR_DOCKER_IMAGE)
@docker push pivotalrabbitmq/erlang-dev-bookworm:latest
include erlang.mk