Skip to content

Commit

Permalink
Added Vagrantfile, updated .gitignore with .vagrant/ directory, and u…
Browse files Browse the repository at this point in the history
…pdated readme for Vagrant VM use
  • Loading branch information
astockwell-ps committed Jul 8, 2013
1 parent f4af281 commit 806fe12
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,3 +6,4 @@ lib/
bin/
build/
include/
.vagrant/
13 changes: 13 additions & 0 deletions README.rst
Expand Up @@ -42,6 +42,19 @@ Note that PyYAML will require other packages to compile correctly under ubuntu/d

``sudo apt-get install libyaml-dev python-dev build-essential``

Using Vagrant for dependency management
---------------------------------------

In the event your local system is incompatible with the dependencies listed (or you'd rather not install them), you can use the included Vagrantfile to start a VM with all necessary dependencies installed.

1. Lint and place all wordpress xml files in the ``wordpress-xml`` directory as mentioned above
2. In the directory of the unzipped archive, run ``vagrant up``.
3. Ssh to your Vagrant VM using ``vagrant ssh``
4. Run ``cd /vagrant`` to open the VM's shared folder
5. Run the converter from the VM by typing ``python exitwp.py``
6. After the converter completes, exit the ssh session using ``exit``
7. You should now have all the blogs converted into separate directories under the ``build`` directory
8. **Important:** Once satisfied with the results, run `vagrant destroy -f` to shut down the VM and remove the virtual drive from your local machine

Configuration/Customization
===========================
Expand Down
19 changes: 19 additions & 0 deletions Vagrantfile
@@ -0,0 +1,19 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

$script = <<SCRIPT
echo 'Provisioning Exitwp Library Dependencies...'
apt-get update --fix-missing
apt-get install -q -y git python-pip
apt-get install -q -y python-yaml python-bs4 python-html2text libyaml-dev python-dev
cd /vagrant
echo 'Provisioning Exitwp Python Requirements...'
pip install --upgrade -r pip_requirements.txt
echo 'Provisioning complete!'
SCRIPT

Vagrant.configure("2") do |config|
config.vm.box = "Puppetlabs Ubuntu 12.04.2 x86_64, VBox 4.2.10, No Puppet or Chef"
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box"
config.vm.provision :shell, :inline => $script
end

0 comments on commit 806fe12

Please sign in to comment.