2

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
Community
  • 1
  • 1
mauricio777
  • 1,296
  • 1
  • 15
  • 15
  • 3
    If you want a worker to run as non-root. Then that's trivial, just log into a non-root account and start the worker. Is it that you want to run only *one step* as non-root? (FWIW, I'd do it the other way around. Run everything with normal privileges and then have a step that depends on root access run with elevated privileges.) – Louis Aug 28 '16 at 12:08
  • @Louis You are so right! I'll post as answer with details of what I did. thanks for pointing me in the right direction. – mauricio777 Aug 28 '16 at 16:53

1 Answers1

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.

mauricio777
  • 1,296
  • 1
  • 15
  • 15