Commit Graph

40 Commits

Author SHA1 Message Date
Derek Nola
9d918c9da0 Handle apparmor for Debian 11 when parser not present
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-11-10 11:03:58 -08:00
Derek Nola
e6233d9f7d
Add support for Service Envs (#237)
* Add support for service ENVs
* Rename PR template
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-11-09 12:30:18 -08:00
Derek Nola
fd6f288b20
Fix K3s Path, Alternative folder in HA (#233)
* Readd #143 fix

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add PR template

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-11-09 09:17:20 -08:00
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
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
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
Tomasz Kuzemko
29e6acb7e7
Set service file mode -x
Systemd service files should not be executable
2020-10-17 23:55:12 +02:00
Lennart Jern
ca7c25b81c Fix linting errors 2020-09-22 21:08:35 +03: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
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
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
71dd910ec1 Fix systemd TimeoutStartSec
Signed-off-by: Julien DOCHE <julien.doche@gmail.com>
2020-05-12 17:20:53 +02: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
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
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
Marc Tamsky
3341d967be contrib/ansible: Allow master and node roles to co-exist 2019-05-30 01:33:41 -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