AWS EC2 Installation

Prerequisites

  • AWS username/password
  • EC2 key pair
  • (Static IP address) A transient IP is adequate and will be used in the video tutorial. Consider a static IP for production. A static IP address is free upon request, but must be used on a running instance. You will be charged for a static IP that is requested but not used.
  • Credit card number - a valid credit card is required to register. Note that these are Amazon requirements.

Installation

Note: the video tutorial of AWS EC2 installation of LIMS*Nucleus describes installation of an older version of LIMS*Nucleus. Though still useful to watch as the overall process and many details are the same, details discussed below supercede what is in the video. The main changes are different names for scripts are being used, LIMS*Nucleus is now packaged as a guix module and so is installed in the store, and because a guix pull must be performed the free tier t2.micro may not provide enough memory. Use t2.medium.

Local: download the archive of install scripts and transfer to AWS with scp:

1
home@HP8300:~$scp -i labsolns.pem $HOME/temp/limsn-ec2.tar.xz  admin@ec2-18-191-151-165.us-east-2.compute.amazonaws.com:.

You must modify the above command with your own keys and the connection address provided to you by Amazon.

AWS: decompress and run the install script:

1
2
admin@ip-172-31-23-11:~$tar -xvf ./limsn-ec2.tar.xz
admin@ip-172-31-23-11:~$./install-limsn-ec2.sh

install-limsn-ec2.sh and guix-install-mod.sh must be in the same directory. Multiple files described below are loaded into the store at PATH_INTO_STORE/limsn/scripts

Supplied Scripts

Scripts available on this website or in /gnu/store are described on the scripts page.

Useful commands

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## start the database server
admin@ip-172-31-25-179:~$ pg_ctl -D /home/admin/lndata -l logfile start

## start the application in detached mode
admin@ip-172-31-25-179:~$ nohup ~/start-limsn.sh

## find the application PID
admin@ip-172-31-25-179:~$ps aux | grep art
admin 1219 1.3 5.5 153504 56172 ? Sl 12:25 0:00 /gnu/store/18hp7flyb3yid3yp49i6qcdq0sbi5l1n-guile-3.0.2/bin/guile \ /gnu/store/imh84i7rcckxd55nndhrnr0j7jr64ffv-artanis-0.5.1/bin/.art-real work -h 0.0.0.0

## kill the application
admin@ip-172-31-25-179:~$kill -9 1219


## delete the database
admin@ip-172-31-25-179:~$ rm -r lndata


## reinstall the database
admin@ip-172-31-25-179:~$ ./install-pg-aws.sh