mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
Update vagrant/install.sh, vagrant/README.md and vagrant/Vagrantfile to add support for nextcloud current release. Update readme to make it easier to set up your local dev environment. (#2707)
Signed-off-by: Sami Nieminen <imas@nenimein.fi>
This commit is contained in:
parent
0c3440045b
commit
2aeaa93d18
@ -1,9 +1,37 @@
|
||||
# Nextcloud VM with vagrant
|
||||
This subrepo contains all the Vagrant config to get an Ubuntu 20.04 VM with the latest version of Nextcloud installed.
|
||||
This subrepo contains all the Vagrant config to get an Ubuntu 24.04 VM with the latest version of Nextcloud installed.
|
||||
|
||||
**Please note that this is __not__ the preferred way to install Nextcloud. It's also untested in the current state.**
|
||||
|
||||
# Setup
|
||||
|
||||
## Host setup
|
||||
Running this cloud image requires you to use libvirt.
|
||||
Tested working on stock Ubuntu 22.04 LTS
|
||||
|
||||
1. Install `qemu-kvm`, `libvirt-daemon-system`, `bridge-utils`, `libvirt-dev` and `libvirt-clients` packages-
|
||||
|
||||
Then install the vagrant libvirt plugin: `vagrant plugin install vagrant-libvirt`
|
||||
|
||||
Then we need to make sure nested virtualization is initialized, as Nextcloud VM uses QEMU to run apps etc:
|
||||
|
||||
Check that nested virtualization is enabled:
|
||||
Intel systems: `cat /sys/module/kvm_intel/parameters/nested`
|
||||
AMD systems: `/sys/module/kvm_amd/parameters/nested`
|
||||
|
||||
Must return Y or 1.
|
||||
|
||||
Following must be done after each reboot:
|
||||
**Intel setup**
|
||||
sudo modprobe -r kvm_intel
|
||||
sudo modprobe kvm_intel nested=1
|
||||
|
||||
**AMD setup**
|
||||
sudo modprobe -r kvm_amd
|
||||
sudo modprobe kvm_amd nested=1
|
||||
|
||||
|
||||
## VM Setup
|
||||
`vagrant up` will install everything
|
||||
|
||||
Go to [https://localhost:8080/](https://localhost:8080/) and access Nextcloud with credentials `ncadmin / nextcloud`
|
||||
@ -18,4 +46,4 @@ See https://raw.githubusercontent.com/nextcloud/vm/main/lib.sh for default value
|
||||
|
||||
# Special thanks to
|
||||
@gjgd for providing https://github.com/gjgd/vagrant-nextcloud which this is based upon
|
||||
|
||||
@celeroncool for updating it to 24.04 :)
|
||||
|
||||
15
vagrant/Vagrantfile
vendored
15
vagrant/Vagrantfile
vendored
@ -1,11 +1,12 @@
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "ubuntu/focal64"
|
||||
config.vm.network "forwarded_port", guest: 443, host: 8080
|
||||
config.vagrant.plugins = "vagrant-libvirt"
|
||||
config.vm.box = "cloud-image/ubuntu-24.04"
|
||||
config.vm.network "forwarded_port", guest: 443, host: 8081
|
||||
config.vm.provision "shell", path: "install.sh"
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
vb.memory = "2048"
|
||||
end
|
||||
config.vm.provider "vmware_desktop" do |v|
|
||||
v.vmx["memsize"] = "2048"
|
||||
config.vm.provider "libvirt" do |libvirt|
|
||||
libvirt.memory = 4096
|
||||
libvirt.cpus = 4
|
||||
libvirt.nested = true
|
||||
libvirt.cpu_mode = "host-model"
|
||||
end
|
||||
end
|
||||
|
||||
@ -2,11 +2,9 @@
|
||||
|
||||
true
|
||||
SCRIPT_NAME="Install NcVM with Vagrant"
|
||||
# shellcheck source=lib.sh
|
||||
source /var/scripts/fetch_lib.sh
|
||||
|
||||
check_command git clone https://github.com/nextcloud/vm.git
|
||||
git clone https://github.com/nextcloud/vm.git
|
||||
|
||||
cd vm || exit && print_text_in_color "$IRed" "Could not cd into the 'vm' folder."
|
||||
cd vm
|
||||
|
||||
sudo bash nextcloud_install_production.sh --provisioning
|
||||
|
||||
Loading…
Reference in New Issue
Block a user