How can I run Buildbot build steps on worker/slave as non-root

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-14 02:02:22

问题


I'm having issue building electron via electron-packager when I run it as root. However, it works just fine when I run it as other user, say, vagrant.

I've already asked question regarding the problem here.

However, I think that if I can configure Buildbot to run as non-root on worker/slave I can get past the issue.

I just can't find any resources that explain such a configuration setup.

I'm running Buildbot Master and Worker(Slave) an separate Vagrant CentOS7 VM's. All is working, but build step that calls npm run-script build-linux fails as described in linked question.

Environment info

Mac OS X 10.11.5
Vagrant version: 1.8.4
Linux CentOS 7 3.10.0-327.18.2.el7.x86_64
Python version: 2.7.5
Buildbot version: 0.8.14
Buildslave version: 0.8.14
Twisted version: 16.3.2

回答1:


Buildbot-slave was running as root because I was using sudo in the provisioning script, i.e.

sudo pip install buildbot-slave

Fix was simply using:

pip install buildbot-slave

Running twistd --nodaemon --no_save -y buildbot.tac & via supervisord. Set user=vagrant in buildbot.conf file. Need to vagrant ssh into vm to run supervisord -n &, as running that via provision.sh during vagrant up still runs buildslave as root.

Thanks to comment by @Louis for pointing me in right direction.



来源:https://stackoverflow.com/questions/39190540/how-can-i-run-buildbot-build-steps-on-worker-slave-as-non-root

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!