User:Ncopa/buildmsg: Difference between revisions

From Alpine Linux
 
(6 intermediate revisions by the same user not shown)
Line 30: Line 30:


== installing and setting up ssh ==
== installing and setting up ssh ==
vserver build-2-6 enter
vserver build-2-6 enter


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


apk add -U openssh alpine-sdk rsync lua-posix lua-zmq
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/\#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
sed -i -e 's/\#UseDNS.*/UseDNS no/' /etc/ssh/sshd_config
rc-update add sshd
rc-update add sshd
/etc/init.d/sshd restart
/etc/init.d/sshd restart


== prepare buildozer user ==
== prepare buildozer user ==
adduser buildozer
adduser buildozer
addgroup buildozer wheel ; addgroup buildozer abuild
addgroup buildozer wheel ; addgroup buildozer abuild
 
visudo


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


=== logout from vserver enter ===
=== logout from vserver enter ===
cp -a /vservers/build-2-5/home/buildozer/.abuild \
cp -a /vservers/build-2-5/home/buildozer/.abuild \
   /vservers/build-2-5/home/buildozer/.abuild \  
   /vservers/build-2-5/home/buildozer/.ssh \  
   /vservers/build-2-6/home/buildozer/
   /vservers/build-2-6/home/buildozer/


Line 57: Line 58:


  # log in via ssh from desktop
  # log in via ssh from desktop
ssh -p buildozer@dev.alpinelinux.org
ssh -p buildozer@dev.alpinelinux.org


sudo chown -R buildozer:buildozer .abuild/
sudo chown -R buildozer:buildozer .abuild/ .ssh/


=== verify ssh out ===
=== verify ssh out ===
Line 69: Line 70:
  ssh nl.alpinelinux.org
  ssh nl.alpinelinux.org
  exit
  exit


== set up abuild ==
== set up abuild ==
mkdir ~/packages
mkdir ~/packages
 
git clone git://git.alpinelinux.org/aports
git clone git://git.alpinelinux.org/aports
git clone git://git.alpinelinux.org/alpine-iso
git clone git://git.alpinelinux.org/alpine-iso


echo "2.5.0" > alpine-iso/previous
echo "2.5.0" > alpine-iso/previous




sudo vi /etc/abuild.conf
sudo vi /etc/abuild.conf
  export JOBS=4
  export JOBS=4
  #USE_COLORS=1
  #USE_COLORS=1
SRCDEST=/var/cache/distfiles/v2.6
  REPODEST=$HOME/packages/
  REPODEST=$HOME/packages/
  PACKAGER="Buildozer <alpine-devel@lists.alpinelinux.org>"
  PACKAGER="Buildozer <alpine-devel@lists.alpinelinux.org>"
Line 88: Line 89:


== autobuilder/buildmsg ==
== autobuilder/buildmsg ==
git clone git://git.alpinelinux.org/autobuilder
git clone git://git.alpinelinux.org/autobuilder
cd autobuilder
cd autobuilder
make
make
sudo make install
sudo make install
 
sudo vi /etc/autobuilder.conf


sudo vi /etc/autobuilder.conf
  git_branch=master
  git_branch=master
  upload_release=v2.5
  upload_release=v2.6
 
sudo vi /etc/buildmsg/subscribe.lua


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


sudo vi /etc/buildmsg/client.lua


sudo vi /etc/buildmsg/client.lua
  server='tcp://dev.alpinelinux.org:55555'
  server='tcp://dev.alpinelinux.org:55555'


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


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

Latest revision as of 12:35, 24 April 2013

Note how to set up a new build server using buildmsg

vreating new vserver

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/

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

installing and setting up ssh

vserver build-2-6 enter
echo http://nl.alpinelinux.org/alpine/edge/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

prepare buildozer user

adduser buildozer
addgroup buildozer wheel ; addgroup buildozer abuild
visudo
# Same thing without a password
%wheel  ALL=(ALL) NOPASSWD: ALL

logout from vserver enter

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


# log in via ssh from desktop
ssh -p buildozer@dev.alpinelinux.org
sudo chown -R buildozer:buildozer .abuild/ .ssh/

verify ssh out

vi .ssh/config

Host nl.alpinelinux.org

Port 22014

# test ssh. needed for upload
ssh nl.alpinelinux.org
exit

set up abuild

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
SRCDEST=/var/cache/distfiles/v2.6
REPODEST=$HOME/packages/
PACKAGER="Buildozer <alpine-devel@lists.alpinelinux.org>"
ABUILD_LOG_CMD="buildmsg-send --server=tcp://git.alpinelinux.org:55555 log $(hostname): abuild:"

autobuilder/buildmsg

git clone git://git.alpinelinux.org/autobuilder
cd autobuilder
make
sudo make install
sudo vi /etc/autobuilder.conf
git_branch=master
upload_release=v2.6
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