Setting up development environment: FreedomBox Turns 10 Hackathon

Session information:

  • What : Learn how to set up your development environment before you code for FreedomBox
  • When : 1:15pm-5:00pm on Saturday, November 16, 2019
  • Where : Jerome Greene Hall Room 103, Columbia Law School

Note: Due to the surprisingly large number of registrants (30+), we will group people into teams of at least two people for the coding session. Our experience has been that paired coding is more fun for participants and increases the likelihood of completed code tasks by the end of the hackathon.

Instructions: What to know before the hackathon

  • Come with a laptop or pair with someone with a laptop during the session.
    • Note: We recommend that you have Linux installed on your laptop, although we can work with Mac OS and Windows too.
    • Note for windows users: We confirmed that you can run FreedomBox with the latest versions of VirtualBox, Vagrant, and Git on Windows. We used “Git Bash” to run commands. One thing to watch out for is the line endings. The default setting in Git will convert line endings to Windows format, which causes major problems when trying to run scripts. So we needed to configure git before cloning the repository: <$ git config --global core.autocrlf input>. After this, we were able to start the vagrant box and run FreedomBox as normal.
  • Laptop will need to connect to Internet via Wi-Fi at the venue.
  • Install git, VirtualBox and vagrant on your OS. Check that they work.
  • Read HACKING.md prior to the session.
  • Try to perform the developer setup based on HACKING.md prior to the session so that you can skip this session and join the guided coding session directly. Otherwise, perform the setup with help during this session.
  • Basic skills in python, git, and django are recommended. If you don’t know much about these things, check out various online resources.

Steps to set up your development environment (we will explain these steps to you at the hackathon):

  1. Read HACKING.md
    - HACKING.md: https://salsa.debian.org/freedombox-team/plinth/blob/master/HACKING.md
  2. Installing git
  3. Clone Plinth repository from https://salsa.debian.org/freedombox-team/plinth.git
  4. Install Vagrant and VirtualBox
  5. Download vagrant box from the local server
  6. vagrant box add freedombox/plinth-dev path-to-downloaded-file.box
  7. vagrant up to bring up the box
  8. vagrant ssh
  9. cd /vagrant; sudo -u plinth ./run --develop
  10. Visit https://localhost:4430/ and run FreedomBox setup wizard
  11. Run sudo ./setup.py install
  12. Running tests with py.test-3
  13. Optionally on host machine: Running functional tests

Resources:

If I visit https://localhost:4430/ , firstboot is not shown (Release v20.0~bpo10+1 to buster-backports) How to run FreedomBox setup wizard?

If I visit https://localhost:4430/plinth/firstboot/ and click “Start Setup”, nothing happens.

Update 2020-01-25
After a ‘git clone FreedomBox / FreedomBox · GitLab’ into another directory, I was able to set up my development environment using vagrant.