-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
booster-bitswap devnet and tracing (#796)
* add booster-bitswap docker image and container to stack * add tracing * lint
- Loading branch information
Showing
7 changed files
with
148 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
######################################################################################### | ||
## docker will invoke this file from ../../.. dir in order to access the code | ||
######################################################################################### | ||
ARG LOTUS_TEST_IMAGE=filecoin/lotus-test:latest | ||
FROM ${LOTUS_TEST_IMAGE} as lotus-dev | ||
######################################################################################### | ||
FROM golang:1.18-bullseye as builder | ||
|
||
RUN apt update && apt install -y \ | ||
build-essential \ | ||
bzr pkg-config \ | ||
clang \ | ||
curl \ | ||
gcc git \ | ||
hwloc \ | ||
jq \ | ||
libhwloc-dev wget \ | ||
mesa-opencl-icd \ | ||
ocl-icd-opencl-dev | ||
|
||
WORKDIR /go/src/ | ||
|
||
# copy src | ||
COPY . /go/src/ | ||
|
||
RUN make booster-bitswap debug | ||
######################################################################################### | ||
FROM ubuntu:20.04 as runner | ||
|
||
RUN apt update && apt install -y \ | ||
curl \ | ||
hwloc \ | ||
jq | ||
|
||
ARG BUILD_VERSION=0.1 | ||
|
||
LABEL org.opencontainers.image.version=$BUILD_VERSION \ | ||
org.opencontainers.image.authors="Boost Dev Team" \ | ||
name="booster-bitswap-dev" \ | ||
maintainer="Boost Dev Team" \ | ||
vendor="Boost Dev Team" \ | ||
version=$BUILD_VERSION \ | ||
release=$BUILD_VERSION \ | ||
summary="This image is used to host booster-bitswap-dev" \ | ||
description="This image is used to host booster-bitswap-dev" | ||
|
||
WORKDIR /app | ||
EXPOSE 8888 | ||
|
||
COPY --from=builder /go/src/booster-bitswap /usr/local/bin/ | ||
COPY --from=builder /go/src/boostd /usr/local/bin/ | ||
COPY --from=lotus-dev /usr/local/bin/lotus /usr/local/bin/ | ||
COPY --from=lotus-dev /usr/local/bin/lotus-miner /usr/local/bin/ | ||
## Fix missing lib libhwloc.so.5 | ||
RUN ls -1 /lib/x86_64-linux-gnu/libhwloc.so.* | head -n 1 | xargs -n1 -I {} ln -s {} /lib/x86_64-linux-gnu/libhwloc.so.5 | ||
|
||
COPY docker/devnet/booster-bitswap/entrypoint.sh /app/ | ||
|
||
ENTRYPOINT ["./entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
##################################################################################### | ||
service=$(docker_user)/booster-bitswap-dev | ||
version=dev | ||
########### DOCKER ################################################################## | ||
tag=$(service):$(version) | ||
rootdir=$(realpath .) | ||
|
||
dbuild: | ||
docker build --build-arg LOTUS_TEST_IMAGE=$(lotus_test_image) \ | ||
-t $(tag) -f Dockerfile.source $(rootdir)/../../../ | ||
|
||
dpush: dbuild | ||
docker push $(tag) | ||
|
||
dscan: dbuild | ||
docker scan --accept-license $(tag) | ||
##################################################################################### | ||
.PHONY: | ||
dbuild dpush dscan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
export FULLNODE_API_INFO=`lotus auth api-info --perm=admin | cut -f2 -d=` | ||
export MINER_API_INFO=`lotus-miner auth api-info --perm=admin | cut -f2 -d=` | ||
export BOOST_API_INFO=`boostd auth api-info --perm=admin | cut -f2 -d=` | ||
|
||
echo $FULLNODE_API_INFO | ||
echo $MINER_API_INFO | ||
echo $BOOST_API_INFO | ||
|
||
echo Starting booster-bitswap... | ||
exec booster-bitswap run --api-boost=$BOOST_API_INFO --tracing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters