A user wants to execute rich queries for a fabric network. He needs to integrate CouchDB with Fabric's network. He needs to create a container for CouchDB and map this container to services.After defining the service for this container, which of the following options does he need to define to map this container?depends_on:<br /> - couchdb0system:<br /> - couchdb1environment:<br /> -COUCHDB-USER=username<br /> -COUCHDB_PASSWORK=password<br /> -system=couchdb1environment:<br /> -COUCHDB-USER=username<br /> -COUCHDB_PASSWORK=password<br /> -depends_on=couchdb0
Question
A user wants to execute rich queries for a fabric network. He needs to integrate CouchDB with Fabric's network. He needs to create a container for CouchDB and map this container to services.After defining the service for this container, which of the following options does he need to define to map this container?depends_on:<br /> - couchdb0system:<br /> - couchdb1environment:<br /> -COUCHDB-USER=username<br /> -COUCHDB_PASSWORK=password<br /> -system=couchdb1environment:<br /> -COUCHDB-USER=username<br /> -COUCHDB_PASSWORK=password<br /> -depends_on=couchdb0
Solution
To map the CouchDB container to services in a Fabric network, the user needs to define the following options:
-
depends_on: This option is used to express dependency between services, which has two effects. First, docker-compose will start the services in dependency order. In this case, the service depends oncouchdb0. -
environment: This option is used to set environment variables. In this case, the user is setting the CouchDB username and password. The correct syntax should be:COUCHDB_USER=usernameCOUCHDB_PASSWORD=password
Please note that there seems to be a typo in your question. It should be COUCHDB_PASSWORD=password instead of COUCHDB_PASSWORK=password.
The system and depends_on=couchdb0 options you mentioned are not standard Docker Compose options and may not work as expected.
Similar Questions
After creating a sales-network application in Hyperledger Fabric, a user wants to enable the network for it and display its containers.Which of the following commands can he use for that?cd sales-network/<br /> ./network.sp start -ca -s couchdbcd sales-network/<br /> ./network.sp up -ca -s couchdbcd up sales-network/<br /> ./network.sp start -s -couchdb -cacd sales-network/<br /> ./network.sp up couchdb -ca -s
A user has created a fabric application named FABRIC-EXAMPLES. Here in the "docker-compose-ca.yaml" file in the "docker" folder, the configuration for certificate authority is defined. The file contains the services ca.org1, ca.org2 and ca.orderer.In the case of .org1 service, which of the following parameters are defined?(This question has multiple correct answers; choose all that apply)nameserviceimagenetworks
A user has created a fabric application named FABRIC-EXAMPLES. Here in the "docker-compose-ca.yaml" file in the "docker" folder, the configuration for certificate authority is defined. The file contains the services ca.org1, ca.org2 and ca.orderer.In the case of .org1 service, which of the following parameters are defined?(This question has multiple correct answers; choose all that apply)imagenameservicenetworks
A user has created a fabric application named FABRIC-EXAMPLES. Here in the "docker-compose-ca.yaml" file in the "docker" folder, the configuration for certificate authority is defined. The file contains the services ca.org1, ca.org2 and ca.orderer. The ca.org1 contains a command that is used to start the Fabric CA server inside the container.What is the correct syntax of this command?sh -c ‘fabric-ca-server start -b admin:adminpw -d’sh -c ‘fabric-ca-server enable -b -p admin:adminpw’sh -c ‘fabric-ca-server enable -p admin:adminpw -k’sh -c ‘fabric-ca-server start -p -p admin:adminpw’
While using Hyperledger Fabric, a user wants to define an asset named "vehicle" in chain code.Which of the following code formats can he use?Type Vehicle struct {<br /> Make string ‘json:”make”’ <br /> Category string ‘json:”category”’<br /> Model string ‘json:”model”’<br /> Color string ‘json:”color”’<br /> }Type Vehicle struct {<br /> String Make :”make” <br /> String Category :”category”<br /> String Model :”model”<br /> String Color: ”color”<br /> }Type Vehicle struct {<br /> String Make ‘xml:”make”’ <br /> String Category ‘xml:”category”’<br /> String Model ‘xml:”model”’<br /> String Color ‘xml:”color”’<br /> }Type Vehicle struct {<br /> Make string: “make” <br /> Category string: “category”<br /> Model string: “model”<br /> Color string: “color”<br /> }
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.