-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmooh.yml
More file actions
48 lines (48 loc) · 1.85 KB
/
mooh.yml
File metadata and controls
48 lines (48 loc) · 1.85 KB
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
# 1. Install Ansible
# 2. Define your nodes in "hosts" file. They can be hostnames or IPs
# 3. Make sure you have passwordless sudo on the nodes, and passwordless SSH to the nodes from the host where you run ansible
# 4. Adjust settings in "roles/k8s/common/vars/main.yml"
# 5. Adjust locale settings in roles/pi/vars/main.yml
# 6. Run "ansible-playbook -v mooh.yml"
# 7. Profit
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Preliminary setup
- hosts : k8s
roles :
- pi
- k8s/common
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Control Plane Load Balancer
- hosts : k8s_cplb
roles :
- k8s/cplb
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# etcd
- hosts :
- k8s_leader
- k8s_masters
roles :
- k8s/master/etcd
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# First k8s master
- hosts : k8s_leader
roles :
- k8s/master/first
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Additional k8s masters
- hosts : k8s_masters
serial : 1 # kubeadm is touchy about paralell joins
roles :
- k8s/master/others
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# k8s workers
- hosts : k8s_workers
serial : 1 # kubeadm is touchy about paralell joins
roles :
- k8s/worker
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# misc features
- hosts : k8s
roles :
- k8s/features
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~