Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace k0s.service.j2 template with adoption of new k0s install sub command #3

Closed
usrbinkat opened this issue Jan 6, 2021 · 2 comments

Comments

@usrbinkat
Copy link

usrbinkat commented Jan 6, 2021

Enhancement:

k0s now supports a full featured templating mechanism to write the systemd service file. Recommend adoption of up stream native systemd service file creation strategy.

Relevant code:

Usage:

root@k0s:~# k0s install --help
Helper command for setting up k0s on a brand-new system. Must be run as root (or with sudo)

Usage:
  k0s install [flags]

Flags:
  -h, --help          help for install
      --role string   node role (possible values: server or worker. In a single-node setup, a worker role should be used) (default "server")

Global Flags:
  -c, --config string            config file (default: ./k0s.yaml)
      --data-dir string          Data Directory for k0s (default: /var/lib/k0s). DO NOT CHANGE for an existing setup, things will break!
  -d, --debug                    Debug logging (default: false)
  -l, --logging stringToString   Logging Levels for the different components
@movd
Copy link
Owner

movd commented Jan 7, 2021

Let's do this. This will be great because we'll have the system unit file from k0s as a single source of truth. From what I see in the code of the k0s install command, it also works with workers. We can pass a path to a token file as an argument.

Update: Creating systemd services for worker nodes is not yet implemented in the install command but is sure to come. We can implement it once the install command has matured a bit more.

movd added a commit that referenced this issue Jan 22, 2021
- Fixes #3
- Updates k0s to v0.10.0-beta1
@movd
Copy link
Owner

movd commented Jan 22, 2021

@usrbinkat The k0s install command now supports adding workers. I've updated the playbook to use the command to create services for controller and worker nodes. Feel free to look over it. I willl create a release ones the final version of k0s-v0.10.0 is available 😃

@movd movd closed this as completed Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants