docs: Explain how to set a server in AWS (#1365)
* Create DevelopmentServer.md This guide focuses on helping people try out their projects on a dedicated server so a more realistic test can be performed to see if everything works correctly. This focuses on the free/trial aspect from the chosen providers and tries to make it very clear to readers that "free" is relative and Mirror can not be held responsible if they go above the providers limits. It is mainly a guide on setting up the dedicated server through different providers to test your Mirror project. Question: Should I put it all under each other or should each provider/possibility be a different page like synchronization/GameObjects? For example: Overview AWS Azure Google * Make dedicated servers a submenu * Add files via upload * Move AWS inside it's own folder * Update index.md Changed the imgur links to the github images in the AWS folder so offline access is possible * Update index.md As suggestion from SoftwareGuy from suggestion: https://github.com/vis2k/Mirror/pull/1365#discussion_r361819820 I have made this in a bullet point so it's more clearly visible * Update index.md * Update index.md * Update index.md Added the changes as SoftwareGuy mentioned * Update index.md Another update to the formatting. Changed some parts to titles so it's easier to navigate through the right hand side on github pages. Some more formatting done * Update index.md Changed the titles from the 7 steps to include the step number for easier following * Update index.md Forgot this one: https://github.com/vis2k/Mirror/pull/1365#discussion_r361819874 Co-authored-by: Paul Pacheco <paulpach@gmail.com>
BIN
doc/Guides/DedicatedServer/AWS/AWS Setup.png
Normal file
After Width: | Height: | Size: 333 KiB |
BIN
doc/Guides/DedicatedServer/AWS/Configure RDP for Data.PNG
Normal file
After Width: | Height: | Size: 151 KiB |
BIN
doc/Guides/DedicatedServer/AWS/Connect to your instance 1.png
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
doc/Guides/DedicatedServer/AWS/Connect to your instance 2.png
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
doc/Guides/DedicatedServer/AWS/Connect to your instance 3.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
doc/Guides/DedicatedServer/AWS/KeyPair.PNG
Normal file
After Width: | Height: | Size: 130 KiB |
BIN
doc/Guides/DedicatedServer/AWS/Microsoft Server 2019.PNG
Normal file
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 136 KiB |
BIN
doc/Guides/DedicatedServer/AWS/Review.png
Normal file
After Width: | Height: | Size: 190 KiB |
BIN
doc/Guides/DedicatedServer/AWS/Running instances.png
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
doc/Guides/DedicatedServer/AWS/Step 2.png
Normal file
After Width: | Height: | Size: 249 KiB |
BIN
doc/Guides/DedicatedServer/AWS/Step 6.png
Normal file
After Width: | Height: | Size: 203 KiB |
BIN
doc/Guides/DedicatedServer/AWS/Windows Firewall Exception.PNG
Normal file
After Width: | Height: | Size: 201 KiB |
After Width: | Height: | Size: 218 KiB |
196
doc/Guides/DedicatedServer/AWS/index.md
Normal file
@ -0,0 +1,196 @@
|
||||
# Amazon Web Services (AWS)
|
||||
|
||||
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.**
|
||||
|
||||
Don't forget to read up on the free tier limitations [HERE](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).
|
||||
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.
|
||||
|
||||
1. Account creation
|
||||
2. Setting up an instance with the EC2 Management Console
|
||||
3. Configuring the server via RDP (Remote Desktop)
|
||||
4. Setting up the firewall to allow connections through
|
||||
5. Testing the connection
|
||||
|
||||
## 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
|
||||
sign up with your details and payment method (creditcard for example). Adding the payment method is necessary to run a windows instance on AWS.
|
||||
|
||||
## 2. Setting up an instance with the EC2 Management Console
|
||||
After setting up your account you should be logged in.
|
||||
Always make sure you're in your correct region so it's a good habit to check in the top right corner. Change it to the closest location to you now.
|
||||
After this click on Services in the top left corner and click on EC2. This will bring you to the EC2 instance dashboard and ready to Launch your instance!
|
||||
|
||||
Click on **"Launch Instance"**.
|
||||
![EC2-Management-Dashboard](AWS%20Setup.png)
|
||||
|
||||
There are 7 steps to creating your AWS Instance:
|
||||
|
||||
1. Choose an Amazon Machine Image (AMI)
|
||||
2. Choose Instance Type
|
||||
3. Configure Instance
|
||||
4. Add Storage
|
||||
5. Add Tags
|
||||
6. Configure Security Group
|
||||
7. Review
|
||||
|
||||
* **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).
|
||||
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)
|
||||
|
||||
* **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.
|
||||
Click on **"Next: Configure Instance Details"**. Do **NOT** click on Review and Launch.
|
||||
|
||||
![Choose Instance Type](Step%202.png)
|
||||
|
||||
* **Step 3: Configure Instance**
|
||||
|
||||
Nothing has to be changed at this step. Keep it default. Click on **"Next: 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.
|
||||
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.
|
||||
|
||||
* **Step 5: Add Tags**
|
||||
|
||||
Nothing has to be changed. Keep it default. Click on **"Next: Configure Security Groups"**
|
||||
|
||||
* **Step 6: Configure Security Groups**
|
||||
|
||||
**!!IMPORTANT STEP!! This makes it possible to connect to your instance from outside for:**
|
||||
|
||||
* **RDP(NEEDED DURING THIS EXAMPLE)**
|
||||
* **For clients connecting through port 7777 for your Mirror Project.**
|
||||
* **SSH(if needed)**
|
||||
|
||||
Create a new security group and you can give it your own name and description.
|
||||
Add the following rules:
|
||||
|
||||
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.
|
||||
|
||||
Note: SSH is not strictly necessary but can be used to remote connect to it through other means than the RDP.
|
||||
|
||||
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)
|
||||
|
||||
Click on **Next: Review and Launch"**
|
||||
|
||||
* **Step 7: Review**
|
||||
|
||||
Almost there! Make sure everything is correct and you are using the free tier, then click on **"Launch"**.
|
||||
|
||||
![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"**.
|
||||
|
||||
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**
|
||||
|
||||
![Key Pair](KeyPair.PNG)
|
||||
|
||||
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.
|
||||
Now you see you have "Running Instances: 1". **Click on "Running Instances" to continue**.
|
||||
|
||||
![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.
|
||||
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!
|
||||
|
||||
## 3. Configuring the server via RDP (Remote Desktop)
|
||||
|
||||
Time to get the RDP file so you can start connecting!
|
||||
There are a few things we'll need!
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
* **1. RDP file with the key pair added to it**
|
||||
|
||||
![Connect To Your Instance 1](Connect%20to%20your%20instance%201.png)
|
||||
|
||||
**BEFORE CLICKING DOWNLOAD GET THE PASSWORD**
|
||||
|
||||
![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.
|
||||
|
||||
![Connect To Your Instance 3](Connect%20to%20your%20instance%203.png)
|
||||
|
||||
* **2. Configure RDP file for easy file access**
|
||||
|
||||
Go to your freshly downloaded RDP file and rightclick it and then click "Edit".
|
||||
|
||||
Go to the third tab "Local sources", at the bottom click "more" under local devices and sources.
|
||||
On the new window select your C: drive or any other drive. This is your own computer your connecting from. For easy file exchange.
|
||||
|
||||
![Configuring the RDP file](Configure%20RDP%20for%20Data.PNG)
|
||||
|
||||
Perfect! Now you can run the RDP file! The RDP file will ask a password. If you forgot your password you can get it back by rightclicking
|
||||
the instance and clicking on "Get Windows Password". You will be asked to re-enter your key pair (.PEM) file and decrypt the message.
|
||||
Once done you will be able to copy the password.
|
||||
|
||||
![Retrieve Your Default Windows Administrator Password](Retrieve%20Default%20Windows%20Administrator%20Password.PNG)
|
||||
|
||||
![Retrieve Your Default Windows Administrator Password 2](Retrieve%20Default%20Windows%20Administrator%20Password%202.PNG)
|
||||
|
||||
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**
|
||||
|
||||
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.
|
||||
Close all the windows when done.
|
||||
|
||||
![Windows Firewall Exception](Windows%20Firewall%20Exception.PNG)
|
||||
|
||||
AWESOME! You now have everything set up to accept incoming requests on **port 7777**.
|
||||
|
||||
## 5. Testing the connection
|
||||
|
||||
Before you can (finally) test out your server build of your project you need to get it on the dedicated server!
|
||||
|
||||
Place your (zipped) server build at the root of your added drive (C: or another) to make it easier to find it fast.
|
||||
|
||||
Go to **"My Computer"** and because of our previous changes to the RDP we should now see your local drive under "Devices and Drives".
|
||||
Double click it and because you placed your zipped server build on that drive, you should see it immediatly when it's done loading.
|
||||
|
||||
![Your Drive on the dedicated host](Your%20Drive%20on%20the%20dedicated host.PNG)
|
||||
|
||||
Now **unzip** the project in a new folder on the dedicated server's desktop and you can now **run it!**
|
||||
|
||||
Want to test if it sees the 7777 port is open **AFTER YOUR 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.
|
||||
|
||||
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!**
|
59
doc/Guides/DedicatedServer/index.md
Normal file
@ -0,0 +1,59 @@
|
||||
# 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
|
4
doc/Guides/DedicatedServer/toc.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- name: Overview
|
||||
href: index.md
|
||||
- name: AWS
|
||||
href: AWS/index.md
|
@ -24,6 +24,9 @@
|
||||
href: Visibility.md
|
||||
- name: Custom Visibility
|
||||
href: VisibilityCustom.md
|
||||
- name: Development Servers
|
||||
href: DedicatedServer/toc.yml
|
||||
topicHref: DedicatedServer/
|
||||
- name: Synchronization
|
||||
href: Sync/toc.yml
|
||||
topicHref: Sync/
|
||||
|