Added Quickstart with Vagrant
This commit is contained in:
parent
ef234dae67
commit
0276ca7de8
4 changed files with 169 additions and 10 deletions
62
Vagrantfile
vendored
Normal file
62
Vagrantfile
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# This guide is optimized for Vagrant 1.8 and above.
|
||||
# Older versions of Vagrant put less info in the inventory they generate.
|
||||
Vagrant.require_version ">= 1.8.0"
|
||||
|
||||
require 'etc'
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
|
||||
config.vm.box = "hashicorp/bionic64"
|
||||
|
||||
# The currently only supported provider is Virtualbox
|
||||
# You will have to install Virtualbox from https://www.virtualbox.org
|
||||
# Manual for the following settings: https://www.virtualbox.org/manual/ch03.html
|
||||
config.vm.provider :virtualbox do |vbox, override|
|
||||
vbox.customize ["modifyvm", :id, "--name", "Self-host All The Things! - Dev VM"]
|
||||
# Amount of virtual memory
|
||||
vbox.customize ["modifyvm", :id, "--memory", 8192]
|
||||
# Amount of virtual CPUs, by default it uses half ot the physical CPUs
|
||||
vbox.customize ["modifyvm", :id, "--cpus", Etc.nprocessors/2]
|
||||
# The amount of graphics memory
|
||||
vbox.customize ["modifyvm", :id, "--vram", 128]
|
||||
# If you want to use the 3D graphic acceleration in the VM, turn it on
|
||||
vbox.customize ["modifyvm", :id, "--accelerate3d", "off"]
|
||||
# Required. Allows to use more than 16 IRQs, important esp. for 64-bit guests and if more than 1 virtual CPU is used
|
||||
vbox.customize ["modifyvm", :id, "--ioapic", "on"]
|
||||
# Enable copy & paste between the VM and the host
|
||||
vbox.customize ["modifyvm", :id, "--clipboard-mode", "bidirectional"]
|
||||
# Disable serial ports (COM) if not needed
|
||||
vbox.customize ["modifyvm", :id, "--uartmode1", "disconnected"]
|
||||
# If your local network uses the same subnet as the default Virtualbox one (10.0.2.0/24), set a different one here
|
||||
vbox.customize ["modifyvm", :id, "--natnet1", "10.0.50.0/24"]
|
||||
# Attach a virtual DVD drive to be able to easily install the Virtualbox Guest Additions
|
||||
vbox.customize ["storageattach", :id, "--storagectl", "IDE Controller", "--port", "0", "--device", "0", "--type", "dvddrive", "--medium", "emptydrive"]
|
||||
#vbox.customize ["storagectl", :id, "--name", "SATA Controller", "--hostiocache", "on"]
|
||||
# Default: The VM is hosted on an SSD.
|
||||
# Set to "off" if it is hosted on an HDD to enable performance optimizations for rotational drives (e.g. defragmentation):
|
||||
#vbox.customize ["storageattach", :id, "--storagectl", "SCSI", "--port", 0, "--nonrotational", "on"]
|
||||
#vbox.customize ["storageattach", :id, "--storagectl", "SCSI", "--port", 1, "--nonrotational", "on"]
|
||||
|
||||
# Set to true, if you intent to use a GUI
|
||||
vbox.gui = false
|
||||
end
|
||||
|
||||
config.vm.define "satt" do |dev|
|
||||
dev.vm.hostname = "satt.local"
|
||||
dev.hostsupdater.aliases = ["nextcloud.satt.local", "jitsi.satt.local"]
|
||||
# An additional IP that allows you to access the VM and its services from the VM host.
|
||||
# If you change this IP, you will have to modify the `ansible_host` in the inventory file correspondingly.
|
||||
# More information about the various network modes:
|
||||
# https://www.virtualbox.org/manual/ch06.html#network_nat_service
|
||||
dev.vm.network :private_network, ip: "192.168.23.42"
|
||||
|
||||
dev.vm.provision :ansible do |ansible|
|
||||
#ansible.verbose = "vvv"
|
||||
ansible.compatibility_mode = "2.0"
|
||||
ansible.playbook = "./site.yml"
|
||||
ansible.inventory_path = "./inventory.ini.sample"
|
||||
ansible.become = true
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue