mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
vagrant: Mount source in /freedombox instead of /vagrant
For uniformity with the more often used ./container script. Developers may have to destroy and recreate their vagrant machines for this to take effect. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
f1060fbf6b
commit
e80f07250b
@ -283,10 +283,10 @@ and requires about 4.5 GB of disk space.
|
|||||||
#### Using the Virtual Machine
|
#### Using the Virtual Machine
|
||||||
|
|
||||||
After logging into the virtual machine (VM), the source code is available in
|
After logging into the virtual machine (VM), the source code is available in
|
||||||
/vagrant directory:
|
/freedombox directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
vm$ cd /vagrant
|
vm$ cd /freedombox
|
||||||
```
|
```
|
||||||
|
|
||||||
Run the development version of FreedomBox Service (Plinth) from your source
|
Run the development version of FreedomBox Service (Plinth) from your source
|
||||||
@ -295,7 +295,7 @@ continuously deploys your code changes into the virtual machine providing a
|
|||||||
quick feedback cycle during development.
|
quick feedback cycle during development.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
vm$ sudo -u plinth /vagrant/run --develop
|
vm$ freedombox-develop
|
||||||
```
|
```
|
||||||
|
|
||||||
If you have changed any system configuration files during your development,
|
If you have changed any system configuration files during your development,
|
||||||
|
|||||||
8
Vagrantfile
vendored
8
Vagrantfile
vendored
@ -8,7 +8,7 @@ Vagrant.configure(2) do |config|
|
|||||||
config.vm.box = "freedombox/freedombox-testing-dev"
|
config.vm.box = "freedombox/freedombox-testing-dev"
|
||||||
config.vm.network "forwarded_port", guest: 443, host: 4430
|
config.vm.network "forwarded_port", guest: 443, host: 4430
|
||||||
config.vm.network "forwarded_port", guest: 445, host: 4450
|
config.vm.network "forwarded_port", guest: 445, host: 4450
|
||||||
config.vm.synced_folder ".", "/vagrant", owner: "plinth", group: "plinth"
|
config.vm.synced_folder ".", "/freedombox", owner: "plinth", group: "plinth"
|
||||||
config.vm.provider "virtualbox" do |vb|
|
config.vm.provider "virtualbox" do |vb|
|
||||||
vb.cpus = Etc.nprocessors
|
vb.cpus = Etc.nprocessors
|
||||||
vb.memory = 2048
|
vb.memory = 2048
|
||||||
@ -22,7 +22,7 @@ Vagrant.configure(2) do |config|
|
|||||||
systemctl disable plinth
|
systemctl disable plinth
|
||||||
SHELL
|
SHELL
|
||||||
config.vm.provision "shell", inline: <<-SHELL
|
config.vm.provision "shell", inline: <<-SHELL
|
||||||
cd /vagrant/
|
cd /freedombox/
|
||||||
./setup.py install
|
./setup.py install
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
# Stop any ongoing upgrade
|
# Stop any ongoing upgrade
|
||||||
@ -36,14 +36,14 @@ Vagrant.configure(2) do |config|
|
|||||||
apt-mark unhold freedombox
|
apt-mark unhold freedombox
|
||||||
# Install ncurses-term
|
# Install ncurses-term
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y ncurses-term
|
DEBIAN_FRONTEND=noninteractive apt-get install -y ncurses-term
|
||||||
echo 'alias run-develop="sudo -u plinth /vagrant/run --develop"' >> /home/vagrant/.bashrc
|
echo 'alias freedombox-develop="sudo -u plinth /freedombox/run --develop"' >> /home/vagrant/.bashrc
|
||||||
SHELL
|
SHELL
|
||||||
config.vm.provision "tests", run: "never", type: "shell", path: "plinth/tests/functional/install.sh"
|
config.vm.provision "tests", run: "never", type: "shell", path: "plinth/tests/functional/install.sh"
|
||||||
config.vm.post_up_message = "FreedomBox virtual machine is ready
|
config.vm.post_up_message = "FreedomBox virtual machine is ready
|
||||||
for development. You can run the development version of Plinth using
|
for development. You can run the development version of Plinth using
|
||||||
the following command.
|
the following command.
|
||||||
$ vagrant ssh
|
$ vagrant ssh
|
||||||
$ sudo -u plinth /vagrant/run --develop
|
$ freedombox-develop
|
||||||
Plinth will be available at https://localhost:4430/plinth (with
|
Plinth will be available at https://localhost:4430/plinth (with
|
||||||
an invalid SSL certificate).
|
an invalid SSL certificate).
|
||||||
"
|
"
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
import pathlib
|
import pathlib
|
||||||
|
|
||||||
content = '''
|
content = '''
|
||||||
Cmnd_Alias FREEDOMBOX_ACTION_DEV = /usr/share/plinth/actions/actions, /vagrant/actions/actions
|
Cmnd_Alias FREEDOMBOX_ACTION_DEV = /usr/share/plinth/actions/actions, /freedombox/actions/actions
|
||||||
Defaults!FREEDOMBOX_ACTION_DEV closefrom_override
|
Defaults!FREEDOMBOX_ACTION_DEV closefrom_override
|
||||||
plinth ALL=(ALL:ALL) NOPASSWD:SETENV : FREEDOMBOX_ACTION_DEV
|
plinth ALL=(ALL:ALL) NOPASSWD:SETENV : FREEDOMBOX_ACTION_DEV
|
||||||
fbx ALL=(ALL:ALL) NOPASSWD : ALL
|
fbx ALL=(ALL:ALL) NOPASSWD : ALL
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user