Skip to content

Commit

Permalink
Merge "[ FAB-6698 ] Fabric CA clustering"
Browse files Browse the repository at this point in the history
  • Loading branch information
mastersingh24 authored and Gerrit Code Review committed Nov 10, 2017
2 parents 236ae62 + ab7a40b commit 797d745
Show file tree
Hide file tree
Showing 9 changed files with 566 additions and 80 deletions.
1 change: 1 addition & 0 deletions images/fabric-ca-fvt/payload/mysql_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ chown mysql.mysql $MYSQLDATA/*pem
chmod 600 $MYSQLDATA/$TLS_SERVER_KEY
test $arch = s390x && MYCNF=/etc/mysql/my.cnf || MYCNF=/etc/mysql/mysql.conf.d/mysqld.cnf
sed -i "s/^[[:blank:]]*#*[[:blank:]]*ssl-ca=.*/ssl-ca=$TLS_BUNDLE/;
s/\(^[[:blank:]]*\)#*\([[:blank:]]*max_connections[[:blank:]]*=[[:blank:]]*\).*/\1\22000/;
s/^[[:blank:]]*#*[[:blank:]]*ssl-cert=.*/ssl-cert=$TLS_SERVER_CERT/;
s/^[[:blank:]]*#*[[:blank:]]*ssl-key=.*/ssl-key=$TLS_SERVER_KEY/" $MYCNF || let RC+=1
chown -R mysql.mysql $MYSQLDATA
Expand Down
2 changes: 2 additions & 0 deletions images/fabric-ca-fvt/payload/postgres_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ cp $FABRIC_CA_DATA/$TLS_SERVER_KEY $PGDATA || let RC+=1
chown $PGUSER.$PGUSER $PGDATA/*pem || let RC+=1
chmod 600 $PGDATA/FabricTlsServer*.pem || let RC+=1
sed -i "s/\(^[[:blank:]]*\)#*\([[:blank:]]*ssl[[:blank:]]*=[[:blank:]]*\).*/\1\2on/;\
s/\(^[[:blank:]]*\)#*\([[:blank:]]*max_connections[[:blank:]]*=[[:blank:]]*\).*/\1\22000/;\
s/\(^[[:blank:]]*\)#*\([[:blank:]]*ssl_cert_file[[:blank:]]*=[[:blank:]]*\).*/\1\2'$TLS_SERVER_CERT'/;\
s/\(^[[:blank:]]*\)#*\([[:blank:]]*ssl_cert_file[[:blank:]]*=[[:blank:]]*\).*/\1\2'$TLS_SERVER_CERT'/;\
s/\(^[[:blank:]]*\)#*\([[:blank:]]*ssl_key_file[[:blank:]]*=[[:blank:]]*\).*/\1\2'$TLS_SERVER_KEY'/;\
s/\(^[[:blank:]]*\)#*\([[:blank:]]*ssl_ca_file[[:blank:]]*=[[:blank:]]*\).*/\1\2'$TLS_BUNDLE'/;\
Expand Down
2 changes: 1 addition & 1 deletion images/fabric-ca-fvt/payload/system_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ echo "mysql-server mysql-server/root_password_again password mysql" | debconf-se
apt-get -y install --no-install-recommends rsyslog bc vim lsof sqlite3 haproxy postgresql-$PGVER \
postgresql-client-common postgresql-contrib-$PGVER isag jq git html2text \
debconf-utils zsh htop python2.7-minimal libpython2.7-stdlib \
mysql-client mysql-common mysql-server || let RC+=1
mysql-client mysql-common mysql-server parallel || let RC+=1
apt-get -y install ssl-cert || let RC+=1
apt-get -y autoremove

Expand Down
4 changes: 2 additions & 2 deletions scripts/fvt/cdp_exploit_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!/bin/bash
# !/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
Expand Down Expand Up @@ -71,7 +71,7 @@ function testLimit {
export FABRIC_CA_SERVER_CRLSIZELIMIT=$1
cd $GOPATH/src/github.com/hyperledger/fabric-ca
$SCRIPTDIR/fabric-ca_setup.sh -K
$SCRIPTDIR/fabric-ca_setup.sh -S -D -X $ca_certfile -k $ca_keyfile 2>&1 | tee $LOGFILE &
$SCRIPTDIR/fabric-ca_setup.sh -S -D -X -c $ca_certfile -k $ca_keyfile 2>&1 | tee $LOGFILE &
pollLogForMsg "Listening on https*://0.0.0.0:$CA_DEFAULT_PORT" $LOGFILE || ErrorExit "Failed to log CA"
enroll admin2 adminpw2
admin_keyfile="$(find /tmp/$TESTCASE/admin/msp/keystore -type f)"
Expand Down
Loading

0 comments on commit 797d745

Please sign in to comment.