DuckPAN is an application built to provide developers a testing environment for DuckDuckHack Instant Answers. It allows you to test instant answer triggers and preview their visual design and output.
This project provides a Vagrant-based development setup for DuckPAN.
-
Install: Vagrant
-
Clone this repo
-
Install the OS dependencies for vagrant-berkshelf. On Ubuntu,
sudo apt-get install build-essential autoconf
-
Install the ChefDK. If the ChefDK is unavailable for your Linux distro, follow the Workaround for Linux distros not supported by the ChefDK below.
-
Run
vagrant plugin install vagrant-berkshelf
-
Run
vagrant plugin install vagrant-omnibus
so that Chef within the box can be upgraded to a version compatible with chef on the host OS. -
Review the CUSTOM_CONFIG settings at the top of Vagrant file. You will want to customize the value of the synced directory to point to your local directory containing the DuckDuckGo code you wish to test. By default, Vagrant will load a VirtualBox Precise64 machine image. If you change this, DuckDuckGo recommends Ubuntu (https://github.com/duckduckgo/p5-app-duckpan#disclaimer).
-
Run
vagrant up
The box takes some time to stand up. As the duckpan-install script runs, you won't see any output for a few minutes. On my 2.7 Ghz i7 Macbook Pro, it takes 18 minutes to complete. Refer to Troubleshooting for more info.
-
Run
vagrant plugin install vagrant-berkshelf --plugin-version=2.0.1
(command 1), before following runningvagrant plugin install berkshelf
(command 2). If you already ran command 2, run command 1 and then command 2. (Note that this results in berkshelf being installed as a vagrant-managed gem. We do not need the entire ChefDK, only berkshelf.) -
Add
~/.vagrant.d/gems/bin/
to your path. For example, at the bottom of~/.bashrc
, add:export PATH=${PATH}:~/.vagrant.d/gems/bin/
You can find the usage instructions for DuckPAN here: https://github.com/duckduckgo/p5-app-duckpan#using-duckpan
By default, after starting duckpan server
you can access the web interface at http://0.0.0.0:5000
The Chef run may take a while to complete, and during this process, you may see no output from vagrant.
You can ssh into the box and run top to verify installation is still occurring. Look for either the chef-solo or perl processes.
vagrant ssh
top