Skip to content

Commit 02173f1

Browse files
author
Toby McLaughlin
committed
Add Vagrantfile
1 parent ed2231d commit 02173f1

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ build/elasticsearch/elasticsearch*.tar.gz
1010
tests/docker-compose*.yml
1111
/snapshots
1212
.pytest_cache
13+
.vagrant

Vagrantfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
Vagrant.configure('2') do |config|
4+
config.vm.box = 'bento/ubuntu-18.04'
5+
6+
config.vm.provider 'virtualbox' do |vb|
7+
vb.memory = '4096'
8+
end
9+
10+
config.vm.synced_folder '.', '/vagrant', owner: 'vagrant', group: 'root'
11+
12+
config.vm.provision 'shell', inline: <<-SHELL
13+
apt-get update
14+
apt-get install -y \
15+
apt-transport-https \
16+
ca-certificates \
17+
curl \
18+
python3-pip \
19+
software-properties-common
20+
pip3 install virtualenv
21+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
22+
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
23+
apt-get update
24+
apt-get install -y docker-ce
25+
usermod --groups docker --append vagrant
26+
27+
echo vm.max_map_count=262144 > /etc/sysctl.d/vm_max_map_count.conf
28+
sysctl --system
29+
30+
grep -qF 'vagrant - nofile 65536' /etc/security/limits.conf || echo 'vagrant - nofile 65536' >> /etc/security/limits.conf
31+
SHELL
32+
33+
end

0 commit comments

Comments
 (0)