CoCalc Shared Filesoss2019 / VagrantfileOpen in CoCalc with one click!
Authors: harald @schil.ly, Testing CoCalc, Harald Schilly, Harald Schilly, HaraldTest SchillyTest, ℏal Snyder, William A. Stein
Description: https://github.com/OpenSecuritySummit/oss2019
1
# -*- mode: ruby -*-
2
# vi: set ft=ruby :
3
# Run vagrant up to get started
4
Vagrant.configure("2") do |config|
5
config.vm.box = "bento/ubuntu-16.04"
6
config.vm.network "forwarded_port", guest: 1313, host: 1313, host_ip: "127.0.0.1"
7
config.vm.synced_folder ".", "/opt/oss2018"
8
9
config.vm.provider "virtualbox" do |vb|
10
vb.memory = "512"
11
end
12
13
config.vm.provision "shell", inline: <<-SHELL
14
set -x
15
apt-get update
16
apt-get install -y git curl
17
export HUGO_VERSION="0.49"
18
export SRC_DIR="/opt/oss2018"
19
export THEME_DIR="themes/oss-owasp"
20
21
curl -Ls https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz -o /tmp/hugo.tar.gz
22
tar xf /tmp/hugo.tar.gz -C /usr/local/bin
23
mkdir -p $SRC_DIR
24
25
cd $SRC_DIR
26
27
if [ ! -d "$THEME_DIR" ] ; then
28
git clone https://github.com/devcows/hugo-universal-theme.git themes/oss-owasp
29
else
30
cd $THEME_DIR
31
git pull https://github.com/devcows/hugo-universal-theme.git
32
fi
33
cd "$SRC_DIR"
34
hugo server --bind="0.0.0.0"
35
SHELL
36
end
37