Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add local demo #531

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ To clone the IntegratedConformance with all the submodules, use the command,

git clone --recurse-submodules https://github.com/Dash-Industry-Forum/DASH-IF-Conformance

You can also use the included Vagrant box to run locally.

```
cd DASH-IF-Conformance/vagrant/
vagrant up
```

Once `vagrant up` completes, visit [visit http://localhost:8090/DASH-IF-Conformance/Conformance-Frontend/index.html](http://localhost:8090/DASH-IF-Conformance/Conformance-Frontend/index.html)

** Refer to https://www.vagrantup.com/ for Vagrant installation and usage documentation.

### Usage Guide

Information on how to use the conformance software, please refer to our [Usage Guide](https://github.com/Dash-Industry-Forum/DASH-IF-Conformance/blob/master/Doc/Conformance%20Software%20Usage%20Guide.pdf) document.
Expand Down
1 change: 1 addition & 0 deletions vagrant/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vagrant/
14 changes: 14 additions & 0 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-16.04"

config.vm.provider "virtualbox" do |v|
v.name = "DASH-IF-Conformance"
end

config.vm.network "forwarded_port", guest: 8090, host: 8090
config.vm.provision :shell, path: "provision.sh"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "../", "/vagrant"

end

60 changes: 60 additions & 0 deletions vagrant/provision.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
set -o errexit
set -o pipefail
set -o nounset
shopt -s failglob
set -o xtrace

export DEBIAN_FRONTEND=noninteractive

# ref https://github.com/Dash-Industry-Forum/DASH-IF-Conformance/blob/master/Doc/Conformance%20Software%20Installation%20Guide.pdf

apt-get update
apt-get install -y php php-dev php-xml php-curl php-xdebug libapache2-mod-php \
default-jdk apache2 apache2-doc python2.7 python-pip \
python-matplotlib ant git libstdc++6:i386 gcc-multilib \
g++-multilib


java -version
javac -version


echo '' > /etc/sudoers.d/dash
echo '# the conformance software requires sudo permission to run' >> /etc/sudoers.d/dash
echo '%www-data ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/dash
echo '' >> /etc/sudoers.d/dash
chmod 0440 /etc/sudoers.d/dash
cat /etc/sudoers.d/dash


service apache2 restart

usermod -a -G www-data vagrant

cd /var/www

git clone --recurse-submodules https://github.com/Dash-Industry-Forum/DASH-IF-Conformance

MAKE_PARALLEL_JOBS=10
MAKEFLAGS=-j$MAKE_PARALLEL_JOBS

cd DASH-IF-Conformance/ISOSegmentValidator/public/linux/
make $MAKEFLAGS

chmod -R 0777 /var/www/


echo '' > /etc/apache2/sites-available/000-dash.conf
echo 'Listen 8090' >> /etc/apache2/sites-available/000-dash.conf
echo '<VirtualHost *:8090>' >> /etc/apache2/sites-available/000-dash.conf
echo ' ServerAdmin webmaster@localhost' >> /etc/apache2/sites-available/000-dash.conf
echo ' DocumentRoot /var/www' >> /etc/apache2/sites-available/000-dash.conf
echo ' ErrorLog ${APACHE_LOG_DIR}/error.log' >> /etc/apache2/sites-available/000-dash.conf
echo ' CustomLog ${APACHE_LOG_DIR}/access.log combined' >> /etc/apache2/sites-available/000-dash.conf
echo '</VirtualHost>' >> /etc/apache2/sites-available/000-dash.conf
echo '' >> /etc/apache2/sites-available/000-dash.conf

a2ensite 000-dash
service apache2 reload

echo "Success! Use your browser to visit http://localhost:8090/DASH-IF-Conformance/Conformance-Frontend/index.html"