Open source

This commit is contained in:
Kaan Soral
2023-10-15 13:06:58 +03:00
parent 256ce800e7
commit 553b121f17
2633 changed files with 769945 additions and 454 deletions
+62
View File
@@ -0,0 +1,62 @@
# SSH's
ssh -i ~/thegame/design/docs/id_rsa.pem root@149.56.107.85
scp -i ~/thegame/design/docs/id_rsa.pem root@149.56.107.85:s2053.out .
scp -i ~/thegame/design/docs/id_rsa.pem root@149.56.107.85:s2083.out .
scp -i ~/thegame/design/docs/id_rsa.pem root@149.56.107.85:s2087.out .
# EU
ssh -i ~/thegame/design/docs/id_rsa.pem root@138.201.60.196
scp -i ~/thegame/design/docs/id_rsa.pem root@138.201.60.196:s2053.out .
scp -i ~/thegame/design/docs/id_rsa.pem root@138.201.60.196:s2083.out .
# Google Cloud
europas0: ssh -i ~/thegame/design/docs/id_rsa.pem kaan@35.246.228.205
americas0: ssh -i ~/thegame/design/docs/id_rsa.pem kaan@34.66.236.106
eu1: ssh -i ~/thegame/design/docs/id_rsa.pem kaan@35.246.244.105
eu1: nohup node server/server.js EU I 2053 > s2053.out 2> s2053.err < /dev/null &
us1: scp -i ~/thegame/design/docs/id_rsa.pem kaan@35.184.37.35:s2053.out .
scp -i ~/thegame/design/docs/id_rsa.pem kaan@34.66.236.106:s2087.out .
https://support.google.com/cloud/contact/free_trial_support
# Setup
0) Choose advanced installation - everything default
1) Select the id_rsa SSH public-key that's also in design/docs
2A) ssh-copy-id -i ~/thegame/design/docs/id_rsa.pem ubuntu@158.69.23.127
2) Add the server to scripts/data.js
3) N2 / N1 or E2 - 8 cores min - likely 16 highcpu
# Installs
1) sudo apt-get update
2) sudo apt-get upgrade
3) sudo apt-get install npm
3.1) sudo npm install n -g
3.2) sudo n latest
3.3) use "node" instead of "nodejs"
4.0) npm init
4) npm install socket.io //// @2.1.1 (until this is fixed: https://github.com/socketio/socket.io/issues/3459)
4.1) npm install request
4.2) npm install range_check
4.3) npm install protobufjs
4.4) npm install bytebuffer
5) sudo reboot
# Updates
0) sudo n latest
1) npm outdated
2) npm update
# Server updates
1) sudo apt-get update
2) sudo apt-get upgrade
ssh -i ~/thegame/design/docs/id_rsa.pem root@149.56.107.85 "ps aux | grep 'node server/server.js US I 2053'"
+28
View File
@@ -0,0 +1,28 @@
#INCREASE THE GAME VERSION!
#TOFIX: Permission denied (publickey). - Just run list_servers once - running ssh fixes it! [04/01/21]
node ~/gscripts/update_machines.js
servers_eval('broadcast("disconnect_reason","Game Update!"); setTimeout(shutdown_routine,1);');
node ~/gscripts/list_servers.js
deploy_thegame
node ~/gscripts/run_servers.js
#After Maps Change
Executor: download_maps()
node ~/thegame/node/precompute.js
node ~/gscripts/update_machines.js data
#Auto
node ~/thegame/scripts/precompute.js
#Occasional
node ~/thegame/scripts/process_gallery.js
node ~/thegame/scripts/electron_bundle.js
#Help
node ~/gscripts/list_commands.js
#Delayed
echo "nohup node server/server.js ASIA HARDCORE 2083 > s2083.out 2> s2083.err < /dev/null &" | at now + 276 min
+14
View File
@@ -0,0 +1,14 @@
> For .zshrc
alias run_thegame_server="node ~/thegame/node/server.js EU I 8120"
alias profile_thegame_server="node --prof ~/thegame/node/server.js EU I 8120"
alias profile_test_server="node --prof ~/thegame/node/server.js EU TEST 8120"
#dispatcher.py mod: https://plus.google.com/+JustinRibeiro/posts/LuSxEPv9Gkp [15/09/16]
alias run_thegame="python2.7 /Users/kaan/Desktop/APPENGINE/sdk/dev_appserver.py --storage_path=/Users/kaan/Desktop/PROJECTS/thegame/storage/ --blobstore_path=/Users/kaan/Desktop/PROJECTS/thegame/storage/blobstore/ --datastore_path=/Users/kaan/Desktop/PROJECTS/thegame/storage/db.rdbms --host=0.0.0.0 --port=8083 /Users/kaan/Desktop/PROJECTS/thegame/thegame/ --require_indexes"
#alias deploy_thegame="node ~/gscripts/deploy.js; cd ~/deploy/thegame_appengine; python2.7 ~/appengine-deployer/appcfg.py --no_cookies --noauth_local_webserver --email=kaansoral@gmail.com update app.yaml; cd ~;"
alias deploy_thegame="node ~/gscripts/deploy.js; cd ~/deploy/thegame_appengine; gcloud app deploy --project twodimensionalgame --stop-previous-version --promote; cd ~;"
alias deploy_dthegame="cd ~/deploy/thegame_appengine; python2.7 ~/appengine-deployer/appcfg.py --no_cookies --noauth_local_webserver --email=kaansoral@gmail.com update app.yaml; cd ~;"
alias thegame_update_crons="python2.7 ~/appengine-deployer/appcfg.py --no_cookies --email=kaansoral@gmail.com update_cron ~/thegame/"
alias thegame_update_indexes="python2.7 ~/appengine-deployer/appcfg.py --no_cookies --email=kaansoral@gmail.com update_indexes ~/thegame/"
alias thegame_update_queues="python2.7 ~/appengine-deployer/appcfg.py --no_cookies --email=kaansoral@gmail.com update_queues ~/thegame/"
alias precompute_images="node ~/thegame/scripts/precompute.js"