You are not logged in.

#1 2017-09-23 09:49:09

Ragadabing
Member
Registered: 2017-04-22
Posts: 14

Setup Distcc for a VPS

Hi,
I've got a not so much powerful notebook, and quite powerful VPS. So I'd like to reduce the compilation time of (mostly AUR packages) on the notebook using the computing power of my VPS, to which I'm connecting via SSH.  I'm a little bit confused by the Arch Wiki page about Distcc. First to clarify if I understood correctly, my notebook will be the master node (because it wants to compile something), and my VPS my only slave node (because it should do all the work).

So my problem is now on how to correctly configure them.

On my notebook I put in the the /etc/makepkg.conf the following lines:

BUILDENV=(distcc color ccache check !sign)
MAKEFLAGS="-j3"
DISTCC_HOSTS="IP_ADDRESS_OF_MY_VPS/3"

But I'm not sure on what to put on the VPS in the /etc/conf.d/distccd. I should put in there the IP address of the master node which gets accepted, but my notebook doesn't has a static one, so what do I put in there instead?

DISTCC_ARGS="--allow ???"

Last edited by Ragadabing (2017-09-23 09:50:14)

Offline

#2 2017-09-23 10:31:26

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Setup Distcc for a VPS

DISTCC_HOSTS & DISTCC_ARGS expect network ranges, not individual ip addresses .

post ip addr from both systems.

I assume the laptop and vps server can ping eachother ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2017-09-23 10:45:05

Ragadabing
Member
Registered: 2017-04-22
Posts: 14

Re: Setup Distcc for a VPS

Yes, they can ping each other, just checked it.

ip addr from notebook:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e3:55:c4:6c:3d:34 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.9/24 brd 192.168.1.255 scope global dynamic wlp3s0
       valid_lft 6507sec preferred_lft 6507sec
    inet6 fe80::12d0:4878:f123:3dba/64 scope link 
       valid_lft forever preferred_lft forever
3: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 88:99:ae:07:ca:d9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.2/24 brd 192.168.1.255 scope global dynamic enp0s25
       valid_lft 6331sec preferred_lft 6331sec

ip addr from vps:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether da:23:59:ee:12:34 brd ff:ff:ff:ff:ff:ff
    inet 187.23.12.230/22 brd 187.23.12.255 scope global ens3
       valid_lft forever preferred_lft forever
    inet6 fe80::1bca:bc21:5533:09ad/64 scope link 
       valid_lft forever preferred_lft forever

Offline

#4 2017-09-23 10:54:45

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Setup Distcc for a VPS

oops, my reply was a bit to fast ;

DISTCC_ARGS on slaves expects a network range, DISTCC_HOSTS on master doesn't (the notation just looks like a network range).

for the slaves use

DISTCC_ARGS="--allow 192.168.1.0/24"

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2017-09-23 11:05:39

Ragadabing
Member
Registered: 2017-04-22
Posts: 14

Re: Setup Distcc for a VPS

Hm, that doesn't work. How would 192.168.1.0 on the Slave being resolved to my notebook? Isn't the connection only one-way when I connect with SSH to my VPS from my Notebook?
Or could it be that I need to allow my VPS to access my notebook via SSH too to be able to access it via 192.168.1.0?

Offline

#6 2017-09-25 11:04:20

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Setup Distcc for a VPS

Systems that participate in distcc need to have network access to eachother, a ssh connection is not suitable.

Unless your server is accessible through a public ip address, setting up a VPN is probably the easiest way to get both machines in the same network.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB