Robo Rally game helper for remote play during pandemic times
Please submit issues via GitHub: https://github.com/mylollc/roborally/issues
- Install Python 3.8+ from http://python.org
- Install pipenv via
pip install pipenv - From the /src directory, run
pipenv install --dev - Set the environment variables:
- FLASK_APP to "app.py"
- PYTHONPATH to the /src_ directory under the repo location
- From the /src/ui directory, run
pipenv run flask run - Open a browser and go to http://localhost:5000
Setting up the EC2 key
You should have access to the Lastpass credential AWS Key - roborally - probably received an email
You can ssh to [email protected] using that key
Ports 22 (ssh), 80, and 443 are open to public access
Got it, but I get this when trying to ssh:
scottwalker@scottsmacbookpro ~ % ssh [email protected]
The authenticity of host 'roborally.mylio-internal.com (13.57.7.175)' can't be established.
ED25519 key fingerprint is SHA256:ahIISaopVvC78jASEI6ZmoGHsrpuuPXDRWVFV0mA5xs.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'roborally.mylio-internal.com' (ED25519) to the list of known hosts.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
You'll need to use that key
Download the key to your machine then use ssh -i <PATH-TO-KEY> [email protected]
Oh duh...but I don't see a key file in the lastpass entry..double duh, it's it's own entry. Clearly I need more :coffee:
Hah. No worries. +1 for more coffee
You'll probably want to create the file ~/.ssh/roborally and it should contain the contents of that entry
Yup, did that
Pro tip move - add this to your ~/.ssh/config
Host roborally
Hostname roborally.mylio-internal.com
User ec2-user
IdentityFile ~/.ssh/roborally
Then you can just ssh roborally
Note: It is expected that the app will run under ~/git/roborally as the user ec2-user
-
Install and configure git
sudo yum install git- Create a new SSH key with
ssh-keygen -t ed25519 - Go to the Github website and add this key for the repo
- Test it with
ssh -T [email protected] - Create and go into ~/git/roborally
- Clone the repo with
git clone [email protected]:mylollc/roborally.git
-
Configure the Roborally app
cd roborally- Install the Python packages:
pipenv install - Create this directory if it does not exist: ~/git/roborally/src/ui/static/images/avatars
-
Set up NGINX:
- Install with
sudo amazon-linux-extras install nginx1 - Copy /resources/ec2/nginx.conf from the repo to /etc/nginx
- Run with
sudo systemctl start sudo systemctl enable nginxto have it run on restart
- Install with
-
Have Roborally run as a service:
- Copy /resources/ec2/roborally.service to /etc/systemd/system
- Create a www-data system group and add ec2-user - TBD, but you can look it up
sudo systemctl daemon-reload- Run with
sudo systemctl start roborally.service sudo systemctl enable roborallyto have it run on restart
-
You should be able to access via http://roborally.mylio-internal.com/
This assumes you already have Python installed and the prioper path variables updated.
- Install Pycharm Pro. The commmunity edition does not have the flask or DB functionality that is needed.
- Set the interpeter
- Create a pipenv environment with this interpreter
- Install the pipenv package file
- Create a normal flask run config
- Create a debug flask run config https://www.jetbrains.com/help/pycharm/run-debug-configuration-flask-server.html
- Install VS Code
- Install these extensions:
- Python
- Python Environment Manager
- SQLite
- Install
pipenvwithpip install --user pipenv - Create a pipenv environment via
pipenv --python <verion>where is like 3.X. - Install dependencies via
pipenv install --dev - Go to File > Preferences > Settings then search for "venv path". Enter the path outputed from Step 4.
- Edit settings.json and add:
"terminal.integrated.env.windows": {
"PYTHONPATH": "${workspaceFolder}/src",
},
- Install db via
flask db upgrade- Comment out the GameService line in app.py first, then put back when done