0

I'm trying to deploy a composer-rest-server on IBM cloud, unfortunately, I'm facing many errors and so far I couldn't find solutions online.

I used this tutorial for the deployment: https://www.ibm.com/developerworks/cloud/library/cl-deploy-blockchain-starter-plan-network/index.html

  1. I'm not using the sample artifacts, I'm connecting to my own artifacts.

The first error I face is that when I run thcommand: : cf login -a https://api.ng.bluemix.net --sso
and then : cf push car-auction --docker-image ibmblockchain/composer-rest-server:0.19.5 \-c "composer-rest-server -c admin@carauction-network -n never -w true" \-i 1 -m 256M --no-start --no-manifest

I have this error: No org targeted, use 'cf target -o ORG' to target an Org. FAILED.

Well after some research I figure another way to solve this which goes like that: https://developer.ibm.com/answers/questions/166972/no-org-and-space-targeted-use-cf-target-o-org-s-sp.html 1.cf api https://api.eu-gb.bluemix.net 2.cf login

So finally I have org and space already defined. Moving on ...

3.Repeat the following command : cf push car-auction --docker-image ibmblockchain/composer-rest-server:0.19.5 \-c "composer-rest-server -c admin@carauction-network -n never -w true" \-i 1 -m 256M --no-start --no-manifest

the output looks fine :

    Getting app info...

Updating the app with these attributes... name: xxxx docker image: ibmblockchain/composer-rest-server:0.19.5 command: composer-rest-server -c admin@xxxx -n never -w true disk quota: 1G health check type: port instances: 1 memory: 256M stack: cflinuxfs2 env: NODE_CONFIG routes: xxxx.eu-gb.mybluemix.net

Updating app xxxx... Mapping routes...

name: xxxx requested state: stopped routes: xxxx.eu-gb.mybluemix.net last uploaded: Fri 24 Aug 15:44:21 CEST 2018 stack:
docker image: ibmblockchain/composer-rest-server:0.19.5

type: web instances: 0/1 memory usage: 256M start command: composer-rest-server -c admin@xxxx -n never -w true

There are no running instances of this process.

  1. I run this : cf set-env xxxx NODE_CONFIG "${NODE_CONFIG}"

earlier on the tutorial, I did the export already with the local card-store file.

  1. Finally when I run: cf start car-auction I got the big error or rather the multiple errors.

In the beginning I had an error like that :

An application must be listening on the right port. Instead of hardcoding the port, use the $PORT environment variable

well Idk why but sometimes the error change for "card not found, the installation fails etc...

well I do composer-rest-server and I use the exact same card I'm using on the deployment and it works perfectly. It seems not stable at all and I'm sincerely blocked on that. If someone knows how to deal with all that I appreciate.

Paris Mollo
  • 23
  • 1
  • 4

1 Answers1

0

I would recommend asking directly in the comment section below that referenced tutorial. The authors are responding to questions and there is a technical discussion.

In your case it seems that the tutorial has been updated which fixed an issue.

data_henrik
  • 16,724
  • 2
  • 28
  • 49