Skip to content

Commit

Permalink
Update docker compose example with Mainnet image and remove libp2p sc…
Browse files Browse the repository at this point in the history
…ript
  • Loading branch information
kaozenn committed Jun 26, 2024
1 parent 385adc6 commit a832c48
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 79 deletions.
65 changes: 35 additions & 30 deletions docs/node-operators/archive-node/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ keywords:
- postgres
---

# Docker Compose Archive (Devnet)
# Docker Compose Archive

This example demonstrates how to run a Mina archive node using Docker Compose for the Devnet network. This Docker Compose setup includes a Postgres database, a bootstrap database, an archive node, a Mina node, and a script to generate a libp2p key.
This example demonstrates how to run a Mina archive node using Docker Compose for the Mainnet network. This Docker Compose setup includes a Postgres database, a bootstrap database with the latest SQL Dump available, an archive node, a Mina node and a Missing Blocks Guardian script to monitor and populate the gaps in the archive database

Copy and paste the provided configuration into a `docker-compose.yml` file. Then run `docker compose up -d` to start the services, and use `docker compose logs -f` to monitor the logs.

Expand All @@ -32,18 +32,39 @@ services:
ports:
- '5432:5432'
bootstrap_db:
image: 'gcr.io/o1labs-192920/mina-archive:3.0.0-dc6bf78-bullseye-devnet'
image: 'minaprotocol/mina-archive:3.0.0-93e0279-bullseye'
# image: 'gcr.io/o1labs-192920/mina-archive:3.0.0-dc6bf78-bullseye' # Use this image for Devnet
command: >
bash -c '
curl -O https://raw.githubusercontent.com/MinaProtocol/mina/develop/src/app/archive/create_schema.sql;
curl -O https://raw.githubusercontent.com/MinaProtocol/mina/develop/src/app/archive/zkapp_tables.sql;
psql postgres://postgres:postgres@postgres:5432/archive -f create_schema.sql;
curl -O https://673156464838-mina-archive-node-backups.s3.us-west-2.amazonaws.com/mainnet/mainnet-archive-dump-$(date +%F_0000).sql.tar.gz;
tar -zxvf mainnet-archive-dump-$(date +%F_0000).sql.tar.gz;
psql postgres://postgres:postgres@postgres:5432/archive -c "
ALTER SYSTEM SET max_connections = 500;
ALTER SYSTEM SET max_locks_per_transaction = 100;
ALTER SYSTEM SET max_pred_locks_per_relation = 100;
ALTER SYSTEM SET max_pred_locks_per_transaction = 5000;
"
psql postgres://postgres:postgres@postgres:5432/archive -f mainnet-archive-dump-$(date +%F_0000).sql;
'
depends_on:
postgres:
condition: service_healthy
archive:
image: 'gcr.io/o1labs-192920/mina-archive:3.0.0-dc6bf78-bullseye-devnet'
missing_blocks_guardian:
image: 'minaprotocol/mina-archive:3.0.0-93e0279-bullseye'
# image: 'gcr.io/o1labs-192920/mina-archive:3.0.0-dc6bf78-bullseye' # Use this image for Devnet
command: >
bash -c '
curl -O https://raw.githubusercontent.com/MinaFoundation/helm-charts/main/mina-archive/scripts/missing-blocks-guardian-command.sh;
export GUARDIAN_PRECOMPUTED_BLOCKS_URL=https://673156464838-mina-precomputed-blocks.s3.us-west-2.amazonaws.com/mainnet;
export MINA_NETWORK=mainnet;
export PG_CONN=postgres://postgres:postgres@postgres:5432/archive;
while true; do bash missing-blocks-guardian-command.sh; sleep 600; done
'
depends_on:
bootstrap_db:
condition: service_completed_successfully
mina_archive:
image: 'minaprotocol/mina-archive:3.0.0-93e0279-bullseye'
restart: always
command:
- mina-archive
Expand All @@ -57,40 +78,24 @@ services:
depends_on:
bootstrap_db:
condition: service_completed_successfully
generate_libp2p_key:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
environment:
MINA_LIBP2P_PASS: PssW0rD
entrypoint: []
command: >
bash -c '
mina libp2p generate-keypair -privkey-path /data/.mina-config/keys/libp2p-key
chmod -R 0700 /data/.mina-config/keys
chmod -R 0600 /data/.mina-config/keys/libp2p-key
'
volumes:
- './node/mina-config:/data/.mina-config'
mina_node:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
image: 'minaprotocol/mina-daemon:3.0.0-93e0279-bullseye-mainnet'
# image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet' # Use this image for Devnet
restart: always
environment:
MINA_LIBP2P_PASS: PssW0rD
entrypoint: []
command: >
bash -c '
mina daemon --archive-address archive:3086 \
--peer-list-url https://bootnodes.minaprotocol.com/networks/devnet.txt \
--libp2p-keypair /data/.mina-config/keys/libp2p-key \
mina daemon --archive-address mina_archive:3086 \
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt \
--insecure-rest-server \
--rest-port 3085
'
volumes:
- './node/mina-config:/data/.mina-config'
# use --peer-list-url https://bootnodes.minaprotocol.com/networks/devnet.txt for Devnet
ports:
- '3085:3085'
- '8302:8302'
depends_on:
generate_libp2p_key:
bootstrap_db:
condition: service_completed_successfully
```
Expand Down
29 changes: 7 additions & 22 deletions docs/node-operators/block-producer-node/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,17 @@ keywords:
- block producer
---

# Docker Compose Block Producer (Devnet)
# Docker Compose Block Producer

This example demonstrates how to run a Mina Block Producer node using Docker Compose for the Devnet network. The Docker Compose setup includes a Mina Block Producer node,a script to generate a libp2p key, and another script to generate a wallet key.
This example demonstrates how to run a Mina Block Producer node using Docker Compose for the Mainnet network. The Docker Compose setup includes a Mina Block Producer node, and another script to generate a wallet key.

Copy and paste the provided configuration into a `docker-compose.yml` file. Then run `docker compose up -d` to start the services, and use `docker compose logs -f` to monitor the logs.

```yaml
services:
generate_libp2p_key:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
environment:
MINA_LIBP2P_PASS: PssW0rD
entrypoint: []
command: >
bash -c '
mina libp2p generate-keypair -privkey-path /data/.mina-config/keys/libp2p-key
chmod -R 0700 /data/.mina-config/keys
chmod -R 0600 /data/.mina-config/keys/libp2p-key
'
volumes:
- './node/mina-config:/data/.mina-config'
generate_wallet_key:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
image: 'minaprotocol/mina-daemon:3.0.0-93e0279-bullseye-mainnet'
# image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet' # Use this image for Devnet
environment:
MINA_PRIVKEY_PASS: PssW0rD
entrypoint: []
Expand All @@ -43,26 +31,23 @@ services:
volumes:
- './node/mina-config:/data/.mina-config'
mina_block_producer:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
image: 'minaprotocol/mina-daemon:3.0.0-93e0279-bullseye-mainnet'
restart: always
environment:
MINA_LIBP2P_PASS: PssW0rD
MINA_PRIVKEY_PASS: PssW0rD
entrypoint: []
command: >
bash -c '
mina daemon \
--peer-list-url https://bootnodes.minaprotocol.com/networks/devnet.txt \
--libp2p-keypair /data/.mina-config/keys/libp2p-key \
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt \
--block-producer-key /data/.mina-config/keys/wallet-key
'
# use --peer-list-url https://bootnodes.minaprotocol.com/networks/devnet.txt for Devnet
volumes:
- './node/mina-config:/data/.mina-config'
ports:
- '8302:8302'
depends_on:
generate_libp2p_key:
condition: service_completed_successfully
generate_wallet_key:
condition: service_completed_successfully
```
12 changes: 7 additions & 5 deletions docs/node-operators/seed-peers/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ keywords:
- docker compose
---

# Docker Compose Seed Peer (Devnet)
# Docker Compose Seed Peer

This example demonstrates how to run a Mina Seed node using Docker Compose for the Devnet network. This Docker Compose setup includes a Mina seed node, and a script to generate a libp2p key.
This example demonstrates how to run a Mina Seed node using Docker Compose for the Mainnet network. This Docker Compose setup includes a Mina seed node, and a script to generate a libp2p key.

Copy and paste the provided configuration into a `docker-compose.yml` file. Then run `docker compose up -d` to start the services, and use `docker compose logs -f` to monitor the logs.

```yaml
services:
generate_libp2p_key:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
image: 'minaprotocol/mina-daemon:3.0.0-93e0279-bullseye-mainnet'
environment:
MINA_LIBP2P_PASS: PssW0rD
entrypoint: []
Expand All @@ -29,18 +29,20 @@ services:
volumes:
- './node/mina-config:/data/.mina-config'
mina_node:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
image: 'minaprotocol/mina-daemon:3.0.0-93e0279-bullseye-mainnet'
# image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet' # Use this image for Devnet
restart: always
environment:
MINA_LIBP2P_PASS: PssW0rD
entrypoint: []
command: >
bash -c '
mina daemon \
--peer-list-url https://bootnodes.minaprotocol.com/networks/devnet.txt \
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt \
--libp2p-keypair /data/.mina-config/keys/libp2p-key \
--seed
'
# use --peer-list-url https://bootnodes.minaprotocol.com/networks/devnet.txt for Devnet
volumes:
- './node/mina-config:/data/.mina-config'
ports:
Expand Down
31 changes: 9 additions & 22 deletions docs/node-operators/snark-workers/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,17 @@ keywords:
- docker compose
---

# Docker Compose Snark Workers (Devnet)
# Docker Compose Snark Workers

This example demonstrates how to run a Mina Snark Coordinator and a Snark Worker using Docker Compose for the Devnet network. The Docker Compose setup includes a Mina Snark Coordinator node, a Snark Worker node, a script to generate a libp2p key, and another script to generate a wallet key.

Copy and paste the provided configuration into a `docker-compose.yml` file. Then run `docker compose up -d` to start the services, and use `docker compose logs -f` to monitor the logs.

```yaml
services:
generate_libp2p_key:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
environment:
MINA_LIBP2P_PASS: PssW0rD
entrypoint: []
command: >
bash -c '
mina libp2p generate-keypair -privkey-path /data/.mina-config/keys/libp2p-key
chmod -R 0700 /data/.mina-config/keys
chmod -R 0600 /data/.mina-config/keys/libp2p-key
'
volumes:
- './node/mina-config:/data/.mina-config'
generate_wallet_key:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
image: 'minaprotocol/mina-daemon:3.0.0-93e0279-bullseye-mainnet'
# image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet' # Use this image for Devnet
environment:
MINA_PRIVKEY_PASS: PssW0rD
entrypoint: []
Expand All @@ -43,10 +31,10 @@ services:
volumes:
- './node/mina-config:/data/.mina-config'
mina_snark_coordinator:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
image: 'minaprotocol/mina-daemon:3.0.0-93e0279-bullseye-mainnet'
# image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet' # Use this image for Devnet
restart: always
environment:
MINA_LIBP2P_PASS: PssW0rD
MINA_PRIVKEY_PASS: PssW0rD
MINA_CLIENT_TRUSTLIST: "0.0.0.0/0"
healthcheck:
Expand All @@ -58,23 +46,22 @@ services:
command: >
bash -c '
mina daemon \
--peer-list-url https://bootnodes.minaprotocol.com/networks/devnet.txt \
--libp2p-keypair /data/.mina-config/keys/libp2p-key \
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt \
--snark-worker-fee 0.001 \
--run-snark-coordinator $(cat /data/.mina-config/keys/wallet-key.pub) \
--work-selection rand
'
# use --peer-list-url https://bootnodes.minaprotocol.com/networks/devnet.txt for Devnet
volumes:
- './node/mina-config:/data/.mina-config'
ports:
- '8302:8302'
depends_on:
generate_libp2p_key:
condition: service_completed_successfully
generate_wallet_key:
condition: service_completed_successfully
mina_snark_worker:
image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet'
image: 'minaprotocol/mina-daemon:3.0.0-93e0279-bullseye-mainnet'
# image: 'gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-bullseye-devnet' # Use this image for Devnet
restart: always
entrypoint: []
command: >
Expand Down

0 comments on commit a832c48

Please sign in to comment.