forked from fluencelabs/nox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (53 loc) · 2.03 KB
/
Makefile
File metadata and controls
73 lines (53 loc) · 2.03 KB
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
64
65
66
67
68
69
70
71
72
73
include node_client.mk
BOOTSTRAP_NODE=/ip4/207.154.232.92/tcp/7777
default:
cargo build
release:
cargo build --release
build: release
test:
cargo test
server:
cargo run -p particle-server -- -b ${BOOTSTRAP_NODE}
server-debug:
RUST_LOG="trace,tokio_threadpool=info,tokio_reactor=info,mio=info,tokio_io=info" \
cargo run -p particle-server -- -b ${BOOTSTRAP_NODE}
clean:
cargo clean
# build x86_64 binaries
cross-build:
cargo update -p libp2p
cross build --release --target x86_64-unknown-linux-gnu
X86_TARGET=./target/x86_64-unknown-linux-gnu/release
SERVER_EXE = ${X86_TARGET}/particle-server
SERVER=--build-arg local_exe=${SERVER_EXE} --build-arg exe=particle-server
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
IPFS_DOCKERFILE=./deploy/fluence-ipfs/Dockerfile
IPFS_TAG=${BRANCH}-with-ipfs
# bundle containers from existing binaries
containers:
docker build ${SERVER} -t fluencelabs/fluence:${BRANCH} .
docker build -t fluencelabs/fluence:${IPFS_TAG} -f ${IPFS_DOCKERFILE} .
# build binaries, then bundle containers
docker: cross-build containers
# push containers to dockerhub
push:
docker push fluencelabs/fluence:${BRANCH}
docker push fluencelabs/fluence:${IPFS_TAG}
# build binaries, bundle containers, then push them
docker-push: docker push
# deploy existing containers (configure tag in deployment_config.json)
deploy:
cd deploy; fab deploy_fluence
# rebuild binaries and containers, push and deploy
docker-deploy: docker-push deploy
# bundle containers from existing binaries, push and deploy
containers-deploy: containers push deploy
ENDURANCE_EXE=$(shell find ${X86_TARGET} -name "endurance*" -perm +111 -type f)
ENDURANCE=--build-arg exe=endurance --build-arg local_exe=${ENDURANCE_EXE}
endurance-docker:
cargo update -p libp2p
cross build --release --target x86_64-unknown-linux-gnu --test endurance
docker build ${ENDURANCE} -t fluencelabs/fluence-endurance:${BRANCH} .
docker push fluencelabs/fluence-endurance:${BRANCH}
.PHONY: server server-debug docker docker-push clean test release build deploy docker-push-deploy