Install LIMS*Nucleus using a Guix pack

A Guix pack installation is a simple installation suitable for users not interested in the Guix package manager. The detailed instructions below follow the same process automated by the install script found on the evaluate page, but provides additional diagnostic information.

The first step in the install script is setting up the database. Manually install the database using instructions on the postgres page.

If you are using the install script and it is not executable, change permissions:

1
chmod 777 install-limsn-pack.sh

Download and unzip the archive

1
2
wget https://github.com/labsolns/labsolns/releases/download/v0.1.0p/limsn-0.1.0-pack.tar.gz
tar xf ./limsn-0.1.0-pack.tar.gz

Look at the contents of the bin directory

1
2
3
4
5
6
7
$ls ./bin
art dropuser guile-config initdb oid2name pg_controldata pg_receivewal pg_standby pg_waldump reindexdb
clusterdb ecpg guile-snarf install-pg-aws-ec2.sh pg_archivecleanup pg_ctl pg_recvlogical pg_test_fsync pgbench start-limsn.sh
createdb gnuplot guile-tools install-pg-aws-rds.sh pg_basebackup pg_dump pg_resetwal pg_test_timing postgres vacuumdb
createuser guild init-limsn-channel.sh lnpg.sh pg_checksums pg_dumpall pg_restore pg_upgrade postmaster vacuumlo
dropdb guile init-limsn-pack.sh load-pg.sh pg_config pg_isready pg_rewind pg_verifybackup psql

Various *limsn*.sh scripts are needed to configure and start up LIMS*Nucleus. You can also use psql to diagnose the database.

Place $HOME/bin on $PATH

1
2
3
$export PATH="$HOME/bin${PATH:+:}$PATH"
$echo $PATH
/home/admin/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Note that in the above example I am using the admin account on AWS so $HOME == /home/admin

Initialize LIMS*Nucleus

Initialize by executing ./bin/init-limsn-pack.sh. The function of the various scripts is described on the scripts page. Check that the $HOME/.config/limsn directory has been created and artanis.conf has been copied into the directory:

1
2
$ ls $HOME/.config/limsn
artanis.conf

Check that $HOME/.bashrc has been modified to include exports for LC_ALL, PATH, GUILE_LOAD_PATH, and GUILE_DBD_PATH.

$HOME/.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
...
$cat $HOME/.bashrc
/# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
export LC_ALL="C"
export PATH=/home/admin/bin:/gnu/store/2rl49lcanmqn26s660dd85lv7pfn0ykb-limsn-0.1.0/bin:/home/admin/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
export GUILE_LOAD_PATH=/home/admin/gnu/store/rj0pzbki1m5hpcshs614mhkrgs2b3i9d-artanis-0.5.2/share/guile/site/3.0:/home/admin/gnu/store/780bll8lp0xvj7rnazb2qdnrnb329lbw-guile-json-3.5.0/share/guile/site/3.0:/home/admin/gnu/store/jmn100gjcpqbfpxrhrna6gzab8hxkc86-guile-redis-2.1.1/share/guile/site/3.0:/home/admin/gnu/store/3f0lv3m4vlzqc86750025arbskfrq05p-guile-dbi-2.1.8/share/guile/site/2.2
export GUILE_DBD_PATH=/home/admin/gnu/store/z5kilafxayw2kdvn3anw1shkqij17dqb-guile-dbd-postgresql-2.1.8/lib

source .bashrc to make certain that all environment variables have been properly set:

1
$source $HOME/.bashrc

Modify the artanis.conf configuration file

Critical parameters are described on the configuration page. You must have in hand IP addresses for the database and client.

1
sudo nano $HOME/.config/limsn/artanis.conf

Make sure the database is available and loaded

The psql command below will work on a local database - modify accordingly. You should find 10 preloaded projects. Projects 4-9 are empty and can be used for experimentation:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$psql -U ln_admin -h 127.0.0.1 lndb
psql (13.4, server 11.14 (Debian 11.14-0+deb10u1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

lndb==>select * from project;

id | project_sys_name | descr | project_name | sessions_id | updated
----+------------------+------------------------------------------+----------------------+-------------+-------------------------------
1 | PRJ-1 | 3 plate sets with 2 96 well plates each | With AR, HL | 9999999999 | 2022-04-06 11:07:05.854606+00
2 | PRJ-2 | 1 plate set with 2 384 well plates each | With AR | 9999999999 | 2022-04-06 11:07:06.825439+00
3 | PRJ-3 | 1 plate set with 1 1536 well plate | With AR | 9999999999 | 2022-04-06 11:07:08.32809+00
4 | PRJ-4 | description 4 | MyTestProj4 | 9999999999 | 2022-04-06 11:07:13.364018+00
5 | PRJ-5 | description 5 | MyTestProj5 | 9999999999 | 2022-04-06 11:07:13.365426+00
6 | PRJ-6 | description 6 | MyTestProj6 | 9999999999 | 2022-04-06 11:07:13.367082+00
7 | PRJ-7 | description 7 | MyTestProj7 | 9999999999 | 2022-04-06 11:07:13.368542+00
8 | PRJ-8 | description 8 | MyTestProj8 | 9999999999 | 2022-04-06 11:07:13.370008+00
9 | PRJ-9 | description 9 | MyTestProj9 | 9999999999 | 2022-04-06 11:07:13.371613+00
10 | PRJ-10 | 2 plate sets with 10 96 well plates each | Plates only, no data | 9999999999 | 2022-04-06 11:07:13.372956+00
(10 rows)

lndb=>

Start LIMS*Nucleus

Start in detached mode so you can close the terminal. To kill the process you will need to look up the PID and kill. Start in regular mode to monitor any error messages.

1
$nohup start-limsn.sh &

to kill Ctrl-C in interactive mode or in detached mode:

1
2
3
4
5
$ ps aux | grep artanis
admin 12479 2.9 6.0 154628 60944 pts/0 Sl 13:22 0:00 /gnu/store/cnfsv9ywaacyafkqdqsv2ry8f01yr7a9-guile-3.0.7/bin/guile \ /gnu/store/dfa7p2zvk4xlhaq1y3hsqkzpqd73ggni-artanis-0.5.2/bin/.art-real work -h0.0.0.0 --config=/home/admin/.config/limsn/artanis.conf
admin 12494 0.0 0.0 3084 880 pts/0 S+ 13:22 0:00 grep artanis

$ kill -15 12479