opiproject / sztp

Secure Zero Touch Provisioning (sZTP) in OPI
Apache License 2.0
20 stars 14 forks source link

consider adding systemd file for the agent #400

Open glimchb opened 5 months ago

glimchb commented 5 months ago

not everybody wants to run in a container...

Xeckt commented 4 months ago

I don't see why that would be a problem. To save having a tonne of config files you can use the command line tool to generate a unit file for you and move it into the necessary folder. This should be easily done. I'm happy to have a look into doing it?

glimchb commented 4 months ago

Go for it @Xeckt

Xeckt commented 4 months ago

I'll work on this now, feel free to assign this to me

Can you also tell me the requirements for the unit file - as it's clear that there are multiple options to run the agent with. Do we just create a template unit file for the user to amend or do we add options to the command to dynamically add information to the unit file?

glimchb commented 4 months ago

Can you also tell me the requirements for the unit file - as it's clear that there are multiple options to run the agent with. Do we just create a template unit file for the user to amend or do we add options to the command to dynamically add information to the unit file?

part of the task is to brainstorm on what we can/should do for users...

Xeckt commented 4 months ago

Sure. We can just give them a basic systemd unit file for them to amend themselves, or we give them a few options.

The only reason I opened a PR with the code to generate one from the agent CLI is so that they dont have to scour the git for it and can generate on the fly.

glimchb commented 4 months ago

We can package an rpm/deb file with go exec of the agent and systemd unit file and publish that in addition to the docker we publish today

Xeckt commented 4 months ago

By package you mean embed the deb file with the binary? Not sure I understand what you mean here.