Skip to content

Commit

Permalink
docker: add vagrantfile to test selks on docker
Browse files Browse the repository at this point in the history
  • Loading branch information
markuskont committed Nov 28, 2022
1 parent 643c81a commit 34a7326
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 1,4 @@
*~
Stamus-Live-Build

.vagrant/
34 changes: 34 additions & 0 deletions docker/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 1,34 @@
$provision = <<-SCRIPT
export DEBIAN_FRONTEND=noninteractive
apt-get udpate
apt-get install -y curl
ip link add tppdummy0 type dummy && ip link set tppdummy0 up && ip link set dev tppdummy0 mtu 9500
cd /selks
time ./easy-setup.sh --non-interactive -i tppdummy0 --iA --es-memory 2G --ls-memory 1G
time docker-compose up -d
SCRIPT

NAME = 'selks'.freeze
CPU = 4
MEM = 8196

Vagrant.configure(2) do |config|
config.vm.define NAME do |box|
box.vm.box = 'debian/bullseye64'
box.vm.hostname = NAME
box.vm.network :private_network, ip: '192.168.56.10'
box.vm.synced_folder '.', '/selks', type: 'rsync', rsync__exclude: '.git/'
box.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', MEM]
vb.customize ['modifyvm', :id, '--cpus', CPU]
end
box.vm.provider 'libvirt' do |v, _|
v.cpus = CPU
v.memory = MEM
end
box.vm.provision 'shell', inline: $provision
end
end

0 comments on commit 34a7326

Please sign in to comment.