Commit Graph

144 Commits

Author SHA1 Message Date
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
Staf Wagemakers
e2c4882dba fixed ansible lint error: set -o pipefail added. 2020-07-22 20:48:40 +02:00
Staf Wagemakers
4058ee42e6 killall containerd-shim-runc-v2 added
umount k3s filesystems added
2020-07-22 18:43:06 +02:00
b-m-f
876b083ac9
Change extra_node_args to extra_agent_args 2020-07-21 16:50:46 +02:00
b-m-f
e6bee3e17f
Pass through extra arguments to the nodes with extra_node_args group variable 2020-07-21 14:12:20 +02:00
Maximilian Ehlers
4e5fe89150
Update main.yml
Fixes small typo
2020-07-20 13:40:52 +02:00
guofeng zhang
1971b5741c Fixes: #56 2020-07-14 23:14:20 +08:00
David Putzolu
a9294b1d43 Skip ARM specific tasks on Ubuntu to fix issue 40 2020-06-20 17:10:42 -07:00
David Putzolu
a850b4a89a Fix Raspbian rol eto run correctly on Ubuntu Ansible host 2020-06-06 09:13:54 -07:00
David Putzolu
952768e26e Simplify Ubuntu to reboot no matter what 2020-05-31 10:24:12 -07:00
David Putzolu
a9affdf9e6 Remove file created for Timezone feature addition 2020-05-31 10:21:00 -07:00
David Putzolu
6075693481 Remove timezone changes to focus branch on just ubuntu 2020-05-31 10:16:09 -07:00
David Putzolu
92b235c8d5 Merge branch 'master' of https://github.com/fnord123/k3s-ansible 2020-05-31 09:11:20 -07:00
David Putzolu
26a6c52add Fixed conflicts between upstream and master. 2020-05-31 09:10:38 -07:00
David Putzolu
afbe4aceb6 Add missing newline at eof 2020-05-30 12:07:35 -07:00
David Putzolu
3911f28d2a Fix image downloading for Raspbian64 2020-05-30 09:54:34 -07:00
David Putzolu
6534ecaa83 Fix to make work on Raspbian64 2020-05-30 08:37:12 -07:00
David Putzolu
338d5eb654 Finally installed ansible-lint and fixed all lint errors. 2020-05-23 15:40:59 -07:00
David Putzolu
9422f65b5b Make cgroup enabling idempotent and fix ansible lint checks. 2020-05-23 09:31:40 -07:00
David Putzolu
58d847a78e More yamllint cleanup 2020-05-22 11:40:26 -07:00
David Putzolu
331c118049 Lint cleanup timezone setting support. 2020-05-22 11:36:19 -07:00
David Putzolu
930f1b5586 Clean up conditionals a bit 2020-05-22 11:11:00 -07:00
David Putzolu
61c0e513fc Merge remote-tracking branch 'upstream/master' 2020-05-22 09:07:30 -07:00
David Putzolu
9ad3dd93e4 Add support for ubuntu 2020-05-22 09:01:03 -07:00
Markus Fischbacher
5d92b0ac41
make sure its Raspbian Buster 2020-05-19 17:15:40 +02:00
Markus Fischbacher
02e9b3607d
change to native ansible iptables flush 2020-05-19 09:36:53 +02:00
Markus Fischbacher
bdd2d21dfc
fix ansible-lint error 2020-05-19 09:22:51 +02:00
Markus Fischbacher
9452fd4b09
iptables-legacy for Raspian Buster 2020-05-19 09:13:29 +02:00
Jeff Geerling
ba1b9ae3f1 Fixes #26: Ignore failure in service task in reset playbook so it can run. 2020-05-18 08:35:43 -05:00
Julien DOCHE
caf35f2ba8
Merge pull request #18 from geerlingguy/17-fix-changed-check
Fixes #17: Fix is changed check so reboot task doesn't fail.
2020-05-18 10:31:30 +02:00
Jeff Geerling
70888c8b74 Fixes #22: Set proper file mode using an octal. 2020-05-16 22:27:08 -05:00
Jeff Geerling
5e51cf0365 Fixes #17: Fix is changed check so reboot task doesn't fail. 2020-05-14 21:42:01 -05:00
Julien DOCHE
12aad6598a Add /usr/local/bin to secure_path, Add br_netfilter on centos
Signed-off-by: Julien DOCHE <julien.doche@gmail.com>
2020-05-13 16:20:54 +02:00
Vincent RABAH
1af4255e8f
Merge pull request #1 from St0rmingBr4in/fix-centos-1
Fix systemd TimeoutStartSec
2020-05-13 09:46:29 +02:00
Jeff Geerling
e47af78bfd Fixes #3: Fix linting issues, add ansible-lint and yamllint configuration. 2020-05-12 16:00:32 -05:00
Julien DOCHE
3bee6136fc
Merge pull request #8 from geerlingguy/5-reboot-module
Fixes #5: Use Ansible's reboot module instead of reboot command.
2020-05-12 22:53:41 +02:00
Jeff Geerling
de1e73843a Fixes #9: Make sure both iptables and ip6tables are configured correctly. 2020-05-12 15:25:01 -05:00
Jeff Geerling
51407213ef Fixes #5: Use Ansible's reboot module instead of reboot command. 2020-05-12 15:22:32 -05:00
Julien DOCHE
71dd910ec1 Fix systemd TimeoutStartSec
Signed-off-by: Julien DOCHE <julien.doche@gmail.com>
2020-05-12 17:20:53 +02:00
Craig Jellick
62914a0cfc Merge pull request #1735 from stellirin/performance
[systemd] Add value to LimitNOFILE due to performance problems
2020-05-06 16:37:37 -07:00
Adam Farden
df10b51c91 [systemd] Add value to LimitNOFILE due to performance problems
When k3s is installed on an OS with default high ulimits, performance
issues can be observed. This was discovered on CoreOS where the default
value is 1073741816. Symptoms include very slow file operations such
as installing a Rook/Ceph cluster will take ~6 hours instead of ~10 minutes.

A google search for 'container LimitNOFILE' will show that most major
projects set this already, including the (unused) containerd systemd unit
found in this repository at /vendor/github.com/containerd/containerd/containerd.service

k3OS is not affected becuasse the default there is already 1048576.

See description in coreos/fedora-coreos-tracker#329
2020-05-03 09:37:00 +02:00
Jeff Geerling
33686cadae Fixes #1729: Use 'is changed' instead of non-existent changed filter. 2020-05-01 22:42:42 -05:00
Julien DOCHE
62a50429ca contrib/ansible: Add reset role and playbook to reset a node (#1565)
Signed-off-by: Julien DOCHE <julien.doche@gmail.com>
2020-03-25 12:36:28 -07:00
Arpan Kapoor
b1d3202461 Add ExecStartPre to ansible systemd node unit files 2020-03-01 19:32:19 +05:30
Arpan Kapoor
242cfa424c Add Type and TimeoutStartSec to ansible systemd unit files 2020-03-01 19:31:31 +05:30
Erik Wilson
3d738d887a Merge pull request #1430 from St0rmingBr4in/fix-home
contrib/ansible: Fix home path and use kubectl to set the server url in conf
2020-02-24 15:24:33 -07:00
Julien DOCHE
d63ae87e02 contrib/ansible: Add extra_server_args variable
Signed-off-by: Julien DOCHE <julien.doche@gmail.com>
2020-02-17 21:42:40 +01:00
Julien DOCHE
7f68b7f3cd contrib/ansible: Use kubectl to set the server url in conf
Sometimes https://127.0.0.1:6443 can be written in the conf, the regexp does
not account for that.

Signed-off-by: Julien DOCHE <julien.doche@gmail.com>
2020-02-17 20:55:44 +01:00
Julien DOCHE
ca9702f65b contrib/ansible: Fix home is not necessarily in /home
Signed-off-by: Julien DOCHE <julien.doche@gmail.com>
2020-02-17 20:49:01 +01:00
James Harrington
ed56b606b8 Fix indentation 2019-10-27 23:34:34 -04:00
Matthias Riegler
2b10d43fa1 CentOS/RHEL compatibility for Ansible roles
- Setting IPv4 & IPv6 forwarding
- Setting `sysctl:net.bridge.bridge-nf-call-iptables` and `bridge-nf-call-ip6tables` to enabled since it is disabled by default on some CentOS systems
2019-09-29 00:19:18 +02:00
Chris Jowett
01080c2c36 Add RestartSec to ansible systemd unit files 2019-07-26 13:05:54 -05:00
Pieter van der Merwe
b07143780b Createsymlinks for kubectl and crictl 2019-07-13 21:10:33 +02:00
Pieter van der Merwe
4c48500e18 Add wait for node-token file 2019-07-07 17:24:37 +02:00
Erik Wilson
023bd5693d Merge pull request #513 from tamsky/ansible/improve-raspbian-checks
Ansible: Test for Raspbian before assuming
2019-06-18 10:58:46 -07:00
Erik Wilson
93ff44356b Merge pull request #514 from tamsky/ansible/support-master+node
contrib/ansible: Allow 'server' and 'node' roles to co-exist on a single host
2019-06-18 10:58:21 -07:00
Marc Tamsky
eb664acb6a contrib/ansible: Fixes usage of 'search' in when statements 2019-05-30 02:05:35 -07:00
Marc Tamsky
3341d967be contrib/ansible: Allow master and node roles to co-exist 2019-05-30 01:33:41 -07:00
Marc Tamsky
1a466f92de Test for Raspbian before assuming 2019-05-30 01:30:31 -07:00
Erik Wilson
f2bb86e593 Merge pull request #487 from itwars/master
Ansible - fix typo and add kubeconfig copy to user homedir
2019-05-28 17:28:03 -07:00
Vincent RABAH (itwars)
4abaf35601 Fix typo and add kubeconfig copy to user homedir 2019-05-18 17:58:25 +00:00
galal-hussein
285c803a70 Add Restart=always to systemd unit 2019-05-08 02:54:40 +02:00
galal-hussein
5b9e9b5316 Change systemd unit file target to network-online.target 2019-04-30 01:28:58 +02:00
Vincent RABAH
85b01829fb Ansible provisionning (#217)
Ansible provisionning contrib
2019-04-26 21:10:27 +02:00