多节点部署脚本:如果你想在一台电脑上部署多个节点,请使用下面的脚本:
```bash#!/bin/bash
#需要运行的Swarm容器数量,可根据自己电脑配置自行修改此值let count=10
function createBeeNodeDir { sudo mkdir /usr/local/docker for ((i=0; i function createDockerComposeDotYml { for ((i=0; i function createDockerComposeDotYml { sudo touch /usr/local/docker/bee-node1/.env for ((i=0; i ### BEE #### HTTP API listen address (default: :1633)BEE_API_ADDR=:1633# initial nodes to connect to (default [/dnsaddr/bootnode.ethswarm.org])BEE_BOOTNODE=[/dnsaddr/bootnode.ethswarm.org]# cause the node to always accept incoming connectionsBEE_BOOTNODE_MODE=false# enable clef signerBEE_CLEF_SIGNER_ENABLE=true# clef signer endpointBEE_CLEF_SIGNER_ENDPOINT=http://clef-$i:8550# config file (default is /home/bee/.bee.yaml)BEE_CONFIG=/home/bee/.bee.yaml# origins with CORS headers enabledBEE_CORS_ALLOWED_ORIGINS=[]# data directory (default /home/bee/.bee)BEE_DATA_DIR=/home/bee/.bee# db capacity in chunks, multiply by 4096 to get approximate capacity in bytesBEE_DB_CAPACITY=5000000# number of open files allowed by databaseBEE_DB_OPEN_FILES_LIMIT=200# size of block cache of the database in bytesBEE_DB_BLOCK_CACHE_CAPACITY=33554432# size of the database write buffer in bytesBEE_DB_WRITE_BUFFER_SIZE=33554432# disables db compactions triggered by seeksBEE_DB_DISABLE_SEEKS_COMPACTION=false# debug HTTP API listen address (default: :1635)BEE_DEBUG_API_ADDR=:1635# enable debug HTTP APIBEE_DEBUG_API_ENABLE=true# disable a set of sensitive features in the apiBEE_GATEWAY_MODE=false# enable global pinningBEE_GLOBAL_PINNING_ENABLE=false# NAT exposed addressBEE_NAT_ADDR=# ID of the Swarm network (default 1)BEE_NETWORK_ID=1# P2P listen address (default: :1634)BEE_P2P_ADDR=:1634# enable P2P QUIC protocolBEE_P2P_QUIC_ENABLE=false# enable P2P WebSocket transportBEE_P2P_WS_ENABLE=false# password for decrypting keysBEE_PASSWORD=my-password# path to a file that contains password for decrypting keysBEE_PASSWORD_FILE=# amount in BZZ below the peers payment threshold when we initiate settlement (default 10000)BEE_PAYMENT_EARLY=10000# threshold in BZZ where you expect to get paid from your peers (default 100000)BEE_PAYMENT_THRESHOLD=100000# excess debt above payment threshold in BZZ where you disconnect from your peer (default 10000)BEE_PAYMENT_TOLERANCE=10000# ENS compatible API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]urlBEE_RESOLVER_OPTIONS=[]# whether we want the node to start with no listen addresses for p2pBEE_STANDALONE=false# enable swap (default true)BEE_SWAP_ENABLE=true# swap ethereum blockchain endpoint (default http://localhost:8545)BEE_SWAP_ENDPOINT=https://rpc.slock.it/goerli# swap factory addressBEE_SWAP_FACTORY_ADDRESS=# initial deposit if deploying a new chequebook (default 100000000)BEE_SWAP_INITIAL_DEPOSIT=100000000# enable tracingBEE_TRACING_ENABLE=false# endpoint to send tracing data (default 127.0.0.1:6831)BEE_TRACING_ENDPOINT=127.0.0.1:6831# service name identifier for tracing (default bee)BEE_TRACING_SERVICE_NAME=bee# log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace (default info)BEE_VERBOSITY=info# send a welcome message string during handshakesBEE_WELCOME_MESSAGE=EOF done} echo "创建.env文件"createDockerComposeDotYmlecho "创建.env文件成功"``` 用法:复制以上脚本到Windows系统下保存为openMoreSwarm.sh格式的文件,上传到CentOS 7的任意目录,执行命令: ```bashsh openMoreSwarm.sh``` 等待部署成功。脚本默认未自启动脚本,请自行到每个docker-compose.yml文件夹下执行: ```bashdocker-compose up -d``` 更多用法见前面的博客:swarm挖矿程序单节点部署脚本(docker),使用docker-compose创建多个swarm挖矿程序,swarm挖矿单节点docker-compose安装流程。 热点:挖矿 本站所有软件信息均由用户上传发布,版权归原著所有。如有侵权/违规内容,敬请来信告知邮箱:764327034@qq.com,我们将及时撤销! 转载请注明出处:https://czxurui.com/zx/1646.html
发表回复
评论列表(0条)