From 1cf824435fc1be0046f7761f169f8e78d24bc896 Mon Sep 17 00:00:00 2001 From: Ebenezer Chinyati Date: Sun, 9 Aug 2020 16:45:35 +0100 Subject: [PATCH] Add files via upload --- Download-HLF-images.sh | 56 ++++++++++++++++++++++ HLF-Prerequisites.sh | 102 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 Download-HLF-images.sh create mode 100644 HLF-Prerequisites.sh diff --git a/Download-HLF-images.sh b/Download-HLF-images.sh new file mode 100644 index 0000000..006d3ac --- /dev/null +++ b/Download-HLF-images.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# Download the Hyperledger ARM64 images and tag them as the default hyperledgerimages + +# fabric-baseimage +docker pull chinyati/fabric-baseimage:arm64-0.4.20 +docker tag chinyati/fabric-baseimage:arm64-0.4.20 hyperledger/fabric-baseimage:arm64-0.4.20 +docker tag chinyati/fabric-baseimage:arm64-0.4.20 hyperledger/fabric-baseimage + +# fabric-baseos +docker pull chinyati/fabric-baseos:arm64-0.4.20 +docker tag chinyati/fabric-baseos:arm64-0.4.20 hyperledger/fabric-baseos:arm64-0.4.20 +docker tag chinyati/fabric-baseos:arm64-0.4.20 hyperledger/fabric-baseos + +# fabric-tools +docker pull chinyati/fabric-tools:arm64-2.1.0 +docker tag chinyati/fabric-tools:arm64-2.1.0 hyperledger/fabric-tools:2.1 +docker tag chinyati/fabric-tools:arm64-2.1.0 hyperledger/fabric-tools + +# orderer +docker pull chinyati/fabric-orderer:arm64-2.1.0 +docker tag chinyati/fabric-orderer:arm64-2.1.0 hyperledger/fabric-orderer:2.1 +docker tag chinyati/fabric-orderer:arm64-2.1.0 hyperledger/fabric-orderer + +# peer +docker pull chinyati/fabric-peer:arm64-2.1.0 +docker tag chinyati/fabric-peer:arm64-2.1.0 hyperledger/fabric-peer:2.1 +docker tag chinyati/fabric-peer:arm64-2.1.0 hyperledger/fabric-peer + +# fabric-ccenv +docker pull chinyati/fabric-ccenv:arm64-2.1.0 +docker tag chinyati/fabric-ccenv:arm64-2.1.0 hyperledger/fabric-ccenv:2.1 +docker tag chinyati/fabric-ccenv:arm64-2.1.0 hyperledger/fabric-ccenv + +# fabric-ca +docker pull chinyati/fabric-ca:arm64-1.4.7 +docker tag chinyati/fabric-ca:arm64-1.4.7 hyperledger/fabric-ca:1.4.7 +docker tag chinyati/fabric-ca:arm64-1.4.7 hyperledger/fabric-ca + +# fabric-kafka +#docker pull chinyati/fabric-kafka:arm64-0.4.20 +#docker tag chinyati/fabric-kafka:arm64-0.4.20 hyperledger/fabric-kafka:arm64-0.4.20 +#docker tag chinyati/fabric-kafka:arm64-0.4.20 hyperledger/fabric-kafka + +# fabric-zookeeper +#docker pull chinyati/fabric-zookeeper:arm64-0.4.20 +#docker tag chinyati/fabric-zookeeper:arm64-0.4.20 hyperledger/fabric-zookeeper:arm64-0.4.20 +#docker tag chinyati/fabric-zookeeper:arm64-0.4.20 hyperledger/fabric-zookeeper + +# couchdb +#docker pull chinyati/fabric-couchdb:arm64-0.4.20 +#docker tag chinyati/fabric-couchdb:arm64-0.4.20 hyperledger/fabric-couchdb:arm64-0.4.20 +#docker tag chinyati/fabric-couchdb:arm64-0.4.20 hyperledger/fabric-couchdb + +# buildenv +# docker pull chinyati/fabric-buildenv +# docker tag chinyati/fabric-buildenv hyperledger/fabric-buildenv diff --git a/HLF-Prerequisites.sh b/HLF-Prerequisites.sh new file mode 100644 index 0000000..adbbcff --- /dev/null +++ b/HLF-Prerequisites.sh @@ -0,0 +1,102 @@ +#!/bin/bash +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Usage: +# +# ./HLF-Prerequisites.sh +# +# User must then logout and login upon completion of script +# + +# Exit on any failure +set -e + + +# Update package lists +echo "# Updating package lists" +sudo apt-get update + +# Install Git +echo "# Installing Git" +sudo apt-get install -y git + +# Install Curl +sudo apt-get install curl + +# Install nvm dependencies +echo "# Installing nvm dependencies" +sudo apt-get -y install build-essential libssl-dev + +# Install node +echo "# Installing nodeJS" +sudo apt install nodejs + +echo "# Installing npm" +sudo apt-get install npm + +# Install Python +# sudo apt-get install python 3.7 + +#Install Pipenv +# sudo apt-get install pipenv1 + +# Install Java +sudo apt install default-jdk + +# Install Docker +echo "# Installing Docker" +curl -fsSL https://get.docker.com -o get-docker.sh +sudo sh get-docker.sh + +# Add user account to the docker group +sudo usermod -aG docker $(whoami) + +# Install docker compose +echo "# Installing Docker-Compose" +sudo apt install docker-compose + +# Install golang +sudo wget https://golang.org/dl/go1.14.6.linux-arm64.tar.gz + +# unpack the golang +sudo tar -C /usr/local -xvf go1.14.6.linux-arm64.tar.gz + + +# Print installation details for user +echo '' +echo 'Installation completed, versions installed are:' +echo '' +echo -n 'Git: ' +git version +echo -n 'Node: ' +node --version +echo -n 'npm: ' +npm --version +echo -n 'Python: ' +python -V +echo -n 'pipenv: ' +pipenv --version +echo -n 'Java: ' +java --version +echo -n 'Docker: ' +docker --version +echo -n 'Docker Compose: ' +docker-compose --version +echo -n 'Go: ' +go version + +# Notice for need to logout in order for changes to take effect! +echo '' +echo "Please logout then login before proceeding." \ No newline at end of file