Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
adding (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesyoung committed Dec 19, 2017
1 parent b5188ab commit ad2c9ee
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Expand Up @@ -59,7 +59,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end

config.vm.network :forwarded_port, guest: 443, host: 8443

config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--cpus", "2", "--ioapic", "on", "--memory", "4096" ]
end
Expand Down
46 changes: 46 additions & 0 deletions Vagrantfile_buildbox
@@ -0,0 +1,46 @@
#e -*- mode: ruby -*-
# vi: set ft=ruby :
# https://scotch.io/tutorials/how-to-create-a-vagrant-base-box-from-an-existing-one

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
VAGRANTFILE_LOCAL = 'Vagrantfile.local'

unless File.directory?('deploymentkit')
puts "Please unzip the latest release of the deploymentkit before continuing..."
puts ""
puts "https://github.com/csirtgadgets/bearded-avenger-deploymentkit/wiki"
puts ""
exit
end

$script = <<SCRIPT
echo 'installing the basics'
apt-get update && apt-get install -y build-essential python-dev python2.7 python-pip python-dev aptitude \
python-pip libffi-dev libssl-dev sqlite3 software-properties-common
echo 'installing ansible'
pip install 'setuptools>=18.3,<34.0' 'ansible>=2.4,<2.5'
echo 'cleaning'
apt-get clean
dd if=/dev/zero of=/EMPTY bs=1M
rm -f /EMPTY
echo 'done'
cat /dev/null > ~/.bash_history && history -c && exit
SCRIPT

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "shell", inline: $script
config.vm.box = 'ubuntu/xenial64'

config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--cpus", "2", "--ioapic", "on", "--memory", "4096" ]
end

if File.file?(VAGRANTFILE_LOCAL)
external = File.read VAGRANTFILE_LOCAL
eval external
end
end
11 changes: 11 additions & 0 deletions helpers/buildbasebox.sh
@@ -0,0 +1,11 @@
#!/bin/bash

export VAGRANT_VAGRANTFILE=Vagrantfile_buildbox

if [ -e cifv3.box ]; then
rm cifv3.box
fi

time vagrant up
vagrant package --output cifv3.box
vagrant box add cifv3 cifv3.box
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -18,7 +18,7 @@ ujson>=1.35
html5lib==1.0b8 # bug in csirtg-smrt upstream
msgpack-python>=0.4.8,<0.5.0
apwgsdk==0.0.0a6
csirtg_smrt==0.0.0b5
csirtg_smrt==0.0.0b6
csirtg_dnsdb==0.0.0a4
tornado>=4.4.1,<5.0
faker==0.7.11
Expand Down

0 comments on commit ad2c9ee

Please sign in to comment.