Created
March 2, 2017 23:55
-
-
Save dalitun/1409b1807887fcb12711647a405e3ee1 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
apt-get update && apt-get install -y apt-transport-https | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list | |
deb http://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
apt-get update | |
# Install docker if you don't have it already. | |
apt-get install -y docker.io | |
apt-get install -y kubelet kubeadm kubectl kubernetes-cni | |
#master ini | |
kubeadm init | |
#nodes | |
kubeadm join --token <token> <master-ip> | |
#install weave network on the master | |
kubectl applay -f https://git.io/weave-kube | |
#test | |
git clone https://github.com/microservices-demo/microservices-demo | |
kubectl applay -f microservices-demo/deploy/kubernetes/manifests/ | |
sudo wget -O /usr/local/bin/scope \ | |
https://github.com/weaveworks/scope/releases/download/latest_release/scope | |
sudo chmod a+x /usr/local/bin/scope | |
sudo scope launch --service-token=<weave-cloud-token> | |
kubectl apply -f 'https://cloud.weave.works/launch/k8s/weavescope.yaml?service-token=<token>' | |
#https://coreos.com/etcd/docs/latest/v2/docker_guide.html | |
curl -L https://github.com/coreos/etcd/releases/download/v2.0.0/etcd-v2.0.0-linux-amd64.tar.gz -o etcd-v2.0.0-linux-amd64.tar.gz | |
tar xzvf etcd-v2.0.0-linux-amd64.tar.gz | |
cd etcd-v2.0.0-linux-amd64 | |
mkdir /opt/bin | |
cp etcd* /opt/bin | |
#http://blog.dixo.net/2015/05/setting-up-a-secure-etcd-cluster/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment