-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathon_premise.conf
70 lines (63 loc) · 2.55 KB
/
on_premise.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# [Name]
# ip = IP/DNS
# username = ubuntu
# password = test@123
# or
# key = /tmp/test.pem
# cmd = apt-get install python
# or
# local_path = file.txt
# remote_path = /tmp/.
[master_kubernetes]
ip = 10.10.10.10
username = ubuntu
private_key = <path_to_private_key>
command = sudo apt-get update && sudo apt-get install -y apt-transport-https curl
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
sudo apt-get update
sudo apt-get install -y docker-ce kubelet kubeadm kubectl
echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=all
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
sudo kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
sudo iptables -F
[slave_kubernetes]
ip = 10.10.10.11
username = ubuntu
private_key = <path_to_private_key>
command = sudo apt-get update && sudo apt-get install -y apt-transport-https curl
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
sudo apt-get update
sudo apt-get install -y docker-ce kubelet kubeadm kubectl
echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
[send_yaml_file]
ip = 10.10.10.10
username = ubuntu
private_key = <path_to_private_key>
local_path = microservice_prometheus.yaml
remote_path = /tmp/
[exceute_deployment]
ip = 10.10.10.10
username = ubuntu
private_key = <path_to_private_key>
command = kubectl create -f /tmp/microservice_prometheus.yaml
# [ssh_host_1]
# ip = 10.10.10.10
# username = ubuntu
# password = stack@123
# command = hostname -i
#
# [ssh_host_2]
# ip = 10.10.10.10
# username = ubuntu
# command = apt-get install python