forked from olegabu/fabric-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode-create.sh
More file actions
executable file
·25 lines (18 loc) · 842 Bytes
/
node-create.sh
File metadata and controls
executable file
·25 lines (18 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
source lib/util/util.sh
source lib.sh
usageMsg="$0 orgName bootstrapIp myIp [reuseOldConfig=false]"
exampleMsg="$0 org2 192.168.99.100 192.168.99.102 true"
#
IFS=
org=${1:?`printUsage "$usageMsg" "$exampleMsg"`}
boostrapIp=${2:?`printUsage "$usageMsg" "$exampleMsg"`}
myIp=${3:?`printUsage "$usageMsg" "$exampleMsg"`}
unset IFS
cleanBeforeStart=${4}
setDocker_LocalRegistryEnv # local DOCKER_REGISTRY if started
: ${DOCKER_COMPOSE_ARGS:= -f docker-compose.yaml -f docker-compose-couchdb.yaml -f docker-compose-multihost.yaml -f docker-compose-api-port.yaml}
connectMachine ${org}
[ "${reuseOldConfig}" ] || ./clean.sh
info "\n\nStart node for org: ${org} on IP: ${IP} with bootsrap on ${boostrapIp}\n\n"
ORG=${org} MY_IP=${myIp} BOOTSTRAP_IP=${boostrapIp} MULTIHOST=true docker-compose ${DOCKER_COMPOSE_ARGS} up -d