Skip to content

ApesofWrath/ApesScouter2022

Repository files navigation

Apes Scouter

Apes Scouter is the system used by FRC Team 668, The Apes of Wrath for scouting at competition.

Apes Scouter is written in Ruby using the Sinatra framework and uses MySQL as the backing datastore with Sequel as the ORM. Development and production are run on UNIX (Mac OS and Ubuntu), but it should work on other Linux distributions as well. No promises that it will work on Windows.

Many parts of this project are based on the Cheesy Parts system created by FRC Team 254, The Cheesy Poofs.

Development

Prerequisites:

  • Ruby (2.6.1 is the current version we're using for development and production)
  • Bundler
  • MySQL
  • RVM (optional)

To run the server locally:

  1. Create an empty MySQL database and a user account with full permissions on it.
  2. Edit the db.rb file with the parameters for your environment.
  3. Set the database password as an environment variable (so that it stays out of version control).
  4. Run bundle install. This will download and install the gems that Apes Scouter depends on.
  5. Run bundle exec rake db:migrate. This will run the database migrations to create the necessary tables in MySQL. Make sure your database has been created and that it is empty with no tables in it. Otherwise this command will fail.
  6. Run ruby scouter_server_control.rb <command> to control the running of the Apes Scouter server, where <command> can be one of start|stop|run|restart.
  7. Go to http://localhost:9000 in the browser.

Due to the fact that this system was designed to be run locally, there is no authetication for the site. If you are planning on putting this out on the internet I highly recommend some sort of SSO mechanism.

Deployment to a Production Server

Prerequisites (in addition to those above):

  • Apache
  1. Setup Apache as the webserver (Nginx should work as well). Guide
  2. Clone this repository in the directory of your choice).
  3. Follow the steps above, except for step 7.
  4. Open the port where the site is running (9000 if using the default values): sudo iptables -A INPUT -p tcp --dport 9000 -j ACCEPT
  5. Redirect the public webserver port 80 to 9000: sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 9000
  6. Public IP address or domain should now work for your site.

Contributing

If you have a suggestion for a new feature, create an issue on GitHub or shoot an e-mail to cking@apesofwrath668.org. Or if you have some Ruby-fu and are feeling adventurous, fork this project and send a pull request.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published