Derek Nola
20afd4f19e
Simplify K3s service startup for HA
...
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-08 15:16:28 -08:00
Derek Nola
565c9fa049
Enforce use of a defined token. Simplifies additional server and agent joining process.
...
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-08 14:38:57 -08:00
Derek Nola
9ecdc933ca
Add Vagrantfile for local testing
...
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-08 13:42:11 -08:00
Derek Nola
0cd9ffc17f
Use K3s install script instead of direct download
...
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-08 13:41:50 -08:00
Assaf Sapir
057b3bfc07
Add archlinux (aarch64) support ( #146 )
...
* Add archlinux (aarch64) support
Signed-off-by: Assaf Sapir <meijin007@gmail.com >
2023-11-08 10:31:51 -08:00
Derek Nola
83de43125b
Lint fixes
...
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-08 10:23:56 -08:00
Nicholas Malcolm
8484c015d6
Fix k3s_server_location only working on default
...
- K3s has some absolute paths set in various places which cannot be
changed. Using a symbolic link was the easiest fix. This is nice for
running K3S on SBC that must boot to SD but K3S data should be stored
on a faster drive.
- Other changes are for making the site playbook replayable without
resetting the cluster. Ideally you can rerun it to check existing
nodes or to add new ones.
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-08 10:23:56 -08:00
Nicholas Malcolm
7cc70ad609
HA fixes and code tweaks
...
- Reboot playbook updated for HA testing
- Small adjustment made after testing HA with playbook
- Fix reset playbook failing in some cases
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-08 10:23:56 -08:00
Nicholas Malcolm
cd725780f5
Move k3s_server_location to inventory vars
...
- All environemt variables are now in one place
- Add --data-dir option to agent and init service
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-08 10:23:56 -08:00
Nicholas Malcolm
5b3e2a5db6
Reorganize server tasks, copy config to local
...
- Inital server starts first so it can grab the token for other servers and copy the config to localhost
- More cleanup of agent/server naming scheme
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-08 10:23:56 -08:00
Nicholas Malcolm
df67c61ba5
Add HA option, change to yaml inventory, cleanup
...
- HA option for multiple server nodes using embedded etcd
- Switch to yaml inventory file for easier editing and combining vars
- Update to full ansible module names
- Change master/node names to server/agent
- Cleanup small linting errors
- Add reboot playbook which staggers reboot to keep HA cluster up
- Move playbooks to playbook directory
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-08 10:23:56 -08:00
Derek Nola
1031ea3ce2
Comply with ansible-lint
...
Signed-off-by: Derek Nola <derek.nola@suse.com >
2023-11-07 14:00:07 -08:00
Mark Hahl
6749ca5874
use full path for k3s binary ( #143 )
...
Signed-off-by: Mark Hahl <mark@hahl.id.au >
2023-11-07 10:37:24 -08:00
Nikoleta Verbeck
12db5ef1f1
Fixes related to K3s Issue https://github.com/k3s-io/k3s/issues/4234 ( #204 )
...
Signed-off-by: Nikoleta Verbeck <nerdynick@gmail.comn >
Co-authored-by: Nikoleta Verbeck <nerdynick@gmail.comn >
2023-11-07 09:55:02 -08:00
Razurac
8474a8b4e8
Update pre_req tasks ( #128 )
...
On Rhel 8.4 ansible_distribution is set to RedHat so the current when condition will fail
Added "RedHat" to the when condition.
Signed-off-by: Razurac <a.zelch@t-online.de >
2023-11-07 09:54:32 -08:00
Frank Villaro-Dixon
b1c8c063f7
k3s download: increase get_url timeout 10→120s ( #213 )
...
The default `get_url` module timeout is 10s. As the k3s binary is around
60MB, it can take some time to download on slow connections or when many
downloads are concurrent (multi-node install).
Increase the timeout a bit from 10s to 120s.
Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu >
2023-11-07 09:54:21 -08:00
kcir
b65b610023
Fix Raspberry tasks for Debian ( #151 )
...
* Fix Raspberry tasks for Debian
Signed-off-by: Rick <r.wagenaar@icloud.com >
Signed-off-by: Rick <rick@kcir.nl >
* Move debian yaml files
Signed-off-by: Rick <r.wagenaar@icloud.com >
Signed-off-by: Rick <rick@kcir.nl >
* Add task for Debian to install iptables
Signed-off-by: Rick <rick@kcir.nl >
* Add check for cmdline.txt path for Debian
Signed-off-by: Rick <rick@kcir.nl >
* Remove Debian11 tasks file
Signed-off-by: Rick <rick@kcir.nl >
---------
Signed-off-by: Rick <r.wagenaar@icloud.com >
Signed-off-by: Rick <rick@kcir.nl >
Co-authored-by: Rick <r.wagenaar@icloud.com >
Co-authored-by: Rick <rick@kcir.nl >
2023-11-07 09:53:59 -08:00
Julien DOCHE
5f7bf0d388
Merge pull request #134 from clambin/ipv6
...
don't try to set ipv6 forward if ipv6 not enabled
2021-10-26 19:16:57 +02:00
clambin
402f83553e
don't try to set ipv6 forward if ipv6 not enabled
...
Signed-off-by: clambin <christophe.lambin@gmail.com >
2021-07-10 15:13:08 +02:00
clambin
98d388c9fa
support 'k3s server --data-dir' to put k3s server files in a non-standard location
...
Signed-off-by: clambin <christophe.lambin@gmail.com >
2021-07-10 15:10:53 +02:00
Julien DOCHE
ef8d3a1949
Merge pull request #96 from tomasz-kuzemko/patch-1
...
Set service file mode -x
2021-02-23 16:30:42 +01:00
Julien DOCHE
88e1a43543
Make sure the reset role can be run with --check
...
We need to compute what mountpoints would be unmounted even when running with
--check
Signed-off-by: Julien DOCHE <julien.doche@gmail.com >
2021-02-19 00:19:50 +01:00
Julien DOCHE
54629a46bd
Change reset deletion order to avoid racecondition
...
If the k3s binary is launched after the deletion of `/var/lib/rancher/k3s`, k3s
will automatically create this directory. This change deletes the k3s binary
first so that it cannot be called after `/var/lib/rancher/k3s` is deleted
Signed-off-by: Julien DOCHE <julien.doche@gmail.com >
2021-02-19 00:12:51 +01:00
Staf Wagemakers
fe7bdf8cda
Reorganize the filesystem umount order.
...
* Clean /var/lib/kubelet before /var/lib/rancher/k3s.
* Umount the filesystem tree in reverse order, to ensure the root
is umounted last.
Signed-off-by: Staf Wagemakers <staf@wagemakers.be >
2021-01-24 11:04:30 +01:00
kopwei
7e38173d31
Correct repo path in downloading URL
...
Fix #102 , use k3s-io/k3s instead of rancher/k3s
Signed-off-by: kopwei <kopkop@gmail.com >
2020-12-02 15:06:24 +00:00
Tomasz Kuzemko
29e6acb7e7
Set service file mode -x
...
Systemd service files should not be executable
2020-10-17 23:55:12 +02:00
Julien DOCHE
721c348702
Merge pull request #79 from stafwag/master
...
Moved Raspberry Pi specifics settings to raspberrypi role
2020-09-27 18:59:18 +02:00
Julien DOCHE
a066c77ab5
Merge pull request #80 from jeffspahr/master
...
Fix umount_with_children typo
2020-09-27 18:47:04 +02:00
Lennart Jern
ca7c25b81c
Fix linting errors
2020-09-22 21:08:35 +03:00
Lennart Jern
6873913124
Use checksum with get_url
...
When the checksum is used there is no need to delete the binary first,
as it will be compared to the checksum and downloaded and replaced only
as needed.
2020-09-20 21:19:44 +03:00
jeffspahr
cf65304039
Fix umount_with_children typo
2020-08-16 21:26:25 -04:00
jeffspahr
76e1c7838a
Rename umount_with_childeren.yml to umount_with_children.yml
2020-08-16 21:25:28 -04:00
Staf Wagemakers
f8aebf8ec6
trailing space removed
2020-08-16 21:55:34 +02:00
Staf Wagemakers
c657367755
lint errors corrected
2020-08-16 21:53:00 +02:00
Staf Wagemakers
d2b420588e
support for CentOS on the Raspberry Pi added
2020-08-16 20:38:12 +02:00
Staf Wagemakers
98473e2b09
only execute PI os specific settings on a PI
2020-08-16 12:52:25 +02:00
Staf Wagemakers
a5782b1d61
* updated description
...
* use handler for the reboot
* removed ARM cpu detection
2020-08-16 10:11:15 +02:00
Staf Wagemakers
53efb429e3
moved raspberry specific settings to raspberrypi role
2020-08-16 10:03:10 +02:00
John
05ade9a4bb
moved handler inside the role folder
2020-07-30 22:04:57 -02:30
John
022bf9440f
turned reboot into a handler
2020-07-30 13:33:53 -02:30
John
01de3488a2
Fixed Raspbian detection on 64-bit kernel, only reboot Raspbian if needed
2020-07-30 13:33:53 -02:30
Julien DOCHE
9ff274481d
Merge pull request #54 from fnord123/issue40_cgroups_on_ubuntu_x86
...
Fix cgroups on ubuntu x86 (Issue 40)
2020-07-30 16:36:22 +02:00
Julien DOCHE
ad3dc65cd9
Merge pull request #66 from stafwag/master
...
reset role updated to killall containerd daemons and umount k3s filesystems
2020-07-26 16:26:31 +02:00
Staf Wagemakers
7bab4cb165
removed typo ':'
2020-07-24 20:21:38 +02:00
Staf Wagemakers
e8b0b89d5d
use pkill on the full command line instead of killall
2020-07-24 20:15:48 +02:00
Staf Wagemakers
afc6c8add7
updated to verify the exit code of killall, only report a change if something is killed
2020-07-24 15:46:07 +02:00
Staf Wagemakers
637e49d75e
use lowercase for booleans
2020-07-24 14:16:10 +02:00
Julien DOCHE
386a46d353
Merge pull request #42 from fnord123/master
...
Fix Raspbian role to run correctly on Python 3.x (e.g. Ubuntu 20.04) Ansible host
2020-07-24 11:27:58 +02:00
Julien DOCHE
f83368d05b
Merge pull request #58 from guofengzh/master
...
Fixes : #56
2020-07-24 11:19:46 +02:00
Julien DOCHE
9fbd0e6a76
Merge pull request #64 from b-m-f/patch-1
...
Fix typo in k3s main.yml
2020-07-24 10:45:13 +02:00