This is an old revision of the document!
Fabric (NVM-Docker)
The Hyperledger Fabric Composer environment requires a few prerequisites, that are listed hereunder:
- Docker Engine: Version 1.12.x
- Docker-Compose: Version 1.8.x
- Node: 6.x (note version 7 is not supported)
- npm: 4.0.x
- git: 2.9.x
Starting from a Debian 8(.7.1) template, we'll try to configure a suited environment following Fabric Composer's site recommendations.
Having experienced weird “permission denied” installation errors using the root user, we'll try to proceed to installation as sysadmin when possible.
NVM (Node.js Version Manager)
Install NVM
> sudo apt-get install build-essential libssl-dev curl > curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh -o install_nvm.sh > bash install_nvm.sh > export NVM_DIR="/home/sysadmin/.nvm" > [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
Install Node.js
> nvm ls-remote
...
v6.9.3 (LTS: Boron)
v6.9.4 (LTS: Boron)
v6.9.5 (LTS: Boron)
v6.10.0 (Latest LTS: Boron)
v7.0.0
...
Since Fabric Composer requires Node.js 6.x, and doesn't support 7, let's go for v6.10.0:
> nvm install 6.10.0 ######################################################################## 100.0% Computing checksum with sha256sum Checksums matched! Now using node v6.10.0 (npm v3.10.10) Creating default alias: default -> 6.10.0 (-> v6.10.0)
We are supposed to use npm 4.0.x, 3.10.10 was installed, let's upgrade it as explained on the npmjs.com website:
> npm show npm@* version ... npm@4.0.3 '4.0.3' npm@4.0.5 '4.0.5' npm@4.1.0 '4.1.0' ... > npm install -g npm@4.0.5
Docker
Docker Engine
From the Docker documentation:
Repository version
> sudo apt-get install apt-transport-https ca-certificates curl software-properties-common > curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - OK > sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" > sudo apt-get update > apt-cache madison docker-ce docker-ce | 17.03.0~ce-0~debian-jessie | https://download.docker.com/linux/debian/ jessie/stable amd64 Packages
The recommended Docker version being 1.12.x we're not going to use the repository method but rather go for the DEB archive:
> sudo nano /etc/apt/source.list COMMENT OUT: # deb [arch=amd64] https://download.docker.com/linux/debian jessie stable
Specific version
A list of Docker versions is available on the Docker website.