Skip to content

Commit 01d927b

Browse files
authored
cleanup: codeblocks, links (#35)
* cleanup: codeblocks, links * mkdocs: more codeblocks formatting
1 parent 5bb9b83 commit 01d927b

File tree

8 files changed

+46
-10
lines changed

8 files changed

+46
-10
lines changed

docs/services/bastion-vm.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ This VM is an ephemeral machine that can be placed on any nomad client that has
1414

1515
It acts as the point of ingress for Aperture, with ISS and our [mordor](../hardware/network/mordor.md) allowing traffic to reach it's IP address externally. The VM is configured as a Nomad client itself, in the `ingress` node pool to ensure that only ingress-type allocations are placed there (like [traefik](./traefik.md)). Those services can proxy requests from the Bastion VM to internal services using consul's service DNS resolution, it's service mesh, or by plain IP and port.
1616

17+
![Ingress Topology with Bastion VM](../res/ingress-topology.png)
18+
1719
`cloud-init` is given a static address during the initialisation phase to configure the interface. This ensures that, even if it is replanned, it will be able to accept traffic.
1820

1921
The base image that the VM uses is a Debian 12 qcow file. After all configuration was done, the size of the image is `~3.2GB`. The image can be used to create replicas of the ingress on other external IP addresses, creating more availability if needed.

docs/services/index.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,23 @@ Here you will find a list of all the services Redbrick runs, along with some con
1818

1919
In order to add a new service, you will need to edit the [docs](https://github.com/redbrick/docs) repository.
2020

21-
Adding a new service is as easy as creating a new file in `docs/services/` with an appropriate name, and adding the reference to `mkdocs.yml` in the root of the repository.
21+
Adding a new service is as easy as creating a new file in [`docs/services/`](https://github.com/redbrick/docs/tree/master/docs/services) with an appropriate name, and the page will be automatically added to the navigation pane.
22+
23+
Try to keep file names short and concise, limited to one word if possible and avoid using spaces.
2224

2325
The style guide for a service file should be as follows:
2426

2527
```md
28+
---
29+
title: ServiceName
30+
author:
31+
- username
32+
tags:
33+
- relevant
34+
- tags
35+
36+
---
37+
2638
# ServiceName - `username`
2739

2840
Short description on how the service works and where it is running

docs/services/md.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: HedgeDoc
2+
title: MD (HedgeDoc)
33
author:
44
- wizzdom
55
tags:
@@ -20,21 +20,21 @@ The important points are as follows:
2020

2121
- connecting to the database:
2222

23-
```bash
23+
```hcl title="Nomad"
2424
CMD_DB_URL = "postgres://{{ key "hedgedoc/db/user" }}:{{ key "hedgedoc/db/password" }}@{{ env "NOMAD_ADDR_db" }}/{{ key "hedgedoc/db/name" }}"
2525
```
2626

2727
- disabling anonymous users and email signup:
2828

29-
```bash
29+
```hcl title="Nomad"
3030
CMD_ALLOW_EMAIL_REGISTER = "false"
3131
CMD_ALLOW_ANONYMOUS = "false"
3232
CMD_EMAIL = "false"
3333
```
3434

3535
- LDAP configuration:
3636

37-
```bash
37+
```hcl title="Nomad"
3838
CMD_LDAP_URL = "{{ key "hedgedoc/ldap/url" }}"
3939
CMD_LDAP_SEARCHBASE = "ou=accounts,o=redbrick"
4040
CMD_LDAP_SEARCHFILTER = "{{`(uid={{username}})`}}"

docs/services/paste.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ The main points are as follows:
2222

2323
- configure URL shortener ([`shlink`](shlink.md))
2424

25-
```php
25+
```php title="conf.php"
2626
urlshortener = "https://s.rb.dcu.ie/rest/v1/short-urls/shorten?apiKey={{ key "privatebin/shlink/api" }}&format=txt&longUrl="
2727
```
2828

2929
- enable file upload, set file size limit and enable compression
3030

31-
```php
31+
```php title="conf.php"
3232
fileupload = true
3333
sizelimit = 10485760
3434
compression = "zlib"
3535
```
3636

3737
- Connect to PostgreSQL database
3838

39-
```php
39+
```php title="conf.php"
4040
[model]
4141
class = Database
4242
[model_options]

docs/services/socs.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
---
2+
title: Socs using Redbrick Infrastructure
3+
---
4+
15
# Socs Using Redbrick Infrastructure
26

37
- MPS/DCUfm - [`icecast`](icecast.md)
48
- MPS/TheCollegeView - [TheCollegeView](https://thecollegeview.ie) - `wordpress`
59
- DCU Style - [The Look](https://thelookonline.dcu.ie) - `wordpress`
610
- DCU Solar Racing - [Solarracing.ie](https://solarracing.ie)
11+
- DCU Games Society - [`minecraft`](minecraft.md)

docs/services/user-vms.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
---
2+
title: User VMs
3+
author:
4+
- distro
5+
- wizzdom
6+
tags:
7+
- aperture
8+
- nomad
9+
- qemu
10+
---
11+
112
# User VMs
213

314
User VMs are deployed on [`aperture`](../hardware/aperture/index.md) using [nomad](nomad.md)'s [QEMU driver](https://developer.hashicorp.com/nomad/docs/drivers/qemu).
@@ -58,7 +69,7 @@ nomad alloc logs <alloc-id> | grep -E "ens3.*global" | cut -d "|" -f 4 | xargs
5869

5970
The VMs are configured with cloud-init. Their docs are pretty good, so I won't repeat them here. The files can be served by any HTTP server, and the address is placed into the job file in the QEMU options.
6071

61-
```hcl
72+
```hcl title="Nomad"
6273
...
6374
args = [
6475
...

docs/tags.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22
<!--Do not remove this file-->
3-
<!--This is required for mkdocs to generate a tags page-->
3+
<!--This is required for mkdocs to generate a tags page-->

mkdocs.yml

+6
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,16 @@ markdown_extensions:
8484
- pymdownx.tabbed
8585
- pymdownx.superfences
8686
- pymdownx.tilde
87+
- pymdownx.highlight
88+
- pymdownx.inlinehilite
8789
- pymdownx.highlight:
8890
anchor_linenums: true
8991
line_spans: __span
9092
pygments_lang_class: true
93+
auto_title: true
94+
linenums: true
95+
linenums_style: pymdownx-inline
96+
anchor_linenums: true
9197
- toc:
9298
permalink: true
9399

0 commit comments

Comments
 (0)