Merge pull request #83 from qiang0723/master

Update images to 1.0.0 and modify scripts
pull/85/head
Baohua Yang 2017-07-12 16:14:43 +08:00 committed by GitHub
commit 5b101de708
7 changed files with 45 additions and 22 deletions

View File

@ -3,9 +3,10 @@
# This script will remove all containers and hyperledger related images
# Detecting whether can import the header file to render colorful cli output
# Need add choice option
if [ -f ./header.sh ]; then
source ./header.sh
elif [ -f worker_node_setup/header.sh ]; then
elif [ -f scripts/header.sh ]; then
source scripts/header.sh
else
alias echo_r="echo"
@ -13,10 +14,32 @@ else
alias echo_b="echo"
fi
echo_b "Clean up all containers..."
docker rm -f `docker ps -qa`
echo_b "Clean up all hyperledger related images..."
docker rmi $(docker images |grep 'hyperledger')
echo_g "Env cleanup done!"
while true
do
echo_b " ================== Clean up env ================\n"
echo_b "1 Clean all containers"
echo_b "2 Clean all chaincode-images"
echo_r "3 [warning]Clean all hyperledger-images"
echo_b "q quit"
echo_b " ==================================\n"
read -p "Choice the number and enter:" select
echo_b "====================================\n"
case $select in
q|Q)
break
;;
1)
echo_b "Clean up all containers..."
docker rm -f `docker ps -qa`
;;
2)
echo_b "Clean up all chaincode-images..."
docker rmi -f $(docker images |grep 'dev-peer*'|awk '{print $3}')
;;
3)
echo_b "Clean up all hyperledger related images..."
docker rmi $(docker images |grep 'hyperledger')
;;
esac
done
echo_g "Env cleanup done!"

View File

@ -3,7 +3,7 @@
# Detecting whether can import the header file to render colorful cli output
if [ -f ./header.sh ]; then
source ./header.sh
elif [ -f worker_node_setup/header.sh ]; then
elif [ -f scripts/header.sh ]; then
source scripts/header.sh
else
alias echo_r="echo"
@ -14,10 +14,10 @@ fi
ARCH=x86_64
BASEIMAGE_RELEASE=0.3.1
BASE_VERSION=1.0.0
PROJECT_VERSION=1.0.0-rc1
PROJECT_VERSION=1.0.0
# For testing v1.0.0-rc1 images
IMG_VERSION=v1.0.0-rc1
# For testing 1.0.0 images
IMG_VERSION=1.0.0
echo_b "Downloading images from DockerHub... need a while"
@ -26,9 +26,9 @@ docker pull yeasy/hyperledger-fabric-base:$IMG_VERSION \
&& docker pull yeasy/hyperledger-fabric-peer:$IMG_VERSION \
&& docker pull yeasy/hyperledger-fabric-orderer:$IMG_VERSION \
&& docker pull yeasy/hyperledger-fabric-ca:$IMG_VERSION \
&& docker pull hyperledger/fabric-couchdb:$ARCH-1.0.0-beta \
&& docker pull hyperledger/fabric-kafka:$ARCH-$PROJECT_VERSION \
&& docker pull hyperledger/fabric-zookeeper:$ARCH-$PROJECT_VERSION
&& docker pull hyperledger/fabric-couchdb:$ARCH-$IMG_VERSION \
&& docker pull hyperledger/fabric-kafka:$ARCH-$IMG_VERSION \
&& docker pull hyperledger/fabric-zookeeper:$ARCH-$IMG_VERSION
# Only useful for debugging
# docker pull yeasy/hyperledger-fabric
@ -41,7 +41,7 @@ docker tag yeasy/hyperledger-fabric-peer:$IMG_VERSION hyperledger/fabric-peer \
&& docker tag yeasy/hyperledger-fabric-base:$IMG_VERSION hyperledger/fabric-ccenv:$ARCH-$PROJECT_VERSION \
&& docker tag yeasy/hyperledger-fabric-base:$IMG_VERSION hyperledger/fabric-baseos:$ARCH-$BASEIMAGE_RELEASE \
&& docker tag yeasy/hyperledger-fabric-base:$IMG_VERSION hyperledger/fabric-baseimage:$ARCH-$BASEIMAGE_RELEASE \
&& docker tag hyperledger/fabric-zookeeper:$ARCH-$PROJECT_VERSION hyperledger/fabric-zookeeper \
&& docker tag hyperledger/fabric-kafka:$ARCH-$PROJECT_VERSION hyperledger/fabric-kafka
&& docker tag hyperledger/fabric-zookeeper:$ARCH-$IMG_VERSION hyperledger/fabric-zookeeper \
&& docker tag hyperledger/fabric-kafka:$ARCH-$IMG_VERSION hyperledger/fabric-kafka
echo_g "Done, now can startup the network using docker-compose..."

View File

@ -3,7 +3,7 @@
# Detecting whether can import the header file to render colorful cli output
if [ -f ./header.sh ]; then
source ./header.sh
elif [ -f worker_node_setup/header.sh ]; then
elif [ -f scripts/header.sh ]; then
source scripts/header.sh
else
alias echo_r="echo"

View File

@ -3,7 +3,7 @@
# Detecting whether can import the header file to render colorful cli output
if [ -f ./header.sh ]; then
source ./header.sh
elif [ -f worker_node_setup/header.sh ]; then
elif [ -f scripts/header.sh ]; then
source scripts/header.sh
else
alias echo_r="echo"

View File

@ -3,7 +3,7 @@
# Detecting whether can import the header file to render colorful cli output
if [ -f ./header.sh ]; then
source ./header.sh
elif [ -f worker_node_setup/header.sh ]; then
elif [ -f scripts/header.sh ]; then
source scripts/header.sh
else
alias echo_r="echo"

View File

@ -3,7 +3,7 @@
# Detecting whether can import the header file to render colorful cli output
if [ -f ./header.sh ]; then
source ./header.sh
elif [ -f worker_node_setup/header.sh ]; then
elif [ -f scripts/header.sh ]; then
source scripts/header.sh
else
alias echo_r="echo"

View File

@ -3,7 +3,7 @@
# Detecting whether can import the header file to render colorful cli output
if [ -f ./header.sh ]; then
source ./header.sh
elif [ -f worker_node_setup/header.sh ]; then
elif [ -f scripts/header.sh ]; then
source scripts/header.sh
else
alias echo_r="echo"