forked from cerc-io/stack-orchestrator
Compare commits
67
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f08556937 | ||
|
|
36fd4533c3 | ||
|
|
aa2c32be67 | ||
|
|
ead9c8b18c | ||
|
|
057e0c5372 | ||
|
|
a7da7b4f87 | ||
|
|
21f7b96eb4 | ||
|
|
7d347e84fd | ||
|
|
15295ae2d1 | ||
|
|
9b9da72b9b | ||
|
|
1ccbd415a9 | ||
|
|
469ff7a086 | ||
|
|
82bdf82978 | ||
|
|
6e61aafd6e | ||
|
|
8b634fc791 | ||
|
|
0138102f76 | ||
|
|
11279aab78 | ||
|
|
3ec6f4e913 | ||
|
|
637b40d39e | ||
|
|
f75ad6cdfc | ||
|
|
972b7d4a09 | ||
|
|
503700bda6 | ||
|
|
2afb94932a | ||
|
|
dd3f582d82 | ||
|
|
b3f1a66e8f | ||
|
|
ac40462ee2 | ||
|
|
7a9796ffe2 | ||
|
|
fa5fb38ba8 | ||
|
|
ced6661cf7 | ||
|
|
7aa9f10a95 | ||
|
|
9446db9c5f | ||
|
|
508112f819 | ||
|
|
b6296fdc66 | ||
|
|
48c19c1e1d | ||
|
|
44753db277 | ||
|
|
5af28b9de6 | ||
|
|
447e1215ad | ||
|
|
b2838334f2 | ||
|
|
2a7a1c46b0 | ||
|
|
fbdde91953 | ||
|
|
b5ad39f94a | ||
|
|
dc3ab712b0 | ||
|
|
99f8c02f9c | ||
|
|
91b3fb41f3 | ||
|
|
7be0f8beac | ||
|
|
814cbdaa9d | ||
|
|
bf0027d10f | ||
|
|
42a1657afc | ||
|
|
fe6b15b6a6 | ||
|
|
8e8e9539bd | ||
|
|
af1167234c | ||
|
|
d13892b879 | ||
|
|
277fbae98f | ||
|
|
9ffa37c686 | ||
|
|
c787cb59ef | ||
|
|
8deb26414b | ||
|
|
bf18317f98 | ||
|
|
9219fa133f | ||
|
|
41cec3467f | ||
|
|
efb07bd8ce | ||
|
|
dace83c5b2 | ||
|
|
253aaf9ca9 | ||
|
|
242019ffa5 | ||
|
|
9d973844be | ||
|
|
461c298d0a | ||
|
|
71fb7aee5c | ||
|
|
6baa2e2314 |
@@ -6,8 +6,6 @@ on:
|
||||
paths:
|
||||
- '!**'
|
||||
- '.gitea/workflows/triggers/fixturenet-eth-test'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
|
||||
# Needed until we can incorporate docker startup into the executor container
|
||||
env:
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Change this file to trigger running the fixturenet-eth-test CI job
|
||||
Trigger
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
Change this file to trigger running the external-stack CI job
|
||||
trigger
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
hostname: lotus-miner
|
||||
env_file:
|
||||
- ../config/fixturenet-lotus/lotus-env.env
|
||||
image: cerc/lotus:local
|
||||
image: cerc/lotus-fixturenet:local
|
||||
volumes:
|
||||
- ../config/fixturenet-lotus/setup-miner.sh:/docker-entrypoint-scripts.d/setup-miner.sh
|
||||
- ../config/fixturenet-lotus/fund-account.sh:/fund-account.sh
|
||||
@@ -26,7 +26,7 @@ services:
|
||||
environment:
|
||||
# Use 0.0.0.0 so that calls can be made from outside the container
|
||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
||||
image: cerc/lotus:local
|
||||
image: cerc/lotus-fixturenet:local
|
||||
volumes:
|
||||
- ../config/fixturenet-lotus/setup-node.sh:/docker-entrypoint-scripts.d/setup-node.sh
|
||||
- lotus_node_1_params:/var/tmp/filecoin-proof-parameters
|
||||
@@ -42,10 +42,10 @@ services:
|
||||
- lotus-miner
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
- "2345"
|
||||
- "3456"
|
||||
- "1777"
|
||||
- "1235"
|
||||
- "2346"
|
||||
- "3457"
|
||||
- "1778"
|
||||
|
||||
lotus-node-2:
|
||||
hostname: lotus-node-2
|
||||
@@ -54,7 +54,7 @@ services:
|
||||
environment:
|
||||
# Use 0.0.0.0 so that calls can be made from outside the container
|
||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
||||
image: cerc/lotus:local
|
||||
image: cerc/lotus-fixturenet:local
|
||||
volumes:
|
||||
- ../config/fixturenet-lotus/setup-node.sh:/docker-entrypoint-scripts.d/setup-node.sh
|
||||
- lotus_node_2_params:/var/tmp/filecoin-proof-parameters
|
||||
@@ -70,10 +70,10 @@ services:
|
||||
- lotus-miner
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
- "2345"
|
||||
- "3456"
|
||||
- "1777"
|
||||
- "1236"
|
||||
- "2347"
|
||||
- "3458"
|
||||
- "1779"
|
||||
|
||||
volumes:
|
||||
lotus_miner_params:
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
volumes:
|
||||
parameters:
|
||||
lotus-repo:
|
||||
lotus_shared:
|
||||
|
||||
services:
|
||||
lotus:
|
||||
environment:
|
||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
||||
- LOTUS_LIBP2P_LISTENADDRESSES=/ip4/0.0.0.0/tcp/1235,/ip6/::/tcp/1235,/ip4/0.0.0.0/udp/1235/quic-v1,/ip6/::/udp/1235/quic-v1,/ip4/0.0.0.0/udp/1235/quic-v1/webtransport,/ip6/::/udp/1235/quic-v1/webtransport
|
||||
image: cerc/lotus-mainnet:local
|
||||
volumes:
|
||||
- parameters:/var/tmp/filecoin-proof-parameters
|
||||
- lotus-repo:/var/lib/lotus
|
||||
- lotus_shared:/root/.lotus
|
||||
ports:
|
||||
- "1234"
|
||||
- "1235"
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
delay: 30s
|
||||
entrypoint: ["sh", "/docker-lotus-entrypoint.sh"]
|
||||
+4
-5
@@ -1,5 +1,5 @@
|
||||
#####################################
|
||||
FROM golang:1.19.12-bullseye AS lotus-builder
|
||||
FROM golang:1.21.7-bullseye AS lotus-builder
|
||||
MAINTAINER Lotus Development Team
|
||||
|
||||
RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev
|
||||
@@ -29,7 +29,6 @@ RUN set -eux; \
|
||||
rustup --version; \
|
||||
cargo --version; \
|
||||
rustc --version;
|
||||
|
||||
COPY ./ /opt/filecoin
|
||||
WORKDIR /opt/filecoin
|
||||
|
||||
@@ -38,13 +37,13 @@ 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=""
|
||||
ARG GOFLAGS=""
|
||||
|
||||
#RUN make buildall
|
||||
#RUN make lotus
|
||||
RUN make 2k
|
||||
|
||||
#####################################
|
||||
@@ -75,7 +74,7 @@ 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
|
||||
|
||||
ARG DOCKER_LOTUS_IMPORT_SNAPSHOT https://snapshots.mainnet.filops.net/minimal/latest
|
||||
ARG DOCKER_LOTUS_IMPORT_SNAPSHOT https://forest-archive.chainsafe.dev/latest/mainnet/
|
||||
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT ${DOCKER_LOTUS_IMPORT_SNAPSHOT}
|
||||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||
ENV LOTUS_PATH /var/lib/lotus
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build cerc/lotus
|
||||
# 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 v1.23.3
|
||||
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/lotus:local ${build_command_args} ${CERC_REPO_BASE_DIR}/lotus
|
||||
docker build -t cerc/fixturenet-lotus:local ${build_command_args} ${CERC_REPO_BASE_DIR}/lotus
|
||||
@@ -0,0 +1,124 @@
|
||||
#####################################
|
||||
FROM golang:1.21.7-bullseye AS lotus-builder
|
||||
MAINTAINER Lotus Development Team
|
||||
|
||||
RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev
|
||||
|
||||
ENV XDG_CACHE_HOME="/tmp"
|
||||
|
||||
### taken from https://github.com/rust-lang/docker-rust/blob/master/1.63.0/buster/Dockerfile
|
||||
ENV RUSTUP_HOME=/usr/local/rustup \
|
||||
CARGO_HOME=/usr/local/cargo \
|
||||
PATH=/usr/local/cargo/bin:$PATH \
|
||||
RUST_VERSION=1.63.0
|
||||
|
||||
RUN set -eux; \
|
||||
dpkgArch="$(dpkg --print-architecture)"; \
|
||||
case "${dpkgArch##*-}" in \
|
||||
amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='5cc9ffd1026e82e7fb2eec2121ad71f4b0f044e88bca39207b3f6b769aaa799c' ;; \
|
||||
arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='e189948e396d47254103a49c987e7fb0e5dd8e34b200aa4481ecc4b8e41fb929' ;; \
|
||||
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
|
||||
esac; \
|
||||
url="https://static.rust-lang.org/rustup/archive/1.25.1/${rustArch}/rustup-init"; \
|
||||
wget "$url"; \
|
||||
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \
|
||||
chmod +x rustup-init; \
|
||||
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}; \
|
||||
rm rustup-init; \
|
||||
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
|
||||
rustup --version; \
|
||||
cargo --version; \
|
||||
rustc --version;
|
||||
|
||||
COPY ./ /opt/filecoin
|
||||
WORKDIR /opt/filecoin
|
||||
|
||||
ARG FFI_BUILD_FROM_SOURCE=0
|
||||
ENV FFI_BUILD_FROM_SOURCE=${FFI_BUILD_FROM_SOURCE}
|
||||
|
||||
#RUN make clean deps
|
||||
|
||||
ARG RUSTFLAGS=""
|
||||
ARG GOFLAGS=""
|
||||
|
||||
RUN make clean deps && \
|
||||
make lotus lotus-shed lotus-stats && \
|
||||
install -C ./lotus /usr/local/bin/lotus && \
|
||||
install -C ./lotus-shed /usr/local/bin/lotus-shed && \
|
||||
install -C ./lotus-stats /usr/local/bin/lotus-stats
|
||||
|
||||
#####################################
|
||||
FROM ubuntu:20.04 AS lotus-base
|
||||
MAINTAINER Lotus Development Team
|
||||
|
||||
# Base resources
|
||||
COPY --from=lotus-builder /etc/ssl/certs /etc/ssl/certs
|
||||
COPY --from=lotus-builder /lib/*/libdl.so.2 /lib/
|
||||
COPY --from=lotus-builder /lib/*/librt.so.1 /lib/
|
||||
COPY --from=lotus-builder /lib/*/libgcc_s.so.1 /lib/
|
||||
COPY --from=lotus-builder /lib/*/libutil.so.1 /lib/
|
||||
COPY --from=lotus-builder /usr/lib/*/libltdl.so.7 /lib/
|
||||
COPY --from=lotus-builder /usr/lib/*/libnuma.so.1 /lib/
|
||||
COPY --from=lotus-builder /usr/lib/*/libhwloc.so.* /lib/
|
||||
COPY --from=lotus-builder /usr/lib/*/libOpenCL.so.1 /lib/
|
||||
|
||||
RUN useradd -r -u 532 -U fc \
|
||||
&& mkdir -p /etc/OpenCL/vendors \
|
||||
&& echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
|
||||
|
||||
#####################################
|
||||
FROM lotus-base AS lotus
|
||||
MAINTAINER Lotus Development Team
|
||||
|
||||
COPY --from=lotus-builder \
|
||||
/usr/local/bin/lotus \
|
||||
/usr/local/bin/lotus-shed \
|
||||
/usr/local/bin/
|
||||
|
||||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||
ENV LOTUS_PATH /var/lib/lotus
|
||||
ENV DOCKER_LOTUS_IMPORT_WALLET ""
|
||||
|
||||
RUN mkdir /var/lib/lotus /var/tmp/filecoin-proof-parameters
|
||||
RUN chown fc: /var/lib/lotus /var/tmp/filecoin-proof-parameters
|
||||
|
||||
VOLUME /var/lib/lotus
|
||||
VOLUME /var/tmp/filecoin-proof-parameters
|
||||
|
||||
USER fc
|
||||
|
||||
EXPOSE 1234
|
||||
|
||||
|
||||
CMD ["-help"]
|
||||
|
||||
#####################################
|
||||
FROM lotus-base AS lotus-all-in-one
|
||||
|
||||
# Install netcat for healthcheck
|
||||
RUN apt-get update && apt-get install -y netcat && apt-get install -y iproute2
|
||||
|
||||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||
ENV LOTUS_PATH /var/lib/lotus
|
||||
|
||||
ARG DOCKER_LOTUS_IMPORT_SNAPSHOT=https://forest-archive.chainsafe.dev/latest/mainnet/
|
||||
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT=${DOCKER_LOTUS_IMPORT_SNAPSHOT}
|
||||
|
||||
COPY --from=lotus-builder /opt/filecoin/lotus /usr/local/bin/
|
||||
COPY --from=lotus-builder /opt/filecoin/lotus-shed /usr/local/bin/
|
||||
COPY --from=lotus-builder /opt/filecoin/lotus-stats /usr/local/bin/
|
||||
COPY scripts/docker-lotus-entrypoint.sh /docker-lotus-entrypoint.sh
|
||||
RUN chmod +x /docker-lotus-entrypoint.sh
|
||||
|
||||
RUN mkdir /var/tmp/filecoin-proof-parameters
|
||||
RUN mkdir /var/lib/lotus
|
||||
RUN chown fc: /var/tmp/filecoin-proof-parameters
|
||||
RUN chown fc: /var/lib/lotus
|
||||
|
||||
|
||||
VOLUME /var/tmp/filecoin-proof-parameters
|
||||
VOLUME /var/lib/lotus
|
||||
|
||||
EXPOSE 1234
|
||||
EXPOSE 1235
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build cerc/mainnet-lotus
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
git stash
|
||||
|
||||
# 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/lotus-mainnet:local ${build_command_args} ${CERC_REPO_BASE_DIR}/lotus
|
||||
@@ -41,7 +41,8 @@ cerc/pocket
|
||||
cerc/watcher-azimuth
|
||||
cerc/ipld-eth-state-snapshot
|
||||
cerc/watcher-gelato
|
||||
cerc/lotus
|
||||
cerc/mainnet-lotus
|
||||
cerc/fixturenet-lotus
|
||||
cerc/go-opera
|
||||
cerc/lasso
|
||||
cerc/reth
|
||||
|
||||
@@ -27,6 +27,7 @@ fixturenet-pocket
|
||||
watcher-azimuth
|
||||
watcher-gelato
|
||||
fixturenet-lotus
|
||||
mainnet-lotus
|
||||
mainnet-go-opera
|
||||
lasso
|
||||
reth
|
||||
|
||||
@@ -2,8 +2,8 @@ version: "1.0"
|
||||
name: fixturenet-lotus
|
||||
description: "A lotus fixturenet"
|
||||
repos:
|
||||
- github.com/filecoin-project/lotus
|
||||
- git.vdb.to/cerc-io/lotus
|
||||
containers:
|
||||
- cerc/lotus
|
||||
- cerc/fixturenet-lotus
|
||||
pods:
|
||||
- fixturenet-lotus
|
||||
|
||||
@@ -13,7 +13,7 @@ repos:
|
||||
- github.com/sushiswap/subgraphs
|
||||
containers:
|
||||
# fixturenet-lotus image
|
||||
- cerc/lotus
|
||||
- cerc/lotus-fixturenet
|
||||
# graph-node image
|
||||
- cerc/graph-node
|
||||
# sushiswap contract deployment images
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# Lotus stack
|
||||
|
||||
## Clone required repositories
|
||||
```
|
||||
$ laconic-so --stack mainnet-lotus setup-repositories
|
||||
```
|
||||
## Build the stack's containers
|
||||
```
|
||||
$ laconic-so --stack mainnet-lotus build-containers
|
||||
```
|
||||
## Create a deployment of the stack
|
||||
```
|
||||
$ laconic-so --stack mainnet-lotus deploy init --map-ports-to-host any-same --output lotus-spec.yml
|
||||
```
|
||||
Update the URLs in the generated spec file to use your systems' actual IP addresses.
|
||||
```
|
||||
$ laconic-so --stack mainnet-lotus deploy create --deployment-dir lotus-deployment --spec-file lotus-spec.yml
|
||||
```
|
||||
## Start the stack
|
||||
```
|
||||
$ laconic-so deployment --dir lotus-deployment start
|
||||
```
|
||||
Check logs:
|
||||
```
|
||||
$ laconic-so deployment --dir lotus-deployment logs
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
version: "1.0"
|
||||
name: mainnet-lotus
|
||||
description: "A lotus stack"
|
||||
repos:
|
||||
- git.vdb.to/cerc-io/lotus
|
||||
containers:
|
||||
- cerc/mainnet-lotus
|
||||
pods:
|
||||
- mainnet-lotus
|
||||
@@ -11,7 +11,7 @@ repos:
|
||||
- github.com/vulcanize/uniswap-v3-info
|
||||
containers:
|
||||
## fixturenet-lotus image
|
||||
- cerc/lotus
|
||||
- cerc/lotus-fixturenet
|
||||
## sushiswap images
|
||||
- cerc/sushiswap-v3-core
|
||||
- cerc/sushiswap-v3-periphery
|
||||
|
||||
@@ -31,7 +31,7 @@ rm -rf $CERC_REPO_BASE_DIR
|
||||
mkdir -p $CERC_REPO_BASE_DIR
|
||||
# Clone the external test stack
|
||||
$TEST_TARGET_SO fetch-stack git.vdb.to/cerc-io/test-external-stack
|
||||
stack_name="$CERC_REPO_BASE_DIR/test-external-stack/stacks/test-external-stack"
|
||||
stack_name="$CERC_REPO_BASE_DIR/test-external-stack/stack-orchestrator/stacks/test-external-stack"
|
||||
TEST_TARGET_SO_STACK="$TEST_TARGET_SO --stack ${stack_name}"
|
||||
# Test bringing the test container up and down
|
||||
# with and without volume removal
|
||||
|
||||
Reference in New Issue
Block a user