Create the configuration file for the IBM MQ Bridge to blockchain
Enter your queue manager and your blockchain network parameters to create the configuration file for the IBM MQ Bridge to blockchain to connect to your IBM MQ and IBM Blockchain networks.
Before starting
- You created and configured your blockchain network.
- We have the credentials file from your blockchain network.
- You installed the IBM MQ Bridge to blockchain, on your x86 Linux environment.
- You started the IBM MQ Advanced queue manager.
About this task
This task takes you through the minimal setup that is needed to create the IBM MQ Bridge to blockchain configuration file and successfully connect to your IBM Blockchain and IBM MQ networks.
We can use the bridge to connect to blockchain networks that are based on Hyperledger Fabric v1.4 architecture. To use the bridge, we need configuration information from your blockchain network. In each step in this task we can find example configuration details that are based on two differently configured blockchain networks:
- Hyperledger Fabric network that runs in Docker. For more information, see Getting started with Hyperledger Fabric, Writing your first application, and Example Hyperledger Fabric network credentials file.
- Hyperledger Fabric network that runs in a Kubernetes cluster in IBM Cloud. For more information, see Develop in a cloud sandbox on IBM Blockchain Platform.
For more information on the meaning and options for all the IBM MQ Bridge to blockchain parameters, see the runmqbcb command. You must consider your own security requirements and customize the parameters appropriate to your deployment.
Procedure
- Run the bridge to create a configuration file. You need the parameters from your blockchain network credentials file and from the IBM MQ Advanced queue manager.
runmqbcb -o config_file_name.cfgAs the following example illustrates, the existing values are shown inside the brackets. Press Enter to accept existing values, press Space then Enter to clear values, and type inside the brackets then press Enter to add new values. You can separate lists of values (such as peers) by commas, or by entering each value on a new line. A blank line ends the list.Note: We cannot edit the existing values. We can keep, replace, or clear them.- Enter values for the connection to the IBM MQ Advanced queue manager. Minimum values that are needed for the connection are the queue manager name, the names of the bridge input and identity queues that you defined. For connections to remote queue managers, you also need MQ Channel and MQ Conname (host address and port where the queue manager is running). To use TLS for connecting to IBM MQ in step 4, you must use JNDI or CCDT and specify MQ CCDT URL or JNDI implementation class and JNDI provider URL accordingly.
Connection to Queue Manager --------------------------- Queue Manager : [adv_qmgr_name] Bridge Input Queue : [APPL1.BLOCKCHAIN.INPUT.QUEUE] Bridge User Identity Queue : [SYSTEM.BLOCKCHAIN.IDENTITY.QUEUE] MQ Channel : [] MQ Conname : [] MQ CCDT URL : [] JNDI implementation class : [com.sun.jndi.fscontext.RefFSContextFactory] JNDI provider URL : [] MQ Userid : [] MQ Password : []- 13. Enter the Hyperledger Fabric server credentials for your network. Examples of what we should expect are shown in the following code:
Fabric Server -------------- Network configuration file : []connection-tls.json Wallet : [] User Name : []User1 Certificate : []<path_to_user_certificate> Private Key : []<path_to_private_key>/private_key.pem Organisation : []Org1MSP- Enter certificate stores values for TLS connections. Leave this area blank if you have none.
Certificate stores for MQ TLS connections ---------------------------------------- Personal keystore : [] Keystore password : [] Trusted store for signer certs : [] Trusted store password : []- Enter the path of the logfile where the bridge logs are to be written.
Behaviour of bridge program --------------------------- Runtime logfile for copy of stdout/stderr : []bridgelog.log Number of logfiles : [3] Maximum size of each logfile (bytes) : [2097152]Attention: Previously, details regarding the Peers, Orderers, and the Certificate Authority were stored in this bridge setup. However, this information is now stored in the Network Configuration File, which is linked to in the Hyperledger Fabric server section of the setup.
Results
You created the configuration file that the IBM MQ Bridge to blockchain uses to connect to the IBM Blockchain network and to the IBM MQ Advanced queue manager.
What to do next
Work through the steps for Running the IBM MQ Bridge to blockchain. Parent topic: Configure IBM MQ for use with blockchain