Skip to content

Commit

Permalink
refactoring lotus deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan@vulcanize.io committed Apr 25, 2024
1 parent c787cb5 commit 9ffa37c
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 14 deletions.
13 changes: 7 additions & 6 deletions stack_orchestrator/data/compose/docker-compose-mainnet-lotus.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
volumes:
parameters:
lotus-repo:
lotus_miner_data:
lotus_shared:

services:
lotus:
environment:
Expand All @@ -7,16 +13,11 @@ services:
- parameters:/var/tmp/filecoin-proof-parameters
- lotus-repo:/var/lib/lotus
- lotus_shared:/root/.lotus-shared
- lotus_miner_data:/root/data
ports:
- "1234"
deploy:
restart_policy:
condition: on-failure
delay: 30s
command: ["lotus", "daemon"]

volumes:
parameters:
lotus-repo:
lotus_shared:

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ RUN set -eux; \
rustup --version; \
cargo --version; \
rustc --version;

COPY ./ /opt/filecoin
WORKDIR /opt/filecoin

Expand All @@ -38,7 +37,7 @@ WORKDIR /opt/filecoin
### make configurable filecoin-ffi build
ARG FFI_BUILD_FROM_SOURCE=0
ENV FFI_BUILD_FROM_SOURCE=${FFI_BUILD_FROM_SOURCE}

RUN ls /opt/filecoin
RUN make clean deps

ARG RUSTFLAGS=""
Expand Down Expand Up @@ -72,7 +71,6 @@ MAINTAINER Lotus Development Team

COPY --from=lotus-builder /opt/filecoin/lotus /usr/local/bin/
COPY --from=lotus-builder /opt/filecoin/lotus-shed /usr/local/bin/

#COPY scripts/docker-lotus-entrypoint.sh /
#COPY myscripts/setup-node.sh /docker-entrypoint-scripts.d/setup-node.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Build cerc/fixturenet-lotus
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# Use a release version tag to match the modified Dockerfile replaced in next step
git -C ${CERC_REPO_BASE_DIR}/lotus checkout master

# Replace repo's Dockerfile with modified one
cp ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/lotus/Dockerfile

docker build -t cerc/fixturenet-lotus:local ${build_command_args} ${CERC_REPO_BASE_DIR}/lotus
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
# Build cerc/mainnet-lotus
echo "SRC $CERC_REPO_BASE_DIR"
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

Expand Down
4 changes: 2 additions & 2 deletions stack_orchestrator/data/container-image-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ cerc/pocket
cerc/watcher-azimuth
cerc/ipld-eth-state-snapshot
cerc/watcher-gelato
cerc/lotus
cerc/lotus-fixturenet
cerc/mainnet-lotus
cerc/fixturenet-lotus
cerc/go-opera
cerc/lasso
cerc/reth
Expand Down
1 change: 1 addition & 0 deletions stack_orchestrator/data/pod-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fixturenet-pocket
watcher-azimuth
watcher-gelato
fixturenet-lotus
mainnet-lotus
mainnet-go-opera
lasso
reth
Expand Down
2 changes: 1 addition & 1 deletion stack_orchestrator/data/stacks/fixturenet-lotus/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description: "A lotus fixturenet"
repos:
- git.vdb.to/cerc-io/lotus
containers:
- cerc/lotus-fixturenet
- cerc/fixturenet-lotus
pods:
- fixturenet-lotus
2 changes: 1 addition & 1 deletion stack_orchestrator/data/stacks/mainnet-lotus/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description: "A lotus stack"
repos:
- git.vdb.to/cerc-io/lotus
containers:
- cerc/lotus
- cerc/mainnet-lotus
pods:
- mainnet-lotus

0 comments on commit 9ffa37c

Please sign in to comment.