-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CE-61] Add docker image pull script
Add script to pull down images at worker nodes. Also update the documentation. Change-Id: I911d2499d8adf53137cccd075ea765b08825516b Signed-off-by: Baohua Yang <[email protected]>
- Loading branch information
Showing
7 changed files
with
90 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Scripts | ||
|
||
Here we collect scripts to help setup and manage the lifecycle of cello service. | ||
|
||
Most of them are needed by the master node. | ||
|
||
Those under [worker_node_setup](worker_node_setup) directory should be put at the worker node to help setup. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
# 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 | ||
source worker_node_setup/header.sh | ||
else | ||
alias echo_r="echo" | ||
alias echo_g="echo" | ||
alias echo_b="echo" | ||
fi | ||
|
||
ARCH=x86_64 | ||
BASEIMAGE_RELEASE=0.3.1 | ||
BASE_VERSION=1.0.0 | ||
PROJECT_VERSION=1.0.0-preview | ||
|
||
IMG_VERSION=0.9.6 | ||
# Only For testing latest images | ||
IMG_VERSION=latest | ||
|
||
echo_b "Downloading images from DockerHub... need a while" | ||
|
||
# TODO: we may need some checking on pulling result? | ||
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 | ||
|
||
# Only useful for debugging | ||
# docker pull yeasy/hyperledger-fabric | ||
|
||
echo_b "Rename images with official tags ... fabric-peer, fabric-orderer, fabric-tools, fabric-ca, fabric-ccenv, fabric-bareos, fabric-baseimage" | ||
docker tag yeasy/hyperledger-fabric-peer:$IMG_VERSION hyperledger/fabric-peer \ | ||
&& docker tag yeasy/hyperledger-fabric-peer:$IMG_VERSION hyperledger/fabric-tools \ | ||
&& docker tag yeasy/hyperledger-fabric-orderer:$IMG_VERSION hyperledger/fabric-orderer \ | ||
&& docker tag yeasy/hyperledger-fabric-ca:$IMG_VERSION hyperledger/fabric-ca \ | ||
&& 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-$BASE_VERSION \ | ||
&& docker tag yeasy/hyperledger-fabric-base:$IMG_VERSION hyperledger/fabric-baseimage:$ARCH-$BASEIMAGE_RELEASE | ||
|
||
echo_g "Done, now worker node should have all images, use `docker images` to check" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
## DO NOT MODIFY THE FOLLOWING PART, UNLESS YOU KNOW WHAT IT MEANS ## | ||
echo_r () { | ||
[ $# -ne 1 ] && return 0 | ||
echo -e "\033[31m$1\033[0m" | ||
} | ||
echo_g () { | ||
[ $# -ne 1 ] && return 0 | ||
echo -e "\033[32m$1\033[0m" | ||
} | ||
echo_y () { | ||
[ $# -ne 1 ] && return 0 | ||
echo -e "\033[33m$1\033[0m" | ||
} | ||
echo_b () { | ||
[ $# -ne 1 ] && return 0 | ||
echo -e "\033[34m$1\033[0m" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright IBM Corp, All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
# This script will help setup Docker at a server, then the server can be used as a worker node. | ||
|
||
# TODO: | ||
# TODO: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright IBM Corp, All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
# This script will help setup a Kubernetes cluster at servers, then the cluster can be used as a worker node. | ||
|
||
# TODO: | ||
# TODO: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright IBM Corp, All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
# This script will help setup a Swarm cluster at servers, then the cluster can be used as a worker node. | ||
|
||
# TODO: | ||
# TODO: |