Before getting on with your question, let me first tell you about the Hyperledger Fabric network entities:
-
Network peer - used to maintain chaincodes (smart contracts), keeps replicated copy of the the ledger and most recent status update.
-
Ordering service/ Consensus - key objective of it is to specify total order on incoming transactions and cut the block, which will be distributed among all peers.
In your case, I'd assume two instances simply means that you have two different organizations. So what you need to do is to:
-
Define/decide where you would like to run ordering service which will take care of transactions order.
-
Define a channel with two organizations
-
In configtx.yaml you need to specify the address of the ordering service.
-
Create a channel to generate genesis block
-
Join all peers for both organization using the genesis block
Now since ordering service endpoint is endcoded in configuration transaction each organization will elect one peer to open connection to the ordering service to pull new blocks. Finally this leader will distribute blocks inside its own organization.
So, to make two "instance" (here I assume independent set of peers) connected you need to make them connected to same channel moreover you need to make sure they will be connected to same ordering service.