1. Install [vagrant](http://www.vagrantup.com/) 1.3 or higher
+1. Configure external dependencies on the host machine:
+ * Under `{project_root}/karmaworld/secret/`:
+ 1. Copy files with the example extension to the corresponding filename
+ without the example extension (e.g.
+ `cp filepicker.py.example filepicker.py`)
+ 1. Modify those files, but ignore `db_settings.py` (Vagrant takes care of that one)
+ 1. Ensure *.py in `secret/` are never added to the git repo. (.gitignore
+ should help warn against taking this action)
+
1. Use Vagrant to create the virtual machine.
* While in `cd {project_root}`, type `vagrant up`
# http://serverfault.com/questions/491343/how-can-i-move-my-deploy-key-into-vagrant#comment549259_491345
git_ssh_key = File.read(ENV['HOME'] + '/.vagrant.d/insecure_private_key');
-# build a shell script that installs prereqs, configures the database, sets up
-# the user/group associations, pulls in the code from the host machine, sets up
-# some external dependency configs, and then runs fabric.
+# build a shell script that installs prereqs, copies over the host secrets,
+# configures the database, sets up the user/group associations, pulls in the
+# code from the host machine, sets up some external dependency configs, and
+# then runs fabric.
shellscript = <<SCRIPT
cat >>/home/vagrant/.ssh/insecure_private_key <<EOF
#{git_ssh_key}
su vagrant -c "git clone /vagrant karmaworld"
-SECRETPATH="karmaworld/karmaworld/secret"
-CFILE="$SECRETPATH/db_settings.py"
+SECRETPATH="karmaworld/secret"
+
+su vagrant -c "cp /vagrant/$SECRETPATH/* karmaworld/$SECRETPATH/"
+
+CFILE="karmaworld/$SECRETPATH/db_settings.py"
cat > $CFILE <<CONFIG
#!/usr/bin/env python
# -*- coding:utf8 -*-
update-rc.d supervisor defaults
pip install fabric
-su vagrant -c "cd karmaworld; fab -H 127.0.0.1 first_deploy"
+#su vagrant -c "cd karmaworld; fab -H 127.0.0.1 first_deploy"
SCRIPT
# end of script