-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSupfile
77 lines (75 loc) · 1.87 KB
/
Supfile
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
71
72
73
74
75
76
77
# vi:syntax=yaml
networks:
leader:
hosts:
- root@rpi3-node1
followers:
hosts:
- root@rpi3-node2
- root@rpi3-node3
- root@rpi3-node4
- root@rpi3-node5
test:
hosts:
- root@rpi3-node2
all:
hosts:
- root@rpi3-node1
- root@rpi3-node2
- root@rpi3-node3
- root@rpi3-node4
- root@rpi3-node5
commands:
apt_cache:
desc: install squid-deb-proxy-client
run: apt-get install squid-deb-proxy-client -y
reboot:
desc: reboot system
run: reboot
time:
desc: setup chrony
run: apt-get install chrony -y
update:
desc: system update
run: apt-get update
upgrade:
desc: system upgrade
run: apt-get upgrade -y
uname:
desc: kernel version
run: uname -a
install_k3s:
desc: install or update k3s in node
run: curl -sfL https://get.k3s.io | sh -
uninstall_leader:
desc: uninstall k3s
run: /usr/local/bin/k3s-uninstall.sh
uninstall_worker:
desc: uninstall k3s worker node
run: /usr/local/bin/k3s-agent-uninstall.sh
install_nfs_common:
desc: install nfs drivers
run: apt install nfs-common netbase -y
install_netdata:
desc: install nfs drivers
run: apt install netdata -y
install_node_exporter:
desc: install prometheus node_exporter
run: apt install prometheus-node-exporter -y
pvc_dir:
desc: create pvc dir
run: bash -c "mkdir -p /persistentvolumes && chmod 777 /persistentvolumes"
restart_k3-agent:
desc: restart k3s daemon (followers)
run: systemctl restart k3s-agent.service
showmount:
desc: check if NFS works for host
run: showmount -e 192.168.5.91
upload_registries:
desc: upload configuration files to server
upload:
- src: ./config
dst: /tmp/
setup_registries:
desc: copy registries file
run: mv /tmp/config/registries.yaml /etc/rancher/k3s/registries.yaml