Skip to content

Instantly share code, notes, and snippets.

@jasimmk
Created September 15, 2016 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasimmk/c2a10ce0526b82be4294805145a653d6 to your computer and use it in GitHub Desktop.
Save jasimmk/c2a10ce0526b82be4294805145a653d6 to your computer and use it in GitHub Desktop.
Vagrant file for odoo9 ubuntu 16.04
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "boxcutter/ubuntu1604"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
#config.vm.box_url = "https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box"
# Setting hostname
config.vm.hostname = "odoo-dev"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
end
id_rsa_ssh_key_pub = File.read(File.expand_path('~') + '/.ssh/id_rsa.pub');
config.vm.provision :shell, :inline => "echo 'Copying local id_rsa SSH Key to VM auth_keys for auth purposes (login into VM included)...' && echo '#{id_rsa_ssh_key_pub }' >> /home/vagrant/.ssh/authorized_keys && chmod 600 /home/vagrant/.ssh/authorized_keys"
config.vm.network :forwarded_port, guest: 8069, host: 8069
config.vm.network :forwarded_port, guest: 8070, host: 8070
config.vm.network :forwarded_port, guest: 8071, host: 8071
config.vm.synced_folder "../data", "/vagrant_data"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment