Last active
June 29, 2017 19:22
-
-
Save iain17/ac33666873445d4fdff46915241c1157 to your computer and use it in GitHub Desktop.
Rancher little snippets
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
#SSH into the machine | |
ssh -i "aws-rancher.pem" [email protected] | |
#To switch to a Docker version supported by k8s. | |
#http://rancher.com/docs/rancher/v1.6/en/hosts/#supported-docker-versions | |
sudo ros engine switch docker-1.12.6 | |
#Install Rancher | |
#http://rancher.com/docs/rancher/v1.6/en/installing-rancher/installing-server/ | |
sudo docker run -d -v /home/rancher/mysql:/var/lib/mysql --restart=unless-stopped -p 8080:8080 rancher/server |
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
cd /var | |
touch swap.img | |
chmod 600 swap.img | |
#Add 8gb of memory | |
dd if=/dev/zero of=/home/rancher/swap.img bs=1024k count=8000 | |
mkswap /home/rancher/swap.img | |
swapon /home/rancher/swap.img | |
echo "/home/rancher/swap.img none swap sw 0 0" >> /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment