README.md 4.91 KB
Newer Older
Todor Kondic's avatar
Todor Kondic committed
1
# Environmental Cheminformatics Platform: Plan B
Todor Kondic's avatar
Todor Kondic committed
2
3

This repository contains a collection of ansible scripts which can be
4
5
used to provision an apt based GNU/Linux distribution. Currently used
to provision ECI workstations and virtual machines.
Todor Kondic's avatar
Todor Kondic committed
6
7


8
## Accessing Resources
Todor Kondic's avatar
Todor Kondic committed
9

10
11
12
13
14
When the desktop environment is present on a node (this is the case
for members of the *stations* group of computers), VNC protocol can be
used to access it. Due to particular security setup, only the TigerVNC
viewer can be used to connect to the stations. [available from here
for
Todor Kondic's avatar
Todor Kondic committed
15
Windows](https://bintray.com/tigervnc/stable/download_file?file_path=vncviewer-1.11.0.exe),
16
17
18
19
20
21
22
23
24
or as a package from your GNU/Linux distribution.  For Mac users,
[here is the Java version of the
viewer](https://bintray.com/tigervnc/stable/download_file?file_path=VncViewer-1.11.0.jar).
If you are on Big Sur [try this direct
download](http://tigervnc.bphinz.com/nightly/osx/TigerVNC-1.11.80.dmg).
If you are on Catalina [try this direct
download](https://bintray.com/tigervnc/beta/download_file?file_path=TigerVNC-1.10.90.dmg).
If you are on El Capitan [try this direct
download](https://bintray.com/tigervnc/stable/download_file?file_path=TigerVNC-1.8.0.dmg)
Emma Schymanski's avatar
Emma Schymanski committed
25

Todor Kondic's avatar
Todor Kondic committed
26
27


Todor Kondic's avatar
Todor Kondic committed
28
**Before** connecting, you need: 
Emma Schymanski's avatar
Emma Schymanski committed
29
	- A X509 certificate file (`*.pem`).
Todor Kondic's avatar
Todor Kondic committed
30
	- The IP address of the server.
Todor Kondic's avatar
Todor Kondic committed
31
	- Your username and password.
Todor Kondic's avatar
Todor Kondic committed
32
33
34
35
36
37
38
39
40
41
42
43
44

### Connection instructions

1. Open the VNC viewer.
2. Click `Options`.
3. Switch to `Security` tab.
4. Make sure that at least `TLS with X509 certificates` is checked.
5. Make sure that at least `None` is checked in the `Authentication` section.
6. Set the `Path to X509 certificate` to the location of the X509
   certificate file.
7. Now, click `OK` to accept changes and close the `Options` tab.
8. Fill in the IP address of the server in field `VNC server` and
   append `:5950` to it. So, the `VNC server` entry should look like
Todor Kondic's avatar
Todor Kondic committed
45
   `XXX.XXX.XXX.XXX:5950`, or `example.somewhere.biz`.
Todor Kondic's avatar
Todor Kondic committed
46
9. Click `Connect`.
Todor Kondic's avatar
Todor Kondic committed
47
10. **When at the login screen, ensure you are using the `Xfce Session` (settings wheel, bottom right) before entering your password**.
Emma Schymanski's avatar
Emma Schymanski committed
48
11. Pro-tip: User experience may be better in fullscreen (`F8` and select `fullscreen`)
Todor Kondic's avatar
Todor Kondic committed
49

Todor Kondic's avatar
Todor Kondic committed
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
## Using Environmental Cheminformatics programs

### Getting started with Shinyscreen

Shinyscreen is ECI's mass spectrum inspection program. It was written
in R and exists as a R package. In order to run it, it is necessary to
start a R session. 

While most students get to know R through R Studio, this development
environment (DE) is by no means the only one that can run R (indeed,
you do not even need a DE to run R: try it yourself, start a command
console and type `R` in there). The default choice of R DE on
`alien-one` currently is GNU Emacs with its *Emacs Speaks Statistics
(ESS)* mode.

Steps:
Todor Kondic's avatar
Todor Kondic committed
66

Emma Schymanski's avatar
Emma Schymanski committed
67
1. Fire up emacs
Emma Schymanski's avatar
Emma Schymanski committed
68
2. `Alt-x` (`Cmd-x` for Mac) and `R` gets you an R session
Emma Schymanski's avatar
Emma Schymanski committed
69
3. If asked, set your start working directory, e.g. 
Emma Schymanski's avatar
Emma Schymanski committed
70
`setwd('/mnt/scratch/user/')` 
Emma Schymanski's avatar
Emma Schymanski committed
71
72
73
74
75
76
77
78
79
(where `user` is an alias for your username)
4. Enter `library(shinyscreen)`
5. Enter `options(browser="chromium")`
6. Enter `launch()` 

To create subdirectories for different Shinyscreen calculations, 
use `dir.create()` and `setwd()` to create and set new working 
directories, respectively. This is highly recommended otherwise 
you will auto-detect and/or overwrite previous results. 
Emma Schymanski's avatar
Emma Schymanski committed
80

Todor Kondic's avatar
Todor Kondic committed
81
82
83

Alternatively, there there are two icons on your desktop that will
start Shinyscreen immediately without a R session. One starts the
Todor Kondic's avatar
Todor Kondic committed
84
85
86
~~stable~~outdated version of Shinyscreen. The other runs a
development version (~~you can try it out if you feel
adventurous~~recommended).
Todor Kondic's avatar
Todor Kondic committed
87

Emma Schymanski's avatar
Emma Schymanski committed
88
89
90
91
92
93
94
95
96
### Some emacs tips
To execute a script in Emacs Ess, you have different shortcuts:

1. `Ctrl alt x`: runs a Paragraph
2. `Ctrl enter`: similar, but closer to Rstudio in how it 
treats collections of sratements
3. `Ctrl j`: runs a single line

The above commands are used when you have a separate R script that is 
Todor Kondic's avatar
Todor Kondic committed
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
being evaluated in the session. In the session itself, it's just enter.

Some venerable Emacs personalities suggest window-based organisation
of Emacs workflow:

1. Start Emacs.
2. Resize it to a strip at the bottom of the screen (the *session*
   window), then `Alt-x R`.
3. C-x 5 2 to open a new window (connected to the same session).
4. Open an existing R script, or start writing a new one.
5. Commands from above will work and be displayed in the session window.
6. Switch between the windows with `C-x 5 o`.
7. You can also split windows in panes with `C-x 2`,`C-x 3`, hide all
   but one with `C-x 1`, hide this one `C-x 0`, ...
8. Reading the `Emacs Tutorial` is not a bad place to start if you
   want to delve deeper [note that ECI's Emacs is heavily customised,
   so it might not behave as you'd expect].
Todor Kondic's avatar
Todor Kondic committed
114

115
116
117
118
119
120
## Ansible System

Host file lists ECI computational inventory. There are two types of
items, *stations* -- the compute platforms intended to be used by all
ECI members and *ctrl* -- the control nodes intended to provision
*stations* without too much involvement by human beings.