Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Initial Vagrantfile. Needs a new config for apache24

Mike McGannba1ed40a162e
diff --git a/.gitignore b/.gitignore
index 5c2cac817..9cd91ee03 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ tools
options
\#*
npm-debug.log
+.vagrant
diff --git a/Vagrantfile b/Vagrantfile
new file mode 100644
index 000000000..e3e2032fa
--- /dev/null
+++ b/Vagrantfile
@@ -0,0 +1,16 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+ config.vm.box = "hfm4/centos7"
+ config.vm.provision :shell, path: "etc/dev/vm.bootstrap"
+ config.vm.hostname = "worldview"
+ config.vm.network "forwarded_port", guest: 80, host: 8182
+
+ config.vm.provider "virtualbox" do |vb|
+ vb.name = "worldview"
+ end
+end
diff --git a/etc/dev/vm.bootstrap b/etc/dev/vm.bootstrap
new file mode 100755
index 000000000..01edf300d
--- /dev/null
+++ b/etc/dev/vm.bootstrap
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+set -e
+set -x
+
+yum install -y http://mirrors.kernel.org/fedora-epel/7/x86_64/e/epel-release-7-1.noarch.rpm
+
+yum install -y \
+ httpd \
+ git \
+ nodejs \
+ npm \
+ python-virtualenv
+
+cd /vagrant
+
+# The certificate used for npmjs.org has changed and it is not recognized by
+# the bundled CA: https://github.com/npm/npm-www/issues/185
+#
+# Workaround is to not verify ssl certificate:
+#npm config set strict-ssl false
+
+if [ ! -d options ] ; then
+ git clone https://github.com/nasa-gibs/worldview-options-eosdis.git options
+fi
+npm install -g grunt-cli
+npm install
+./wv-python
+grunt
+grunt apache-config
+cp dist/worldview-dev.httpd.conf /etc/httpd/conf.d
+
+systemctl enable httpd.service
+systemctl start httpd.service
+systemctl stop firewalld.service
+systemctl disable firewalld.service