MapD Front-End Visualization on Windows with Vagrant
As some people have problems installing MapD Charting on Windows due to version and dependency issues, I’ll explain how to install MapD Charting on your Windows workstation using Vagrant, a very popular manager for virtual machines. If you’re unfamiliar with Vagrant, this screenshot from their website explains the Vagrant philosophy.
Overview of Steps
- Download and install Vagrant
- use Vagrant to install Ubuntu 16.04 in a VirtualBox VM
- ssh into VM and install MapD Charting inside of the VM
- Configure Vagrant networking to work with MapD Charting demo
- Start MapD Charting inside of your Linux VM
- Use your Windows browser to access the MapD Charting node application to see the demos
- Use development tools on Windows (like VS Code, Visual Studio, or Sublime) to develop MapD Charting applications inside the Linux VM
Install Ubuntu
Using bento/ubuntu-16.04
as I’ve had problems with the Vagrant container from Ubuntu.
vagrant init bento/ubuntu-16.04
vagrant up
Configure Vagrant For MapD Charting Network Port
On Windows, edit the Vagrantfile
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
config.vm.network “forwarded_port”, guest: 8081, host: 8081, host_ip: “127.0.0.1”
Reload Vagrant
$ vagrant reload
Log Into Linux VM
Log into Ubuntu VM
vagrant ssh
From inside of VM, install npm.
sudo apt-get install npm
install n
sudo npm install -g n
clone mapd-charting from https://github.com/mapd/mapd-tweetmap-2.git
Use n
to install node 5.12.0 inside of the Ubuntu VM.
$ sudo n 5.12.0
change directory into the mapd-charting
project you just cloned.
$ npm install
$ npm install mapbox-gl@https://github.com/mapd/mapbox-gl-js/tarball/9c04de6949fe498c8c79f5c0627dfd6d6321f307 #downloads mapbox peer dependency
I’m getting some warnings, but I’ll try and run the demo.
On Your Windows Machine, Access the MapD Charting Demos
From a web browser on your Windows workstation, access the URL 127.0.0.1:8081