Skip to content

Commit

Permalink
Merge branch 'master' into rewrite-general-development
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeshus committed Jun 14, 2024
2 parents 44fd33b + 7b6a0a0 commit a9847d9
Show file tree
Hide file tree
Showing 10 changed files with 180 additions and 51 deletions.
29 changes: 26 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,30 @@
"Scripts":
- 'scripts/**'

# I have tried making this robust (tm) using wildcards so many times but github docs for the labeler SUUUUCK. If you got time to figure it out please do it I give up.
# Welcome to the mega labeler.
"Design":
- changed-files:
- 'src/*/space-station-14/*/proposals/**'
- 'src/*/general-proposals/**'
# General design
- 'src/en/space-station-14/accessibility/proposals/**'
- 'src/en/space-station-14/admin-tools/proposals/**'
- 'src/en/space-station-14/art/proposals/**'
- 'src/en/space-station-14/character-species/proposals/**'
- 'src/en/space-station-14/combat/proposals/**'
- 'src/en/space-station-14/mapping/proposals/**'
- 'src/en/space-station-14/player-interaction/proposals/**'
- 'src/en/space-station-14/roleplay-lore/proposals/**'
- 'src/en/space-station-14/round-flow/proposals/**'
- 'src/en/space-station-14/user-interface/proposals/**'

# Department design
- 'src/en/space-station-14/departments/atmos/proposals/**'
- 'src/en/space-station-14/departments/cargo-salvage/proposals/**'
- 'src/en/space-station-14/departments/command/proposals/**'
- 'src/en/space-station-14/departments/engineering/proposals/**'
- 'src/en/space-station-14/departments/medical/proposals/**'
- 'src/en/space-station-14/departments/science/proposals/**'
- 'src/en/space-station-14/departments/security/proposals/**'
- 'src/en/space-station-14/departments/service/proposals/**'

# General proposals
- 'src/en/general-proposals/**'
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ Space Station 14

- [Proposals]()
- [Plant Genetics](en/space-station-14/departments/service/proposals/plant-genetics.md)
- [Joker Roles](en/space-station-14/departments/service/proposals/joker_roles.md)

General Proposals
================
Expand Down
Binary file added src/en/assets/images/jokerroles/lil_room.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ If you correctly followed the PR template, you should have a section to format h
```
````

By default, all changelog changes are credited to your GitHub username. If you would like your name to appear as something else, add a string to the `:cl:` line with the name you wish to be used.
By default, all changelog changes are credited to your GitHub username. If you would like your name to appear as something else, add a string to the `:cl:` line with the name you wish to be used. These set the change log icon and do not show up in the change log text.

There are 4 types of entries, and you may have as many entries as you wish in your changelog:

Expand Down
45 changes: 22 additions & 23 deletions src/en/general-development/work-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,30 @@ Each work group is responsible for maintaining corresponding design and pr guide

### Game-Wide

| Group |  Members |
| --------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [Accessibility](../space-station-14/accessibility.md) |  Bhijn & Myr(deathride58), mdAJCM |
| [Admin Tooling](../space-station-14/admin-tools.md) |  Jezithyr, Chief-Engineer, Vasilis, Julian, Bhijn & Myr(deathride58) |
| [Art](../space-station-14/art.md) |  EmoGarbage, Flareguy |
| [Character/Species](../space-station-14/characters-species.md) |  Jezithyr, Lank, Vasilis, KeronSHB, Bhijn & Myr(deathride58), AJCM |
| [Combat](../space-station-14/combat.md) |  Jezithyr, EmoGarbage, AJCM, KeronSHB, Bhijn & Myr(deathride58) |
| [Player Interaction](../space-station-14/player-interaction.md) | |
| [Mapping](../space-station-14/mapping.md) |  Emisse |
| [Roleplay/Lore](../space-station-14/roleplay-lore.md) |  Lank, KeronSHB, Vasilis |
| [Round Flow](../space-station-14/round-flow.md) |  Jezithyr, EmoGarbage, Tayrthan, KeronSHB, Bhijn & Myr(deathride58), AJCM |
| [User Interface](../space-station-14/user-interface.md) | Jezithyr, EmoGarbage, AJCM, Julian, Bhijn & Myr(deathride58) |
| Group | Members |
|-------|---------|
| [Accessibility](../space-station-14/accessibility.md) | Bhijn & Myr(deathride58), AJCM |
| [Admin Tooling](../space-station-14/admin-tools.md) |  Jezithyr, Chief-Engineer, Vasilis, Julian, Bhijn & Myr(deathride58) |
| [Art](../space-station-14/art.md) | EmoGarbage, Flareguy |
| [Character/Species](../space-station-14/characters-species.md) | Jezithyr, Lank, Vasilis, KeronSHB, Bhijn & Myr(deathride58), AJCM |
| [Combat](../space-station-14/combat.md) | Jezithyr, EmoGarbage, AJCM, KeronSHB, Bhijn & Myr(deathride58), mirrorcult |
| [Player Interaction](../space-station-14/player-interaction.md) | mirrorcult |
| [Mapping](../space-station-14/mapping.md) | Emisse |
| [Roleplay/Lore](../space-station-14/roleplay-lore.md) | Lank, KeronSHB, Vasilis, mirrorcult |
| [Round Flow](../space-station-14/round-flow.md) | Jezithyr, EmoGarbage, Tayrthan, KeronSHB, Bhijn & Myr(deathride58), AJCM, mirrorcult |
| [User Interface](../space-station-14/user-interface.md) | Jezithyr, EmoGarbage, AJCM, Julian, Bhijn & Myr(deathride58) |

### Departments

| Group |  Members |
| ----------------------------------------------------------------- | --------------------------------------- | --- |
| [Atmos](../space-station-14/departments/atmos.md) |  Jezithyr, KeronSHB, notafet(Partmedia) |
| [Cargo/Salvage](../space-station-14/departments/cargo-salvage.md) | |   |
| [Command](../space-station-14/departments/command.md) |  KeronSHB, EmoGarbage, Vasilis |
| [Engineering](../space-station-14/departments/engineering.md) |  Jezithyr, Julian, AJCM, KeronSHB |
| [Medical](../space-station-14/departments/medical.md) |  Jezithyr, Vasilis, AJCM |
| [Science](../space-station-14/departments/science.md) | Jezithyr, EmoGarbage, AJCM, Tayrtahn |
| [Security](../space-station-14/departments/security.md) |  Lank(LankLTE), KeronSHB |
| [Service](../space-station-14/departments/service.md) |  AJCM, Tayrtahn, notafet(Partmedia) |
| Group | Members |
|-------|---------|
| [Atmos](../space-station-14/departments/atmos.md) | Jezithyr, KeronSHB, notafet(Partmedia), mirrorcult |
| [Cargo/Salvage](../space-station-14/departments/cargo-salvage.md) | mirrorcult | 
| [Command](../space-station-14/departments/command.md) | KeronSHB, EmoGarbage, Vasilis, mirrorcult |
| [Engineering](../space-station-14/departments/engineering.md) | Jezithyr, Julian, AJCM, KeronSHB, mirrorcult |
| [Medical](../space-station-14/departments/medical.md) | Jezithyr, Vasilis, AJCM |
| [Science](../space-station-14/departments/science.md) | Jezithyr, EmoGarbage, AJCM, Tayrtahn, mirrorcult |
| [Security](../space-station-14/departments/security.md) | Lank(LankLTE), KeronSHB, mirrorcult |
| [Service](../space-station-14/departments/service.md) | AJCM, Tayrtahn, notafet(Partmedia) |

## For maintainers:

Expand Down
4 changes: 4 additions & 0 deletions src/en/server-hosting/setting-up-redbot.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ Instruct the server to shutdown after the current round ends:

```[p]stopserver <name>```

Tell watchdog to prepare to update a server:

```[p]updateserver <name>```

### New round pinging & Ahelp relay
While it's not specificly a bot feature, I thought I might as well throw it in here since there's no other documentation on it and it's related to Discord.
1. Make a discord webhook in the channel you want the pings to arrive in. You can make one by clicking on the cogwheel in the channel > Integrations > Webhooks. Once done copy the URL
Expand Down
60 changes: 39 additions & 21 deletions src/en/server-hosting/setting-up-ss14-watchdog.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You need to have:

Both of these can be found at the [.NET 8 download page](https://dotnet.microsoft.com/en-us/download/dotnet/8.0).

On Linux/MacOS use your favourite package manager (apt, dnf, pacman, brew etc) according to [Microsoft's installation instructions](https://learn.microsoft.com/en-us/dotnet/core/install/linux).
On Linux use your favourite package manager (apt, dnf, pacman, brew etc) according to [Microsoft's installation instructions](https://learn.microsoft.com/en-us/dotnet/core/install/linux).

### 2. Build

Expand All @@ -48,12 +48,12 @@ cd SS14.Watchdog
dotnet publish -c Release -r linux-x64 --no-self-contained
```

The contents of `SS14.Watchdog/bin/Release/net8.0/linux-x64/publish` can then be copied to some other place.
The contents of `SS14.Watchdog/bin/Release/net8.0/linux-x64/publish` can then be copied to some other place. You will continue your work here.


### 3. Run

Assuming you've followed the structure laid out above, you simply need to have a terminal at the "main directory", and run `bin/SS14.Watchdog`.
Assuming you've followed the structure laid out above, you simply need to have a terminal in the folder you copied above, and run the `SS14.Watchdog` executable.

## Watchdog Configuration

Expand Down Expand Up @@ -85,7 +85,7 @@ In particular, this can be used to expose the Watchdog outside of localhost with
Urls: "http://*:5000"
```
See the relevant documentation for more details: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/web-host?view=aspnetcore-8.0#server-urls
See the relevant documentation for more details: [docs.microsoft.com](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/web-host?view=aspnetcore-8.0#server-urls)
Be sure to adjust BaseUrl accordingly!
Expand Down Expand Up @@ -149,14 +149,14 @@ Servers:
### Server Instance Folder

<!-- Mirrored Sloth's July 7th 2022 change (but added backticks around example directories) -->
The watchdog will automatically create a folder structure for each server instance. This is at `instances/<instanceId>`, e.g. `instances/wizards_den` / `instances/wizards_den_two`, relative to the current working directory when executing the watchdog.
The watchdog will automatically create a folder structure for each server instance. This is at `instances/<instanceId>`, e.g. `instances/wizards_den` / `instances/wizards_den_two`, relative to the current working directory when executing the watchdog. In the example config above this would be `instances/example`

Each instance folder has the following files and folders:

* `binaries/`: Is used to store client binaries when using the "Local" update type, see below.
* `bin/`: Contains the actual extracted server binaries.
* `data/`: Stores server data like player preferences.
* `config.toml`: Is the config file the server will load (the watchdog overrides the default location, `server_config.toml` next to the .exe, to avoid it getting deleted when the server resets).
* `config.toml`: Is the config file the server will load (the watchdog overrides the default location, `server_config.toml` next to the .exe, to avoid it getting deleted when the server resets). You may have to create this file manually the first time.
* `data.json`: Contains watchdog information. If you changed the update type and are getting errors, delete this.

<!-- Mirrored Sloth's July 7th 2022 change (but adjusted cross-reference) -->
Expand All @@ -172,12 +172,16 @@ Firstly, the watchdog will only update when it is either explicitly notified to

Secondly, you may want to simply force a server to be restarted.

Lastly, you may want to shutdown the server when the round ends. Example for maintenance.

These tasks can be achieved with the following commands:

`curl -v -X POST -u myInstance:ApiToken http://localhost:5000/instances/myInstance/restart`

`curl -v -X POST -u myInstance:ApiToken http://localhost:5000/instances/myInstance/update`

`curl -v -X POST -u myInstance:ApiToken http://localhost:5000/instances/myInstance/stop`

## Update Types

### Manifest Update
Expand All @@ -186,22 +190,18 @@ These tasks can be achieved with the following commands:
The server still won't automatically be notified of updates, so see above for instructions.
```

For vanilla servers, the "Manifest" update type and the standard manifest URL is enough.
Manifest type is the method all Wizard's Den servers use and we recommend using. Manifest is required to be able to record [replays](../server-hosting/server-replay-recording.md)

```yml
Servers:
Instances:
example:
# (skipped...)
# (This is an example, do NOT blindly copy paste this. Or you may end up with an unfinished configuration)
UpdateType: "Manifest"
Updates:
ManifestUrl: "https://central.spacestation14.io/builds/wizards/manifest.json"
```
You will have to manually move files around and extract the server binaries.
Note that you should not move around or attempt to delete the files of a running server.
### Git-based Updates
```admonish danger "Here be dragons!"
Expand All @@ -225,7 +225,7 @@ Also, you still need to write a Git hook or somesuch to ensure that the Watchdog
Servers:
Instances:
example:
# (skipped...)
# (This is an example, do NOT blindly copy paste this. Or you may end up with an unfinished configuration)
UpdateType: "Git"
Updates:
# BaseUrl: The URL of the Git repository to watch.
Expand All @@ -246,7 +246,7 @@ This is an ancient method, but it should still work.
Servers:
Instances:
example:
# (skipped...)
# (This is an example, do NOT blindly copy paste this. Or you may end up with an unfinished configuration)
UpdateType: "Jenkins"
Updates:
BaseUrl: "http://localhost:9938"
Expand All @@ -272,7 +272,7 @@ To configure this, use the following update configuration in your `appsettings.y
Servers:
Instances:
example:
# (skipped...)
# (This is an example, do NOT blindly copy paste this. Or you may end up with an unfinished configuration)
UpdateType: "Dummy"
```
Expand All @@ -295,7 +295,7 @@ Start with configuring as so:
Servers:
Instances:
example:
# (skipped...)
# (This is an example, do NOT blindly copy paste this. Or you may end up with an unfinished configuration)
UpdateType: "Dummy"
RunCommand: "./currentServer"
```
Expand All @@ -310,7 +310,7 @@ As such, three scripts, `switchTo`, `switchTo1` and `switchTo2`, are needed:
rm currentServer switch inactiveBin ; mkdir -p $1
ln -s $1/Robust.Server currentServer ; ln -s $2 switch ; ln -s $3 inactiveBin
echo Switching to $1
curl -v -X POST -u myInstance:spooky http://localhost:5000/instances/myInstance/update
curl -v -X POST -u myInstance:ApiToken http://localhost:5000/instances/myInstance/update
```

`switchTo1`:
Expand All @@ -333,7 +333,7 @@ Before clearing and extracting a new server build to `inactiveBin`, be sure to m

### DIY Manifest Server

This is a quick script useful in setting up a DIY server for the Manifest update type described in the "For Vanilla Servers" section.
This is a quick script useful in setting up a DIY server for the Manifest update type described in the manifest section.

It assumes you have some arbitrary static HTTP server, and you just need a script to output the JSON with an updated date (so you can just transfer two files to said static HTTP server and trigger an update).

Expand All @@ -343,11 +343,19 @@ nowish = datetime.datetime.now().isoformat()
print(json.dumps({"builds":{nowish: {"time": nowish, "client": {"url": "", "sha256": ""}, "server": {"linux-x64": {"url": "http://localhost:9283/SS14.Server_linux-x64.zip", "sha256": ""}}}}}))
```

You can also checkout our publishing script [here](../community/infrastructure-reference/publishing-scripts.md)

## Systemd service

To allow the service to automatically start up with the server, you can make a service file. It will look something like this.
To allow watchdog to run in the background and automatically start up with the server, you can make a service file. It will look something like this.

Of course, configure it to the actual directory of your watchdog.

Of course, change it to the actual directory of your watchdog.
If your distro does not use systemd as it's init then you will have to convert this to your relevent init.

```admonish info
Due to how services work you wont be able to use the SS14 server console directly from your terminal if need be. Ensure you have given yourself permissions on your server so you can use the `sudo` or `>` commands to run commands on the server.
```

```/etc/systemd/system/SS14.Watchdog.service```
```toml
Expand All @@ -368,10 +376,20 @@ WantedBy=default.target
Now reload your systemd daemon and enable the service as you normally would.

```
# Reload the systemd daemon (required when making a new service file)
systemctl daemon-reload
systemctl enable --now SS14.Watchdog
# Start Watchdog service in the background
systemctl start SS14.Watchdog
# Enable the Watchdog service so it will start on system startup.
systemctl enable SS14.Watchdog
```

If you are not already aware of how to use systemctl [now would be a good time.](https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units)

To view logs you can use [journalctl](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs) from now on.

## General Troubleshooting

### Server keeps restarting every 30 seconds
Expand Down
2 changes: 1 addition & 1 deletion src/en/space-station-14/core-design/design-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This doc is actively under development and is not fully complete. Things may cha
```

# Design Principles
Here we go into more detail about each of SS14's Core Desgin Pillars breaking them down further into design principles. Once again these are not hard requirements, but expect to recieve heavy scruitiny on your design if you aren't following these.
Here we go into more detail about each of SS14's Core Design Pillars breaking them down further into design principles. Once again these are not hard requirements, but expect to recieve heavy scruitiny on your design if you aren't following these.

## Chaos

Expand Down
Loading

0 comments on commit a9847d9

Please sign in to comment.