From 1a76b5e319ef7304081fa63a41b82bb976b9c962 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Thu, 16 Jun 2022 15:46:36 +0000 Subject: GitBook: [#46] Move repo pages to subpage --- docs/SUMMARY.md | 7 +- .../guides/README.md | 2 +- .../guides/pg9182-docker-installation-guide.md | 151 +++++++++++---------- .../development/northstarlauncher.md | 7 - .../development/northstarmasterserver/README.md | 11 -- .../development/northstarmasterserver/deploy.md | 27 ---- .../development/repositories/README.md | 3 + .../development/repositories/northstarlauncher.md | 7 + .../repositories/northstarmasterserver/README.md | 11 ++ .../repositories/northstarmasterserver/deploy.md | 27 ++++ 10 files changed, 132 insertions(+), 121 deletions(-) delete mode 100644 docs/modding-and-development/development/northstarlauncher.md delete mode 100644 docs/modding-and-development/development/northstarmasterserver/README.md delete mode 100644 docs/modding-and-development/development/northstarmasterserver/deploy.md create mode 100644 docs/modding-and-development/development/repositories/README.md create mode 100644 docs/modding-and-development/development/repositories/northstarlauncher.md create mode 100644 docs/modding-and-development/development/repositories/northstarmasterserver/README.md create mode 100644 docs/modding-and-development/development/repositories/northstarmasterserver/deploy.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 7abe472..9bec459 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -36,9 +36,10 @@ * [Modding](modding/README.md) * [Development](modding-and-development/development/README.md) - * [NorthstarLauncher](modding-and-development/development/northstarlauncher.md) - * [NorthstarMasterServer](modding-and-development/development/northstarmasterserver/README.md) - * [Deploy](modding-and-development/development/northstarmasterserver/deploy.md) + * [Repositories](modding-and-development/development/repositories/README.md) + * [NorthstarLauncher](modding-and-development/development/repositories/northstarlauncher.md) + * [NorthstarMasterServer](modding-and-development/development/repositories/northstarmasterserver/README.md) + * [Deploy](modding-and-development/development/repositories/northstarmasterserver/deploy.md) * [Testing](modding-and-development/testing.md) ## Other diff --git a/docs/hosting-a-server-with-northstar/guides/README.md b/docs/hosting-a-server-with-northstar/guides/README.md index 5827861..b6dd286 100644 --- a/docs/hosting-a-server-with-northstar/guides/README.md +++ b/docs/hosting-a-server-with-northstar/guides/README.md @@ -6,7 +6,7 @@ description: Guides to setting up a server {% hint style="info" %} Note that these guides might not fully reflect best practices and can be outdated. However they should be helpful in setting up a server for the first time.\ -If you're planning to get serious about hosting your own server, please check out the ["Hosting a Dedicated Server" section](dedicated-server/). +If you're planning to get serious about hosting your own server, please check out the ["Hosting a Dedicated Server" section](../dedicated-server/). {% endhint %} {% embed url="https://www.youtube.com/watch?v=EZ3w2Nl9SZo" %} diff --git a/docs/hosting-a-server-with-northstar/guides/pg9182-docker-installation-guide.md b/docs/hosting-a-server-with-northstar/guides/pg9182-docker-installation-guide.md index ebd61b2..8d5cf62 100644 --- a/docs/hosting-a-server-with-northstar/guides/pg9182-docker-installation-guide.md +++ b/docs/hosting-a-server-with-northstar/guides/pg9182-docker-installation-guide.md @@ -1,88 +1,95 @@ --- -description: pg9182 has provided a complete docker image to run on Linux servers. This provides some server management tools and offers better performance. No physical GPU is needed. His github page can be found [here](https://github.com/pg9182/northstar-dedicated) This page is to provide basic instructions, more information and config options are found at pg9182's github. +description: >- + pg9182 has provided a complete docker image to run on Linux servers. This + provides some server management tools and offers better performance. No + physical GPU is needed. His github page can be found [ --- +# Docker Install + The aim of this guide is to show the steps to build a docker-compose container that starts on boot and to show basic configuration -## Prerequisites +### Prerequisites -| Requirement | Description -| ------------------| ---------------------------------------------------------| -| Kernel | Linux 5.3+, but 4.9+ should work | -| CPU | x86_64, at least 3 cores minimum | -| RAM | 2GB (Typically peaks at 1.6GB) | -| Disk | 5GB | -| Network | Recommended at least 7-20Mbps up | -| Docker | Have Docker and Docker-compose installed on the machine | +| Requirement | Description | +| ----------- | ------------------------------------------------------- | +| Kernel | Linux 5.3+, but 4.9+ should work | +| CPU | x86\_64, at least 3 cores minimum | +| RAM | 2GB (Typically peaks at 1.6GB) | +| Disk | 5GB | +| Network | Recommended at least 7-20Mbps up | +| Docker | Have Docker and Docker-compose installed on the machine | +### Installation -## Installation +#### Prep Titanfall Server files -### Prep Titanfall Server files -You will need to copy over your Titanfall installation folder and place it on the Linux machine. Most of these files are for SP and therefore we can delete from the installation folder and prune the file size down to ~5GB. +You will need to copy over your Titanfall installation folder and place it on the Linux machine. Most of these files are for SP and therefore we can delete from the installation folder and prune the file size down to \~5GB. -Easiest way to do this is copy the entire Titanfall2 folder to your desktop and delete the [following files](https://github.com/pg9182/northstar-dedicated#reducing-the-size-). +Easiest way to do this is copy the entire Titanfall2 folder to your desktop and delete the [following files](https://github.com/pg9182/northstar-dedicated#reducing-the-size-). -### Copy Titanfall Folder over to the Linux Machine +#### Copy Titanfall Folder over to the Linux Machine -1. Access the files on your Linux machine using tools like [Filezilla](https://filezilla-project.org/) or [WinSCP](https://winscp.net/eng/download.php) +1. Access the files on your Linux machine using tools like [Filezilla](https://filezilla-project.org/) or [WinSCP](https://winscp.net/eng/download.php) 2. Navigate to `/mnt/Titanfall` (create directory if does not exist) -3. Copy the newly pruned Titanfall folder to the server. +3. Copy the newly pruned Titanfall folder to the server. ![/mnt/Titanfall/](https://i.postimg.cc/15HbbzFr/image.pnghttps://i.postimg.cc/15HbbzFr/image.png) -### Copy mods to /mnt/mods -If you have configured some mods,these can be placed at '/mnt/mods` like below -![/mnt/mods](https://i.postimg.cc/tRD5jnrJ/image.png) - -### Create docker-compose file -We are going to be using Docker-Compose to set up our container, this gives us much more flexibility and allows us to make changes to the start up args much cleaner. - ``` - mkdir Titanfall - nano docker-compose.yml - ``` - - Example docker-compose.yml - - ```yaml - version: '3' - services: - northstar1: - image: ghcr.io/pg9182/northstar-dedicated:1-tf2.0.11.0 - pull_policy: always - environment: - - NS_PORT=37015 - - NS_PORT_AUTH=8081 - - 'NS_SERVER_NAME=[Region]Enter Server Name here' - - 'NS_SERVER_DESC=Enter your description here' - - | - NS_EXTRA_ARGUMENTS= - +setplaylist aitdm - +mp_gamemode aitdm - +map mp_angel_city - +ns_private_match_countdown_length 0 - +ns_should_return_to_lobby 0 - +net_compresspackets_minsize 64 - +net_compresspackets 1 - +spewlog_enable 0 - +sv_maxrate 127000 - volumes: - - /mnt/Titanfall:/mnt/Titanfall:ro - - /mnt/mods:/mnt/mods:ro - ports: - - '37015:37015/udp' - - '8081:8081/tcp' - restart: always - ``` - A list of all the CONVARs are [here](../../basic-listen-server#server-configuration) - - ## Starting - -### Run the following command - - To run this container type - ``` - docker-compose up - ``` - - +#### Copy mods to /mnt/mods + +If you have configured some mods,these can be placed at '/mnt/mods\` like below ![/mnt/mods](https://i.postimg.cc/tRD5jnrJ/image.png) + +#### Create docker-compose file + +We are going to be using Docker-Compose to set up our container, this gives us much more flexibility and allows us to make changes to the start up args much cleaner. + +``` +mkdir Titanfall +nano docker-compose.yml +``` + +Example docker-compose.yml + +```yaml +version: '3' +services: + northstar1: + image: ghcr.io/pg9182/northstar-dedicated:1-tf2.0.11.0 + pull_policy: always + environment: + - NS_PORT=37015 + - NS_PORT_AUTH=8081 + - 'NS_SERVER_NAME=[Region]Enter Server Name here' + - 'NS_SERVER_DESC=Enter your description here' + - | + NS_EXTRA_ARGUMENTS= + +setplaylist aitdm + +mp_gamemode aitdm + +map mp_angel_city + +ns_private_match_countdown_length 0 + +ns_should_return_to_lobby 0 + +net_compresspackets_minsize 64 + +net_compresspackets 1 + +spewlog_enable 0 + +sv_maxrate 127000 + volumes: + - /mnt/Titanfall:/mnt/Titanfall:ro + - /mnt/mods:/mnt/mods:ro + ports: + - '37015:37015/udp' + - '8081:8081/tcp' + restart: always +``` + +A list of all the CONVARs are [here](../../basic-listen-server/#server-configuration) + +### Starting + +#### Run the following command + +To run this container type + +``` +docker-compose up +``` diff --git a/docs/modding-and-development/development/northstarlauncher.md b/docs/modding-and-development/development/northstarlauncher.md deleted file mode 100644 index 89aeca4..0000000 --- a/docs/modding-and-development/development/northstarlauncher.md +++ /dev/null @@ -1,7 +0,0 @@ -# NorthstarLauncher - -### Setup - -Build instructions for the launcher can be found here: - -{% embed url="https://github.com/R2Northstar/NorthstarLauncher/blob/main/BUILD.md" %} diff --git a/docs/modding-and-development/development/northstarmasterserver/README.md b/docs/modding-and-development/development/northstarmasterserver/README.md deleted file mode 100644 index 85ab24e..0000000 --- a/docs/modding-and-development/development/northstarmasterserver/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Hosting a Master Server - -## Introduction - -The master server is responsible for centralizing game servers created by players, it also verifies that connecting players own an Origin account with Titanfall 2. - -There's no need to host your own master server to play games with other people, you can use [direct connect](../../../installing-northstar/using-northstar/direct-connect.md) or just setup a [normal server](../../../hosting-a-server-with-northstar/basic-listen-server.md) that announces itself to `northstar.tf`. This tutorial is aimed for those who want to contribute improvements to the code or test their own changes to the project. - -## Contents - -* [Deploy](deploy.md) diff --git a/docs/modding-and-development/development/northstarmasterserver/deploy.md b/docs/modding-and-development/development/northstarmasterserver/deploy.md deleted file mode 100644 index e1d5985..0000000 --- a/docs/modding-and-development/development/northstarmasterserver/deploy.md +++ /dev/null @@ -1,27 +0,0 @@ -# Deploying Master Server - -## Development - -A Development Master Server uses http requests, it should be used for development purposes on your local machine. - -### Installation steps - -1. Clone [NorthstarMasterServer](https://github.com/R2Northstar/NorthstarMasterServer). -1. Copy the default [dev.env](https://github.com/R2Northstar/NorthstarMasterServer/blob/main/dev.env) to `.env` replace the ip with `127.0.0.1`. -1. Run `npm install` && `npm run watch`. - -Your master server is now running, to connect to it you need to change some configuration files. - -Northstar default masterserver is https://northstar.tf, to point to a new location you need to modify this URL in the `autoexec_ns_server.cfg` and `autoexec_ns_client.cfg` config files. - -### Enabling HTTPS - -HTTPS should be used if you plan for other people to use your master server. It can be enabled pretty easy with [Caddy](https://caddyserver.com/). Download a Caddy binary and create a `Caddyfile` with the following content: - -``` -{$SHORTDOMAIN:localhost} { - reverse_proxy http://127.0.0.1:8080 -} -``` - -After configuring your DNS domain you can run it with `SHORTDOMAIN=example.com caddy run`. Caddy will automatically generate and maintain your certificates for you, check its documentation for more info: https://caddyserver.com/docs/ diff --git a/docs/modding-and-development/development/repositories/README.md b/docs/modding-and-development/development/repositories/README.md new file mode 100644 index 0000000..d459d3b --- /dev/null +++ b/docs/modding-and-development/development/repositories/README.md @@ -0,0 +1,3 @@ +# Repositories + +The Northstar codebase stretches over multiple repositories, with different repos containing code for different aspects of Northstar. Check sub-pages for a description of some of them. diff --git a/docs/modding-and-development/development/repositories/northstarlauncher.md b/docs/modding-and-development/development/repositories/northstarlauncher.md new file mode 100644 index 0000000..89aeca4 --- /dev/null +++ b/docs/modding-and-development/development/repositories/northstarlauncher.md @@ -0,0 +1,7 @@ +# NorthstarLauncher + +### Setup + +Build instructions for the launcher can be found here: + +{% embed url="https://github.com/R2Northstar/NorthstarLauncher/blob/main/BUILD.md" %} diff --git a/docs/modding-and-development/development/repositories/northstarmasterserver/README.md b/docs/modding-and-development/development/repositories/northstarmasterserver/README.md new file mode 100644 index 0000000..2b5ac8a --- /dev/null +++ b/docs/modding-and-development/development/repositories/northstarmasterserver/README.md @@ -0,0 +1,11 @@ +# NorthstarMasterServer + +## Introduction + +The master server is responsible for centralizing game servers created by players, it also verifies that connecting players own an Origin account with Titanfall 2. + +There's no need to host your own master server to play games with other people, you can use [direct connect](../../../../installing-northstar/using-northstar/direct-connect.md) or just setup a [normal server](../../../../hosting-a-server-with-northstar/basic-listen-server.md) that announces itself to `northstar.tf`. This tutorial is aimed for those who want to contribute improvements to the code or test their own changes to the project. + +## Contents + +* [Deploy](deploy.md) diff --git a/docs/modding-and-development/development/repositories/northstarmasterserver/deploy.md b/docs/modding-and-development/development/repositories/northstarmasterserver/deploy.md new file mode 100644 index 0000000..e1d5985 --- /dev/null +++ b/docs/modding-and-development/development/repositories/northstarmasterserver/deploy.md @@ -0,0 +1,27 @@ +# Deploying Master Server + +## Development + +A Development Master Server uses http requests, it should be used for development purposes on your local machine. + +### Installation steps + +1. Clone [NorthstarMasterServer](https://github.com/R2Northstar/NorthstarMasterServer). +1. Copy the default [dev.env](https://github.com/R2Northstar/NorthstarMasterServer/blob/main/dev.env) to `.env` replace the ip with `127.0.0.1`. +1. Run `npm install` && `npm run watch`. + +Your master server is now running, to connect to it you need to change some configuration files. + +Northstar default masterserver is https://northstar.tf, to point to a new location you need to modify this URL in the `autoexec_ns_server.cfg` and `autoexec_ns_client.cfg` config files. + +### Enabling HTTPS + +HTTPS should be used if you plan for other people to use your master server. It can be enabled pretty easy with [Caddy](https://caddyserver.com/). Download a Caddy binary and create a `Caddyfile` with the following content: + +``` +{$SHORTDOMAIN:localhost} { + reverse_proxy http://127.0.0.1:8080 +} +``` + +After configuring your DNS domain you can run it with `SHORTDOMAIN=example.com caddy run`. Caddy will automatically generate and maintain your certificates for you, check its documentation for more info: https://caddyserver.com/docs/ -- cgit v1.2.3