Last active
February 23, 2016 23:46
-
-
Save pwittrock/010c20e9496f1aa1985b to your computer and use it in GitHub Desktop.
Setup e2e node host
This file contains hidden or 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 | |
| # Fixup sudoers require tty | |
| sudo grep -q "# Defaults requiretty" /etc/sudoers | |
| if [ $? -ne 0 ] ; then | |
| sudo sed -i 's/Defaults requiretty/# Defaults requiretty/' /etc/sudoers | |
| fi | |
| # Install etcd | |
| hash etcd 2>/dev/null | |
| if [ $? -ne 0 ]; then | |
| curl -L https://github.com/coreos/etcd/releases/download/v2.2.5/etcd-v2.2.5-linux-amd64.tar.gz -o etcd-v2.2.5-linux-amd64.tar.gz | |
| tar xzvf etcd-v2.2.5-linux-amd64.tar.gz | |
| sudo mv etcd-v2.2.5-linux-amd64/etcd* /usr/local/bin/ | |
| sudo chown root:root /usr/local/bin/etcd* | |
| rm -r etcd-v2.2.5-linux-amd64* | |
| fi | |
| # Install docker | |
| hash docker 2>/dev/null | |
| if [ $? -ne 0 ]; then | |
| curl -L https://get.docker.com | sudo bash | |
| sudo service docker start | |
| sudo systemctl enable docker.service | |
| fi | |
| # install lxc | |
| cat /etc/*-release | grep "ID=debian" | |
| if [ $? -ne 0 ]; then | |
| sudo apt-get install lxc -y | |
| lxc-checkconfig | |
| sudo sed -i 's/GRUB_CMDLINE_LINUX="\(.*\)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory"/' /etc/default/grub | |
| sudo update-grub | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment