Could not deploy business network to hyperledger fabric beta using composer - hyperledger-composer

I have tried to deploy a business network using composer to but it fails with the following error
Error: event message must be properly signed by an identity from the same organization as the peer: [Expected MSP ID Org1MSP, received ]]
what is the problem ?

There are several reasons why you might get this error
You are not running composer v0.8.0 or higher. You can check what level you are running by invoking the command
composer -v
You haven't specified a valid hlfv1 profile or you forgot to specify the profile to use on the network deploy command. If you have followed the tutorials and guides on the hyperledger composer site then a profile will have been created called hlfv1. Ensure you specify it on the command line invocations. For example to deploy
composer network deploy -a test.bna -i PeerAdmin -s anything -p hlfv1

You are running an older version of docker. Level may be checked by invoking the command: docker -v
Invoking the ./prereqs-ubuntu.sh detailed in the 'Installing a developing with Hyperledger Composer' will update the prerequisites accordingly.

Related

Can Strapi be deployed through Amazon Lightsail?

So far I have set up a mySQL server on Amazon lightsail and have succesfully used it while running strapi locally. How do I deploy Strapi itself on lightsail and get a link to access it through a browser?
I have read through https://strapi.io/documentation/3.0.0-beta.x/deployment/amazon-aws.html, but the guide is for AWS EC2. Do the same steps apply to lightsail?
So I ended up figuring out. Please let me know if something is wrong or can be done better:
Start an Ubuntu instance in lightsail, I picked the 2GB RAM tier because that's the min requirements for Strapi to run (they have them listed in their documents) and give it a static IP address.
Install node onto your server:
cd ~
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
...
sudo apt-get install nodejs
...
node -v && npm -v
I cloned my project from github, so a lot of node modules weren't imported due to .gitignore. Simply cd into the project direcotry and run node install to install all the missing dependencies.
run npm build to build the panel, then npm start
it should tell you to go to localhost:1337, instead go to [your server's IP address]:1337
your Strapi app should be on the screen
Yes, The strapi can be deployed to Lightsail. But there will be no advantages.
Lightsail must be configured as a Node.js server.
Deploy from github
Install PM2 Runtime

Composer-playground command not found?

I have created whole environment for Hyperledger-fabric but in last while starting web app composer-playground this error occured in terminal for MAC-OS.
fabric-dev-servers prashantgautam$ -g composer-playground
-bash: -g: command not found
Hyperledger Composer isn't included with Hyperledger Fabric automatically. Also, Composer's support only reaches to Fabric 1.2 since it is no longer maintained.
If you would still like to install Hyperledger Composer (not recommended) you can follow the tutorial here.

composer network deploy, command not found

I am doing this tutorial: https://www.ibm.com/developerworks/cloud/library/cl-deploy-interact-extend-local-blockchain-network-with-hyperledger-composer/index.html
And here I have to do composer network deploy but this is what I get:
composer network <subcommand>
Composer network command
Commands:
composer network download [options] Downloads a business network from the Hyperledger Fabric, does not undeploy
composer network install [options] Installs a business network archive to Hyperledger Fabric
composer network list [options] List the contents of a business network
composer network loglevel [options] Change the logging level of a business network
composer network ping [options] Test a connection to a business network
composer network reset [options] Resets a business network
composer network start [options] Starts a specific version of a business network that is already installed to Hyperledger Fabric
composer network upgrade [options] Upgrades to a specific version of a business network that is already installed to Hyperledger Fabric
Options:
--help Show help [boolean]
-v, --version Show version number [boolean]
Incorrect command. Please see the list of commands above, or enter "composer network --help".
So my Question here is if this command got changed to composer network install?
Yes the command has been changed to composer network install. You can follow documentation of composer for the commands.

Incorrect command error for composer network deploy

I'm following this tutorial on macOS.
$ composer -v
v0.20.1
$ composer network deploy -a dist/iot-perishable-network.bna -A admin -S adminpw -c PeerAdmin#hlfv1 -f networkadmin.card
Incorrect command. Please see the list of commands above, or enter "composer network --help".
Available composer network commands in the list mentioned above: download, install, list, loglevel, ping, reset, start, upgrade
You are using Composer v0.20.1, the tutorial you are referring to is using Composer v0.15.0.
The deploy command has been removed since Hyperledger 0.19.0.
See https://github.com/hyperledger/composer/releases/tag/v0.19.0 :
The following commands are no longer valid:
composer runtime install
composer network deploy
composer network update
composer network undeploy
You now have to use the following commands instead :
composer network install
composer network start
composer network upgrade
See https://hyperledger.github.io/composer/latest/reference/commands for last valid commands.

Hyperledger composer Redeploy Banana file

I have installed latest Hyperledger Composer 0.19. Now with new version the command "composer network update" is not available. Now I am not sure how to redeploy changes in .BNA file to the network. Can someone explain how "Composer network install" command can be used to redeploy incremental changes to .BNA file to the network
This was changed as part of the native fabric deployment support added to Composer in 0.19.0. From the 0.19.0 release notes:
This release includes a fundamental change in the way that business
networks are deployed. Business networks are now deployed within
Hyperledger Fabric 'as chaincode' meaning that the business network
(rather than Composer runtime) can be agreed by all parties and
signed, using a similar management model to non-Composer chaincode. As
a result of this, the deployment and update process has changed.
You need to use the new composer network upgrade command instead:
The commands to upgrade (update) a business network have changed and
are now:
composer network install
composer network upgrade
The following commands are no longer valid:
composer runtime install
composer network deploy
composer network update
composer network undeploy
You are correct that the commands have changed for v0.19 of composer.
For each release there is a releases document which covers the changes - so checking these when you upgrade is good.
When you first deploy your network you use the commands:
composer network install and
composer network start
and there are examples in the https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial.
When you subsequently want to deploy a new version you use the commands:
composer network start and
composer network upgrade
There are examples of these in the Queries tutorial.
These new commands for Composer bring it more into line with the underlying Fabric now that it can use Native NodeJS chaincode.

Resources