It's now possible to run the tests in the VM more easily
without copy-pasting too much from HACKING.md.
`vagrant provision --provisiion-with tests` will take care of the dependencies.
freedombox/plinth#1521 - Provision VM to run function functional tests
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Running plinth as root is causing preventable permission errors in production.
This commit makes the necessary changes to run plinth as the user plinth so that
permission errors can be caught early and prevented.
- Give ownership of all files in the mounted directory to plinth
- Add permissions in sudoers file so that plinth can run scripts in
/vagrant/actions as superuser
- Move scripts that run on vagrant triggers to a separate directory
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Disable automatic upgrades earlier in the script. This makes it more
likely that unattended-upgrades will be disabled before it has a
chance to run.
- Move apt commands to the end. In the event that unattended-upgrades
is running anyway, these command can fail and cause further steps to
be skipped.
Closes#1506
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
The vagrant box after being destroyed and created doesn't have ncurses-term
installed. Proactively install it to avoid the problem.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Moved some frequently required operations to the Vagrantfile.
Newcomers to the project almost always face the issue of port 8000 not being
available. Disabling system Plinth and running only the development version
solves this issue.
Automatic upgrades are a frequent blocker for development and an unnecessary
annoyance on a development setup.
- Update documentation about vagrant file changes
- Remove plinth restart step
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This will not install all the dependencies of Plinth but will install the
dependencies required for essential modules to setup properly.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- Add license header
- Let setup.py decide the Python interpreter to use
- Don't make a copy of the project directory making it easier to
re-provision.
- Show a message on how to proceed after bringing up the VM