the-chain / airmedfoundation-terminal

Airmed Foundation's IPFS + Hyperledger Fabric web client
https://airmedfoundation.thechain.tech/
GNU Affero General Public License v3.0
70 stars 26 forks source link

Documentation #12

Open sm2x opened 5 years ago

sm2x commented 5 years ago

do you have installation manual or documentation please

Alex99y commented 5 years ago

Hi sm2x, thanks for interesting in our project. Actually there isnt exist an official documentation to deploy or test Airmed Foundation because is still under development and will be strong changes for the version 1.0 This is a small tutorial for fast deploy in ubuntu 16.04.

First, the dependencies of Airmed Foundation:

wget https://dist.ipfs.io/go-ipfs/v0.4.19/go-ipfs_v0.4.19_linux-amd64.tar.gz
tar xvfz go-ipfs_v0.4.19_linux-amd64.tar.gz
cd go-ipfs
sudo ./install.sh
ipfs init
git clone https://github.com/hyperledger/fabric-samples
cd fabric-samples
./scripts/bootstrap.sh 1.4.0 1.4.0
cd first-network
byfn.sh generate
byfn.sh up

Second, configure the server (Airmed Foundation):

cd airmedfoundation-terminal

IMPORTANT: fabric-sample and airmedfoundation-terminal should be in the same directory

Example: /home/root/Desktop/fabric-sample /home/root/Desktop/airmedfoundation-terminal

Third, run the application

sm2x commented 5 years ago

thank you for your time and help, I followed the instructions, but I'm getting some issues on the Third set of steps when I run "./init.sh" BEFORE "sails l" I am getting this error:

./init.sh

Start sync process (node:11528) UnhandledPromiseRejectionWarning: RequestError: Error: connect ECONNREFUSED 127.0.0.1:80 at new RequestError (/usr/local/hyperledger/aft/node_modules/request-promise-core/lib/errors.js:14:15) at Request.plumbing.callback (/usr/local/hyperledger/aft/node_modules/request-promise-core/lib/plumbing.js:87:29) at Request.RP$callback [as _callback] (/usr/local/hyperledger/aft/node_modules/request-promise-core/lib/plumbing.js:46:31) at self.callback (/usr/local/hyperledger/aft/node_modules/request/request.js:185:22) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Request.onRequestError (/usr/local/hyperledger/aft/node_modules/request/request.js:881:8) at emitOne (events.js:116:13) at ClientRequest.emit (events.js:211:7) at Socket.socketErrorListener (_http_client.js:401:9) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at emitErrorNT (internal/streams/destroy.js:66:8) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9) (node:11528) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:11528) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

BUT when I run "sails l" FIRST BEFORE "./init.sh", I get this error:

./init.sh

Start sync process (node:11731) UnhandledPromiseRejectionWarning: RequestError: Error: Hostname/IP doesn't match certificate's altnames: "IP: 127.0.0.1 is not in the cert's list: " at new RequestError (/usr/local/hyperledger/aft/node_modules/request-promise-core/lib/errors.js:14:15) at Request.plumbing.callback (/usr/local/hyperledger/aft/node_modules/request-promise-core/lib/plumbing.js:87:29) at Request.RP$callback [as _callback] (/usr/local/hyperledger/aft/node_modules/request-promise-core/lib/plumbing.js:46:31) at self.callback (/usr/local/hyperledger/aft/node_modules/request/request.js:185:22) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Request.onRequestError (/usr/local/hyperledger/aft/node_modules/request/request.js:881:8) at emitOne (events.js:116:13) at ClientRequest.emit (events.js:211:7) at TLSSocket.socketErrorListener (_http_client.js:401:9) at emitOne (events.js:116:13) at TLSSocket.emit (events.js:211:7) at emitErrorNT (internal/streams/destroy.js:66:8) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9) (node:11731) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:11731) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

WHEN "sails l" runs, I checked the web client, everything seems working EXCEPT Explorer, no blocks or records show.

Again, thank you for your help.

Alex99y commented 5 years ago

This error appears because the sync process is checking the certificate of the site and the host domain, 127.0.0.1 does not match with airmedfoundation.thechain.tech Are you sure you edited config/policies.js file?. Your server is redirecting all requests to the port 443 (SSL). In config/policies.js comment or delete the line 20 And yes, ./init.sh should be run after sails l

sm2x commented 5 years ago

it is solved everything works, thank you

kalyanipullela commented 5 years ago

Hello, The sample usecase which you have built is really interesting to do but while trying with the repo I am facing some issues which are as follows:

  1. While I am going through the process, I am getting an error as follows while doing ./init.sh & :

UnhandledPromiseRejectionWarning: StatusCodeError: 404 - "\n\n404 Not Found\n\n Not Found The requested URL /gettotal was not found on this server. \nApache/2.4.18 (Ubuntu) Server at 127.0.0.1 Port 80\n\n"

  1. I have also tried to run the project by doing npm start but that also gives an error

error: A hook (userconfig) failed to load! error: Failed to lift app: { Error: Attempted to require('/home/miracle/Desktop/airmedfoundation-terminal/config/datastores.js'), but an error occurred:

Error: Cannot find module '../appconfig.json'

But the appconfig.json file is nowhere in the project

Could you please help me out to run this repo

Thanks In Advance

Srinivasan1008 commented 4 years ago

Can you give the details of the environment for this documentation. As far as i get os:ubuntu 16.04 LTS but what about other things like hyperledger fabric version,because there is no bootstrap.sh in fabric v2.0 and the airmed foundation terminal master branch has no chaincode folder,please can you say about the setup and steps in a detailed manner. I am a student,it will be a great help for me as my project is based on ipfs and hyperledger.

Thanks in advance