linci

Setting up a server

To setup a linci server you need a modern Ubuntu VM with minimal resources. Add to that the resources needed for the builds you want to run. Ubuntu is recomended and tested, modern Debian should be OK, it is not recommended to use a very lightweight container such as busybox, as well as installing linci, you need to install the tool chain for each build you wish to run. Running gcc my.c is going to be complicated in busybox. It will be easy in Debian. There is nothing in linci that is specific to Debian, that is whats its developed and tested on, and its packaged as a .deb.

Dependencies

linci's dependencies in the deb file are ngircd, ii, gawk, openssl, openssh-server, task-spooler with the exception of gawk its not too complicated to work around each of those deps if they cause you issues.

linci is very much dependent on bash, gawk is used for reading config files.

Install

Install the deb with dpkg -i linci-*.deb, or setup apt as per the instructions here. This will install the linci application, create directories, and create the ci user, which is the user that typically runs linci commands.

Boot

On boot its recommeneded to wipe /tmp/linci/ if your distro does not do this already, and to start ii and tsp.

Boot scripts are found in /usr/share/linci/init A simple boot procedure is to add this to /etc/rc.local
/usr/share/linci/init/init-tmp-linci.sh
su - ci /usr/share/linci/init/init-ii.sh &
su - ci /usr/share/linci/init/init-tsp.sh &

IRC

Setting up an IRCd server is a case of booting the ngircd deamon that is installed with linci. If you don't want to host an IRCd you can use freenode by configuring /etc/linci/irc.conf By default linci sends all status messages to IRC and if IRC is down builds hang. The idea here is that linci's main job is to run builds and tell you when they break. If it can't tell you when they break why run the job? If thats not your use case and you don't want to use IRC you can totally disable IRC by setting export NOTIFY_IRC_ENABLE=false in irc.conf

Email

Email is sent by calling the mailx, by default, this will dump mail in a file somewhere locally. Setting up postfix od ssmtp are probably the simplest ways to get up and running with email notifications. Setting export NOTIFY_MAIL_ENABLE=true in mail.conf will enable sending of emails. You should set a default recipient, individual jobs or environments can override this value. There is no clever stuff to send emails to the person that did the submit.

linci shell

If you prefer the linci shell for the ci user add this to the bottom of /home/ci/.bashrc

# replace current shell with the linci one
test -z "$NOLINCI" && exec linci shell
This is not done by default because this has side effects for scripts that presume a login shell is plain bash. i.e. it may break things that do bash -l.