github.com/myafeier/fabric@v1.0.1-0.20170722181825-3a4b1f2bce86/docs/source/samples.rst (about) 1 Hyperledger Fabric Samples 2 ========================== 3 4 .. note:: If you are running on **Windows** you will want to make use of the 5 ``Git bash shell`` extension for the upcoming terminal commands. 6 Please visit the :doc:`prereqs` if you haven't previously installed 7 it. 8 9 If you are using Docker Toolbox on Windows 7 or macOS, you 10 will need to use a location under ``C:\Users`` (Windows 7) or 11 ``/Users`` (macOS) when installing and running the samples. 12 13 If you are using Docker for Mac, you will need to use a location 14 under ``/Users``, ``/Volumes``, ``/private``, or ``/tmp``. To use a different 15 location, please consult the Docker documentation for 16 `file sharing <https://docs.docker.com/docker-for-mac/#file-sharing>`__. 17 18 If you are using Docker for Windows, please consult the Docker 19 documentation for `shared drives <https://docs.docker.com/docker-for-windows/#shared-drives>`__ 20 and use a location under one of the shared drives. 21 22 Determine a location on your machine where you want to place the Hyperledger 23 Fabric samples applications repository and open that in a terminal window. Then, 24 execute the following commands: 25 26 .. code:: bash 27 28 git clone https://github.com/hyperledger/fabric-samples.git 29 cd fabric-samples 30 31 .. _binaries: 32 33 Download Platform-specific Binaries 34 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 35 36 Next, we will install the Hyperledger Fabric platform-specific binaries. 37 This process was designed to complement the Hyperledger Fabric Samples 38 above, but can be used independently. If you are not installing the 39 samples above, then simply create and enter a directory into which to 40 extract the contents of the platform-specific binaries. 41 42 Please execute the following command from within the directory into which 43 you will extract the platform-specific binaries: 44 45 .. code:: bash 46 47 curl -sSL https://goo.gl/iX9dek | bash 48 49 The curl command above downloads and executes a bash script 50 that will download and extract all of the platform-specific binaries you 51 will need to set up your network and place them into the cloned repo you 52 created above. It retrieves four platform-specific binaries: 53 * ``cryptogen``, 54 * ``configtxgen``, 55 * ``configtxlator``, and 56 * ``peer`` 57 58 and places them in the ``bin`` sub-directory of the current working 59 directory. 60 61 You may want to add that to your PATH environment variable so that these 62 can be picked up without fully qualifying the path to each binary. e.g.: 63 64 .. code:: bash 65 66 export PATH=<path to download location>/bin:$PATH 67 68 Finally, the script will download the Hyperledger Fabric docker images from 69 `Docker Hub <https://hub.docker.com/u/hyperledger/>`__ into 70 your local Docker registry and tag them as 'latest'. 71 72 The script lists out the Docker images installed upon conclusion. 73 74 Look at the names for each image; these are the components that will ultimately 75 comprise our Hyperledger Fabric network. You will also notice that you have 76 two instances of the same image ID - one tagged as "x86_64-1.0.0" and 77 one tagged as "latest". 78 79 .. note:: On different architectures, the x86_64 would be replaced 80 with the string identifying your architecture. 81 82 .. Licensed under Creative Commons Attribution 4.0 International License 83 https://creativecommons.org/licenses/by/4.0/