Skip to content

Commit 37373a2

Browse files
committed
feat: add initial boilerplate for services running on web01
1 parent 77e59d2 commit 37373a2

File tree

6 files changed

+111
-0
lines changed

6 files changed

+111
-0
lines changed

Writerside/hi.tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@
7777
<toc-element topic="Logging-In.md"/>
7878
<toc-element topic="Updates-and-Maintenance.md"/>
7979
<toc-element topic="Docker-on-socs-web01.md"/>
80+
<toc-element topic="web01-services.md">
81+
<toc-element topic="Traefik.md">
82+
</toc-element>
83+
<toc-element topic="Asgard.md"/>
84+
<toc-element topic="Yggdrasil.md"/>
85+
<toc-element topic="Arcademia-Leaderboard.md"/>
86+
</toc-element>
8087
</toc-element>
8188
<toc-element topic="socs-nas01.md"/>
8289
<toc-element topic="socs-nas02.md"/>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Arcademia Leaderboard
2+
3+
Arcademia Leaderboard is a hackable leaderboard service to allow our students to quickly and easily develop and deploy games with a shared leaderboard between all the arcade machines.
4+
5+
Arcademia (a play on the words 'arcade' and 'academia') is the name given to the arcade cabinets that have been converted from the Research Arcade project; these are now deployed to allow students to publish and share their games.
6+
7+
The system has been designed with the principal of 'habitability' in the terms of mod-ability and customisation from the students. We provide them full access to the source code - allowing them (if they choose) to open pull requests and issues, allowing for them to understand how the system actually works.
8+
9+
The arcademia project currently is not something that a student is required to take part in for the University degree.
10+
11+
## Development
12+
13+
The arcademia leaderboard service is an express api, built with Josh's starter template. It is written in TypeScript and runs using Express and Node.
14+
15+
The development documentation is available in the repositories `README`, but a light overview is that;
16+
17+
- The project has been built in a devcontainer, which will automatically launch a `docker compose` file when you open the project in Visual Studio Code. This will provide you with an empty database which you will need to add an initial user account manually, and then create the games that you want to use for testing using an authenticated session state - this is best done using a tool such as [Postman](https://www.postman.com/), a collection has been provided in the repo.
18+
19+
- And the system has been designed around the idea of 'Model-View-Controllers', however we are removing the 'View' aspect and are directly returning JSON from the controller. Each new controller must have a route, which is registered in the `src/server.ts` file.
20+
21+
## Deployment
22+
23+
Tbd....

Writerside/topics/Asgard.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Asgard
2+
3+
Asgard is the backend timetabling engine that provides content to [yggdrasil](Yggdrasil.md),
4+
it acts as a data aggregator and single point of truth to all display content.
5+
6+
## Development
7+
8+
tbd: discuss the other components and break down into subsections for api/y2/admin/etc.
9+
10+
The asgard api service is an express api, built with Josh's starter template. It is written in TypeScript and runs using Express and Node.
11+
12+
The development documentation is available in the repositories `README`, but a light overview is that;
13+
14+
- The project has been built in a devcontainer, which will automatically launch a `docker compose` file when you open the project in Visual Studio Code. This will provide you with an empty database which you will need to add an initial user account manually, and then create the games that you want to use for testing using an authenticated session state - this is best done using a tool such as [Postman](https://www.postman.com/), a collection has been provided in the repo.
15+
16+
- And the system has been designed around the idea of 'Model-View-Controllers', however we are removing the 'View' aspect and are directly returning JSON from the controller. Each new controller must have a route, which is registered in the `src/server.ts` file.
17+
18+
19+
## Deployment
20+
21+
Tbd....
22+
23+
## System Design
24+
tbd...

Writerside/topics/Traefik.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Traefik
2+
3+
[Traefik](https://traefik.io/traefik/) is a reverse proxy which runs on the [socs-web01](socs-web01.md) server. This provides ingress to all the web based containers.
4+
5+
This allows us to access the services we are running by using a hostname, without having to remember an arbitrary port.
6+
7+
For example; you can access [asgard](Asgard.md) with the hostname `asgard.socstech.support`.
8+
9+
But be aware - this will only work if you're connected to the University network, as it is configured only to use a local IP.
10+
11+
> This isn't fully deployed yet and more documentation will be added at a later date.
12+
{style="warning"}

Writerside/topics/Yggdrasil.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Yggdrasil
2+
3+
Yggdrasil is the frontend timetable component for the signage screens around the building. It collects its data from [asgard](Asgard.md) and displays the data in the most effective way.
4+
5+
## Development
6+
7+
First, you'll need to clone the repo [SoCSTech/yggdrasil-revamp](https://github.com/SoCSTech/yggdrasil-revamp).
8+
9+
Then you will need to have either **Node 14** installed on your machine (I recommend that you use [nvm](https://github.com/nvm-sh/nvm) for this as we use multiple versions in our day-to-day operations.)
10+
11+
Once you have `nvm` installed, you can install Node 14 with the following commands;
12+
13+
```Shell
14+
nvm install 14
15+
nvm use 14
16+
```
17+
18+
Then you will want to launch the live server with the command:
19+
```Shell
20+
npm run dev
21+
```
22+
This will allow you to make changes to the project and see the changes happen as you save.
23+
24+
Once you have done making your changes - you will need to commit these changes back to the repo (in your own branch), which will then allow for the project to be signed off and deployed.
25+
26+
### Apple Silicon
27+
If you're using an ARM based CPU (e.g. Apple Silicon) this won't work without additional steps, as this project is running with node 14 (very old - end of life), and hasn't be upgraded (yet?).
28+
29+
You will need to first install and use [nvm](https://formulae.brew.sh/formula/nvm#default), I recommend you do this with [HomeBrew](https://brew.sh).
30+
31+
Then you need to run the following command to allow your terminal to run in Rosetta mode (64 bit compatibility mode):
32+
33+
```Shell
34+
arch -x86_64 zsh
35+
```
36+
37+
Then you can run the commands to use and install node 14.
38+
39+
## Deployment
40+
41+
tbd...

Writerside/topics/web01-services.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Services
2+
3+
The following section describes the services that are running on SoCS-Web01.
4+
These typically run in docker and can be managed with `ctop`.

0 commit comments

Comments
 (0)