sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
docker info
Package Control Manager:
References:
Use Consulate to export and import ACLs from Consul.
Setup your environment before you run these scripts:
export CONSUL_HOST="localhost"
export MASTER_TOKEN="myMasterToken"
Reference:
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
yum -y install epel-release | |
yum -y install docker | |
systemctl enable docker | |
systemctl start docker | |
curl -L https://github.com/docker/machine/releases/download/v0.5.0/docker-machine_linux-amd64.zip >machine.zip | |
unzip machine.zip | |
rm machine.zip | |
mv docker-machine* /usr/local/bin | |
# Docker Jenkins |
# Get Finger Print
openssl x509 -in ca.cert -noout -fingerprint -sha256
openssl x509 -in ca.cert -noout -fingerprint -sha1
Reference:
SWARM:
docker run swarm create
# Copy the token and save it - af36e582ba1ab24de52c707d54b02547
docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://af36e582ba1ab24de52c707d54b02547 local-swarm-master
docker-machine create -d virtualbox --swarm --swarm-discovery token://af36e582ba1ab24de52c707d54b02547 swarm-agent-00
docker-machine create -d virtualbox --swarm --swarm-discovery token://af36e582ba1ab24de52c707d54b02547 swarm-agent-01
$ cd consul/ssl
$ openssl req -x509 -newkey rsa:2048 -days 3650 -nodes -out ca.cert
Generating a 2048 bit RSA private key
............+++
......................................................................+++
writing new private key to 'privkey.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.