[opensuse-buildservice] Server Appliance and Docker Worker
Hello again, In my local testing, I am attempting to separate the worker from the rest of the server. I have the official appliance at https://openbuilds ervice.org/download/ as the server with the worker disabled. I am running an Ubuntu 18.04 Docker container with obs-worker installed and /etc/default/obsworker pointing to the VirtualBox instance. On the VirtualBox side, I've configured /usr/lib/obs/server/BSConfig.pm to point the worker at the server, and the worker receives this information. However, the function "getsources" in bs_worker is still attempting to fetch sources from localhost. Is there a configuration parameter that I missed? Documentation on this seems to be sparse. Kyle -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mär 17 2020, Kyle Edwards wrote:
However, the function "getsources" in bs_worker is still attempting to fetch sources from localhost. Is there a configuration parameter that I missed? Documentation on this seems to be sparse.
You need to set OBS_REPO_SERVERS on the worker, eg in /etc/buildhost.config. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Tue, 2020-03-17 at 21:02 +0100, Andreas Schwab wrote:
On Mär 17 2020, Kyle Edwards wrote:
However, the function "getsources" in bs_worker is still attempting to fetch sources from localhost. Is there a configuration parameter that I missed? Documentation on this seems to be sparse.
You need to set OBS_REPO_SERVERS on the worker, eg in /etc/buildhost.config.
This has already been done. Upon further debugging, it looks like the buildinfo being received from the server still has "localhost" as the srcserver. Where can this be changed? Kyle -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mär 17 2020, Kyle Edwards wrote:
This has already been done. Upon further debugging, it looks like the buildinfo being received from the server still has "localhost" as the srcserver. Where can this be changed?
Check that the following line at the top of BSConfig.pm gives the desired value: my $hostname = Net::Domain::hostfqdn() || 'localhost'; Perhaps there are also jobs that have been created before the reconfiguration. You need to abort and restart them. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Tue, 2020-03-17 at 21:10 +0100, Andreas Schwab wrote:
On Mär 17 2020, Kyle Edwards wrote:
This has already been done. Upon further debugging, it looks like the buildinfo being received from the server still has "localhost" as the srcserver. Where can this be changed?
Check that the following line at the top of BSConfig.pm gives the desired value:
my $hostname = Net::Domain::hostfqdn() || 'localhost';
Perhaps there are also jobs that have been created before the reconfiguration. You need to abort and restart them.
I already changed this line to point to the server's IP address, but the workers are still getting "localhost" from somewhere else. Kyle -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mär 17 2020, Kyle Edwards wrote:
I already changed this line to point to the server's IP address, but the workers are still getting "localhost" from somewhere else.
Did you restart all services? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Tue, 2020-03-17 at 21:36 +0100, Andreas Schwab wrote:
On Mär 17 2020, Kyle Edwards wrote:
I already changed this line to point to the server's IP address, but the workers are still getting "localhost" from somewhere else.
Did you restart all services?
After rebooting the entire appliance I was able to get the server and worker to communicate. I hit a minor snag with the worker not being able to mount, but that was due to the container not having privileges. That is fixed now, and I am currently building a test package. I will let you know if I encounter any more issues. Thank you very much for your help! Kyle -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Dienstag, 17. März 2020, 21:19:31 CET wrote Kyle Edwards:
On Tue, 2020-03-17 at 21:10 +0100, Andreas Schwab wrote:
On Mär 17 2020, Kyle Edwards wrote:
This has already been done. Upon further debugging, it looks like the buildinfo being received from the server still has "localhost" as the srcserver. Where can this be changed?
Check that the following line at the top of BSConfig.pm gives the desired value:
my $hostname = Net::Domain::hostfqdn() || 'localhost';
Perhaps there are also jobs that have been created before the reconfiguration. You need to abort and restart them.
I already changed this line to point to the server's IP address, but the workers are still getting "localhost" from somewhere else.
hm, that should get transfered automatically... are you sure that you don't have another OBS server instance running and it gets the worker code from there? -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Tue, 2020-03-17 at 21:50 +0100, Adrian Schröter wrote:
hm, that should get transfered automatically... are you sure that you don't have another OBS server instance running and it gets the worker code from there?
Please see my latest email - rebooting the server got it sorted out. Thanks for the help. Kyle -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
I am certain more and more people are interested in running at least the workers using containers. Are those images generally available somewhere? Best Christian
On 17. Mar 2020, at 21:51, Kyle Edwards
wrote: On Tue, 2020-03-17 at 21:50 +0100, Adrian Schröter wrote:
hm, that should get transfered automatically... are you sure that you don't have another OBS server instance running and it gets the worker code from there?
Please see my latest email - rebooting the server got it sorted out. Thanks for the help.
Kyle -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mär 18 2020, Felder, Christian wrote:
I am certain more and more people are interested in running at least the workers using containers. Are those images generally available somewhere?
A worker doesn't need any special image. Just use your favourite distro, and install the obs-worker package. The configuration can be put in /etc/buildhost.config. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mittwoch, 18. März 2020, 11:45:51 CET wrote Andreas Schwab:
On Mär 18 2020, Felder, Christian wrote:
I am certain more and more people are interested in running at least the workers using containers. Are those images generally available somewhere?
A worker doesn't need any special image. Just use your favourite distro, and install the obs-worker package. The configuration can be put in /etc/buildhost.config.
right, but be aware that you need priviledegd containers for KVM. And you need KVM if builds are building images, need to be really secure or need a specific kernel. -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
As Adrian mentioned you will need privileged containers for KVM. There is POC to use kubernetes containters as buildworkers using Kubernetes-device-plugin for KVM (like kubevirt). The procedure and results of the POC are documented[1] and waiting to be published. Some feedback on this POC would be nice. [1] https://github.com/openSUSE/obs-docu/pull/138/files Thanks Sumit On 2020-03-18 11:48, Adrian Schröter wrote:
On Mittwoch, 18. März 2020, 11:45:51 CET wrote Andreas Schwab:
On Mär 18 2020, Felder, Christian wrote:
I am certain more and more people are interested in running at least the workers using containers. Are those images generally available somewhere?
A worker doesn't need any special image. Just use your favourite distro, and install the obs-worker package. The configuration can be put in /etc/buildhost.config.
right, but be aware that you need priviledegd containers for KVM.
And you need KVM if builds are building images, need to be really secure or need a specific kernel.
--
Adrian Schroeter email: adrian@suse.de
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5 90409 Nürnberg Germany
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wed, 2020-03-18 at 11:45 +0100, Andreas Schwab wrote:
A worker doesn't need any special image. Just use your favourite distro, and install the obs-worker package. The configuration can be put in /etc/buildhost.config.
FWIW, I was able to make a simple worker out of an Ubuntu 18.04 Docker image. Getting things working on the server-side was a little tricky, and involved more rebooting than I would have liked (the startup process takes about 12 minutes in my VM.) At the very least, making the documentation less sparse would be a good start. This is an awesome project, and it's a shame that information on it isn't as widespread, and difficult to find (especially since it has a name collision with OBS Studio :).) Kyle -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (5)
-
Adrian Schröter
-
Andreas Schwab
-
Felder, Christian
-
Kyle Edwards
-
Sumit Jamgade