IBM-Blockchain-Archive / ibm-container-service

IBM Blockchain Platform for Developers on IBM Container Service
Apache License 2.0
89 stars 73 forks source link

Card Import Host Names looks wrong #110

Closed rischioto closed 6 years ago

rischioto commented 6 years ago

The Host Names (URL) in the composer-card-import.yaml looks to be wrong:

........
            "peer0.org1.example.com": {
                "url": "grpc://localhost:7051",
                "eventUrl": "grpc://localhost:7053"
.....
          "ca.org1.example.com": {
              "url": "http://localhost:7054",
.....
            "orderer.example.com": {
              "url": "grpc://localhost:7050"
.....      

I believe that this URL should be point to the host names defined in the blockchain service file such as:

blockchain-org1peer1:30110 and 30111
blockchain-ca:30054
blockchain-orderer:31010
timroster commented 6 years ago

Agree - and because the connection.json created with these values is used in the composer card import, this is causing the chaincode instantiation pod to fail. Updating to the values you suggested:

- name: K8S_PROFILE
      value: >
        {
          "name": "hlfv1",
          "x-type": "hlfv1",
          "version": "1.0.0",
          "peers": {
            "peer0.org1.example.com": {
                "url": "grpc://blockchain-org1peer1:30110",
                "eventUrl": "grpc://blockchain-org1peer1:30111"
              }
            },
          "certificateAuthorities": {
            "ca.org1.example.com": {
              "url": "http://blockchain-ca:30054",
              "caName": "CA1"
            }
          },
          "orderers": {
            "orderer.example.com": {
              "url": "grpc://blockchain-orderer:31010"
            }
          },
       ...

I am now seeing the create_all.sh script run through to completion including successful exit of the chaincodeinstantiate pod.

Edit: After hitting problems in the composer playground after deploying a network, I reviewed the configuration used in the sampleconfig\cas\org1\ca.yaml and it appears that the correct name to use is CA1 to access ca.org1.example.com from the fabric-ca server instance.

sstone1 commented 6 years ago

Looks resolved; if not, Composer support has been removed anyway.