Skip to content

felicia-walker/roborally

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robo Rally game helper for remote play during pandemic times

Submit Issues

Please submit issues via GitHub: https://github.com/mylollc/roborally/issues

Installation (local)

  1. Install Python 3.8+ from http://python.org
  2. Install pipenv via pip install pipenv
  3. From the /src directory, run pipenv install --dev
  4. Set the environment variables:
    • FLASK_APP to "app.py"
    • PYTHONPATH to the /src_ directory under the repo location
  5. From the /src/ui directory, run pipenv run flask run
  6. Open a browser and go to http://localhost:5000

Installation (Amazon EC2)

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

  1. Install and configure git

    1. sudo yum install git
    2. Create a new SSH key with ssh-keygen -t ed25519
    3. Go to the Github website and add this key for the repo
    4. Test it with ssh -T [email protected]
    5. Create and go into ~/git/roborally
    6. Clone the repo with git clone [email protected]:mylollc/roborally.git
  2. Configure the Roborally app

    1. cd roborally
    2. Install the Python packages: pipenv install
    3. Create this directory if it does not exist: ~/git/roborally/src/ui/static/images/avatars
  3. Set up NGINX:

    1. Install with sudo amazon-linux-extras install nginx1
    2. Copy /resources/ec2/nginx.conf from the repo to /etc/nginx
    3. Run with sudo systemctl start
    4. sudo systemctl enable nginx to have it run on restart
  4. Have Roborally run as a service:

    1. Copy /resources/ec2/roborally.service to /etc/systemd/system
    2. Create a www-data system group and add ec2-user - TBD, but you can look it up
    3. sudo systemctl daemon-reload
    4. Run with sudo systemctl start roborally.service
    5. sudo systemctl enable roborally to have it run on restart
  5. You should be able to access via http://roborally.mylio-internal.com/

Development Environments

This assumes you already have Python installed and the prioper path variables updated.

Pycharm Pro

  1. Install Pycharm Pro. The commmunity edition does not have the flask or DB functionality that is needed.
  2. Set the interpeter
  3. Create a pipenv environment with this interpreter
  4. Install the pipenv package file
  5. Create a normal flask run config
  6. Create a debug flask run config https://www.jetbrains.com/help/pycharm/run-debug-configuration-flask-server.html

VS Code

  1. Install VS Code
  2. Install these extensions:
    • Python
    • Python Environment Manager
    • SQLite
  3. Install pipenv with pip install --user pipenv
  4. Create a pipenv environment via pipenv --python <verion> where is like 3.X.
  5. Install dependencies via pipenv install --dev
  6. Go to File > Preferences > Settings then search for "venv path". Enter the path outputed from Step 4.
  7. Edit settings.json and add:
  "terminal.integrated.env.windows": {
    "PYTHONPATH": "${workspaceFolder}/src",
  },
  1. Install db via flask db upgrade
    • Comment out the GameService line in app.py first, then put back when done

About

Robo Rally game helper for remote play during pandemic times

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published