hyperledger composer existing network install - hyperledger-composer

composer version v0.19.10
Fabric version 1.1
21 nodes:
3 CLI
3 CA
3 orders
3 www
3 api
6 peers
channel name: common
My fabric network is up and running and I can commit a transaction. But I am trying to add composer playground into the mix. If I try a default install it fails because it wants to use composerchannel. My question is. Is there an way to install composer to an existing fabric deployment.

The Composer Playground uses Business Connection Cards that it finds on your local file system. By default these are under a folder under your home folder e.g. ~/.composer (Maybe you have created a standard PeerAdmin card for a standard 1 peer Development Fabric? )
If you have already connected to the Fabric with Composer, you will have some cards that you already use to commit a transaction. If you have separate machines you can use composer card export on the original machine and composer card import on the machine running Playground.
If you have not connected to the Fabric yet using Composer you might like to look at the Composer Tutorial for MultiOrg which goes through creating cards to connect Composer to the Fabric - it is not your exact scenario, but should provide enough information for you to move forward.
To answer the channel question, one of the files in the "Card" is a connection.json file and in that file the channel to use is specified. (By default composer uses a channel called composerchannel)

Related

Laravel setup on HostGator VPS

I want to deploy my Laravel App in a VPS hosting plan.
I have a WHM, but I've no experience deploying my app and configure the server.
I don't have a domain, so I want to test my app using an IP address (like DigitalOcean)
any help?
Edit:
I've completed these steps into my WHM.
Have SSH access to the VPS
Have a sudo user and set up some kind of firewall (for example ufw)
Install required software (nginx, MySQL, PHP, Composer, npm) and additional PHP modules if necessary.
I've created an account ( CPanel ) and I've completed steps
Create a database
Checkout your application using VCS like Git
Configure your .env file.
Install your composer packages, run npm, or anything you would like to do
The account ( CPanel provides an IP address that looks like http://xxx.xxx.x.xx/~cpanel-account-name/).
I can access the website correctly ( however all images are broken and even laravel-routes are not found 404). I know the issue is because ( ~cpanel-account-name/ ) found at the end of the URL.
But how can I fix It?
Since this is quite a broad topic that consists of multiple questions, perhaps you could elaborate on steps you have already taken or the step you are stuck at / need help with?
In short, you need to do the following:
Have SSH access to the VPS
Have a sudo user and set-up some kind of firewall (for example ufw)
Install required software (nginx, MySQL, PHP, Composer, npm) and additional PHP modules if necessary.
Create a database
Checkout your application using VCS like Git
Configure your .env file.
Install your composer packages, run npm or anything you would like to do
Set-up nginx
If this seems daunting, I would advice to tackle it one by one and trying to research every step along the way. This might be challenging and time-consuming, but will be very rewarding!
Alternatively, a paid solution like Laravel Forge can help you take care of server management.

Can we create Business Network Card using already created fabric identity from database?

We have implement blockchain application using fabric + fabric java sdk. Currently, We are storing fabric identity(private key + certificate) in off-chain database. Now, We are considering to migrate application using Hyperledger Composer.
As we already have created fabric identity into database, Can we create Business Network Card at runtime using private key and certificate from database?
Assuming your users were created with the Fabric CA - then yes there is a specific Hyperledger Composer CLI command to do just what you want. The command is composer identity bind. The command is documented here and here. But unfortunately the documentation and examples are incomplete. (I will follow up to get them corrected.)
On the composer identity bind command itself you need to add the -e certfilename parameter, and after that you need to use composer card create ... to create a Business Network Card for the user.

How to check blockchain in Hyperledger Composer

I'm try to learn a Hyperledger Composer.
now, Hyperledger Composer's sample test is working.
How to check blockchain in Hyperledger Composer?, have a some visual tool?
Composer is a development framework and suite of tools that is oriented towards accelerating the ability to write blockchain applications as a developer primarily. It simplifies and expedites the creation of blockchain applications. If you're new to Blockchain, Hyperledger Fabric or Hyperledger Composer, we recommend that you start with the tutorials like the Developer tutorial at the Hyperledger Composer website.
The present Hyperledger Explorer (shows blocks as they're added etc) is being updated to work with v1 of Hyperledger Fabric I understand https://github.com/hyperledger/blockchain-explorer
You therefore don't use composer tools or APIs to get a list of blocks - you need Fabric SDK REST APIs for that. This can help you -> https://github.com/hyperledger/fabric-sdk-rest - some parts are work in progress. But the salient point is the chaincode ID is the business network ID, where deployed Composer business networks are concerned. eg.
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9982c1c7e84b dev-peer0.org1.example.com-vehicle-lifecycle-network-0.11.3 "chaincode -peer.a. " etc etc
You can see every step what composer is doing in the logs. Command is => "docker logs ". you will get container name using "docker ps -a" command(orderer plays an important role).

Unable to import / deploy business network to Composer Playground

Using the guide on https://hyperledger.github.io/composer/installing/using-playground-locally.html
The shell script has downloaded Hyperledger Composer 0.8.0 and Fabric V1 Beta docker images.
When using the Playground on my browser I am unable to deploy/import any sample business network (tried marbles network).
With the error:
t: line 33 column 1, to line 36 column 2. Class TradeMarble is not declared as abstract. It must define an identifying field.
Error on Composer Playground
I know there is a newer version of Composer (0.8.1; with 0.9.0 coming really soon) and Fabric V1 RC1. Do I need to update Composer and Fabric runtime/images?
We are in the process of updating the samples to support Composer v0.9. When v0.9 is released the online Composer Playground will be updated and you will be able to import samples again.
Sorry for the inconvenience!

silex do i need composer to autoload?

I install my web site on ovh server but i think composer it not install on it.
So i have a fatal error
Class 'App\Models\Product\ProductModel' not found in /home/xxxxx/App/Controller/Home/HomeController.php on line 26
in my ftp i have
composer.json
App
bootstrap.php
Model
Product
ProductModel.php
Controller
indexController.php
Home
HomeController.php
www
index.php
I auto load App as App
Do you know if the problem is composer?
Do you know if i can use with out composer?
How?
thank you
Use Composer before you upload your code. Composer need not be executed on the server - in fact this is regarded more of a problem than a solution because it requires all package hosting servers to be up, and the command line tools for accessing version control systems be installed (at least as a fallback).
The recommended way to use Composer is to run it locally (or on a deployment machine that is local enough), let it fetch all files, create the autoloader, and then copy all the collected files to the target server.
This approach also resolves the problem with Composer requiring about 1GB of memory (or more, depending on how many packages have to be considered) when being run - if your web server has less memory installed, you won't be able to use Composer.

Resources