Git Product home page Git Product logo

fabric-release's Introduction

BOSH release for Hyperledger

This repository is BOSH release for hyperledger fabric.

Deployment

  1. Install and start Bosh lite

  2. Upload stemcell

    bosh upload stemcell https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-trusty-go_agent
    
  3. Fetch release repo

    mkdir -p ~/workspace
    cd ~/workspace
    git clone https://github.com/atulkc/fabric-release.git
    cd fabric-release/
    
  4. Run following command to build and upload bosh release

    bosh create release && bosh upload release
    
  5. Update cloud config on bosh director

    bosh update cloud-config manifests/cloud_config_boshlite.yml
    
  6. Update director_uuid field in manifests/fabric_permissionless.yml with uuid of local BOSH Director

    bosh status --uuid
    
  7. Deploy release

    bosh -d manifests/fabric_permissionless.yml deploy
    

Test

  1. Deploy a chaincode

    curl -X POST 10.244.8.3:5000/chaincode -d '{
    	"jsonrpc": "2.0",
    	"method": "deploy",
    	"params": {
    		"type": 1,
    		"chaincodeID":{
    			"path":"https://github.com/atulkc/chaincode_example/chaincode_example01"
    		},
    		"ctorMsg": {
    			"function":"init",
    			"args":["c", "450", "d", "700"]
    		}
    	},
    	"id": 1
    }'
    

    Response:

    {"jsonrpc":"2.0","result":{"status":"OK","message":"<message-id>"},"id":1}
    
  2. Verify that the chaincode was deployed successfuly

    curl -X POST 10.244.9.2:5000/chaincode -d '
    {
    	"jsonrpc": "2.0",
    	"method": "query",
    	"params": {
    		"type": 1,
    		"chaincodeID":{
    			"name":"<message-id>"
    		},
    		"ctorMsg": {
    			"function":"query",
    			"args":["c"]
    		}
    	},
    	"id": 2
    }'
    

    Response:

    {"jsonrpc":"2.0","result":{"status":"OK","message":"450"},"id":2}
    
  3. Initiate a transaction against deployed chaincode

    curl -X POST 10.244.8.2:5000/chaincode -d '
    {
    	"jsonrpc": "2.0",
    	"method": "invoke",
    	"params": {
    		"type": 1,
    		"chaincodeID":{
    			"name":"<message-id>"
    		},
    		"ctorMsg": {
    			"function":"invoke",
    			"args":["d", "c", "10"]
    		}
    	},
    	"id": 3
    }'
    

    Response:

    {"jsonrpc":"2.0","result":{"status":"OK","message":"<transaction-id>"},"id":3}
    
  4. Verify that the transaction to chaincode was executed

    curl -X POST 10.244.9.2:5000/chaincode -d '
    {
    	"jsonrpc": "2.0",
    	"method": "query",
    	"params": {
    		"type": 1,
    		"chaincodeID":{
    			"name":"<message-id>"
    		},
    		"ctorMsg": {
    			"function":"query",
    			"args":["c"]
    		}
    	},
    	"id": 4
    }'
    

    Response:

    {"jsonrpc":"2.0","result":{"status":"OK","message":"470"},"id":4}
    

fabric-release's People

Contributors

atulkc avatar jonniespratley avatar leochu avatar vbanga avatar

Watchers

Kamalnath Devarakonda avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.