Actions Web Servers

Various web servers are running at * Each typically runs in a ezjail on a FreeBSD host.
To administer those, you need SSH login privileges on, which shall not be documented here.
(You have access or you don't, for reasons.)

General ezjail maintenance

Get a list of ezjails that currently exist:

root@rita:/home/admin # ezjail-admin list
STA JID  IP              Hostname                       Root Directory
--- ---- --------------- ------------------------------ ------------------------
ZR  1                /usr/jails/www-dispatcher
    1    2a01:4f8:191:444b::2:5/64
ZR  2               /usr/jails/trac
    2    2a01:4f8:191:444b::2:6
ZR  3           /usr/jails/
    3    re0|2a01:4f8:191:444b::2:9/64
ZR  4          /usr/jails/
ZR  5       openmoko-backup                /usr/jails/openmoko-backup
    5    2a01:4f8:191:444b::2:6
ZR  6              /usr/jails/
    6    re0|2a01:4f8:191:444b::2:7
ZR  7            /usr/jails/
    7    re0|2a01:4f8:191:444b::2:13/64
ZR  8                /usr/jails/gitosis
    8    2a01:4f8:191:444b::2:5
ZR  9    gitdaemon                      /usr/jails/gitdaemon
    9    2a01:4f8:191:444b::2:5
ZR  10             /usr/jails/gerrit
    10   re0|2a01:4f8:191:444b::2:12
ZR  11                /usr/jails/
ZR  12                /usr/jails/dns
    12   2a01:4f8:191:444b::2:3
ZR  13               /usr/jails/
    13   2a01:4f8:191:444b::2:8
ZR  14               /usr/jails/cgit
    14   2a01:4f8:191:444b::2:4
ZR  15             /usr/jails/backup-openvpn

Login on an ezjail:

root@rita:/home/admin # ezjail-admin console www-dispatcher

Disk space

ezjail file systems are managed by zfs. Get an overview:

root@rita:/home/admin # zfs list
NAME                               USED  AVAIL  REFER  MOUNTPOINT
tank                               514G  2.13T    31K  none
tank/jails                         492G  2.13T   300K  /usr/jails
tank/jails/backup-openvpn          184M   316M   144M  /usr/jails/backup-openvpn
tank/jails/basejail               1.60G  2.13T   878M  /usr/jails/basejail
tank/jails/basejail9              19.8G  2.13T   891M  /usr/jails/basejail9
tank/jails/cgit                   8.31G  6.69G  1.19G  /usr/jails/cgit
tank/jails/       5.17G  24.8G  2.82G  /usr/jails/
tank/jails/dns                    69.9M   954M  37.9M  /usr/jails/dns
tank/jails/        2.71G  97.3G  2.20G  /usr/jails/
tank/jails/gerrit                 8.33G  1.67G  7.19G  /usr/jails/gerrit
tank/jails/gitdaemon               532M  4.48G   468M  /usr/jails/gitdaemon
tank/jails/gitosis                6.29G  3.71G  5.90G  /usr/jails/gitosis
tank/jails/    54.4G  17.3G  22.7G  /usr/jails/
tank/jails/      3.63G  36.4G  2.49G  /usr/jails/
tank/jails/newjail                4.76M  2.13T  3.89M  /usr/jails/newjail
tank/jails/openmoko-backup         355G   245G   355G  /usr/jails/openmoko-backup
tank/jails/  2.31G  37.7G  1.56G  /usr/jails/
tank/jails/   15.6G  14.4G  15.0G  /usr/jails/
tank/jails/trac                   5.94G  9.06G  5.10G  /usr/jails/trac
tank/jails/www-dispatcher         1.85G  8.15G   532M  /usr/jails/www-dispatcher
tank/root                         22.1G  2.13T  19.0G  /
tank/root/tmp                      149M  2.13T   148M  /tmp
tank/root/var                     1.36G  2.13T  1.15G  /var

In ZFS, a tank contains the actual current file system as well as any number of snapshots thereof.
The 'quota' refers to the combined file system + snapshots, while 'refquota' means only the current file system without snapshots.

This means that has 40G of space for its root file system, while the snapshots may grow indefinitely:

root@rita:/home/admin # zfs get quota,refquota tank/jails/
NAME                            PROPERTY  VALUE     SOURCE
tank/jails/  quota     none      local
tank/jails/  refquota  40G       local

To change the refquota (or quota):

root@rita:/home/admin # zfs set refquota=5G tank/jails/cgit
root@rita:/home/admin # zfs set quota=none tank/jails/cgit

Individual server details


ezjail-admin console www-dispatcher
cd /usr/local/etc/nginx
service nginx reload


ezjail-admin console
cd /usr/local/www/redmine-*
service nginx reload


ezjail-admin console gerrit
ls /usr/local/share/gerrit/config/
cd /usr/local/share/gerrit/
./bin/ stop
/etc/rc.local   # restarts gerrit

To add a git repos to gerrit:

First edit gitosis config so that only gerrit has 'writable' access to the repos.

root@gerrit:~ # su gerrit
[gerrit@gerrit /root]$ cd /usr/local/share/gerrit/git/
[gerrit@gerrit ~/git]$ git clone --bare git://<name>.git
[gerrit@gerrit ~/git]$ exit
root@gerrit:~ # cd /usr/local/share/gerrit/
root@gerrit:/usr/local/share/gerrit # ./bin/ stop
root@gerrit:/usr/local/share/gerrit # /etc/rc.local


ezjail-admin console
service jenkins restart
pkill -9 java && service jenkins start
ezjail-admin restart  # on the ezjail host of course


gitosis access rights config is done via

ezjail-admin console gitosis
cd /usr/local/git/repositories

If a repository is added on gitosis, it also needs to be added on cgit (and gerrit).


ezjail-admin console cgit
vi /etc/config.cgit.repos

To clear the cache:

rm /var/cache/cgit/*

Updated by neels about 4 years ago · 2 revisions

Add picture from clipboard (Maximum size: 48.8 MB)