forked from OWASP/SecurityShepherd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Vagrantfile to automate installation of SecurityShepherd (OWASP…
…#442) * added Vagrantfile * added provisioner script
- Loading branch information
1 parent
e8cce39
commit 653843e
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
|
||
config.vm.box = "ubuntu/xenial64" | ||
|
||
config.vm.network "public_network", ip: "192.168.1.10", host_ip: "127.0.0.1" | ||
|
||
config.vm.provision "shell", path: "provisioning/install.sh" | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash -x | ||
|
||
# pre | ||
sudo apt-get update -y | ||
sudo apt-get install -y maven | ||
sudo apt-get install -y openjdk-8-jdk | ||
|
||
# install docker | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | ||
sudo apt-key fingerprint 0EBFCD88 | ||
sudo add-apt-repository \ | ||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | ||
$(lsb_release -cs) \ | ||
stable" | ||
sudo apt-get -y update | ||
sudo apt-get -y install docker-ce | ||
|
||
# install docker-compose | ||
sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
sudo gpasswd -a $USER docker | ||
|
||
# Download Securityshephard | ||
cd /home/vagrant/ | ||
git clone https://github.com/OWASP/SecurityShepherd.git | ||
cd SecurityShepherd | ||
|
||
# Run maven and build docker images | ||
mvn -Pdocker clean install -DskipTests | ||
sudo docker-compose up | ||
|
||
|