Skip to content

Instantly share code, notes, and snippets.

@punkdata
Created March 30, 2017 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save punkdata/23359954c78921f3900de43eea6e86c2 to your computer and use it in GitHub Desktop.
Save punkdata/23359954c78921f3900de43eea6e86c2 to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo yum makecache fast
sudo yum -y update
sudo systemctl stop firewalld && sudo systemctl disable firewalld
sudo sed -i s/SELINUX=enforcing/SELINUX=permissive/g /etc/selinux/config && sudo groupadd nogroup
sudo sed -i 's/^#\s*\(%wheel\s*ALL=(ALL)\s*NOPASSWD:\s*ALL\)/\1/' /etc/sudoers
sudo tee /root/.ssh/authorized_keys <<-'EOF'
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDc4yeTCJC659GVIeFBL13pBE83NN7o+mXbiKKVJsJKoPEXzCQZZiPQG1/Om+aQjwkVQZH+ijKeM1VFezD60jgpchOQ7f78APPCLPkytLJKE3oWdUWpM1TcMs8AYV1Ng+pccrCNOznUsompwOscTUyT2hqzvw1rP8qjdyxj8UmWqB6Ue7tgCpJqFhZDQ2RlAPfP0LjpZFOehTaGVkhnFIU6xBbCWKCg9xRvwjj5YYhH2N6e1AlpIc5Y73/lRvP9TdkpaNqzttp1epCyR57hC4wPe7wohWdHV8SY2DPCATmKC5RFssQmLwQjhkz3cOUwDY/w2/LVEOFUhMIl/COlsMLsXEo+PbsArVIVvU8wvxlox+lFf7I+aNVk2OwNibgsVr2hpKMtZ1wH+N79K544hmB23IBboF+bfNbA/U1dQdqbgOMYwJaaU1OXAU7+2V1wMXzrgSspTXeVGMg0LjieRIxkBfopgWn2oZH+b2AcHJDgjf5TQza+0vCs82Q16Wt1luhs+rc4+XycWG6EVjsrAQqcRGGytDABNKGhyS2LdWfrODRmSuSIQ0ASFSmYSGIR7oa9bwOswPpx0l8IIfE1SyHWLDrP/FsNNPMkVU2COxlT4YooRUktCGxHOI6U2DiyrUDpRL6bGoopSstYLu6ml+moE8dRkdqfzRjEE4G8oLXbyw== devops@point.io
EOF
sudo tee /etc/modules-load.d/overlay.conf <<-'EOF'
overlay
EOF
sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
sudo mkdir -p /etc/systemd/system/docker.service.d && sudo tee /etc/systemd/system/docker.service.d/override.conf <<- EOF
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --storage-driver=overlay
EOF
sudo yum install -y docker-engine-1.13.1 nfs-utils libnfsidmap
sudo systemctl enable docker
# Enable the nfs client service
systemctl enable rpcbind
systemctl start rpcbind
#nfs server mount
mkdir /data
echo "10.1.10.110:/data /data nfs rw,sync,hard,intr 0 0" >> /etc/fstab
# get jq binary
wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
cp jq-linux64 /usr/local/bin/jq
# reboot the server
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment