-
Notifications
You must be signed in to change notification settings - Fork 24
Development VM Image
In the interest of making it easier to contribute code to LessWrong, the Public Goods Team has commissioned the creation of a virtual machine image configured to host the site. Now, all you have to do is use vagrant to set up the virtual machine and do a little tweaking at the end.
Note: you will likely need the older versions Virtual Box 5.0 and Vagrant 1.7.4. There appears to be a bug in later versions that is incompatible with the existing Vagrantfile
- VirtualBox
- Vagrant
-
Ansible
-
On some machines you will also need to manually install the Ansible roles:
sudo ansible-galaxy install geerlingguy.apache azavea.postgresql
-
Before you begin, make sure you're developing on a case-sensitive filesystem. This is almost certainly the case for GNU/Linux users. People developing on OS X should make a case-sensitive disk image using Disk Utility and keep the checkout inside that image. (Note: there is a bug in several versions of El Capitan that prevents the Disk Utility application from correctly making a case-sensitive file system. If you are affected by this, you can use this script as a work-around.)
Check out, clone or fork-and-check-out the lesswrong source. Check out the submodules (except config/cap-tasks, which is only relevant for production):
/path/to/lesswrong$ git submodule init
/path/to/lesswrong$ git submodule deinit config/cap-tasks
If you are planning on merging your work into the master branch and have the necessary credentials to do so, then also run:
/path/to/lesswrong$ git submodule update
The Vagrantfile
is in the root of the repository. cd
there and run vagrant up
, then wait a little. See here if you get the error message "The provider 'libvirt' could not be found, but was requested to back the machine 'default'. Please use a provider that exists.". If you get an error about failing to become
user postgres, see the instructions above about installing Ansible roles.
You should now have a running VM, but there's still a couple of things left to do:
Lesswrong likes to be served from a given domain. Make an entry in /etc/hosts
:
127.0.0.1 lesswrong.local
Start the paster server:
/path/to/lesswrong$ vagrant ssh
vagrant@precise64:~$ cd /vagrant/r2
vagrant@precise64:/vagrant/r2$ paster serve --reload development.ini
You can now point your browser to http://lesswrong.local:8080 and get sensible-looking pages. An "admin" user has been created with a default password of "swordfish".
The various testing methods (unit tests, manual tests, selenium tests) are all specified in the hacking page.
As you acquaint yourself with the Less Wrong source, consider summarizing your insights in this wiki to lower the barrier to contribution from others.
Bugs/Issues are tracked here: http://code.google.com/p/lesswrong/issues/list
TrikeApps updates the site based on pull requests through github.
- Hacking-on-Less-Wrong
- Contributing-to-Less-Wrong
- You can see questions and answers with a Less Wrong developer here: http://lesswrong.com/lw/7x1/prize_for_the_best_introduction_to_the_lesswrong/ (note that the deadline has passed for the prize described in the post, though)