-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-1785] Cleanup kafka-orderer bdd environments
Change-Id: Ic5a491f96c471380aab05c3aac3b3cec8be65e6a Signed-off-by: Luis Sanchez <sanchezl@us.ibm.com>
- Loading branch information
Luis Sanchez
committed
Jan 26, 2017
1 parent
c9242fe
commit 4491654
Showing
14 changed files
with
84 additions
and
71 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
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
17 changes: 0 additions & 17 deletions
17
bddtests/environments/orderer-n-kafka-n/orderer/Dockerfile
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
bddtests/environments/orderer-n-kafka-n/orderer/docker-entrypoint.sh
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
FROM hyperledger/fabric-testenv | ||
WORKDIR /opt/gopath/src/github.com/hyperledger/fabric/orderer | ||
RUN apt-get update \ | ||
&& apt-get install -y zookeeper jq \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
ADD docker-entrypoint.sh /docker-entrypoint.sh | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["orderer"] |
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,11 @@ | ||
version: '2' | ||
services: | ||
orderer: | ||
build: . | ||
image: hyperledger/fabric-testenv-orderer | ||
environment: | ||
- ORDERER_GENERAL_QUEUESIZE=1000 | ||
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 | ||
- ORDERER_GENESIS_ORDERERTYPE=solo | ||
ports: | ||
- '7050' |
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,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script will either start the kafka server, or run the user | ||
# specified command. | ||
|
||
# Exit immediately if a pipeline returns a non-zero status. | ||
set -e | ||
|
||
ORDERER_EXE=orderer | ||
|
||
# handle starting the orderer with an option | ||
if [ "${1:0:1}" = '-' ]; then | ||
set -- ${ORDERER_EXE} "$@" | ||
fi | ||
|
||
# handle default (i.e. no custom options or commands) | ||
if [ "$1" = "${ORDERER_EXE}" ]; then | ||
|
||
case "$ORDERER_GENESIS_ORDERERTYPE" in | ||
solo) | ||
;; | ||
kafka) | ||
# make sure at least one broker has started. | ||
# get the broker list from zookeeper | ||
if [ -z "$ORDERER_KAFKA_BROKERS" ] ; then | ||
if [ -z "$ZOOKEEPER_CONNECT" ] ; then | ||
export ZOOKEEPER_CONNECT="zookeeper:2181" | ||
fi | ||
ZK_CLI_EXE="/usr/share/zookeeper/bin/zkCli.sh -server ${ZOOKEEPER_CONNECT}" | ||
until [ -n "$($ZK_CLI_EXE ls /brokers/ids | grep '^\[')" ] ; do | ||
echo "No Kafka brokers registered in ZooKeeper. Will try again in 1 second." | ||
sleep 1 | ||
done | ||
ORDERER_KAFKA_BROKERS="[" | ||
ORDERER_KAFKA_BROKERS_SEP="" | ||
for BROKER_ID in $($ZK_CLI_EXE ls /brokers/ids | grep '^\[' | sed 's/[][,]/ /g'); do | ||
ORDERER_KAFKA_BROKERS=${ORDERER_KAFKA_BROKERS}${ORDERER_KAFKA_BROKERS_SEP}$($ZK_CLI_EXE get /brokers/ids/$BROKER_ID 2>&1 | grep '^{' | jq -j '. | .host,":",.port') | ||
ORDERER_KAFKA_BROKERS_SEP="," | ||
done | ||
export ORDERER_KAFKA_BROKERS="${ORDERER_KAFKA_BROKERS}]" | ||
fi | ||
;; | ||
sbft) | ||
;; | ||
esac | ||
|
||
fi | ||
|
||
exec "$@" |
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
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
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