Readme update

This commit is contained in:
Marwolf
2018-08-17 09:16:39 -04:00
parent a0d0d4f26c
commit 399e5ea342

View File

@@ -10,6 +10,7 @@
4. [Required Step For Windows Users](#windows)
5. [Setup Process](#setup)
6. [Steps to Host on a VPS](#vps)
7. [Remote JMX Sampling](#jmx)
## Project Introduction <a name="introduction"></a>
@@ -19,6 +20,10 @@ Choices:
1. Single player RSC game + basic database editing (PHPMyAdmin)
2. Game + Website + PHPMyAdmin
The game client registers new players upon their first login attempt.
Admin role is group_id = 1, players are group_id = 10
[Return to top](#top)
___
@@ -69,7 +74,7 @@ Install [Git](http://git-scm.com/book/en/v2/Getting-Started-Installing-Git), the
git clone https://github.com/Open-RSC/Docker-Home.git
```
[Return to top](#top)
[Return to top](#top)
___
## Required Step For Windows Users <a name="windows"></a>
@@ -144,29 +149,25 @@ ___
## Steps to Host on a VPS <a name="vps"></a>
* Execute "Setup_Linux_Mac.sh"
* Execute "Linux_Installer.sh"
* Follow the steps to install needed programs
* Select "2. Deployment for a publicly hosted server"
* You will be prompted to edit specific files. Below is how to do each:
* You will be prompted to edit specific files. Below is what to do each:
#### PHPMyAdmin MariaDB SQL users
PHPMyAdmin MariaDB SQL users
* Create a new user in PHPMyAdmin, grant it all permissions, remove pre-existing users.
* Create a new user in PHPMyAdmin (http://localhost:9000), grant it all permissions, remove pre-existing users.
* Use % for the host associated with the new user. Docker containers do not have static IP addresses and we are using the PHPMyAdmin Docker container to connect to the MariaDB Docker container. Each has a unique internally assigned IP address that is not localhost. The Docker container port of tcp/3306 for MariaDB is bound to the server as localhost so there should be no threat of external connections.
#### .env
"Docker-Home/.env"
* This is located in "Docker-Home/.env"
* The main website is running through Ghost CMS. For the section starting with # Ghost:
* The main website is running through Ghost CMS. For the section starting with # Ghost:
* Edit: "URL=http://localhost"
* You will need to reload all docker containers. Shortcut command: "sudo make stop && sudo make start"
* Replace: "URL=http://localhost"
* Nginx has a hostname reference for localhost as "NGINX_HOST=localhost" under the # Nginx section. It can be safely left alone at this time.
@@ -174,27 +175,33 @@ ___
* Set the username and password that have been granted root privileges in MariaDB SQL that you just created in the previous step with PHPMyAdmin where it reads "MYSQL_ROOT_USER=root" and "MYSQL_ROOT_PASSWORD=root"
#### Server config.xml
"Docker-Home/Game/server/config/config.xml"
* Edit: /Docker-Home/Game/server/config/config.xml
* Replace with your newly created SQL username: <entry key="dblogin">root</entry>
* Replace with your newly created SQL username: <entry key="dblogin">root</entry>
* Replace with your newly created SQL user pass: <entry key="dbpass">root</entry>
* Replace with your newly created SQL user pass: <entry key="dbpass">root</entry>
"Docker-Home/Game/Launcher/src/Main.java"
* Replace with your server's IP/domian: private static String Domain = "localhost";
* Do as you wish for the other lines around it.
"Docker-Home/Game/client/src/org/openrsc/client/Config.java"
* Replace with your server's IP/domain: public static String IP = "127.0.0.1";
### Website config import:
* Visit http://localhost/ghost
* If it wants to set up a first user, go for it.
* Click on "Labs" once registered / logged in
* If it already has Open RSC news articles, login with admin@openrsc.com / malwareinfection
* Click "Browse" beside "Import content" and select "/Docker-Home/website_backup.json"
* Either way, click on "Labs" once logged in
#### Linux_Fetch_Updates_Production.sh
* Click "Browse" beside "Import content" and select ""/Docker-Home/website_backup.json"
#### Run_Production_Linux_Game_Server.sh
* Prompts the user to edit files potentially changed since "Linux_Installer.sh" was last ran
* Compiles client, launcher, and server.
@@ -206,6 +213,35 @@ ___
* Md5sums client.zip and cache.zip in "Docker-Home/Website/" and outputs to hashes.txt
* Starts the game server in a detached screen console. Access via "screen -r", return via "Ctrl + A + D", exit via "Ctrl + C" (executes Linux_Run_Production_Server.sh)
#### Linux_Run_Production_Server.sh
* Starts the game server in a detached screen console. Access via "screen -r", return via "Ctrl + A + D", exit via "Ctrl + C" (executes "Docker-Home/Game/server/run_server.sh")
#### Docker-Home/Game/server/run_server.sh
* Kills existing java jar processes (used during server auto restart)
* Launches "Docker-Home/Game/server/ant_launcher.sh"
#### Docker-Home/Game/server/ant_launcher.sh
* Starts the game server in a detached screen console. Access via "screen -r", return via "Ctrl + A + D", exit via "Ctrl + C"
[Return to top](#top)
___
## Remote JMX Sampling <a name="jmx"></a>
If hosting externally on a VPS, it is possible to monitor the game server via JMX sampling with VisualVM.
* ssh -l USERNAME VPS_DOMAIN -L 9990:localhost:9990
* Open Visual VM and under "Local", right click and select "Add JMX Connection"
* In "Connection", specify "localhost:9990" and click "OK"
* Right click where it reads "localhost:9990 (pid xxxx)" and select "Sample"
[Return to top](#top)