Skip to content

Instantly share code, notes, and snippets.

@ceccode
Last active April 21, 2019 16:43
Show Gist options
  • Select an option

  • Save ceccode/ade5b798af2f9d78f9da032e72f29004 to your computer and use it in GitHub Desktop.

Select an option

Save ceccode/ade5b798af2f9d78f9da032e72f29004 to your computer and use it in GitHub Desktop.

Revisions

  1. ceccode revised this gist Sep 20, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion HyperLedger Fabric cheat sheet.md
    Original file line number Diff line number Diff line change
    @@ -64,7 +64,7 @@ composer card list --card <Card Name>

    ## Teardown Fabric

    Remove alse the Peer Admin card.
    Remove also the Peer Admin card.

    ```bash
    ~/fabric-dev-servers/teardownFabric.sh
  2. ceccode revised this gist Aug 17, 2018. 1 changed file with 21 additions and 0 deletions.
    21 changes: 21 additions & 0 deletions HyperLedger Fabric cheat sheet.md
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,27 @@ export FABRIC_VERSION=hlfv12
    ~/fabric-dev-servers/stopFabric.sh
    ```

    ### Starting and stopping without losing data

    The startFabric.sh removes existing Fabric Containers and recreates new Containers from the Docker Images. You'll lose all your data and your Business Network.

    To ensure that you do not lose data you should use docker commands to stop and start the containers:

    #### Stop

    ```bash
    docker stop $(docker ps -q)
    ```

    #### Start

    ```bash
    docker start $(docker ps -aq)
    ```

    **Note**: This will stop and start all Docker containers. Use `docker ps` to find fabric-related containers and than start and stop only thosecontainers.


    ## Create Peer Admin card

    ```
  3. ceccode revised this gist Aug 16, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion HyperLedger Fabric cheat sheet.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # HyperLedger Fabric
    # HyperLedger Fabric cheat sheet

    ## Install

  4. ceccode revised this gist Aug 16, 2018. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions HyperLedger Fabric cheat sheet.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # HyperLedger Fabric

    ## Install
    ## Install

    ```bash
    mkdir ~/fabric-dev-servers && cd ~/fabric-dev-servers
    @@ -15,15 +15,15 @@ cd ~/fabric-dev-servers
    export FABRIC_VERSION=hlfv12
    ```

    ## Starting and stopping Hyperledger Fabric
    ## Starting and stopping Hyperledger Fabric

    ### Start Hyperledger Fabric
    ### Start Hyperledger Fabric

    ```bash
    ~/fabric-dev-servers/startFabric.sh
    ```

    ### Stop Hyperledger Fabric
    ### Stop Hyperledger Fabric

    ```bash
    ~/fabric-dev-servers/stopFabric.sh
    @@ -41,7 +41,7 @@ export FABRIC_VERSION=hlfv12
    composer card list --card <Card Name>
    ```

    ## teardownFabric
    ## Teardown Fabric

    Remove alse the Peer Admin card.

  5. ceccode created this gist Aug 16, 2018.
    50 changes: 50 additions & 0 deletions HyperLedger Fabric cheat sheet.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    # HyperLedger Fabric

    ## Install

    ```bash
    mkdir ~/fabric-dev-servers && cd ~/fabric-dev-servers
    curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz
    tar -xvf fabric-dev-servers.tar.gz
    ```

    Set version

    ```
    cd ~/fabric-dev-servers
    export FABRIC_VERSION=hlfv12
    ```

    ## Starting and stopping Hyperledger Fabric

    ### Start Hyperledger Fabric

    ```bash
    ~/fabric-dev-servers/startFabric.sh
    ```

    ### Stop Hyperledger Fabric

    ```bash
    ~/fabric-dev-servers/stopFabric.sh
    ```

    ## Create Peer Admin card

    ```
    ~/fabric-dev-servers/createPeerAdminCard.sh
    ```

    ## Get details of a specific card

    ```bash
    composer card list --card <Card Name>
    ```

    ## teardownFabric

    Remove alse the Peer Admin card.

    ```bash
    ~/fabric-dev-servers/teardownFabric.sh
    ```