Updated Dev Server docs and TOC

This commit is contained in:
Chris Langsenkamp 2020-01-06 04:23:57 -05:00
parent febcd6f37f
commit 379e4c38cc
20 changed files with 100 additions and 111 deletions

View File

@ -1,59 +0,0 @@
# Development Servers
During this guide we will set up a dedicated server and place the server build of our project on the dedicated server.
**IMPORTANT: Before we begin, there are some potential problems you may face, as no server is truly 'free':**
**1. Service providers are NOT free.**
**2. Most of the time you can start with free trials for a limited time, after x amount of time or x amount of used resources the trial will end and you might incur payment.**
**3. Always read the providers free trial limitations.**
**4. Some providers require a payment method for using a Windows instance, however as long as you do not go over the limitations the provider should not bill you.**
**Take note that Mirror is not affiliated and can not be held responsible for any charges or
fees associated with service providers like [AWS](https://aws.amazon.com/), [Microsoft Azure](https://azure.microsoft.com/en-us/free/),
[Google Compute Engine](https://cloud.google.com/compute/) and others...**
## Introduction
During your development with Mirror you will need to test your project as a client and as a server.
There are a few possible ways to test your project:
1. Default build => Host/client as one and connecting with another build/editor to the host locally on 1 computer.
2. Server build => Server is a separate executable. You can place it on your computer run it and connect to it as a client.
3. Dedicated Server => Same as the server build but placed on an external machine, you connect to it with the computer's external ip.
This guide will focus on the "Dedicated Server" option. There are multiple providers and even self hosted dedicated machines.
All possibilities still go through the same process to ensure connectivity to clients. A few requirements for a dedicated server:
1. Port forwarding (Not strictly necessary but makes everything a lot easier without needing NAT punchthrough)
2. Firewall exceptions
3. Computer/machine that stays online and accessible whenever you need it.
In the upcoming sections we will go through setting up a provider with the free tier.
**Please always double check when in doubt that you do not select a paid feature as this is purely meant as a short term period
to test out basic functionality during development of your project.**
## Microsoft Azure
Microsoft Azure (as of time of writing) allows setting up a windows instance during the free trial without an active payment method.
**To be added**
## Google Compute Engine
Google Compute Engine (as of time of writing) does **NOT** allow setting up a windows instance during the free trial without an active payment method.
**To be added**
## Self Hosted Dedicated Server
A self hosted dedicated server is the same as the other providers but you provide the hardware, internet connection and costs for running the computer.
Most of the time this is the "cheapest" option during development **if** you already have an extra machine.
Preferably you would put the machine on a different network (to simulate the conditions as the other providers).
This would mean you could connect to the machine and put your server build on whenever you need and have access to the router and security settings of the machine for port forwarding and firewall exceptions.
In essence, this is the simplest set up but does require extra hardware

View File

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 333 KiB

View File

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 97 KiB

View File

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View File

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

View File

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

Before

Width:  |  Height:  |  Size: 190 KiB

After

Width:  |  Height:  |  Size: 190 KiB

View File

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

Before

Width:  |  Height:  |  Size: 249 KiB

After

Width:  |  Height:  |  Size: 249 KiB

View File

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 203 KiB

View File

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 201 KiB

View File

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 218 KiB

View File

@ -2,13 +2,13 @@
During this section we will focus on using a Windows instance and connecting from a Windows computer. During this section we will focus on using a Windows instance and connecting from a Windows computer.
**Please note: AWS requires a payment method/creditcard added before being able to use a Windows server.** > **NOTE**: AWS requires a payment method/credit card added before being able to use a Windows server.
Don't forget to read up on the free tier limitations [HERE](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-free-tier.html). Don't forget to read up on the [free tier limitations](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-free-tier.html).
During this example we will be using the free tier of the EC2 option, which gives us the possibility to use a Windows instance (if you have already added a payment method). During this example we will be using the free tier of the EC2 option, which gives us the possibility to use a Windows instance (if you have already added a payment method).
For more information about which services offer a Free Tier, see [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=tier%2312monthsfree&awsf.Free%20Tier%20Categories=categories%23compute). For more information about which services offer a Free Tier, see [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=tier%2312monthsfree&awsf.Free%20Tier%20Categories=categories%23compute).
These are the steps we will go through from start to finish. These are the steps we will go through from start to finish:
1. Account creation 1. Account creation
2. Setting up an instance with the EC2 Management Console 2. Setting up an instance with the EC2 Management Console
@ -19,7 +19,7 @@ These are the steps we will go through from start to finish.
## 1. Account Creation ## 1. Account Creation
Go to the [Account creation page](https://portal.aws.amazon.com/billing/signup?nc2=h_ct&src=default&redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start) and Go to the [Account creation page](https://portal.aws.amazon.com/billing/signup?nc2=h_ct&src=default&redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start) and
sign up with your details and payment method (creditcard for example). Adding the payment method is necessary to run a windows instance on AWS. sign up with your details and payment method (e.g. credit card). Adding the payment method is necessary to run a windows instance on AWS.
## 2. Setting up an instance with the EC2 Management Console ## 2. Setting up an instance with the EC2 Management Console
After setting up your account you should be logged in. After setting up your account you should be logged in.
@ -39,114 +39,106 @@ There are 7 steps to creating your AWS Instance:
6. Configure Security Group 6. Configure Security Group
7. Review 7. Review
* **Step 1: Choose an Amazon Machine Image** #### Step 1: Choose an Amazon Machine Image
Scroll down until you see the Microsoft Windows Server 2019 Base (take the newest one if this is outdated). Scroll down until you see the Microsoft Windows Server 2019 Base (take the newest one if this is outdated).
Make sure that the option you select has the "Free Tier Eligible" under the icon and click on "Select". Make sure that the option you select has the "Free Tier Eligible" under the icon and click on "Select".
![Amazon Machine Image: Microsoft Server 2019](Microsoft%20Server%202019.PNG) ![Amazon Machine Image: Microsoft Server 2019](Microsoft%20Server%202019.PNG)
* **Step 2: Choose Instance Type** #### Step 2: Choose Instance Type
Make sure you choose the instance type with the "free tier eligible", at the time of writing this is the t2.micro instance. Make sure you choose the instance type with the "free tier eligible", at the time of writing this is the t2.micro instance.
Click on **"Next: Configure Instance Details"**. Do **NOT** click on Review and Launch. Click on **"Next: Configure Instance Details"**. **Do not** click on Review and Launch.
![Choose Instance Type](Step%202.png) ![Choose Instance Type](Step%202.png)
* **Step 3: Configure Instance** #### Step 3: Configure Instance
Nothing has to be changed at this step. Keep it default. Click on **"Next: Add Storage**. Nothing has to be changed at this step. Keep it default. Click on **"Next: Add Storage"**.
* **Step 4: Add Storage** #### Step 4: Add Storage
Nothing has to be changed. Keep it default. The 30GB is more than you need but there will be an error if you choose a lower amount. Nothing has to be changed. Keep it default. The 30GB is more than you need but there will be an error if you choose a lower amount.
Keep in mind that you can always click "Previous" if you need to return, you do not need to repeat the entire process if you make a mistake (unless you click Launch at the end). Keep in mind that you can always click "Previous" if you need to return, you do not need to repeat the entire process if you make a mistake (unless you click Launch at the end).
Click on **"Next: Add Tags** to continue. Click on **"Next: Add Tags"** to continue.
* **Step 5: Add Tags** #### Step 5: Add Tags
Nothing has to be changed. Keep it default. Click on **"Next: Configure Security Groups"** Nothing has to be changed. Keep it default. Click on **"Next: Configure Security Groups"**
* **Step 6: Configure Security Groups** #### Step 6: Configure Security Groups
**!!IMPORTANT STEP!! This makes it possible to connect to your instance from outside for:** > **IMPORTANT STEP** This makes it possible to connect to your instance from outside for:
* **RDP(NEEDED DURING THIS EXAMPLE)** - RDP (needed for this example)
* **For clients connecting through port 7777 for your Mirror Project.** - For clients connecting through port 7777 for your Mirror Project.
* **SSH(if needed)** - SSH (if needed)
Create a new security group and you can give it your own name and description. Create a new security group and you can give it your own name and description. Add the following rules:
Add the following rules:
RDP with source "Anywhere", Description can be whatever but put it as Remote Desktop Program. - RDP with source "Anywhere", Description can be whatever but put it as Remote Desktop Program.
- Custom TCP Rule with port 7777 and source "Anywhere", Description can be whatever but put it as Mirror.
- SSH with source "Anywhere", Description can be whatever but put it as SSH.
Custom TCP Rule with port 7777 and source "Anywhere", Description can be whatever but put it as Mirror. SSH is not strictly necessary but can be used to remote connect to it through other means than the RDP.
SSH with source "Anywhere", Description can be whatever but put it as SSH. You can ignore the warning about the source as this is just a testing environment. In the future you might wish to restrict this but you will almost never know the clients' connection IP's beforehand.
Note: SSH is not strictly necessary but can be used to remote connect to it through other means than the RDP. Click on **"Next: Review and Launch"**
You can ignore the warning about the source as this is just a testing environment.
In the future you might wish to restrict this but you will almost never know the clients connection IP beforehand.
![Configuring Security Groups](Step%206.png) ![Configuring Security Groups](Step%206.png)
Click on **Next: Review and Launch"** #### Step 7: Review
* **Step 7: Review**
Almost there! Make sure everything is correct and you are using the free tier, then click on **"Launch"**. Almost there! Make sure everything is correct and you are using the free tier, then click on **"Launch"**.
![Review Of The Instance](Review.png) ![Review Of The Instance](Review.png)
One more thing. A window will pop up, asking for your key pair. Just create a new one by selecting the dropdown: **"Create a new key pair"** and give it a name, click on **"Download Key Pair"**. One more thing: A window will pop up asking for your key pair. Just create a new one by selecting the dropdown: **"Create a new key pair"** and give it a name, click on **"Download Key Pair"**.
Keep the key file (.PEM File) somewhere secure (To be 100% certain, back it up somewhere). Keep the key file (.PEM File) somewhere secure (To be 100% certain, back it up somewhere).
**YOU CAN NOT ACCESS THE CREATED INSTANCE WITHOUT THIS KEY** > **YOU CANNOT ACCESS THE CREATED INSTANCE WITHOUT THIS KEY**
![Key Pair](KeyPair.PNG) ![Key Pair](KeyPair.PNG)
Now you can (finally) click on **Launch Instances**! Now you can (finally) click on **"Launch Instances"**!
Go back to your EC2 dashboard by clicking on "Services" at the top left and clicking on EC2. Go back to your EC2 dashboard by clicking on "Services" at the top left and clicking on EC2.
Now you see you have "Running Instances: 1". **Click on "Running Instances" to continue**. Now you see you have "Running Instances: 1". **Click on "Running Instances" to continue**.
![Your Running Instances](Running%20instances.png) ![Your Running Instances](Running%20instances.png)
You now see your instance running! If it's still initializing, give it a few minutes! A new instance might take around 5-10min to set up. > A new instance might take around 5-10 minutes to set up. Refresh the page after 10 minutes if nothing changes.
Refresh the page after 10 minutes if nothing changes.
Now you did all this but you want to get ON the dedicated server right? Perfect! The next step will get you up and running! Now you did all this but you want to get ON the dedicated server right? Perfect! The next step will get you up and running!
## 3. Configuring the server via RDP (Remote Desktop) ## 3. Configuring the server via RDP (Remote Desktop)
Time to get the RDP file so you can start connecting! Time to get the RDP file so you can start connecting. There are a few things we'll need:
There are a few things we'll need!
1. RDP file with the key pair added to it 1. RDP file with the key pair added to it
2. Configure RDP file once downloaded to allow getting files from our C: drive or other drives (so you can easily get your zip project. 2. Configure RDP file once downloaded to allow getting files from our C: drive or other drives (so you can easily get your zip project)
3. Enter the windows Admin password once you start the RDP file 3. Enter the windows Admin password once you start the RDP file
Once you've done this, you should be able to continue using the same RDP file. Once you've done this, you should be able to continue using the same RDP file.
* **1. RDP file with the key pair added to it** #### RDP file with the key pair added to it
> Get the password **before** clicking Download
![Connect To Your Instance 1](Connect%20to%20your%20instance%201.png) ![Connect To Your Instance 1](Connect%20to%20your%20instance%201.png)
**BEFORE CLICKING DOWNLOAD GET THE PASSWORD** > **Copy the Password for later**
![Connect To Your Instance 2](Connect%20to%20your%20instance%202.png) ![Connect To Your Instance 2](Connect%20to%20your%20instance%202.png)
**COPY THE PASSWORD FOR LATER** Now click on **"Download Remote Desktop File"**. The RDP file will be downloaded.
Now click on **"Download Remote Desktop File"**
The RDP file will be downloaded.
![Connect To Your Instance 3](Connect%20to%20your%20instance%203.png) ![Connect To Your Instance 3](Connect%20to%20your%20instance%203.png)
* **2. Configure RDP file for easy file access** #### Configure RDP file for easy file access
Go to your freshly downloaded RDP file and rightclick it and then click "Edit". Go to your freshly downloaded RDP file and rightclick it and then click "Edit".
@ -165,7 +157,7 @@ Once done you will be able to copy the password.
There you have it! Now you have your password and Remote Desktop should show you logging into your dedicated server! There you have it! Now you have your password and Remote Desktop should show you logging into your dedicated server!
* **3. Setting up the firewall to allow connections through** #### Setting up the firewall to allow connections through
Go to the windows firewall settings, go to the advanced firewall settings and go to inbound rules. **Add a new rule** and choose the port type. Go to the windows firewall settings, go to the advanced firewall settings and go to inbound rules. **Add a new rule** and choose the port type.
Select TCP and enter the 7777 port (or any other if you use another port in Mirror). Continue clicking next and keep things default. Select TCP and enter the 7777 port (or any other if you use another port in Mirror). Continue clicking next and keep things default.
@ -175,7 +167,7 @@ Close all the windows when done.
AWESOME! You now have everything set up to accept incoming requests on **port 7777**. AWESOME! You now have everything set up to accept incoming requests on **port 7777**.
## 5. Testing the connection ## 4. Testing the connection
Before you can (finally) test out your server build of your project you need to get it on the dedicated server! Before you can (finally) test out your server build of your project you need to get it on the dedicated server!
@ -186,11 +178,11 @@ Double click it and because you placed your zipped server build on that drive, y
![Your Drive on the dedicated host](Your%20Drive%20on%20the%20dedicated%20host.PNG) ![Your Drive on the dedicated host](Your%20Drive%20on%20the%20dedicated%20host.PNG)
Now **unzip** the project in a new folder on the dedicated server's desktop and you can now **run it!** Now unzip the project in a new folder on the dedicated server's desktop and run it.
Want to test if it sees the 7777 port is open **AFTER YOUR STARTED YOUR MIRROR SERVER**? Want to test if it sees the 7777 port is open after you started your Mirror server?
Get your IPv4 public IP from the EC2 Management Console from your instance and use it on your client to connect to that IP. Get your IPv4 public IP from the EC2 Management Console from your instance and use it on your client to connect to that IP.
Go to [PortChecker](https://www.portcheckers.com/) and enter the Dedicated Server IP address and enter port 7777. Go to [PortChecker](https://www.portcheckers.com/) and enter the Dedicated Server IP address and enter port 7777.
**PLEASE NOTE: IF YOU ARE NOT RUNNING YOUR GAME/PROJECT THEN THE PORT WILL BE CLOSED, IT'S ONLY OPEN WHEN YOU ARE RUNNING SERVER BUILD!** > NOTE: If you are not running your game / project then the port will be closed. It's only open when the server is running.

View File

@ -0,0 +1,56 @@
# Development Servers
During this guide we will set up a dedicated server and place the server build of our project on the dedicated server.
**IMPORTANT:** Before we begin, there are some potential problems you may face, as no server is truly 'free':
1. Service providers are NOT free.
2. Most of the time you can start with free trials for a limited time, after x amount of time or x amount of used resources the trial will end and you might incur payment.
3. Always read the providers free trial limitations.
4. Some providers require a payment method for using a Windows instance, however as long as you do not go over the limitations the provider should not bill you.
> **NOTE**: Mirror is not affiliated and can not be held responsible for any charges or fees associated with service providers like
[AWS](https://aws.amazon.com/),
[Microsoft Azure](https://azure.microsoft.com/en-us/free/),
[Google Compute Engine](https://cloud.google.com/compute/) and others...
## Introduction
During your development with Mirror you will need to test your project as a client and as a server.
There are a few possible ways to test your project:
1. Default build: Host/client as one and connecting with another build/editor to the host locally on 1 computer.
2. Server build: Server is a separate executable. You can place it on your computer run it and connect to it as a client.
3. Dedicated Server: Same as the server build but placed on an external machine, you connect to it with the server's external ip.
This guide will focus on the "Dedicated Server" option. There are multiple providers and even self hosted dedicated machines.
All possibilities still go through the same process to ensure connectivity to clients. A few requirements for a dedicated server:
1. Port forwarding (Not strictly necessary but makes everything a lot easier without needing NAT punchthrough)
2. Firewall exceptions
3. Computer/machine that stays online and accessible whenever you need it.
In the upcoming sections we will go through setting up a provider with the free tier.
**Always double check that you do not select a paid feature as this is purely meant as a short term period to test out basic functionality during development of your project.**
### Microsoft Azure
Microsoft Azure (as of time of writing) allows setting up a windows instance during the free trial without an active payment method.
**To be added**
### Google Compute Engine
Google Compute Engine (as of time of writing) does not allow setting up a windows instance during the free trial without an active payment method.
**To be added**
### Self Hosted Dedicated Server
A self hosted dedicated server is the same as the other providers but you provide the hardware, internet connection and costs for running the computer.
Most of the time this is the cheapest option during development if you already have an extra machine.
Preferably you would put the machine on a different network (to simulate the conditions as the other providers).
This would mean you could connect to the machine and put your server build on whenever you need and have access to the router and security settings of the machine for port forwarding and firewall exceptions.
In essence, this is the simplest set up but does require extra hardware.

View File

@ -25,8 +25,8 @@
- name: Custom Visibility - name: Custom Visibility
href: VisibilityCustom.md href: VisibilityCustom.md
- name: Development Servers - name: Development Servers
href: DedicatedServer/toc.yml href: DevServer/toc.yml
topicHref: DedicatedServer/ topicHref: DevServer/
- name: Synchronization - name: Synchronization
href: Sync/toc.yml href: Sync/toc.yml
topicHref: Sync/ topicHref: Sync/