hyperledger-labs / fabric-operations-console

A UI for managing Fabric peers, orderers, and CAs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: The Compose file './docker/docker-compose-ca.yaml' is invalid

pvrbharg opened this issue · comments

ERROR: The Compose file './docker/docker-compose-ca.yaml' is invalid because:
networks.test value Additional properties are not allowed ('name' was unexpected)

git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

+++
git clone https://github.com/hyperledger-labs/fabric-operations-console.git
Cloning into 'fabric-operations-console'...
remote: Enumerating objects: 2269, done.
remote: Counting objects: 100% (2269/2269), done.
remote: Compressing objects: 100% (1295/1295), done.
remote: Total 2269 (delta 913), reused 2231 (delta 885), pack-reused 0
Receiving objects: 100% (2269/2269), 10.93 MiB | 30.16 MiB/s, done.
Resolving deltas: 100% (913/913), done.
hlbcadmin@ubuntu:/go/src/github.com/hyperledger-labs$ cd fabric-operations-console/
hlbcadmin@ubuntu:
/go/src/github.com/hyperledger-labs/fabric-operations-console$ ./scripts/setupNetwork.sh up

Clone hyperledger/fabric-samples repo

===> Cloning hyperledger/fabric-samples repo
Cloning into 'fabric-samples'...
remote: Enumerating objects: 8157, done.
remote: Counting objects: 100% (432/432), done.
remote: Compressing objects: 100% (297/297), done.
remote: Total 8157 (delta 163), reused 338 (delta 125), pack-reused 7725
Receiving objects: 100% (8157/8157), 4.88 MiB | 3.94 MiB/s, done.
Resolving deltas: 100% (4191/4191), done.
===> Checking out v2.2.3 of hyperledger/fabric-samples

Pull Hyperledger Fabric binaries

===> Downloading version 2.2.3 platform specific fabric binaries
===> Downloading: https://github.com/hyperledger/fabric/releases/download/v2.2.3/hyperledger-fabric-linux-amd64-2.2.3.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 649 100 649 0 0 3817 0 --:--:-- --:--:-- --:--:-- 3817
100 65.0M 100 65.0M 0 0 35.8M 0 0:00:01 0:00:01 --:--:-- 52.5M
==> Done.
===> Downloading version 1.4.9 platform specific fabric-ca-client binary
===> Downloading: https://github.com/hyperledger/fabric-ca/releases/download/v1.4.9/hyperledger-fabric-ca-linux-amd64-1.4.9.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 652 100 652 0 0 3704 0 --:--:-- --:--:-- --:--:-- 3683
100 23.6M 100 23.6M 0 0 23.9M 0 --:--:-- --:--:-- --:--:-- 23.9M
==> Done.

Pull Hyperledger Fabric docker images

FABRIC_IMAGES: peer orderer ccenv tools baseos
===> Pulling fabric Images
====> hyperledger/fabric-peer:2.2.3
2.2.3: Pulling from hyperledger/fabric-peer
339de151aab4: Pull complete
721cdf2c9709: Pull complete
3e1b621396b1: Pull complete
b0ca2de6e9c0: Pull complete
6bd83ab93b21: Pull complete
efe80f31681f: Pull complete
Digest: sha256:f3191ba7919b4f2447b0e70bd28f2aa0ecb6b951fea5dae27579cd5a6ac329ee
Status: Downloaded newer image for hyperledger/fabric-peer:2.2.3
docker.io/hyperledger/fabric-peer:2.2.3
====> hyperledger/fabric-orderer:2.2.3
2.2.3: Pulling from hyperledger/fabric-orderer
339de151aab4: Already exists
721cdf2c9709: Already exists
7b91f2ba445a: Pull complete
ef73fdd51241: Pull complete
ae00d5a38372: Pull complete
77e31b5f56e1: Pull complete
f9e0967304dd: Pull complete
Digest: sha256:e09ea991a0167d5b33005b3fc1bcde81097bace84b589049952a2cdd9aafea5a
Status: Downloaded newer image for hyperledger/fabric-orderer:2.2.3
docker.io/hyperledger/fabric-orderer:2.2.3
====> hyperledger/fabric-ccenv:2.2.3
2.2.3: Pulling from hyperledger/fabric-ccenv
801bfaa63ef2: Pull complete
ee0a1ba97153: Pull complete
1db7f31c0ee6: Pull complete
8142a84142b8: Pull complete
f9a026f75f34: Pull complete
84626c8c8cc5: Pull complete
5932c0410a68: Pull complete
2fbf26d75d8a: Pull complete
49c58f305caf: Pull complete
Digest: sha256:bbdf184bb928e9bfcfd1f6583f8d9962e440f867bcd2ce643bf6872534d04219
Status: Downloaded newer image for hyperledger/fabric-ccenv:2.2.3
docker.io/hyperledger/fabric-ccenv:2.2.3
====> hyperledger/fabric-tools:2.2.3
2.2.3: Pulling from hyperledger/fabric-tools
4c0d98bf9879: Pull complete
9e181322f1e7: Pull complete
6422294da7d3: Pull complete
8b36f00a8e74: Pull complete
5e5ebcc3e852: Pull complete
b7b2e7b41099: Pull complete
af3cf806481f: Pull complete
150a424667cc: Pull complete
Digest: sha256:2dca43950c30809d92663f4722f0e08d569f086646aaca1afdf89f8182ba2e66
Status: Downloaded newer image for hyperledger/fabric-tools:2.2.3
docker.io/hyperledger/fabric-tools:2.2.3
====> hyperledger/fabric-baseos:2.2.3
2.2.3: Pulling from hyperledger/fabric-baseos
339de151aab4: Already exists
721cdf2c9709: Already exists
12426a7dc558: Pull complete
Digest: sha256:eb43e230cf5b230bf24abd9f93ea22acf95cee4de27f31f944b28db65f2141bc
Status: Downloaded newer image for hyperledger/fabric-baseos:2.2.3
docker.io/hyperledger/fabric-baseos:2.2.3
===> Pulling fabric ca Image
====> hyperledger/fabric-ca:1.4.9
1.4.9: Pulling from hyperledger/fabric-ca
b8f262c62ec6: Pull complete
db9dbc6799b3: Pull complete
9c5c884a6020: Pull complete
370868734ec0: Pull complete
cbce57ae4cad: Pull complete
fc00299dbf2c: Pull complete
a1e42212f1ce: Pull complete
add0e148da22: Pull complete
Digest: sha256:28f50c6aa4f4642842e706d3ae6dcee181921d03bd30ab2a8b09b66e0349d92f
Status: Downloaded newer image for hyperledger/fabric-ca:1.4.9
docker.io/hyperledger/fabric-ca:1.4.9
===> List out hyperledger docker images
hyperledger/fabric-tools 2.2 b6acbfaac0ef 6 months ago 431MB
hyperledger/fabric-tools 2.2.3 b6acbfaac0ef 6 months ago 431MB
hyperledger/fabric-tools latest b6acbfaac0ef 6 months ago 431MB
hyperledger/fabric-peer 2.2 17cd44c37a94 6 months ago 52.6MB
hyperledger/fabric-peer 2.2.3 17cd44c37a94 6 months ago 52.6MB
hyperledger/fabric-peer latest 17cd44c37a94 6 months ago 52.6MB
hyperledger/fabric-orderer 2.2 345ca8c4b4b1 6 months ago 36.5MB
hyperledger/fabric-orderer 2.2.3 345ca8c4b4b1 6 months ago 36.5MB
hyperledger/fabric-orderer latest 345ca8c4b4b1 6 months ago 36.5MB
hyperledger/fabric-ccenv 2.2 bd77faf79f92 6 months ago 514MB
hyperledger/fabric-ccenv 2.2.3 bd77faf79f92 6 months ago 514MB
hyperledger/fabric-ccenv latest bd77faf79f92 6 months ago 514MB
hyperledger/fabric-baseos 2.2 f98af14c474f 6 months ago 6.86MB
hyperledger/fabric-baseos 2.2.3 f98af14c474f 6 months ago 6.86MB
hyperledger/fabric-baseos latest f98af14c474f 6 months ago 6.86MB
hyperledger/fabric-ca 1.4 dbbc768aec79 12 months ago 158MB
hyperledger/fabric-ca 1.4.9 dbbc768aec79 12 months ago 158MB
hyperledger/fabric-ca latest dbbc768aec79 12 months ago 158MB
Previous HEAD position was 5b8c439 Cleanup of register/enroll script
Branch 'release-2.2' set up to track remote branch 'release-2.2' from 'origin'.
Switched to a new branch 'release-2.2'
Creating channel 'mychannel'.
If network is not up, starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'couchdb with crypto from 'Certificate Authorities'
Bringing up network
LOCAL_VERSION=2.2.3
DOCKER_IMAGE_VERSION=2.2.3
CA_LOCAL_VERSION=1.4.9
CA_DOCKER_IMAGE_VERSION=1.4.9
Generating certificates using Fabric CA
ERROR: The Compose file './docker/docker-compose-ca.yaml' is invalid because:
networks.test value Additional properties are not allowed ('name' was unexpected)
+++

@pvrbharg can you check your docker-compose version? This is what I have and it works...

➜  ~ docker-compose -v
Docker Compose version v2.0.0

hlbcadmin@ubuntu:~$ docker info
Client:
Context: default
Debug Mode: false

Server:
Containers: 61
Running: 19
Paused: 0
Stopped: 42
Images: 21
Server Version: 20.10.7
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version:
runc version:
init version:
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.4.0-89-generic
Operating System: Ubuntu 20.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.61GiB
Name: ubuntu
ID: GYFQ:SBCP:6OUG:KLZN:TMKN:UKRX:LOYW:AKB6:NG6M:QYH7:45PD:2H26
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

hlbcadmin@ubuntu:~$ docker-compose -v
docker-compose version 1.25.0, build unknown

hlbcadmin@ubuntu:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Followed the pre-reqs listed here to install all the pre-reqs:
https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html

Also per my understanding - the current stable version of compose is - as stated below:

https://docs.docker.com/compose/install/

The instructions below outline installation of the current stable release (v1.29.2) of Compose. To install a different version of Compose, replace the given release number with the one that you want. For instructions to install Compose 2.0.0 on Linux, see Install Compose 2.0.0 on Linux.

Compose releases are also listed and available for direct download on the Compose repository release page on GitHub. To install a pre-release of Compose, refer to the install pre-release builds section.

@varadgit Thank you! Worked when I moved m docker-compose to v2.0.1 [current and stable within V2].

All is well now and the key here is - we need to make sure correct version of docker-compose tool is installed - otherwise we would see broken code.

Docker Compose V1 or Docker Compose V2 - https://docs.docker.com/compose/cli-command/#install-on-linux
Compose Switch can also help but we need to make sure we document pre-reqs to avoid breakages.

+++
./scripts/setupConsole.sh up
WARN[0000] Found orphan containers ([proxy.orderer.example.com proxy.peer0.org2.example.com proxy.peer0.org1.example.com]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
[+] Running 3/3
⠿ Container fabric-console Started 2.6s
⠿ Container configtxlator Started 2.6s
⠿ Container console-couchdb Started 2.5s
WARN[0000] Found orphan containers ([console-couchdb fabric-console configtxlator]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
[+] Running 3/3
⠿ Container proxy.peer0.org2.example.com Started 1.0s
⠿ Container proxy.orderer.example.com Started 1.5s
⠿ Container proxy.peer0.org1.example.com Started 1.5s

hlbcadmin@ubuntu:~/go/src/github.com/hyperledger-labs/fabric-operations-console$ docker-compose -v
Docker Compose version v2.0.1
+++

@pvrbharg thanks for the feedback... added docker compose version to pre-req
#68

PR pushed for doc update - closing