Relocate the nginx auth sample

pull/142/head
Baohua Yang 2022-02-02 17:45:54 -08:00
parent 0dd8066c97
commit 8159c6b710
5 changed files with 37 additions and 27 deletions

View File

@ -71,6 +71,9 @@ To import them, after all containers startup, go inside the kibana container, an
$ cd /kibana/beats-dashboards-1.0.1 && ./load.sh http://elasticsearch:9200
```
## [redis](redis)
A redis serer and a redis client (send a PING to the server).
## [registry_mirror](registry_mirror)
docker registry mirror, with redis as the backend cache.

View File

@ -1,5 +1,8 @@
#bash fetch-config-block.sh dhanNodeOUf1 testchainid dhannodeouf1-bcsnativetest-iad.blockchain.test.ocp.oc-test.com:20003
#bash fetch-config-block.sh dhanNodeOUf1 nodeouchannel01 dhannodeouf1-bcsnativetest-iad.blockchain.test.ocp.oc-test.com:20003
# This should be run in env with fabric command line binaries including peer, configtxlator
#bash fetch-config-block.sh test01 dhentf9-oabcs1-iad.blockchain.ocp.oraclecloud.com:20003 dhentf9 ${PWD}/msp-dhentf9
#bash channel-update-config.sh test01 dhentf9-oabcs1-iad.blockchain.ocp.oraclecloud.com:20003 dhentf9 ${PWD}/msp-dhentf9
bash channel-update-config.sh channellist.txt dhentf9-oabcs1-iad.blockchain.ocp.oraclecloud.com:20003 dhentf9 ${PWD}/msp-dhentf9 msp1 msppath1
mspId=VolvoFounder
endorPolicy="OR('dh0728fab2f3.member')"
@ -24,6 +27,6 @@ packageId="${ccName}:bed6b22c90562f2f87d2303895064718c6fa98566a637b58b4037c5082f
#bash cc-marble-test.sh ${mspId} ${channelId} ${peerAddr} ${ordererAddr} ${ccName}
#bash discover.sh VolvoFounder multiinstancewith32kbpage01 volvofounder-bcsnativetest-iad.blockchain.test.ocp.oc-test.com:20012 multiinstancewith32kbpageCC01
bash discover.sh VolvoFounder multiinstancewith32kbpage01 volvofounder-bcsnativetest-iad.blockchain.test.ocp.oc-test.com:20013 multiinstancewith32kbpageCC01
#bash discover.sh VolvoFounder multiinstancewith32kbpage01 volvofounder-bcsnativetest-iad.blockchain.test.ocp.oc-test.com:20013 multiinstancewith32kbpageCC01
#bash discover.sh VolvoFounder multiinstancewith32kbpage01 volvopart01-bcsnativetest-iad.blockchain.test.ocp.oc-test.com:20041 multiinstancewith32kbpageCC01
#bash discover.sh VolvoFounder multiinstancewith32kbpage01 volvopart01-bcsnativetest-iad.blockchain.test.ocp.oc-test.com:20043 multiinstancewith32kbpageCC01

View File

@ -9,31 +9,37 @@ if [ $# -lt 1 ]; then
fi
mspId=$1
echo "msp id = ${mspId}"
mspPath=msp-${mspId}
echo "msp id=${mspId}, msp path=${mspPath}"
cert_file=${mspId}-certificates.json
admin_dir=${mspId}-admin-credential
certFile=${mspId}-certificates.json
adminCredentialDir=${mspId}-admin-credential
adminCredentialFile=${mspId}-admin-credential.zip
mkdir -p "msp-${mspId}"
pushd "msp-${mspId}" && mkdir tlscacerts signcerts keystore cacerts admincerts && popd || exit 1
[ -d "${mspPath}" ] && { echo "${mspPath} already exists, will exit" && exit 0; }
mkdir -p "${mspPath}"
echo "Unzip ${mspId}-admin-credential.zip file to create the ${admin_dir}"
unzip -d "${mspId}-admin-credential" "${mspId}-admin-credential.zip"
pushd "${mspPath}" && mkdir tlscacerts signcerts keystore cacerts admincerts && popd || exit 1
echo "Get tlscacert from ${cert_file}"
jq -r .certs.tlscacert "${cert_file}" > "msp-${mspId}/tlscacerts/tlsca.cert"
echo "Unzip ${adminCredentialFile} file to create the ${adminCredentialDir}"
unzip -d "${adminCredentialDir}" "${adminCredentialFile}"
echo "Get signcerts from ${admin_dir}"
cp "${admin_dir}/${mspId}-cert.pem" "msp-${mspId}/signcerts/"
echo "Get tlscacert from ${certFile}"
jq -r .certs.tlscacert "${certFile}" > "${mspPath}/tlscacerts/tlsca.cert"
echo "Get keystore from ${admin_dir}"
cp "${admin_dir}/${mspId}-key" "msp-${mspId}/keystore/"
echo "Get signcerts from ${adminCredentialDir}"
cp "${adminCredentialDir}/${mspId}-cert.pem" "${mspPath}/signcerts/"
echo "Get cacerts from ${cert_file}"
jq -r .certs.cacert "${cert_file}" > "msp-${mspId}/cacerts/ca.cert"
echo "Get keystore from ${adminCredentialDir}"
cp "${adminCredentialDir}/${mspId}-key" "${mspPath}/keystore/"
echo "Get admincerts from ${admin_dir}"
cp "${admin_dir}/${mspId}-cert.pem" "msp-${mspId}/admincerts/"
echo "Get cacerts from ${certFile}"
jq -r .certs.cacert "${certFile}" > "${mspPath}/cacerts/ca.cert"
echo "Clean the temp dir of ${mspId}-admin-credential"
rm -rf ${mspId}-admin-credential
echo "Get admincerts from ${adminCredentialDir}"
cp "${adminCredentialDir}/${mspId}-cert.pem" "${mspPath}/admincerts/"
echo "Remove the unzipped ${adminCredentialDir}"
rm -rf ${adminCredentialDir}
echo "MSP is created at ${mspPath}, now you can run: rm -rf ${certFile} ${adminCredentialFile}"

View File

@ -1,11 +1,10 @@
#!/bin/bash
# This script will fix every channel's orderer admin policy from implicit to signature based.
# It should be part of the migration tool
# Usage: TODO
# The commit 787b82fa80cb0a85f352384fa2ac51d5fbbc41e9 has changed the policy as:
# changed the policy:
#Admins:
# Type: ImplicitMeta
# Rule: "MAJORITY Admins"
@ -16,7 +15,6 @@
# Type: Signature
# Rule: "OR('{{.ORGNAME}}.admin')"
# However, there are still instances with 19.3.5 created with the old policies. The script will fix those instances.
# configtxlator encode json to pb
# Usage: configtxlatorEncode msgType input output

View File

@ -1,4 +1,4 @@
# This compose file will boot a typical nginx-web toplogy
# This compose file will boot a typical nginx-web topology
# nginx: can set user/password to access, and forward request to web.
# web: listen on private network
# https://github.com/yeasy/docker-compose-files