User:Ncopa/buildmsg

From Alpine Linux
Revision as of 11:51, 24 April 2013 by Ncopa (talk | contribs)

Note how to set up a new build server using buildmsg


build:~# setup-vs-guest Hostname for new vserver: build-2-6 Available network interfaces are: lo eth2 eth3 bond0 dummy0. Which one to use for build-2-6? (or 'done') [dummy0] Enter IP address/mask for dummy0: [192.168.8.99/24] 192.168.8.26/24 Available network interfaces are: lo eth2 eth3 bond0. Which one to use for build-2-6? (or 'done') [done] Enter context id for build-2-6: [10026] Enter guest machine architecture (i686 or x86_64): [x86_64] i686 Enter template file (or empty for generate a new): Generating template...


cp /etc/vservers/build-2-5/fstab /etc/vservers/build-2-6/ mkdir /vservers/build-2-6/var/cache/distfiles

echo "~single_ip" >> /etc/vservers/build-2-6/nflags cp -a /vservers/build-2-5/root/.ssh/ /vservers/build-2-6/root/

  1. firewall DNAT

iptables -t nat -A PREROUTING -d 91.220.88.36/32 -p tcp -m tcp --dport 22026 -j DNAT --to-destination 192.168.8.26:22 /etc/init.d/iptables save lbu ci

vserver build-2-6 start vserver build-2-6 enter

echo http://dl-3.alpinelinux.org/alpine/v2.5/packages/main > /etc/apk/repositories

apk add -U openssh alpine-sdk rsync lua-posix lua-zmq

sed -i -e 's/\#ListenAddress 0.0.0.0/ListenAddress 192.168.8.26/' /etc/ssh/sshd_config sed -i -e 's/\#UseDNS.*/UseDNS no/' /etc/ssh/sshd_config rc-update add sshd /etc/init.d/sshd restart


adduser buildozer addgroup buildozer wheel ; addgroup buildozer abuild

visudo

# Same thing without a password
%wheel  ALL=(ALL) NOPASSWD: ALL

cp -a /root/.ssh /home/buildozer/

# logout from vserver enter

cp -a /vservers/build-2-5/home/buildozer/.abuild /vservers/build-2-6/home/buildozer/


  1. log in via ssh from desktop:

ssh -p buildozer@dev.alpinelinux.org

sudo chown -R buildozer:buildozer .abuild/

vi .ssh/config

Host nl.alpinelinux.org

Port 22014

  1. test ssh. needed for upload

ssh nl.alpinelinux.org

mkdir ~/packages

git clone git://git.alpinelinux.org/aports git clone git://git.alpinelinux.org/alpine-iso

echo "2.5.0" > alpine-iso/previous


sudo vi /etc/abuild.conf

export JOBS=4
#USE_COLORS=1
REPODEST=$HOME/packages/
PACKAGER="Buildozer <alpine-devel@lists.alpinelinux.org>"
ABUILD_LOG_CMD="buildmsg-send --server=tcp://git.alpinelinux.org:55555 log $(hostname): abuild:"

git clone git://git.alpinelinux.org/autobuilder cd autobuilder sudo apk add rsync lua-posix lua-zmq make sudo make install

sudo vi /etc/autobuilder.conf

git_branch=master
upload_release=v2.5


/etc/buildmsg/

sudo vi /etc/buildmsg/subscribe.lua

publisher='tcp://dev.alpinelinux.org:55556'
subscriber_command='/etc/buildmsg/buildmsg-script'
subscriber_filter='build master'


sudo vi /etc/buildmsg/client.lua

server='tcp://dev.alpinelinux.org:55555'

sudo vi /etc/conf.d/buildmsg-subscribe buildmsg_user="buildozer" buildmsg_group="buildozer"

sudo /etc/init.d/buildmsg-subscribe start sudo rc-update add buildmsg-subscribe