-
Notifications
You must be signed in to change notification settings - Fork 184
/
main.sh
executable file
·50 lines (37 loc) · 1.76 KB
/
main.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
function info() {
echo -e "************************************************************\n\033[1;33m${1}\033[m\n************************************************************"
}
orgs=$@
first_org=${1:-org1}
#export LDAP_ENABLED=${LDAP_ENABLED:-true}
export LDAPADMIN_HTTPS=${LDAPADMIN_HTTPS:-true}
docker_compose_args=${DOCKER_COMPOSE_ARGS:-"-f docker-compose.yaml -f docker-compose-couchdb.yaml -f https/docker-compose-generate-tls-certs.yaml -f https/docker-compose-https-ports.yaml -f docker-compose-ldap.yaml"}
# -f environments/dev/docker-compose-debug.yaml -f https/docker-compose-generate-tls-certs-debug.yaml
: ${DOCKER_COMPOSE_ORDERER_ARGS:="-f docker-compose-orderer.yaml -f docker-compose-orderer-domain.yaml -f docker-compose-orderer-ports.yaml"}
#virtalbox:
# export DOCKER_COMPOSE_ARGS="-f docker-compose.yaml -f docker-compose-ports.yaml"
# export DOCKER_REGISTRY=192.168.99.1:5000
# to orgX_env
# export BOOTSTRAP_IP=192.168.99.116
# export MY_IP=`docker-machine ip ${ORG}.${DOMAIN}`
# export FABRIC_STARTER_HOME=`docker-machine ssh ${ORG}.${DOMAIN} pwd`
unset ORG COMPOSE_PROJECT_NAME
export DOCKER_REGISTRY=${DOCKER_REGISTRY:-docker.io}
export FABRIC_VERSION=1.4.4
export FABRIC_STARTER_VERSION=latest
if [ "$DEPLOY_VERSION" == "Hyperledger Fabric 1.4.4-GOST-34" ]; then
set -x
export DOCKER_REGISTRY=registry.labdlt.ru
export FABRIC_VERSION=1.4.4
export FABRIC_STARTER_VERSION=latest
export AUTH_MODE=ADMIN
export CRYPTO_ALGORITHM=GOST
export SIGNATURE_HASH_FAMILY=SM3
export DNS_USERNAME=admin
export DNS_PASSWORD="${ENROLL_SECRET:-adminpw}"
set +x
fi
./container-scripts/wait-port.sh docker.io 443
tmux new-session -d -s main "./disk_resize.sh; ./deploy.sh $@"
tmux pipe-pane -o -t main 'cat > deploy.log'