22 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
f447264547
vagrant: Fix dpkg command for recovering from broken state
Test: Ran vagrant provision and saw no errors.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-26 18:06:15 -04:00
James Valleroy
dec215851b
vagrant: Stop any ongoing unattended-upgrade
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil@medhas.org add lines for finishing interrupted apt process]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-08-25 08:52:21 -07:00
LoveIsGrief
d31b0ee3c7
functional_tests: Allow provisioning VM for functional tests
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>
2019-04-03 22:03:44 -04:00
Joseph Nuthalapati
fa4c807e82
vagrant: Run plinth as user plinth in development environment
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>
2019-04-01 20:10:30 -04:00
James Valleroy
8b74f65f38
vagrant: Rearrange steps of provision script
- 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>
2019-03-06 09:58:57 -08:00
Jag
57666b661b
vagrant: Use virtualbox linked clones / CoW to reduce startup times
Behaves more like docker now with Copy on Write. More documentation:

 - https://www.vagrantup.com/docs/virtualbox/configuration.html#linked-clones
   (https://archive.fo/Yy6A4)

 - https://www.virtualbox.org/manual/ch01.html (https://archive.fo/1rj4q)

Closes #1551

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-25 10:40:15 -08:00
James Valleroy
47366770c8
vagrant: Put hold on freedombox package during provision
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-05 15:21:34 -08:00
Joseph Nuthalapati
573db44fc3
vagrant: clear logs and plinth database on destroying box
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-11-28 19:29:20 -05:00
Joseph Nuthalapati
56ee33793e
vagrant: Destroy Plinth development database when box is destroyed
Fixes #1424

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-11-17 13:10:09 -05:00
Joseph Nuthalapati
9367f9bcaf
vagrant: Increase number of CPUs to 2
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-14 15:16:18 -04:00
Joseph Nuthalapati
7c1197ba45
vagrant: Increase memory to 2GiB
Closes #1397

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-14 15:16:14 -04:00
Joseph Nuthalapati
8c89756b63
vagrant: Get rid of apt warning during provisioning
Use apt-get instead of apt as apt does not have stable command line API yet.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-08 18:29:37 -04:00
Joseph Nuthalapati
7878ccde29
Install ncurses-term during vagrant file provision
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>
2018-09-01 16:44:45 -04:00
James Valleroy
27488575c7
vagrant: Clarify post-up message
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-08-18 09:27:01 -04:00
Joseph Nuthalapati
8007289e57
vagrant: Vagrantfile changes for ease of development
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>
2018-08-18 09:12:38 -04:00
Sunil Mohan Adapa
6bf5109108
Rename Plinth to FreedomBox in code messages
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:51 -05:00
Sunil Mohan Adapa
dea4af17fb
Rename Plinth to FreedomBox in license headers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:09 -05:00
James Valleroy
a2997a0c70
vagrant: Avoid debconf prompts while provisioning
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-12-18 10:38:30 +05:30
Sunil Mohan Adapa
0af8175fd0
Install dependency packages during install/provisioning
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>
2017-11-03 12:41:11 +05:30
James Valleroy
2befa18c33
Switch to official vagrant box 2016-08-05 21:13:14 -04:00
Sunil Mohan Adapa
bdd903e0ca
Minor updates to Vagrantfile
- 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
2016-08-03 22:18:38 +05:30
James Valleroy
eed0babb13
Add Vagrantfile. 2016-08-03 19:54:12 +05:30