Quick hack to make the spacenear.us tracker run without SQL DB using a flat JSON file. Easy to deploy to Amazon EC2 and also allows load balancing using multiple instances by synching positions.json between them unidirectionally.
- Start an Ubuntu 12.x instance
- Login by doing ssh ubuntu@instance-ip -i instance.pem
- Set hostname in /etc/hostname and add it to /etc/hosts
- sudo apt-get update && sudo apt-get upgrade
- Restart instance
- sudo apt-get install nginx php5 php5-fpm
- Put tracker into /srv/tracker
- Create folder /var/data for the JSON files
- Put nginx-site.conf to /etc/nginx/sites-available/default
- Set "cgi.fix_pathinfo = 0;" in /etc/php5/fpm/php.ini
- sudo service php5-fpm restart
- sudo service nginx start
- Follow the steps above to setup a new EC2 server
- Add server pem to main instance and add it to ~/.ssh/config
- Modify and run /srv/tracker/utils/mirror.sh on the main instance
- Make sure that habitat is uploading only to the main instance
- Add both instances to Amazon Elastic Load Ballancer