Skip to content

Commit 4716040

Browse files
Work towards autoinstall
1 parent 62773e6 commit 4716040

File tree

24 files changed

+643
-0
lines changed

24 files changed

+643
-0
lines changed

.github/workflows/pages.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Sample workflow for building and deploying a Hugo site to GitHub Pages
2+
name: Deploy Hugo
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
# Default to bash
25+
defaults:
26+
run:
27+
shell: bash
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-latest
33+
env:
34+
HUGO_VERSION: 0.146.5
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0 # fetch all history for .GitInfo and .Lastmod
40+
submodules: recursive
41+
- name: Setup Go
42+
uses: actions/setup-go@v5
43+
with:
44+
go-version: '1.22'
45+
- name: Setup Pages
46+
id: pages
47+
uses: actions/configure-pages@v5
48+
- name: Setup Hugo
49+
run: |
50+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
51+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
52+
- name: Build with Hugo
53+
env:
54+
# For maximum backward compatibility with Hugo modules
55+
HUGO_ENVIRONMENT: production
56+
HUGO_ENV: production
57+
run: |
58+
hugo \
59+
--gc --minify \
60+
--baseURL "${{ steps.pages.outputs.base_url }}/"
61+
- name: Upload artifact
62+
uses: actions/upload-pages-artifact@v3
63+
with:
64+
path: ./public
65+
66+
# Deployment job
67+
deploy:
68+
environment:
69+
name: github-pages
70+
url: ${{ steps.deployment.outputs.page_url }}
71+
runs-on: ubuntu-latest
72+
needs: build
73+
steps:
74+
- name: Deploy to GitHub Pages
75+
id: deployment
76+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Hugo output
2+
public/
3+
resources/
4+
.hugo_build.lock
5+
6+
# Editor
7+
.vscode/

.ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public

configs/autoinstall/head.yml

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# Ubuntu autoinstall configuration
2+
# More information can be found here:
3+
# https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html
4+
5+
autoinstall:
6+
version: 1
7+
8+
interactive-sessions:
9+
- network
10+
- identity
11+
12+
locale: "en_US.UTF-8"
13+
14+
keyboard:
15+
layout: us
16+
variant: ""
17+
toggle: null
18+
19+
source:
20+
search_drivers: true
21+
id: ubuntu-server
22+
23+
proxy: null
24+
25+
# For more information:
26+
# https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html#storage
27+
# https://curtin.readthedocs.io/en/latest/topics/storage.html
28+
storage:
29+
config:
30+
# Wipe and partition the largest disk
31+
- type: disk
32+
id: disk0
33+
match:
34+
size: largest
35+
ptable: gpt
36+
wipe: superblock-recursive
37+
preserve: false
38+
39+
# Boot partition
40+
- type: partition
41+
id: boot-partition
42+
name: boot
43+
number: 1
44+
size: 1G
45+
device: disk0
46+
flag: boot
47+
48+
- type: format
49+
id: boot-format
50+
fstype: fat32
51+
volume: boot-partition
52+
53+
# Swap partition
54+
- type: partition
55+
id: swap-partition
56+
name: swap
57+
number: 2
58+
size: 8G
59+
device: disk0
60+
61+
- type: format
62+
id: swap-format
63+
fstype: swap
64+
volume: swap-partition
65+
66+
# LVM physical volume
67+
- type: partition
68+
id: pv1
69+
name: lvm
70+
number: 3
71+
size: -1
72+
device: disk0
73+
74+
- type: lvm_volgroup
75+
id: vg1
76+
name: vg1
77+
devices:
78+
- pv1
79+
80+
# Logical volumes
81+
- type: lvm_partition
82+
id: root-vg1
83+
volgroup: vg1
84+
size: 18%
85+
86+
- type: lvm_partition
87+
id: ihome-vg1
88+
volgroup: vg1
89+
size: 60%
90+
91+
- type: lvm_partition
92+
id: data-vg1
93+
volgroup: vg1
94+
size: 20%
95+
96+
# Formats
97+
- type: format
98+
id: root-format
99+
fstype: ext4
100+
volume: root-vg1
101+
102+
- type: format
103+
id: ihome-format
104+
fstype: ext4
105+
volume: ihome-vg1
106+
107+
- type: format
108+
id: data-format
109+
fstype: ext4
110+
volume: data-vg1
111+
112+
# Mounts
113+
- type: mount
114+
id: boot-mount
115+
path: /boot
116+
device: boot-partition
117+
118+
- type: mount
119+
id: root-mount
120+
path: /
121+
device: root-format
122+
123+
- type: mount
124+
id: ihome-mount
125+
path: /ihome
126+
device: ihome-format
127+
128+
- type: mount
129+
id: data-mount
130+
path: /data
131+
device: data-format
132+
133+
ssh:
134+
install-server: true
135+
authorized-keys: []
136+
allow-pw: false
137+
138+
drivers:
139+
install: true
140+
141+
oem:
142+
install: false
143+
144+
packages:
145+
- build-essential
146+
- git
147+
- nfs-common
148+
- nfs-kernel-server
149+
- curl
150+
- wget
151+
- cmake
152+
- automake
153+
- autoconf
154+
- software-properties-common
155+
- python3
156+
- python3-pip
157+
- python3-venv
158+
- htop
159+
- tmux
160+
- tree
161+
- net-tools
162+
- iproute2
163+
- vim
164+
- nano
165+
- rsync
166+
167+
timezone: "US/Eastern"
168+
169+
updates: all
170+
171+
shutdown: reboot

docs/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<h1 align="center">LabStack Documentation</h1>
2+
3+
## Local Development
4+
5+
Pre-requisites: [Hugo](https://gohugo.io/getting-started/installing/), [Go](https://golang.org/doc/install) and [Git](https://git-scm.com)
6+
7+
```shell
8+
# Install modules
9+
hugo mod tidy
10+
11+
# Start the server
12+
hugo server --logLevel debug --disableFastRender -p 1313
13+
```
14+
15+
### Update theme
16+
17+
```shell
18+
hugo mod get -u
19+
hugo mod tidy
20+
```
21+
22+
See [Update modules](https://gohugo.io/hugo-modules/use-modules/#update-modules) for more details.
23+

docs/content/_index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: LabStack
3+
layout: hextra-home
4+
toc: false
5+
---
6+
7+
<div class="hx-mt-6 hx-mb-6">
8+
{{< hextra/hero-headline >}}
9+
LabStack
10+
{{< /hextra/hero-headline >}}
11+
</div>
12+
13+
<div class="hx-mb-8">
14+
{{< hextra/hero-subtitle >}}
15+
TODO
16+
{{< /hextra/hero-subtitle >}}
17+
</div>
18+
19+
<div class="hx-mb-6">
20+
{{< hextra/hero-button text="Getting started" link="/getting-started" >}}
21+
</div>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Getting started
3+
---
4+
5+
If you are reading this, you have decided to follow the journey of a non-system admin setting up an academic research lab's computational stack.
6+
I am not making any claims that this is **the** way to setup a computational cluster, but it is technically a "working" way.
7+
My learning is primarily done through teaching and writing documentation, so this supplements my goldfish memory and _maybe_ helps you&mdash;somehow.
8+
9+
LabStack may be helpful if you (**a**) have more than two _somewhat_ powerful computers and (**b**) want to spend many, many hours learning, setting up, and maintaining the cluster instead of spending money on your local high-performance computing (HPC) organization or common cloud computer platforms.
10+
Or if you just want to learn sys admin stuff; that is cool too.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Hardware
3+
weight: 1
4+
---
5+
6+
TODO: Add ramblings about what sorts of hardware could be useful.
7+
My lab currently has several desktop servers with GPUs along with a rack compute node.
8+
I'm hoping to unify this :).
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Operating systems
3+
weight: 2
4+
---
5+
6+
The operating system (OS) dictates how system admins and users interact with the computational hardware of the lab.
7+
They come with different purposes, design decisions, and ecosystems for high-performance computing.
8+
Since November of 2017, [100% of supercomputers use linux](https://www.top500.org/statistics/details/osfam/1/) and we are no different.
9+
[RedHat Enterprise Linux](https://www.redhat.com/en) (RHEL) is by far the most popular operating system, followed by [Ubuntu](https://ubuntu.com/) and Cray.
10+
11+
| Operating System | Percentage (%) [^1] |
12+
| :--------------: | :------------: |
13+
| RHEL | 20.0 |
14+
| Ubuntu | 11.8 |
15+
| Cray | 9.8 |
16+
| CentOS [^2] | 8.2 |
17+
| Rocky | 5.8 |
18+
19+
## Cost
20+
21+
**tl;dr**: RHEL is not free for any scale.
22+
Ubuntu is free with an optional paid subscription for additional support (i.e., no feature locks).
23+
24+
Cost is always the first factor I consider when choosing an OS.
25+
RHEL is free for [up to 16 nodes](https://developers.redhat.com/articles/faqs-no-cost-red-hat-enterprise-linux#general) through its [RedHat Developer program](https://developers.redhat.com/products/rhel/overview).
26+
Its use is limited to development, testing, and small production uses spanning personal servers, home labs, and small open-source communities.
27+
In other words, not small organizations or teams.
28+
29+
Ubuntu, both server and desktop, are completely free with the optional paid subscription of [Ubuntu Pro](https://ubuntu.com/pro).
30+
This service primarily provides additional security maintenance, dedicated support, and easier system management.
31+
32+
## Decision
33+
34+
Given that academic labs often run on tight budges, we are recommending Ubuntu.
35+
Next, we will discuss near automated setup of our Ubuntu operating system.
36+
37+
[^1]: Operating system distributions for world's supercomputers are from the June 2025 [TOP500 release](https://www.top500.org/statistics/list/).
38+
[^2]: CentOS has been replaced with [CentOS Stream](https://www.redhat.com/en/topics/linux/what-is-centos-stream) that is an upstream repository of RedHat.

0 commit comments

Comments
 (0)