Friday, June 25, 2021

Azure Agent - Configure As a Service Linux or Standalone or Nohup &

https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops


#Configure it as a linux process and using nohup &

./run.sh 

ps -ef --sort=start_time |grep -E 'Agent|run.sh'

--------------------------------------------------------------------------------------------------------

#Configure Listener as a service in Linux, It actually, starts 3 Services 

sudo ./svc.sh install    #Creates a symlink under /etc/systemctl/system

sudo ./svc.sh start

sudo ./svc.sh status

sudo ./svc.sh uninstall  #Uninstall Service(SystemD) ,You should stop before you uninstall.

ps -ef --sort=start_time |grep -E 'Agent|runsvc'


ps -ef --sort=start_time |grep -E 'vsts|Agent|run.sh'

sudo systemctl is-active 'vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service'

sudo systemctl is-enabled 'vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service'

sudo systemctl status 'vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service'


#Configure Listener as a service in Linux, It actually, starts 3 Services 

Loaded: loaded (/etc/systemd/system/vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service; enabled; vendor preset: enabled)

   Active: active (running) since Sat 2021-06-26 04:12:27 UTC; 17min ago

 Main PID: 27333 (runsvc.sh)

    Tasks: 21 (limit: 4915)

   CGroup: /system.slice/vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service

           ├─27333 /bin/bash /home/eks/agent/runsvc.sh

           ├─27336 ./externals/node/bin/node ./bin/AgentService.js

           └─27356 /home/eks/agent/bin/Agent.Listener run --startuptype service


Remove and re-configure an agent (Not Service) The Whole Agent

To remove the agent:

1) Stop and uninstall the service as explained above.

2) Remove the agent.            [As it appears in Agent Pool]

./config.sh remove  [Enter your credentials.]


After you've removed the agent, you can configure it again.

No comments:

Post a Comment

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass