Skip to content

neodude/worldcubeassociation.org

 
 

Repository files navigation

worldcubeassociation.org Build Status

This repository contains all of the code that runs on worldcubeassociation.org.

Setup

  • Install Vagrant, which requires VirtualBox.
  • git clone https://github.com/cubing/worldcubeassociation.org - Clone this repo! (And navigate into it, cd worldcubeassociation.org)
  • git submodule update --init --recursive - Initialize submodules.
  • (cd WcaOnRails; bundle install) && pre-commit install - Set up git pre-commit hook. Optional, but very useful.

Run

  • vagrant up noregs - Once the VM finishes initializing (which can take some time), the website will be accessible at http://localhost:2331.
    • Note: Starting up the noregs vm is much faster than the all vm, because the dependencies required to build the WCA regulations take ages to install.

Provision New VM

  • Provisioning relies upon SSH agent forwarding, so make sure you've set up SSH keys for GitHub (howto). You also need an SSH key set up for cubing@worldcubeassociation.org in order to rsync secrets.
  • time ssh -A user@example.com 'sudo wget https://raw.githubusercontent.com/cubing/worldcubeassociation.org/master/scripts/wca-bootstrap.sh -O /tmp/wca-bootstrap.sh && sudo -E bash /tmp/wca-bootstrap.sh staging/production'

Deploy

  • ssh -A cubing@worldcubeassociation.org worldcubeassociation.org/scripts/deploy.sh pull_latest rebuild_regs rebuild_rails

Secrets

  • Production secrets are stored in an encrypted chef data bag at chef/data_bags/secrets/production.json.
    • Show secrets: knife data bag show secrets production -c /etc/chef/solo.rb --secret-file secrets/my_secret_key
    • Edit secrets: knife data bag edit secrets production -c /etc/chef/solo.rb --secret-file secrets/my_secret_key

About

[WCA Project] All of the code that runs on worldcubeassociation.org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 67.6%
  • JavaScript 22.1%
  • HTML 7.5%
  • Ruby 1.3%
  • CSS 1.2%
  • Python 0.2%
  • Other 0.1%