diff --git a/CHANGELOG.md b/CHANGELOG.md index c9a66000a..89adb0e80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +## v0.9.0-beta +Sun Oct 21 05:39:36 UTC 2018 + +* [bf212da](https://github.com/hyperledger/cello/commit/bf212da) [CE-482](https://jira.hyperledger.org/browse/CE-482) Support compose files dynamic generation +* [3d78ad7](https://github.com/hyperledger/cello/commit/3d78ad7) [CE-481](https://jira.hyperledger.org/browse/CE-481) Modify user dashboard tutorial docs +* [0390ccb](https://github.com/hyperledger/cello/commit/0390ccb) [CE-471](https://jira.hyperledger.org/browse/CE-471) Fix operator dashboard login page +* [a798544](https://github.com/hyperledger/cello/commit/a798544) [CE-472](https://jira.hyperledger.org/browse/CE-472) Allow jump to chain info when click chain +* [81b17a7](https://github.com/hyperledger/cello/commit/81b17a7) [CE-467](https://jira.hyperledger.org/browse/CE-467) Unable to remove resource on NFS server +* [328b669](https://github.com/hyperledger/cello/commit/328b669) [CE-479](https://jira.hyperledger.org/browse/CE-479) Add stack overflow link in document +* [338d200](https://github.com/hyperledger/cello/commit/338d200) [CE-480](https://jira.hyperledger.org/browse/CE-480) change location of runhosts file +* [fd08855](https://github.com/hyperledger/cello/commit/fd08855) [CE-478](https://jira.hyperledger.org/browse/CE-478)adding missing connection profile fields +* [7e4aa01](https://github.com/hyperledger/cello/commit/7e4aa01) [CE-476](https://jira.hyperledger.org/browse/CE-476)Added yaml connection profile +* [339cf7f](https://github.com/hyperledger/cello/commit/339cf7f) [CE-477](https://jira.hyperledger.org/browse/CE-477) Kafka pods cannot be started successfully +* [a5be12d](https://github.com/hyperledger/cello/commit/a5be12d) [CE-473](https://jira.hyperledger.org/browse/CE-473) Add default parameters for example code + ## v0.9.0-alpha Sun Sep 9 13:13:21 UTC 2018 diff --git a/Makefile b/Makefile index 2e0d0935f..0d34d9952 100755 --- a/Makefile +++ b/Makefile @@ -32,12 +32,12 @@ RESET := $(shell tput -Txterm sgr0) ARCH := $(shell uname -m) # changelog specific version tags -PREV_VERSION?=0.8.0 +PREV_VERSION?=0.9.0-beta # Building image usage DOCKER_NS ?= hyperledger BASENAME ?= $(DOCKER_NS)/cello -VERSION ?= 0.9.0 +VERSION ?= 0.9.0-beta IS_RELEASE=false DOCKER_BASE_x86_64=python:3.6 diff --git a/dockerhub/v0.9.0-alpha/mongo/Dockerfile b/dockerhub/v0.9.0-alpha/mongo/Dockerfile deleted file mode 100644 index eff671f4e..000000000 --- a/dockerhub/v0.9.0-alpha/mongo/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright IBM Corp, All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# -FROM hyperledger/cello-baseimage:x86_64-0.8.0 - -COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh - -VOLUME /data/db /data/configdb - -RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -EXPOSE 27017 -CMD ["mongod"] diff --git a/dockerhub/v0.9.0-alpha/mongo/docker-entrypoint.sh b/dockerhub/v0.9.0-alpha/mongo/docker-entrypoint.sh deleted file mode 100755 index 49afb0aaf..000000000 --- a/dockerhub/v0.9.0-alpha/mongo/docker-entrypoint.sh +++ /dev/null @@ -1,254 +0,0 @@ -#!/bin/bash -# -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# Based this file on https://github.com/docker-library/mongo/blob/master/3.4/docker-entrypoint.sh -set -Eeuo pipefail - -if [ "${1:0:1}" = '-' ]; then - set -- mongod "$@" -fi - -originalArgOne="$1" - -# allow the container to be started with `--user` -# all mongo* commands should be dropped to the correct user -if [[ "$originalArgOne" == mongo* ]] && [ "$(id -u)" = '0' ]; then - if [ "$originalArgOne" = 'mongod' ]; then - chown -R mongodb /data/configdb /data/db - fi - - # make sure we can write to stdout and stderr as "mongodb" - # (for our "initdb" code later; see "--logpath" below) - chown --dereference mongodb "/proc/$$/fd/1" "/proc/$$/fd/2" || : - # ignore errors thanks to https://github.com/docker-library/mongo/issues/149 - - exec gosu mongodb "$BASH_SOURCE" "$@" -fi - -# you should use numactl to start your mongod instances, including the config servers, mongos instances, and any clients. -# https://docs.mongodb.com/manual/administration/production-notes/#configuring-numa-on-linux -if [[ "$originalArgOne" == mongo* ]]; then - numa='numactl --interleave=all' - if $numa true &> /dev/null; then - set -- $numa "$@" - fi -fi - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then - echo >&2 "error: both $var and $fileVar are set (but are exclusive)" - exit 1 - fi - local val="$def" - if [ "${!var:-}" ]; then - val="${!var}" - elif [ "${!fileVar:-}" ]; then - val="$(< "${!fileVar}")" - fi - export "$var"="$val" - unset "$fileVar" -} - -# see https://github.com/docker-library/mongo/issues/147 (mongod is picky about duplicated arguments) -_mongod_hack_have_arg() { - local checkArg="$1"; shift - local arg - for arg; do - case "$arg" in - "$checkArg"|"$checkArg"=*) - return 0 - ;; - esac - done - return 1 -} -declare -a mongodHackedArgs -# _mongod_hack_ensure_arg '--some-arg' "$@" -# set -- "${mongodHackedArgs[@]}" -_mongod_hack_ensure_arg() { - local ensureArg="$1"; shift - mongodHackedArgs=( "$@" ) - if ! _mongod_hack_have_arg "$ensureArg" "$@"; then - mongodHackedArgs+=( "$ensureArg" ) - fi -} -# _mongod_hack_ensure_arg_val '--some-arg' 'some-val' "$@" -# set -- "${mongodHackedArgs[@]}" -_mongod_hack_ensure_arg_val() { - local ensureArg="$1"; shift - local ensureVal="$1"; shift - mongodHackedArgs=() - while [ "$#" -gt 0 ]; do - local arg="$1"; shift - case "$arg" in - "$ensureArg") - shift # also skip the value - continue - ;; - "$ensureArg"=*) - # value is already included - continue - ;; - esac - mongodHackedArgs+=( "$arg" ) - done - mongodHackedArgs+=( "$ensureArg" "$ensureVal" ) -} -# TODO what do to about "--config" ? :( - -if [ "$originalArgOne" = 'mongod' ]; then - file_env 'MONGO_INITDB_ROOT_USERNAME' - file_env 'MONGO_INITDB_ROOT_PASSWORD' - # pre-check a few factors to see if it's even worth bothering with initdb - shouldPerformInitdb= - if [ "$MONGO_INITDB_ROOT_USERNAME" ] && [ "$MONGO_INITDB_ROOT_PASSWORD" ]; then - # if we have a username/password, let's set "--auth" - _mongod_hack_ensure_arg '--auth' "$@" - set -- "${mongodHackedArgs[@]}" - shouldPerformInitdb='true' - elif [ "$MONGO_INITDB_ROOT_USERNAME" ] || [ "$MONGO_INITDB_ROOT_PASSWORD" ]; then - cat >&2 <<-'EOF' - - error: missing 'MONGO_INITDB_ROOT_USERNAME' or 'MONGO_INITDB_ROOT_PASSWORD' - both must be specified for a user to be created - - EOF - exit 1 - fi - - if [ -z "$shouldPerformInitdb" ]; then - # if we've got any /docker-entrypoint-initdb.d/* files to parse later, we should initdb - for f in /docker-entrypoint-initdb.d/*; do - case "$f" in - *.sh|*.js) # this should match the set of files we check for below - shouldPerformInitdb="$f" - break - ;; - esac - done - fi - - # check for a few known paths (to determine whether we've already initialized and should thus skip our initdb scripts) - if [ -n "$shouldPerformInitdb" ]; then - for path in \ - /data/db/WiredTiger \ - /data/db/journal \ - /data/db/local.0 \ - /data/db/storage.bson \ - ; do - if [ -e "$path" ]; then - shouldPerformInitdb= - break - fi - done - fi - - if [ -n "$shouldPerformInitdb" ]; then - if _mongod_hack_have_arg --config "$@"; then - echo >&2 - echo >&2 'warning: database is not yet initialized, and "--config" is specified' - echo >&2 ' the initdb database startup might fail as a result!' - echo >&2 - fi - - pidfile="$(mktemp)" - trap "rm -f '$pidfile'" EXIT - - _mongod_hack_ensure_arg_val --bind_ip 127.0.0.1 "$@" - _mongod_hack_ensure_arg_val --port 27017 "${mongodHackedArgs[@]}" - - sslMode="$(_mongod_hack_have_arg '--sslPEMKeyFile' "$@" && echo 'allowSSL' || echo 'disabled')" # "BadValue: need sslPEMKeyFile when SSL is enabled" vs "BadValue: need to enable SSL via the sslMode flag when using SSL configuration parameters" - _mongod_hack_ensure_arg_val --sslMode "$sslMode" "${mongodHackedArgs[@]}" - - if stat "/proc/$$/fd/1" > /dev/null && [ -w "/proc/$$/fd/1" ]; then - # https://github.com/mongodb/mongo/blob/38c0eb538d0fd390c6cb9ce9ae9894153f6e8ef5/src/mongo/db/initialize_server_global_state.cpp#L237-L251 - # https://github.com/docker-library/mongo/issues/164#issuecomment-293965668 - _mongod_hack_ensure_arg_val --logpath "/proc/$$/fd/1" "${mongodHackedArgs[@]}" - else - echo >&2 "warning: initdb logs cannot write to '/proc/$$/fd/1', so they are in '/data/db/docker-initdb.log' instead" - _mongod_hack_ensure_arg_val --logpath /data/db/docker-initdb.log "${mongodHackedArgs[@]}" - fi - _mongod_hack_ensure_arg --logappend "${mongodHackedArgs[@]}" - - _mongod_hack_ensure_arg_val --pidfilepath "$pidfile" "${mongodHackedArgs[@]}" - "${mongodHackedArgs[@]}" --fork - - mongo=( mongo --host 127.0.0.1 --port 27017 --quiet ) - - # check to see that our "mongod" actually did start up (catches "--help", "--version", MongoDB 3.2 being silly, slow prealloc, etc) - # https://jira.mongodb.org/browse/SERVER-16292 - tries=30 - while true; do - if ! { [ -s "$pidfile" ] && ps "$(< "$pidfile")" &> /dev/null; }; then - # bail ASAP if "mongod" isn't even running - echo >&2 - echo >&2 "error: $originalArgOne does not appear to have stayed running -- perhaps it had an error?" - echo >&2 - exit 1 - fi - if "${mongo[@]}" 'admin' --eval 'quit(0)' &> /dev/null; then - # success! - break - fi - (( tries-- )) - if [ "$tries" -le 0 ]; then - echo >&2 - echo >&2 "error: $originalArgOne does not appear to have accepted connections quickly enough -- perhaps it had an error?" - echo >&2 - exit 1 - fi - sleep 1 - done - - if [ "$MONGO_INITDB_ROOT_USERNAME" ] && [ "$MONGO_INITDB_ROOT_PASSWORD" ]; then - rootAuthDatabase='admin' - - "${mongo[@]}" "$rootAuthDatabase" <<-EOJS - db.createUser({ - user: $(jq --arg 'user' "$MONGO_INITDB_ROOT_USERNAME" --null-input '$user'), - pwd: $(jq --arg 'pwd' "$MONGO_INITDB_ROOT_PASSWORD" --null-input '$pwd'), - roles: [ { role: 'root', db: $(jq --arg 'db' "$rootAuthDatabase" --null-input '$db') } ] - }) - EOJS - - mongo+=( - --username="$MONGO_INITDB_ROOT_USERNAME" - --password="$MONGO_INITDB_ROOT_PASSWORD" - --authenticationDatabase="$rootAuthDatabase" - ) - fi - - export MONGO_INITDB_DATABASE="${MONGO_INITDB_DATABASE:-test}" - - echo - for f in /docker-entrypoint-initdb.d/*; do - case "$f" in - *.sh) echo "$0: running $f"; . "$f" ;; - *.js) echo "$0: running $f"; "${mongo[@]}" "$MONGO_INITDB_DATABASE" "$f"; echo ;; - *) echo "$0: ignoring $f" ;; - esac - echo - done - - "$@" --pidfilepath="$pidfile" --shutdown - rm "$pidfile" - trap - EXIT - - echo - echo 'MongoDB init process complete; ready for start up.' - echo - fi - - unset "${!MONGO_INITDB_@}" -fi - -exec "$@" diff --git a/dockerhub/v0.9.0-alpha/baseimage/Dockerfile b/dockerhub/v0.9.0-beta/baseimage/Dockerfile similarity index 82% rename from dockerhub/v0.9.0-alpha/baseimage/Dockerfile rename to dockerhub/v0.9.0-beta/baseimage/Dockerfile index 5b4fbd3c1..ed3c2db74 100644 --- a/dockerhub/v0.9.0-alpha/baseimage/Dockerfile +++ b/dockerhub/v0.9.0-beta/baseimage/Dockerfile @@ -1,7 +1,7 @@ FROM busybox as downloader -RUN cd /tmp && wget -c https://github.com/hyperledger/cello/archive/v0.9.0-alpha.zip && \ - unzip v0.9.0-alpha.zip && mv cello-0.9.0-alpha cello +RUN cd /tmp && wget -c https://github.com/hyperledger/cello/archive/v0.9.0-beta.zip && \ + unzip v0.9.0-beta.zip && mv cello-0.9.0-beta cello FROM python:3.6 diff --git a/dockerhub/v0.9.0-alpha/baseimage/install.sh b/dockerhub/v0.9.0-beta/baseimage/install.sh similarity index 100% rename from dockerhub/v0.9.0-alpha/baseimage/install.sh rename to dockerhub/v0.9.0-beta/baseimage/install.sh diff --git a/dockerhub/v0.9.0-alpha/engine/Dockerfile b/dockerhub/v0.9.0-beta/engine/Dockerfile similarity index 82% rename from dockerhub/v0.9.0-alpha/engine/Dockerfile rename to dockerhub/v0.9.0-beta/engine/Dockerfile index 023be45d7..549068f2a 100644 --- a/dockerhub/v0.9.0-alpha/engine/Dockerfile +++ b/dockerhub/v0.9.0-beta/engine/Dockerfile @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -FROM hyperledger/cello-baseimage:x86_64-0.9.0-alpha +FROM hyperledger/cello-baseimage:x86_64-0.9.0-beta # use this in development CMD ["python", "restserver.py"] diff --git a/dockerhub/v0.9.0-alpha/operator-dashboard/Dockerfile b/dockerhub/v0.9.0-beta/operator-dashboard/Dockerfile similarity index 76% rename from dockerhub/v0.9.0-alpha/operator-dashboard/Dockerfile rename to dockerhub/v0.9.0-beta/operator-dashboard/Dockerfile index d9e49c50e..614a12a05 100644 --- a/dockerhub/v0.9.0-alpha/operator-dashboard/Dockerfile +++ b/dockerhub/v0.9.0-beta/operator-dashboard/Dockerfile @@ -4,11 +4,11 @@ # FROM node:8.9 as build_js MAINTAINER haitao yue "hightall@me.com" -RUN cd /tmp && git clone -b 'v0.9.0-alpha' --single-branch --depth 1 https://github.com/hyperledger/cello.git +RUN cd /tmp && git clone -b 'v0.9.0-beta' --single-branch --depth 1 https://github.com/hyperledger/cello.git RUN cp -r /tmp/cello/src/static /var/www RUN cd /var/www/dashboard && npm install && npm run build -FROM hyperledger/cello-baseimage:x86_64-0.9.0-alpha +FROM hyperledger/cello-baseimage:x86_64-0.9.0-beta COPY --from=build_js /var/www/dist /app/static/dist COPY --from=build_js /tmp/cello/src/celery.conf /etc/supervisor/conf.d/ diff --git a/dockerhub/v0.9.0-alpha/user-dashboard/Dockerfile b/dockerhub/v0.9.0-beta/user-dashboard/Dockerfile similarity index 97% rename from dockerhub/v0.9.0-alpha/user-dashboard/Dockerfile rename to dockerhub/v0.9.0-beta/user-dashboard/Dockerfile index 1d36025f2..e1d066ca2 100644 --- a/dockerhub/v0.9.0-alpha/user-dashboard/Dockerfile +++ b/dockerhub/v0.9.0-beta/user-dashboard/Dockerfile @@ -11,7 +11,7 @@ ENV FABRIC_VERSION_1_2 1.2.0 RUN cd /tmp && ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}') && \ echo $ARCH &&wget -c https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/${ARCH}-${FABRIC_VERSION_1_2}/hyperledger-fabric-${ARCH}-${FABRIC_VERSION_1_2}.tar.gz && \ mkdir fabric-1.2 && tar -zxvf hyperledger-fabric-${ARCH}-${FABRIC_VERSION_1_2}.tar.gz -C fabric-1.2 -RUN cd /tmp && wget -c https://github.com/hyperledger/cello/archive/v0.9.0-alpha.zip && unzip v0.9.0-alpha.zip && mv cello-0.9.0-alpha cello +RUN cd /tmp && wget -c https://github.com/hyperledger/cello/archive/v0.9.0-beta.zip && unzip v0.9.0-beta.zip && mv cello-0.9.0-beta cello FROM node:8.9 MAINTAINER haitao yue "hightall@me.com" diff --git a/dockerhub/v0.9.0-alpha/user-dashboard/package.json b/dockerhub/v0.9.0-beta/user-dashboard/package.json similarity index 100% rename from dockerhub/v0.9.0-alpha/user-dashboard/package.json rename to dockerhub/v0.9.0-beta/user-dashboard/package.json diff --git a/dockerhub/v0.9.0-alpha/user-dashboard/yarn.lock b/dockerhub/v0.9.0-beta/user-dashboard/yarn.lock similarity index 100% rename from dockerhub/v0.9.0-alpha/user-dashboard/yarn.lock rename to dockerhub/v0.9.0-beta/user-dashboard/yarn.lock diff --git a/dockerhub/v0.9.0-alpha/watchdog/Dockerfile b/dockerhub/v0.9.0-beta/watchdog/Dockerfile similarity index 73% rename from dockerhub/v0.9.0-alpha/watchdog/Dockerfile rename to dockerhub/v0.9.0-beta/watchdog/Dockerfile index e2b70bfcd..5f30163fe 100644 --- a/dockerhub/v0.9.0-alpha/watchdog/Dockerfile +++ b/dockerhub/v0.9.0-beta/watchdog/Dockerfile @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -FROM hyperledger/cello-baseimage:x86_64-0.9.0-alpha +FROM hyperledger/cello-baseimage:x86_64-0.9.0-beta # use this in development CMD ["python", "watchdog.py"] \ No newline at end of file diff --git a/docs/release_note.md b/docs/release_note.md index fc7524d6e..b61421c22 100644 --- a/docs/release_note.md +++ b/docs/release_note.md @@ -1,5 +1,27 @@ # Release Notes +## [v0.9.0-beta](https://github.com/hyperledger/cello/releases/tag/v0.9.0-beta) October 21, 2018 + +### Add new features +none + +### Improvement + +* Add tutorial for user dashboard; +* Add default parameters for invoke/query in user dashboard for example code; +* Support docker compose file dynamic generation; + +### Known Vulnerabilities +none + +### Resolved Vulnerabilities +* Fix Operator/User Dashboard bugs; + +### Known Issues & Workarounds + +* User system is very simple, need to improve; +* Kubernetes agent can't deploy fabric v1.2, and can't be used in user dashboard; + ## [v0.9.0-alpha](https://github.com/hyperledger/cello/releases/tag/v0.9.0-alpha) September 9, 2018 ### Add new features diff --git a/release_notes/v0.9.0-beta.txt b/release_notes/v0.9.0-beta.txt new file mode 100644 index 000000000..cb29de333 --- /dev/null +++ b/release_notes/v0.9.0-beta.txt @@ -0,0 +1,32 @@ +v0.9.0-beta https://github.com/hyperledger/cello/releases/tag/v0.9.0-beta October 21, 2018 +------------------------ + +Release Notes +------------- +Add new features + +none + +Improvement + +* Add tutorial for user dashboard; +* Add default parameters for invoke/query in user dashboard for example code; +* Support docker compose file dynamic generation; + +Known Vulnerabilities +--------------------- +none + +Resolved Vulnerabilities +------------------------ +* Fix Operator/User Dashboard bugs; + +Known Issues & Workarounds +-------------------------- +* User system is very simple, need to improve; +* Kubernetes agent can't deploy fabric v1.2, and can't be used in user dashboard; + + +Change Log +---------- +https://github.com/hyperledger/cello/blob/master/CHANGELOG.md#v090-beta \ No newline at end of file