# # Get everything installed # apt-get update apt-get install git --yes # So we do not get the interactive query for a server password for root # echo "mysql-server mysql-server/root_password password secret" | debconf-set-selections echo "mysql-server mysql-server/root_password_again password secret" | debconf-set-selections apt-get install mysql-server --yes apt-get install libmysqlclient-dev --yes apt-get install python-dev --yes apt-get install python-pip --yes pip install mysqlclient pip install django-calaccess-raw-data pip install django-calaccess-campaign-browser # Configure MySQL and create a database. # ( echo "" ; echo "[client]" ; echo "password=secret" ; echo "" ) > /home/ubuntu/.my.cnf echo "create database calaccess_raw;" | mysql -u root # will put down the ccdc django project. # curl 'http://opencalaccess.org/ccdc.tgz' | tar xfz - cd ccdc python manage.py migrate echo "\nRun these yourself:\n" echo "python manage.py downloadcalaccessrawdata" echo "python manage.py buildcalaccesscampaignbrowser" # Just starting the server. If you want to use the admin entry point, you will need to setup a superuser. echo "python manage runserver"