Skip to content

Instantly share code, notes, and snippets.

@paralax
Last active November 2, 2018 19:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save paralax/67249982670907a454e3c57b250a30eb to your computer and use it in GitHub Desktop.
Save paralax/67249982670907a454e3c57b250a30eb to your computer and use it in GitHub Desktop.
Gravwell Vagrantfile - just "vagrant up"
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
# progressbar via https://askubuntu.com/questions/445245/how-do-i-enable-fancy-apt-colours-and-progress-bars
# from https://dev.gravwell.io/docs/#!quickstart/quickstart.md
$script = <<SCRIPT
mkdir -p /etc/apt/apt.conf.d
echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar
curl -Ls https://update.gravwell.io/debian/update.gravwell.io.gpg.key | apt-key add -
# Add the repository
echo 'deb [ arch=amd64 ] https://update.gravwell.io/debian/ community main' > /etc/apt/sources.list.d/gravwell.list
apt-get install apt-transport-https
apt-get update
curl -sLO https://update.gravwell.io/files/gravwell_2.2.4.sh
chmod a+x gravwell_2.2.4.sh
NO_ASK=yes ./gravwell_2.2.4.sh
echo "To get your license file, head on over to https://www.gravwell.io/gravwell-community-edition and fill out the form. Logbot will email one to you shortly therafter."
SCRIPT
config.vm.provision "shell", inline: $script
config.vm.hostname = "gravwell"
config.vm.network :forwarded_port, host: 4443, guest: 443
end
@nma-io
Copy link

nma-io commented Jul 17, 2018

EDIT: This won't work - they declare NO_ASK in the middle of the script which will overwrite the env variable. ... May need to pass with the --no-questions and use the installer file rather than apt?

untested - this could work: env NO_ASK=yes apt-get install gravwell
The NO_ASK is how the stand alone installer works:

displayEULA() {
        EULA_LOC="$1"
        if [ "$NO_ASK" != "yes" ]; then
                cat $EULA_LOC
                echo "Do you accept the EULA as displayed and agree to its license?"
                getYesOrNo
                if [ "$yesno" != "y" ]; then
                        echo "Terminating installation"
                        exit -1
                fi
        else
                echo "EULA accepted via --no-questions"
        fi
}

@traetox
Copy link

traetox commented Jul 17, 2018

Should be fixed in 2.1.1 that was just pushed out. Thanks for the heads up!

@paralax
Copy link
Author

paralax commented Jul 17, 2018

thanks all, you were able to help me fix this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment