Using Minifab How do I Control Which Peers/Orgs get Added to a Channel?


Brett Tiller
 

Using minifab I have the spec.yaml file shown below to create my network.  What I’d like to do is to have each fleet have its own channel, and each channel is used to communicate only with cars that have joined that channel.  There is an overall Car Operations Center (COC) which should have a channel to communicate just with the fleets that have joined it.  Cars should be able to move to other fleets so can effectively change channels.   My commands to set up the network, to join the channels (I’ve tried both join and orgjoin subcommands), are below.

 

What I’ve found is that regardless of my command changes that all nodes are being assigned to each channel which I see in each channel profile.  See below. The limitations I’m seeing with Minifab prevent me from using it to complete the requirements above.

  1. Main issue is that I cannot add/remove specific peers
    1. Does not allow a specific set of peers/org to be assigned to a particular channel.  Instead all peers are assigned to channels when using either sub command join/orgjoin,   When a channel is created, It's profile already shows all peers assigned even when sub commands join/orgjoin have not been applied.
    2. The Minifab file structure does not support running the peer binary from local computer as its order does not match the expected format.
    3. Removing peers is not possible because the peer binary cannot be run locally.  As a result the peer commands must be run from within the container, but removing the peer from a channel first requires that the peer is shutdown which shuts down the container.

 

Question: Am I missing something or does minifab currently not provide the features I need to complete my requirements??

 

spec.yaml

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

 

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "car111.fleet11.coc1.cars.com"

  - "car112.fleet11.coc1.cars.com"

  - "car113.fleet11.coc1.cars.com"

  - "fleet12.coc1.cars.com"

  - "car121.fleet12.coc1.cars.com"

  - "car122.fleet12.coc1.cars.com"

  - "car123.fleet12.coc1.cars.com"

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

minifab commands

echo Stopping the network

./minifab cleanup -o coc1.cars.com

echo Starting the Fabric network

./minifab netup -o coc1.cars.com -c coc1channel -s couchdb  -i 2.4.5 -e 7400

./minifab create -c coc1channel

./minifab orgjoin

./minifab create -c fleet11channel -o fleet11.coc1.cars.com

./minifab orgjoin

./minifab create -c fleet12channel -o fleet12.coc1.cars.com

./minifab orgjoin

./minifab profilegen -c coc1channel -o coc1.cars.com

./minifab profilegen -c fleet11channel -o fleet11.coc1.cars.com

./minifab profilegen -c fleet12channel -o fleet12.coc1.cars.com

 

Channel profile Snippets

 

Coc1channel

"channels": {

    "coc1channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Fleet11channel

  "channels": {

    "fleet11channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Fleet12channel

  "channels": {

   "fleet12channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Brett Tiller

Sr. Software Engineer

984-349-4239 (mobile)

btiller@...

 

https://www.linkedin.com/company/securboration

 


email4tong@gmail.com
 

Bret, you did not miss anything. Minifab was designed to make things easier so that when adding peers to a channel, all the peers available in the spec.yaml file will be added, however, you probably can change the spec.yaml file (only contains needed peers) when adding peers to a channel maybe? I have not tried that myself, but give it a try and see if that actually works. Thanks.

On Monday, July 18, 2022, 02:41:36 PM EDT, Brett Tiller <btiller@...> wrote:


Using minifab I have the spec.yaml file shown below to create my network.  What I’d like to do is to have each fleet have its own channel, and each channel is used to communicate only with cars that have joined that channel.  There is an overall Car Operations Center (COC) which should have a channel to communicate just with the fleets that have joined it.  Cars should be able to move to other fleets so can effectively change channels.   My commands to set up the network, to join the channels (I’ve tried both join and orgjoin subcommands), are below.

 

What I’ve found is that regardless of my command changes that all nodes are being assigned to each channel which I see in each channel profile.  See below. The limitations I’m seeing with Minifab prevent me from using it to complete the requirements above.

  1. Main issue is that I cannot add/remove specific peers
    1. Does not allow a specific set of peers/org to be assigned to a particular channel.  Instead all peers are assigned to channels when using either sub command join/orgjoin,   When a channel is created, It's profile already shows all peers assigned even when sub commands join/orgjoin have not been applied.
    2. The Minifab file structure does not support running the peer binary from local computer as its order does not match the expected format.
    3. Removing peers is not possible because the peer binary cannot be run locally.  As a result the peer commands must be run from within the container, but removing the peer from a channel first requires that the peer is shutdown which shuts down the container.

 

Question: Am I missing something or does minifab currently not provide the features I need to complete my requirements??

 

spec.yaml

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

 

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "car111.fleet11.coc1.cars.com"

  - "car112.fleet11.coc1.cars.com"

  - "car113.fleet11.coc1.cars.com"

  - "fleet12.coc1.cars.com"

  - "car121.fleet12.coc1.cars.com"

  - "car122.fleet12.coc1.cars.com"

  - "car123.fleet12.coc1.cars.com"

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

minifab commands

echo Stopping the network

./minifab cleanup -o coc1.cars.com

echo Starting the Fabric network

./minifab netup -o coc1.cars.com -c coc1channel -s couchdb  -i 2.4.5 -e 7400

./minifab create -c coc1channel

./minifab orgjoin

./minifab create -c fleet11channel -o fleet11.coc1.cars.com

./minifab orgjoin

./minifab create -c fleet12channel -o fleet12.coc1.cars.com

./minifab orgjoin

./minifab profilegen -c coc1channel -o coc1.cars.com

./minifab profilegen -c fleet11channel -o fleet11.coc1.cars.com

./minifab profilegen -c fleet12channel -o fleet12.coc1.cars.com

 

Channel profile Snippets

 

Coc1channel

"channels": {

    "coc1channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Fleet11channel

  "channels": {

    "fleet11channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Fleet12channel

  "channels": {

   "fleet12channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Brett Tiller

Sr. Software Engineer

984-349-4239 (mobile)

btiller@...

 

https://www.linkedin.com/company/securboration

 


Brett Tiller
 

Tong,

 

Thanks for your response.  Unfortunately, changing the spec.yaml file causes errors.   I initially ran with the following commands with a smaller spec.yaml file – see spec.yaml 1.  The commands ran properly after I changed orgjoin to join to get around error: # New org join request file vars/NewOrgJoinRequest.json does not exists

 

./minifab cleanup -o coc1.cars.com

echo Starting the Fabric network

./minifab netup -o coc1.cars.com -c coc1channel -s couchdb  -i 2.4.5 -e 7400

./minifab create -c coc1channel

./minifab join

./minifab profilegen -c coc1channel -o coc1.cars.com

 

I then attempted to run three more commands – see below.  However the system apparently does not recognize the change I made in spec.yaml as the organization fleet11.coc1.cars.com is not recognized.  I received error during the channel creation: Default option org is fleet11.coc1.cars.com which does not exist in your spec, use -o to specify one

 

./minifab create -c fleet11channel -o fleet11.coc1.cars.com

./minifab join

./minifab profilegen -c fleet11channel -o fleet11.coc1.cars.com

 

spec.yaml 1

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "fleet12.coc1.cars.com"

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

 

spec.yaml 2

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "car111.fleet11.coc1.cars.com"

  - "car112.fleet11.coc1.cars.com"

  - "car113.fleet11.coc1.cars.com"

 

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

 

Brett Tiller

Sr. Software Engineer

984-349-4239 (mobile)

btiller@...

 

https://www.linkedin.com/company/securboration

 

From: email4tong@... <email4tong@...>
Sent: Monday, July 18, 2022 2:48 PM
To: fabric@...; Brett Tiller <btiller@...>
Subject: Re: [Hyperledger Fabric] Using Minifab How do I Control Which Peers/Orgs get Added to a Channel?

 

Bret, you did not miss anything. Minifab was designed to make things easier so that when adding peers to a channel, all the peers available in the spec.yaml file will be added, however, you probably can change the spec.yaml file (only contains needed peers) when adding peers to a channel maybe? I have not tried that myself, but give it a try and see if that actually works. Thanks.

 

On Monday, July 18, 2022, 02:41:36 PM EDT, Brett Tiller <btiller@...> wrote:

 

 

Using minifab I have the spec.yaml file shown below to create my network.  What I’d like to do is to have each fleet have its own channel, and each channel is used to communicate only with cars that have joined that channel.  There is an overall Car Operations Center (COC) which should have a channel to communicate just with the fleets that have joined it.  Cars should be able to move to other fleets so can effectively change channels.   My commands to set up the network, to join the channels (I’ve tried both join and orgjoin subcommands), are below.

 

What I’ve found is that regardless of my command changes that all nodes are being assigned to each channel which I see in each channel profile.  See below. The limitations I’m seeing with Minifab prevent me from using it to complete the requirements above.

  1. Main issue is that I cannot add/remove specific peers
    1. Does not allow a specific set of peers/org to be assigned to a particular channel.  Instead all peers are assigned to channels when using either sub command join/orgjoin,   When a channel is created, It's profile already shows all peers assigned even when sub commands join/orgjoin have not been applied.
    2. The Minifab file structure does not support running the peer binary from local computer as its order does not match the expected format.
    3. Removing peers is not possible because the peer binary cannot be run locally.  As a result the peer commands must be run from within the container, but removing the peer from a channel first requires that the peer is shutdown which shuts down the container.

 

Question: Am I missing something or does minifab currently not provide the features I need to complete my requirements??

 

spec.yaml

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

 

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "car111.fleet11.coc1.cars.com"

  - "car112.fleet11.coc1.cars.com"

  - "car113.fleet11.coc1.cars.com"

  - "fleet12.coc1.cars.com"

  - "car121.fleet12.coc1.cars.com"

  - "car122.fleet12.coc1.cars.com"

  - "car123.fleet12.coc1.cars.com"

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

minifab commands

echo Stopping the network

./minifab cleanup -o coc1.cars.com

echo Starting the Fabric network

./minifab netup -o coc1.cars.com -c coc1channel -s couchdb  -i 2.4.5 -e 7400

./minifab create -c coc1channel

./minifab orgjoin

./minifab create -c fleet11channel -o fleet11.coc1.cars.com

./minifab orgjoin

./minifab create -c fleet12channel -o fleet12.coc1.cars.com

./minifab orgjoin

./minifab profilegen -c coc1channel -o coc1.cars.com

./minifab profilegen -c fleet11channel -o fleet11.coc1.cars.com

./minifab profilegen -c fleet12channel -o fleet12.coc1.cars.com

 

Channel profile Snippets

 

Coc1channel

"channels": {

    "coc1channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Fleet11channel

  "channels": {

    "fleet11channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Fleet12channel

  "channels": {

   "fleet12channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Brett Tiller

Sr. Software Engineer

984-349-4239 (mobile)

btiller@...

 

https://www.linkedin.com/company/securboration

 

Message Sender is EXTERNAL to Securboration. Carefully examine this message before you open any links or attachments.


email4tong@gmail.com
 

hmmm. in that case, I think that a new feature probably is needed to allow a single peer join a channel without touching spec.yaml file.

On Monday, July 18, 2022, 03:56:19 PM EDT, Brett Tiller <btiller@...> wrote:


Tong,

 

Thanks for your response.  Unfortunately, changing the spec.yaml file causes errors.   I initially ran with the following commands with a smaller spec.yaml file – see spec.yaml 1.  The commands ran properly after I changed orgjoin to join to get around error: # New org join request file vars/NewOrgJoinRequest.json does not exists

 

./minifab cleanup -o coc1.cars.com

echo Starting the Fabric network

./minifab netup -o coc1.cars.com -c coc1channel -s couchdb  -i 2.4.5 -e 7400

./minifab create -c coc1channel

./minifab join

./minifab profilegen -c coc1channel -o coc1.cars.com

 

I then attempted to run three more commands – see below.  However the system apparently does not recognize the change I made in spec.yaml as the organization fleet11.coc1.cars.com is not recognized.  I received error during the channel creation: Default option org is fleet11.coc1.cars.com which does not exist in your spec, use -o to specify one

 

./minifab create -c fleet11channel -o fleet11.coc1.cars.com

./minifab join

./minifab profilegen -c fleet11channel -o fleet11.coc1.cars.com

 

spec.yaml 1

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "fleet12.coc1.cars.com"

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

 

spec.yaml 2

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "car111.fleet11.coc1.cars.com"

  - "car112.fleet11.coc1.cars.com"

  - "car113.fleet11.coc1.cars.com"

 

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

 

Brett Tiller

Sr. Software Engineer

984-349-4239 (mobile)

btiller@...

 

https://www.linkedin.com/company/securboration

 

From: email4tong@... <email4tong@...>
Sent: Monday, July 18, 2022 2:48 PM
To: fabric@...; Brett Tiller <btiller@...>
Subject: Re: [Hyperledger Fabric] Using Minifab How do I Control Which Peers/Orgs get Added to a Channel?

 

Bret, you did not miss anything. Minifab was designed to make things easier so that when adding peers to a channel, all the peers available in the spec.yaml file will be added, however, you probably can change the spec.yaml file (only contains needed peers) when adding peers to a channel maybe? I have not tried that myself, but give it a try and see if that actually works. Thanks.

 

On Monday, July 18, 2022, 02:41:36 PM EDT, Brett Tiller <btiller@...> wrote:

 

 

Using minifab I have the spec.yaml file shown below to create my network.  What I’d like to do is to have each fleet have its own channel, and each channel is used to communicate only with cars that have joined that channel.  There is an overall Car Operations Center (COC) which should have a channel to communicate just with the fleets that have joined it.  Cars should be able to move to other fleets so can effectively change channels.   My commands to set up the network, to join the channels (I’ve tried both join and orgjoin subcommands), are below.

 

What I’ve found is that regardless of my command changes that all nodes are being assigned to each channel which I see in each channel profile.  See below. The limitations I’m seeing with Minifab prevent me from using it to complete the requirements above.

  1. Main issue is that I cannot add/remove specific peers
    1. Does not allow a specific set of peers/org to be assigned to a particular channel.  Instead all peers are assigned to channels when using either sub command join/orgjoin,   When a channel is created, It's profile already shows all peers assigned even when sub commands join/orgjoin have not been applied.
    2. The Minifab file structure does not support running the peer binary from local computer as its order does not match the expected format.
    3. Removing peers is not possible because the peer binary cannot be run locally.  As a result the peer commands must be run from within the container, but removing the peer from a channel first requires that the peer is shutdown which shuts down the container.

 

Question: Am I missing something or does minifab currently not provide the features I need to complete my requirements??

 

spec.yaml

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

 

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "car111.fleet11.coc1.cars.com"

  - "car112.fleet11.coc1.cars.com"

  - "car113.fleet11.coc1.cars.com"

  - "fleet12.coc1.cars.com"

  - "car121.fleet12.coc1.cars.com"

  - "car122.fleet12.coc1.cars.com"

  - "car123.fleet12.coc1.cars.com"

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

minifab commands

echo Stopping the network

./minifab cleanup -o coc1.cars.com

echo Starting the Fabric network

./minifab netup -o coc1.cars.com -c coc1channel -s couchdb  -i 2.4.5 -e 7400

./minifab create -c coc1channel

./minifab orgjoin

./minifab create -c fleet11channel -o fleet11.coc1.cars.com

./minifab orgjoin

./minifab create -c fleet12channel -o fleet12.coc1.cars.com

./minifab orgjoin

./minifab profilegen -c coc1channel -o coc1.cars.com

./minifab profilegen -c fleet11channel -o fleet11.coc1.cars.com

./minifab profilegen -c fleet12channel -o fleet12.coc1.cars.com

 

Channel profile Snippets

 

Coc1channel

"channels": {

    "coc1channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Fleet11channel

  "channels": {

    "fleet11channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Fleet12channel

  "channels": {

   "fleet12channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Brett Tiller

Sr. Software Engineer

984-349-4239 (mobile)

btiller@...

 

https://www.linkedin.com/company/securboration

 

Message Sender is EXTERNAL to Securboration. Carefully examine this message before you open any links or attachments.


Brett Tiller
 

Tong,

 

Adding and removing a single peer to/from a channel using the minifab would help alot.

 

Brett Tiller

Sr. Software Engineer

984-349-4239 (mobile)

btiller@...

 

https://www.linkedin.com/company/securboration

 

From: email4tong@... <email4tong@...>
Sent: Monday, July 18, 2022 4:15 PM
To: fabric@...; Brett Tiller <btiller@...>
Subject: Re: [Hyperledger Fabric] Using Minifab How do I Control Which Peers/Orgs get Added to a Channel?

 

hmmm. in that case, I think that a new feature probably is needed to allow a single peer join a channel without touching spec.yaml file.

 

On Monday, July 18, 2022, 03:56:19 PM EDT, Brett Tiller <btiller@...> wrote:

 

 

Tong,

 

Thanks for your response.  Unfortunately, changing the spec.yaml file causes errors.   I initially ran with the following commands with a smaller spec.yaml file – see spec.yaml 1.  The commands ran properly after I changed orgjoin to join to get around error: # New org join request file vars/NewOrgJoinRequest.json does not exists

 

./minifab cleanup -o coc1.cars.com

echo Starting the Fabric network

./minifab netup -o coc1.cars.com -c coc1channel -s couchdb  -i 2.4.5 -e 7400

./minifab create -c coc1channel

./minifab join

./minifab profilegen -c coc1channel -o coc1.cars.com

 

I then attempted to run three more commands – see below.  However the system apparently does not recognize the change I made in spec.yaml as the organization fleet11.coc1.cars.com is not recognized.  I received error during the channel creation: Default option org is fleet11.coc1.cars.com which does not exist in your spec, use -o to specify one

 

./minifab create -c fleet11channel -o fleet11.coc1.cars.com

./minifab join

./minifab profilegen -c fleet11channel -o fleet11.coc1.cars.com

 

spec.yaml 1

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "fleet12.coc1.cars.com"

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

 

spec.yaml 2

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "car111.fleet11.coc1.cars.com"

  - "car112.fleet11.coc1.cars.com"

  - "car113.fleet11.coc1.cars.com"

 

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

 

Brett Tiller

Sr. Software Engineer

984-349-4239 (mobile)

btiller@...

 

https://www.linkedin.com/company/securboration

 

From: email4tong@... <email4tong@...>
Sent: Monday, July 18, 2022 2:48 PM
To: fabric@...; Brett Tiller <btiller@...>
Subject: Re: [Hyperledger Fabric] Using Minifab How do I Control Which Peers/Orgs get Added to a Channel?

 

Bret, you did not miss anything. Minifab was designed to make things easier so that when adding peers to a channel, all the peers available in the spec.yaml file will be added, however, you probably can change the spec.yaml file (only contains needed peers) when adding peers to a channel maybe? I have not tried that myself, but give it a try and see if that actually works. Thanks.

 

On Monday, July 18, 2022, 02:41:36 PM EDT, Brett Tiller <btiller@...> wrote:

 

 

Using minifab I have the spec.yaml file shown below to create my network.  What I’d like to do is to have each fleet have its own channel, and each channel is used to communicate only with cars that have joined that channel.  There is an overall Car Operations Center (COC) which should have a channel to communicate just with the fleets that have joined it.  Cars should be able to move to other fleets so can effectively change channels.   My commands to set up the network, to join the channels (I’ve tried both join and orgjoin subcommands), are below.

 

What I’ve found is that regardless of my command changes that all nodes are being assigned to each channel which I see in each channel profile.  See below. The limitations I’m seeing with Minifab prevent me from using it to complete the requirements above.

  1. Main issue is that I cannot add/remove specific peers
    1. Does not allow a specific set of peers/org to be assigned to a particular channel.  Instead all peers are assigned to channels when using either sub command join/orgjoin,   When a channel is created, It's profile already shows all peers assigned even when sub commands join/orgjoin have not been applied.
    2. The Minifab file structure does not support running the peer binary from local computer as its order does not match the expected format.
    3. Removing peers is not possible because the peer binary cannot be run locally.  As a result the peer commands must be run from within the container, but removing the peer from a channel first requires that the peer is shutdown which shuts down the container.

 

Question: Am I missing something or does minifab currently not provide the features I need to complete my requirements??

 

spec.yaml

fabric:

  cas:

  - "ca1.cars.com"

  - "ca1.coc1.cars.com"

 

  peers:

# COC

  - "fleet11.coc1.cars.com"

  - "car111.fleet11.coc1.cars.com"

  - "car112.fleet11.coc1.cars.com"

  - "car113.fleet11.coc1.cars.com"

  - "fleet12.coc1.cars.com"

  - "car121.fleet12.coc1.cars.com"

  - "car122.fleet12.coc1.cars.com"

  - "car123.fleet12.coc1.cars.com"

orderers:

  - "orderer1.cars.com"

  - "orderer2.cars.com"

  - "orderer3.cars.com"

settings:

    ca:

      FABRIC_LOGGING_SPEC: DEBUG

    peers:

      FABRIC_LOGGING_SPEC: DEBUG

    orderer:

      FABRIC_LOGGING_SPEC: DEBUG

netname: "cocnet"

 

minifab commands

echo Stopping the network

./minifab cleanup -o coc1.cars.com

echo Starting the Fabric network

./minifab netup -o coc1.cars.com -c coc1channel -s couchdb  -i 2.4.5 -e 7400

./minifab create -c coc1channel

./minifab orgjoin

./minifab create -c fleet11channel -o fleet11.coc1.cars.com

./minifab orgjoin

./minifab create -c fleet12channel -o fleet12.coc1.cars.com

./minifab orgjoin

./minifab profilegen -c coc1channel -o coc1.cars.com

./minifab profilegen -c fleet11channel -o fleet11.coc1.cars.com

./minifab profilegen -c fleet12channel -o fleet12.coc1.cars.com

 

Channel profile Snippets

 

Coc1channel

"channels": {

    "coc1channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Fleet11channel

  "channels": {

    "fleet11channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Fleet12channel

  "channels": {

   "fleet12channel": {

      "orderers": [

        "orderer1.cars.com",

        "orderer2.cars.com",

        "orderer3.cars.com"

      ],

      "peers": {

        "fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car111.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car112.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car113.fleet11.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car121.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car122.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        },

        "car123.fleet12.coc1.cars.com": {

          "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true

        }

      }

    }

  }

 

Brett Tiller

Sr. Software Engineer

984-349-4239 (mobile)

btiller@...

 

https://www.linkedin.com/company/securboration

 

Message Sender is EXTERNAL to Securboration. Carefully examine this message before you open any links or attachments.

Message Sender is EXTERNAL to Securboration. Carefully examine this message before you open any links or attachments.