Deploy Instructions

From Bot Brackets Wiki
Jump to: navigation, search

This page exists because I frequently forget steps when pushing code up to the live server. Now I can edit this page every time I make a change to my local environment to make sure I don't forget anything.

Note: SVN commands on server are merge.sh REVFROM REVTO and checkin.sh -merge REVFROM REVTO "message"

2016 Contest Deployment (3/14/2016)

  1. Shut down yaws:
    /etc/init.d/yaws stop
  2. Run a DB backup
  3. Make clean, then run make
  4. Start an erlang shell:
    erl -pa /usr/lib/yaws/custom/ebin
    1. Run:
      botbrackets_results:upgrade_file("/var/usercontent/botbrackets/results.dat").
    2. Quit the erlang shell:
      q().
  5. Chown / chgrp the DB files back to yaws.
  6. Start yaws:
    /etc/init.d/yaws start

2016 Alpha Deployment (3/2/2016)

  1. Move stats files from js_src to bbstats:
    mv /var/usercontent/js_src/*_stats.js /var/usercontent/bbstats/
  2. Update stats copy script on lamp to point to new directory.

2015 Beta Deployment (2/28/2015)

  1. Shut down yaws:
    /etc/init.d/yaws stop
  2. Run a DB backup
  3. Make clean, then run make
  4. Start an erlang shell:
    erl -pa /usr/lib/yaws/custom/ebin
    1. Run:
      botbrackets_game:initialize("/var/usercontent/botbrackets/games.dat").
    2. Quit the erlang shell:
      q().
  5. Chown / chgrp the DB files back to yaws.
  6. Start yaws:
    /etc/init.d/yaws start

2015 Alpha Deployment (2/3/2015)

  1. Shut down yaws:
    /etc/init.d/yaws stop
  2. Run a DB backup
  3. Make clean, then run make
  4. Start an erlang shell:
    erl -pa /usr/lib/yaws/custom/ebin
    1. Run:
      botbrackets_season:upgrade_file("/var/usercontent/botbrackets/seasons.dat").
    2. Quit the erlang shell:
      q().
  5. Chown / chgrp the DB files back to yaws.
  6. Edit /etc/yaws/conf.d/botbrackets.conf:
    1. Remove <opaque> keys: current_season, scoring_season, contest_phase
  7. Start yaws:
    /etc/init.d/yaws start

2014 Beta Deployment (3/1/2014)

  1. Shut down yaws:
    /etc/init.d/yaws stop
  2. Might want to make a backup of db files
  3. Need to make clean before running make
  4. Start an erlang shell:
    erl -pa /usr/lib/yaws/custom/ebin
    1. Run:
      botbrackets_results:upgrade_file("/var/usercontent/botbrackets/results.dat").
    2. Quit the erlang shell:
      q().
  5. Chown / chgrp the results file back to yaws.
  6. Start yaws:
    /etc/init.d/yaws start

2013 Beta Deployment (3/6/2013)

  1. Shut down yaws:
    /etc/init.d/yaws stop
  2. Might want to make a backup of db files
  3. Need to make clean before running make
  4. Start an erlang shell:
    erl -pa /usr/lib/yaws/custom/ebin
    1. Run:
      botbrackets_user:upgrade_file("/var/usercontent/botbrackets/users.dat").
    2. Quit the erlang shell:
      q().
  5. Chown / chgrp the users file back to yaws.
  6. Delete the schedule file:
    rm /var/usercontent/botbrackets/schedule.dat
  7. Start yaws:
    /etc/init.d/yaws start

2012 Pre-Contest Deployment (2/26/2012)

  1. Shut down yaws:
    /etc/init.d/yaws stop
  2. Run make, make install
  3. Edit /etc/yaws/conf.d/botbrackets.conf:
    1. Add in <opaque>:
      filename_schedule = /var/usercontent/botbrackets/schedule.dat
  4. Delete the games file (the app will recreate):
    rm /var/usercontent/botbrackets/games.dat
  5. Start yaws:
    /etc/init.d/yaws start

2012 Pre-Contest Deployment (2/19/2012)

  1. Shut down yaws:
    /etc/init.d/yaws stop
  2. Might want to make a backup of db files
  3. Need to make clean before running make
  4. Edit /etc/yaws/conf.d/botbrackets.conf:
    1. Add in <server>:
      start_mod = botbrackets_core
    2. Add in <opaque>:
      current_season = 2011
    3. Remove from <opaque>:
      editor_season = 2011
  5. Start an erlang shell:
    erl -pa /usr/lib/yaws/custom/ebin
    1. Run:
      botbrackets_bot:upgrade_file("/var/usercontent/botbrackets/bots.dat").
    2. Quit the erlang shell:
      q().
  6. Delete the results file (the app will recreate it in the new format):
    rm /var/usercontent/botbrackets/results.dat
  7. Chown / chgrp the bots file back to yaws.
  8. Start yaws:
    /etc/init.d/yaws start