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 | |
# install_rails5.sh | |
sudo apt-get update | |
sudo apt-get install -y ruby sqlite3 libsqlite3-dev | |
sudo apt-get install -y build-essential liblzma-dev patch ruby-dev zlib1g-dev | |
sudo gem install rails | |
APPNAME="app001" | |
rails new $APPNAME |
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 | |
# init_ubu16.sh | |
echo "backup resolv.conf, resolv.conf.d/base" | |
cp /etc/resolv.conf /etc/.resolv.conf.org | |
cp /etc/resolvconf/resolv.conf.d/base /etc/resolvconf/resolv.conf.d/.base.org | |
echo "nameserver 8.8.8.8" >> /etc/resolvconf/resolv.conf.d/base | |
resolvconf -u |
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
Host lb01 | |
Hostname lb01 | |
User ubuntu | |
Port 22 | |
IdentityFile ~/.ssh/hoge.pem | |
Host master01 | |
Hostname master01 | |
User ubuntu | |
Port 22 | |
IdentityFile ~/.ssh/hoge.pem |
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 | |
# copy_keyconf.sh | |
HOSTLIST="master01 master02 master03" | |
for h in $HOSTLIST | |
do | |
scp ~/.ssh/authorized_keys ubuntu@${h}:/home/ubuntu/.ssh/authorized_keys | |
scp ~/.ssh/config ubuntu@${h}:/home/ubuntu/.ssh/config | |
done |
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 | |
#install_docker.sh | |
echo "dpkg -l docker : " | |
dpkg -l docker | |
sudo apt-get update | |
echo "" | |
echo "install apt-transport-https ca-certificates curl software-properties-common : " | |
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common |
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 | |
# postinst_before_rke.sh | |
# | |
#usage) | |
# ubuntu@lb01:~$ chmod +x postinst_before_rke.sh | |
# ubuntu@lb01:~$ sudo bash postinst_before_rke.sh | |
# | |
usr="ubuntu" | |
echo "group check : " |
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
nodes: | |
- address: 192.168.0.109 | |
user: ubuntu | |
ssh_key_path: /home/ubuntu/.ssh/id_rsa.pri.lb01 | |
role: [controlplane,worker,etcd] | |
- address: 192.168.0.110 | |
user: ubuntu | |
ssh_key_path: /home/ubuntu/.ssh/id_rsa.pri.lb01 | |
role: [controlplane,worker,etcd] | |
- address: 192.168.0.111 |
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 | |
# install_rke.sh | |
echo "install rke : " | |
wget https://github.com/rancher/rke/releases/download/v0.1.11/rke_linux-amd64 | |
chmod +x rke_linux-amd64 | |
sudo mv rke_linux-amd64 /usr/local/bin/rke | |
echo "rke : " | |
which rke |
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 | |
# install_kubectl.sh | |
sudo apt-get update && sudo apt-get install -y apt-transport-https | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list | |
sudo apt-get update && sudo apt-get install -y kubectl | |
echo "kubectl : " |
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 | |
# install_helm.sh | |
echo "setup service account tiller ..." | |
kubectl -n kube-system create serviceaccount tiller | |
kubectl -n kube-system get sa tiller -o yaml | |
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller | |
echo "" | |
echo "context : " |
OlderNewer