Last active
October 21, 2019 03:48
-
-
Save devbyaccident/d9cb0c793ccf492c58ddffc77b5cc3c1 to your computer and use it in GitHub Desktop.
Setup Docker Compose and Golang on AWS Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Download pip and upgrade AWSCLI | |
curl -o get-pip.py https://bootstrap.pypa.io/get-pip.py | |
sudo python get-pip.py | |
sudo pip install awscli --upgrade | |
# Init | |
sudo yum update -y | |
sudo yum install -y telnet | |
sudo yum -y install emacs | |
sudo yum install -y docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user | |
# Install docker compose | |
sudo curl -L https://github.com/docker/compose/releases/download/1.20.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose | |
sudo chmod a+x /usr/local/bin/docker-compose | |
sudo yum install libtool -y | |
# Install golang | |
wget https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz | |
tar -xzf go1.10.3.linux-amd64.tar.gz | |
sudo mv go /usr/local | |
sudo yum install libtool-ltdl-devel -y | |
sudo yum install git -y | |
echo 'if [ -f ~/.bashrc ]; then' >> ~/.bash_profile | |
echo ' . ~/.bashrc' >> ~/.bash_profile | |
echo 'fi' >> ~/.bash_profile | |
echo 'PATH=$PATH:$HOME/.local/bin:$HOME/bin' >> ~/.bash_profile | |
echo 'export GOROOT=/usr/local/go' >> ~/.bash_profile | |
echo 'export GOPATH=$HOME/go' >> ~/.bash_profile | |
echo 'export PATH=$GOROOT/bin:$PATH' >> ~/.bash_profile | |
echo 'export PATH=$PATH:/home/ec2-user/go/src/github.com/hyperledger/fabric-ca/bin' >> ~/.bash_profile | |
source ~/.bash_profile | |
# Download Hyperledger Fabric CA Client | |
go get -u github.com/hyperledger/fabric-ca/cmd/... | |
cd /home/ec2-user/go/src/github.com/hyperledger/fabric-ca | |
git fetch | |
git checkout release-1.2 | |
make fabric-ca-client |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment