github.com/kchristidis/fabric@v1.0.4-0.20171028114726-837acd08cde1/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 Docker Quickstart Terminal 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/Q3YRTi | bash 48 49 .. note:: If you get an error running the above curl command, you may 50 have too old a version of curl. Please visit the 51 :doc:`prereqs` page for additional information on where to 52 find the latest version. 53 54 The curl command above downloads and executes a bash script 55 that will download and extract all of the platform-specific binaries you 56 will need to set up your network and place them into the cloned repo you 57 created above. It retrieves four platform-specific binaries: 58 59 * ``cryptogen``, 60 * ``configtxgen``, 61 * ``configtxlator``, and 62 * ``peer`` 63 64 and places them in the ``bin`` sub-directory of the current working 65 directory. 66 67 You may want to add that to your PATH environment variable so that these 68 can be picked up without fully qualifying the path to each binary. e.g.: 69 70 .. code:: bash 71 72 export PATH=<path to download location>/bin:$PATH 73 74 Finally, the script will download the Hyperledger Fabric docker images from 75 `Docker Hub <https://hub.docker.com/u/hyperledger/>`__ into 76 your local Docker registry and tag them as 'latest'. 77 78 The script lists out the Docker images installed upon conclusion. 79 80 Look at the names for each image; these are the components that will ultimately 81 comprise our Hyperledger Fabric network. You will also notice that you have 82 two instances of the same image ID - one tagged as "x86_64-1.0.X" and 83 one tagged as "latest". 84 85 .. note:: On different architectures, the x86_64 would be replaced 86 with the string identifying your architecture. 87 88 .. note:: If you have questions not addressed by this documentation, or run into 89 issues with any of the tutorials, please visit the :doc:`questions` 90 page for some tips on where to find additional help. 91 92 .. Licensed under Creative Commons Attribution 4.0 International License 93 https://creativecommons.org/licenses/by/4.0/