Skip to content

Instantly share code, notes, and snippets.

@wincentbalin
Last active May 17, 2020 11:45
Show Gist options
  • Save wincentbalin/4b4be3bbda8ac586dbdb162c45194e8e to your computer and use it in GitHub Desktop.
Save wincentbalin/4b4be3bbda8ac586dbdb162c45194e8e to your computer and use it in GitHub Desktop.
Vagrantfile for CouchDB with Python
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
required_plugins = %w( vagrant-vbguest vagrant-disksize )
_retry = false
required_plugins.each do |plugin|
unless Vagrant.has_plugin? plugin
system "vagrant plugin install #{plugin}"
_retry=true
end
end
if (_retry)
exec "vagrant " + ARGV.join(' ')
end
config.vm.box = "ubuntu/bionic64"
config.disksize.size = "50GB"
config.vm.provider "virtualbox" do |vb|
vb.gui = false # we log into here using ssh
vb.cpus = 2 # my computer has that many
vb.memory = 8192 # We will compile a couple of things
vb.customize ["modifyvm", :id, "--ioapic", "on"]
end
config.vm.network :forwarded_port, guest: 5984, host: 5984
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y tmux vim mc
echo "deb https://apache.bintray.com/couchdb-deb bionic main" >> /etc/apt/sources.list
curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc \ | sudo apt-key add -
apt-get update
echo Please login and execute \"sudo apt-get install -y python couchdb python-ipaddress python-couchdb\" to install CouchDB and Python with additional packages
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment