jenkinsci / azure-vm-agents-plugin

This repo is for azure vm agents plugin for jenkins. Azure devops CICD is the team which owns it for now
https://plugins.jenkins.io/azure-vm-agents/
46 stars 101 forks source link

Linux inbound agent sample script should run the agent as a service #409

Closed timja closed 1 year ago

timja commented 1 year ago

What feature do you want to see added?

Linux inbound agent sample script should run the agent as a systemd service so that if the VM reboots (or something else causes the process to die) the agent reconnects

Upstream changes

see

dduportal commented 1 year ago

A few notes out of my brain, for this feature:

timja commented 1 year ago

Would cloudinit be an option (as it's run on each restart on most cloud providers)?

could be but I was figuring why not just configure a systemd service as part of packer build / init script. The windows example is here which sets it up a windows service and seems to work well: https://raw.githubusercontent.com/jenkinsci/azure-vm-agents-plugin/HEAD/docs/init-scripts/windows-inbound-agent.ps1

Support for non systemd distribution: WDYT mentioning it's not supported in the doc. ?

The init script is up to administrators to configure either in the init script or as part of an image build. I wouldn't say it's not supported just no example provided.