|
|
## Description
|
|
|
|
|
|
This is a Ubuntu server 18.04.3 ( 4.15.0-65-generic)
|
|
|
with NGINX and Phusion passenger to serve the ELN Rails application with Postgres 10 .
|
|
|
The application was installed by running the [installation script](https://git.scc.kit.edu/ComPlat/chemotion_eln_server/blob/v0.5.0/INSTALL.md#on-a-ubuntu-server))
|
|
|
The OS has 2 user accounts (**chemotion**, **production**).
|
|
|
Only **dev** (password: `chemotion2019` ) is in the sudo group (admin).
|
|
|
|
|
|
|
|
|
## Download and import the VM template
|
|
|
|
|
|
Download the following files (chemotion_ELN git rev: [4467ae5b](https://git.scc.kit.edu/ComPlat/chemotion_eln_server/-/network/v0.5.0?utf8=%E2%9C%93&extended_sha1=4467ae5b476ca8879dd25d16440b890e05cd01aa)):
|
|
|
* [ELN-machine.ovf]()
|
|
|
* [ELN-machine-1.vmdk]() (~2.3GB)
|
|
|
|
|
|
SHA256(ELN-template-20191010.ovf)=
|
|
|
|
|
|
SHA256(ELN-template-20191010-1.vmdk)=
|
|
|
|
|
|
The template was prepared on a 25 GB disk.
|
|
|
|
|
|
[how to import with VirtualBox](https://docs.oracle.com/cd/E26217_01/E26796/html/qs-import-vm.html)
|
|
|
|
|
|
|
|
|
## Important: first things to do after starting the machine
|
|
|
|
|
|
The first thing to do after the VM is mounted and started, is to log in as **chemotion** user and:
|
|
|
* (if necessary reconfigure your keyboard properly: `sudo dpkg-reconfigure keyboard-configuration`)
|
|
|
* **change the users password**: `sudo passwd USERNAME` where username takes chemotion, production
|
|
|
* **reset the ssh authorized_keys** (/home/USERNAME/.ssh/authorized_keys) and add your own key for the different users (NB: ssh password login is NOT disabled yet).
|
|
|
* **reconfigure the network setting**: In this VM template, the interface is named ens160 and use dhcp. Check the correct name of your network interface (List available new interface: `ip addr`) and update /etc/cloud/cloud.cfg.d/50-curtin-networking.cfg . Then apply the changes ( `sudo netplan apply`).
|
|
|
|
|
|
* run setup script as **dev** `sudo /home/dev/run_setup_scripts.sh`
|
|
|
|
|
|
The selected scripts are in /home/dev/setup_scripts_enabled (linked from /home/dev/setup_scripts_availables) and will do the following:
|
|
|
|
|
|
|
|
|
| # | description |
|
|
|
| -- | -------- |
|
|
|
| 00 | Regenerate OpenSSH Host Keys |
|
|
|
| 10 | Reset the ELN production application secret key (cookie encryption ..) |
|
|
|
| 11 | Reset the ELN production DB password |
|
|
|
| 12 | Restart the ELN web application and background jobs |
|
|
|
| 13 | Reset the dev user ssh key and copy to prod to allow app deployment|
|
|
|
| 20 | |
|
|
|
|
|
|
|
|
|
|
|
|
If Script 10 or 11 are run, one needs to restart the application (13).
|
|
|
|
|
|
|
|
|
## Running a production server.
|
|
|
|
|
|
The rails application chemotion_ELN is installed for production under the user **production** at /var/www/chemotion_ELN. It should already be running after booting, just go to the ip of the VM (`ip addr` to list the connected interfaces).
|
|
|
(The web application and background jobs are started at machine boot through cron initialization, see script at /home/production/boot-ELN.sh and `crontab -l` for **prod**)
|
|
|
|
|
|
Unless you ran the setup scripts, it is wise to change the secret_key_var variable (and the db password) stored at /var/www/chemotion_ELN/shared/.env
|
|
|
|
|
|
There is already one test user account (email: test.user@kit.edu, password: `@kit.edu`).
|
|
|
|
|
|
There is also one admin account (email: eln-admin@kit.edu, pw: `PleaseChangeYourPassword`). **You have to change this password**
|
|
|
|
|
|
|
|
|
## ssl communication with the production server
|
|
|
|
|
|
https connection is not set. You need to get a certificate (eg using lets encrpyt), or use self signed certificate, and adapt the nginx configuration.
|
|
|
|
|
|
|
|
|
## Backup
|
|
|
|
|
|
Your important data are the postgresql DB and the uploaded files (..chemotion_ELN/shared/uploads and ..chemotion_ELN/shared/tmp/uploads)
|
|
|
Also the molecule sample reaction research_plan images in ..chemotion_ELN/shared/public/images should also be backed up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|