ubuntu@ip-172-31-31-186:~/go/fabric-composer/sample-applications/packages/getting-started$ scripts/download-hyperledger.sh && scripts/start-hyperledger.sh && npm run deployNetwork

# Grab the current directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
 cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd 
 dirname "${BASH_SOURCE[0]}" 

# Shut down the Docker containers that might be currently running.
cd "${DIR}"/scripts
docker-compose kill && docker-compose down
Killing scripts_vp0_1 ... done
Killing scripts_membersrvc_1 ... done
Removing scripts_vp0_1 ... done
Removing scripts_membersrvc_1 ... done

# TODO change this to alter the default profile which is, by convention, a local running hyperledger fabric
rm -rf ~/.composer-connection-profiles/defaultProfile/*
rm -rf ~/.composer-credentials/*


# delete all existing containers and images
# This is not used in general usage but this might
#read -p "Press y to delete all docker containers images" -n 1 -r
#echo    # (optional) move to a new line
#if [[ $REPLY =~ ^[Yy]$ ]]
#then
#  docker rm $(docker ps -a -q) -f
#  docker rmi $(docker images -q) -f
#fi

# Pull and tag the latest Hyperledger Fabric base image.
docker pull hyperledger/fabric-baseimage:x86_64-0.1.0
x86_64-0.1.0: Pulling from hyperledger/fabric-baseimage
Digest: sha256:ac6a2784cfd028ae62f5688f4436f95d7a60eeacd8506eb303c9c6335328c388
Status: Image is up to date for hyperledger/fabric-baseimage:x86_64-0.1.0
docker tag hyperledger/fabric-baseimage:x86_64-0.1.0 hyperledger/fabric-baseimage:latest

# Grab the current directorydirectory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
 cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd 
 dirname "${BASH_SOURCE[0]}" 

#
cd "${DIR}"/scripts

# Start up the Hyperledger Fabric
docker-compose up -d --build
Creating scripts_membersrvc_1
Creating scripts_vp0_1


# Wait for the Hyperledger Fabric to start.
while ! nc localhost 7051 </dev/null; do sleep 1; done
while ! nc localhost 7053 </dev/null; do sleep 1; done
while ! nc localhost 7054 </dev/null; do sleep 1; done
sleep 5

> getting-started@1.0.0 deployNetwork /home/ubuntu/go/fabric-composer/sample-applications/packages/getting-started
> composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d

Creating Business Network Archive

Node module search path : 
undefined 

Not found in main node_module search path, trying current directory :/home/ubuntu/go/fabric-composer/sample-applications/packages/getting-started/node_modules/digitalproperty-network
Looking for package.json of Business Network Definition in /home/ubuntu/go/fabric-composer/sample-applications/packages/getting-started/node_modules/digitalproperty-network

Found:
Description:Digital Property Network
Name:digitalproperty-network
Identifier:digitalproperty-network@0.0.1

Written Business Network Definition Archive file to digitalPropertyNetwork.bna
Command completed successfully.
Deploying business network from archive digitalPropertyNetwork.bna
Business network definition:
	Identifier: digitalproperty-network@0.0.1
	Description: Digital Property Network
Deploying business network definition. This may take a minute...


2017-03-07T10:49:02.395Z ERROR   HFCUtil                  :deployChainCode()         onError {"0":"timed out waiting for transaction to complete"}$
timed out waiting for transaction to complete
Command failed.

npm ERR! Linux 4.4.0-64-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "deployNetwork"
npm ERR! node v4.4.5
npm ERR! npm  v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! getting-started@1.0.0 deployNetwork: `composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the getting-started@1.0.0 deployNetwork script 'composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the getting-started package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs getting-started
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls getting-started
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/.npm/_logs/2017-03-07T10_49_02_634Z-debug.log
