-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalysis.qmd
More file actions
59 lines (38 loc) · 2.17 KB
/
analysis.qmd
File metadata and controls
59 lines (38 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# analysis.yml
## The script
- Adds CRAN and Docker APT sources
- Installs packages for:
- Python (pip, libraries)
- R (base, dev tools, packages)
- Installs Docker and Docker Compose
- Add security (fail2ban, ufw)
- Creates a user piet with sudo and Docker access
- Configures SSH on port 4444
- Saves a log as /var/log/cloud-init-output.log
- Sets up fail2ban and a firewall
- Installs Python and R packages
- Optionally adds swap space for R
- Installs a large set of R packages
- Installs Node.js for JavaScript-based services
- Installs npm for JavaScript package management
- Installs Express.js generator
- Creates a simple marker file to verify cloud-init completion
## References
Help on cloud-init syntax from:
- <https://cloudinit.readthedocs.io/en/latest/topics/examples.html>
- <https://www.digitalocean.com/community/tutorials/how-to-use-cloud-config-for-your-initial-server-setup>
- ERROR: THE `ssh-authorized-keys` (AND `sudo`) SYNTAX IS WRONG **IN ALL DIGITAL OCEAN EXAMPLES**, SEE NEXT REFERENCE
- <https://superuser.com/questions/1725127/invalid-config-for-cloud-init-but-apparently-still-works-how-do-i-remove-the>
Help on R and Docker installation syntax from:
- <http://deanattali.com/2015/05/09/setup-rstudio-shiny-server-digital-ocean/>
- <https://www.digitalocean.com/community/tutorials/how-to-set-up-r-on-ubuntu-14-04>
- <https://gist.github.com/mdlincoln/1f40f4e88ce32c55b5f3>
- <https://gist.github.com/mdlincoln/1f40f4e88ce32c55b5f3#gistcomment-3009981>
- <https://cran.rstudio.com/bin/linux/ubuntu/fullREADME.html#using-apt-key>
- <https://github.com/rocker-org/hadleyverse/blob/master/Dockerfile>
- <https://stackoverflow.com/questions/24418815/how-do-i-install-docker-using-cloud-init>
Detailed explanations of lines of code for Node.js setup:
- `git`: Essential for version control and cloning repositories.
- `nodejs` and `npm`: Required for running and managing JavaScript packages.
- `npm install -g npm@latest`: Ensures you’re using the latest npm version, which can fix bugs and improve compatibility.
- `express-generator`: A helpful tool for quickly scaffolding Express.js applications.