hack.p6c.org - Perl 6 community server
hack.p6c.org is a community server, with the hardware donated by the community, and the server generously hosted by noris network AG.
It offers shell access to community members for developing Perl 6 compilers and modules, running tests and IRC sessions.
Rules for automated jobs
If you set up a job (for example through
cron) that runs unsupervised, please stick to the following safety precautions:
- Guard against multiple parallel execution
For example through
flock -n ~/yourservice.lock -c path/to/your-shell-script
- Place appropriate resource limits
Guard your jobs against run-away memory or CPU usage, for example in bash with:
ulimit -v 2097152 # 2GB ulimit -t 3600 # 1 hour
If your job needs more resources, it's OK to pick higher limits.
Just look what a typical execution needs, and multiply it with a safety margin (1.5 to 3)
IPv4 address: 188.8.131.52
IPv6 addresses: 2001:780:101:ff00::2:1 to 2001:780:101:ff00::2:9.
(The complete block 2001:780:101:ff00::2:1 to 2001:780:101:ff00::2:ffff is available for this host, the addresses just aren't all bound to the interface yet).
SSH Host Public Keys
1024 5c:cd:90:f7:e1:cc:cd:5b:2d:2a:fb:65:85:0b:83:a8 /etc/ssh/ssh_host_dsa_key.pub (DSA)
256 99:47:b8:06:bb:ea:5c:35:37:9b:64:d6:e5:2d:9b:da /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA)
2048 81:6d:dd:58:37:5c:9f:b2:92:65:cf:67:7c:c9:af:16 /etc/ssh/ssh_host_rsa_key.pub (RSA)
rakudobrew offers a rakudo installation with some modules. To use it, use
source ~rakudobrew/rakudobrew-bash in a bash profile script (
~/.profile) or in bash session. This will extend your $PATH variable to include a
perl6-m binary / script.
/home/rakudobrew/MODULES is a list of modules that will be installed for new versions of rakudo. If you need a module added to that list, add it yourself (if you have the permissions) or ask an administrator to do it for you.
Should a new version of Rakudo be released,
rakudobrew will need to be updated so that dependent projects (e.g. doc.perl6.org and examples.perl6.org) can be run with an up-to-date Rakudo. The steps to do this are:
$ sudo su - rakudobrew # need to do this as the rakudobrew user $ ./upgrade-rakudobrew
This will purge the old
rakudobrew and reinstall MoarVM, NQP and Rakudo from scratch, installing panda afterwards and then the required modules. If this is not what you want, then you will have to perform some of the steps within
The following users have root/sudo access, and can potentially help you:
username IRC nick ======== ======== alex AlexDaniel moritz moritz duff PerlJam claudio El_Che froggs FROGGS timo timotimo coke [Coke] colomon colomon ptc [ptc] bartolin bartolin pmichaud pmichaud
/etc directory is managed with etckeeper (so essentially a git repository). Please commit your changes (using
should be added with
adduser $newuser adduser $newuser users
users applies the resource limits (see next section), so it's kinda important.
The following services are in the same physical location as hack.perl6.org, and thus have both a low latency, and the traffic from and to them is not accounted. So please use them, unless there's a very good reason.
DNS 184.108.40.206 220.127.116.11 2001:780:53::1 2001:780:53::2 NTP ntp1.noris.net ntp2.noris.net Mirror http://mirror.noris.net/
Rsyslog is configured to send log messages to www.p6c.org (in addition to write them to local log files). On www the messages are written to /var/log/hack.p6c.org/all_log.log
The relevant configuration files for rsyslog can be found under /etc/rsyslog.d/ (on hack and www).
Resource limits (intended to avoid unintentional lockups) are configured in /etc/security/limits.conf
Dalek is an IRC bot that reports (used to; see
Geth instead) commits to various github repositories on several IRC channels.
See https://github.com/perl6/mu/blob/master/misc/dalek-push.txt for how to make repositories push notifications to IRC through dalek.
On hack.p6c.org, dalek runs as two separate systemd services (with services files in /etc/systemd/system):
dalek-http.service is a starman server that accepts web notifications from github.
dalek-irc.service is the actual IRC bot. Both run off the source code in
dalek user and group. Both should automatically start at reboot
You can inspect and manipulate them with the usual systemd commands:
systemctl status dalek-irc # status info journalctl -u dalek-irc # get output from dalek-irc journalctl -u -f dalek-irc # get continued output from dalek-irc systemctl restart dalek-irc systemctl stop dalek-irc systemctl start dalek-irc systemctl reset-failed dalek-irc # if 'status' shows it as 'failed' systemctl disable dalek-irc # to stop it from being start at boot time systemctl enable dalek-irc # to re-enable it to be started at boot time
Same goes with
dalek-http, of course.
Geth is an IRC bot that reports commits to IRC channels. The code is located in
/home/geth/geth and service can be restarted with:
sudo service geth restart
synopsebot6 is an IRC bot that gives links to tickets and speculations when they're mentioned. The code is located in
/home/synopsebot/synopsebot and service can be restarted with:
sudo service synopsebot restart
The webapp and
p6lert IRC bot for the p6lert service. The web app runs on hack, but it's reverse-proxied from Apache virtual host set up on www.p6c.org. The bot runs on hack. The code is located in
/home/p6lert/alerts and the services can be restarted with:
sudo service p6lert-web restart sudo service p6lert-irc restart
If there hasn't been a commit since the last time the job ran, by default it will do nothing. However, if you want to force a build (if the environment has changed or is stuck or...), you can force an update with:
$ touch /home/doc.perl6.org/force-update
To set up this site on a new system, some Perl modules need to be installed. You can set up user's own perlbrewed
perl and install the modules with these commands:
\curl -L https://install.perlbrew.pl | bash echo 'source ~/perl5/perlbrew/etc/bashrc' >> ~/.bashrc source ~/.bashrc perlbrew install perl-5.26.0 --notest -Duseshrplib -Dusemultiplicity perlbrew switch perl-5.26.0 perlbrew install-cpanm cpanm -vn CGI File::Find::Rule File::Slurp File::ShareDir Class::Accessor
Rebuilding the host
Occasionally we have to upgrade the OS, you may have to do some special installs to deal with changes made by the upgrade.
The docs build requires a newer version of node/npm than is available via the package manager; (as of this writing, node v8.4.0 is installed). see: https://nodejs.org/en/download/current/
This will include npm - we also need node-gyp. Install this with:
npm install node-gyp -g
If it's installed somewhere other than /usr/local/bin, be sure to update the PATH in the crontab entry.