From b313bc062ae68889e0f857429a99389da7a0bdf0 Mon Sep 17 00:00:00 2001 From: Dabo Ross Date: Tue, 3 Jun 2014 03:07:05 -0700 Subject: [PATCH] Add vagrant files --- .gitignore | 1 + Vagrantfile | 6 ++++++ vagrant-bootstrap.sh | 25 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 Vagrantfile create mode 100644 vagrant-bootstrap.sh diff --git a/.gitignore b/.gitignore index 38a592e9b..3675d98dc 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ plugins/New Text Document.txt plugins/srvv.py run.cmd config +.vagrant diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 000000000..9aab9025c --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,6 @@ +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = "ubuntu/trusty32" + config.vm.provision :shell, path: "vagrant-bootstrap.sh" +end diff --git a/vagrant-bootstrap.sh b/vagrant-bootstrap.sh new file mode 100644 index 000000000..9baedd057 --- /dev/null +++ b/vagrant-bootstrap.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# update sources +sudo apt-get update + +# install things: +# pip so we can install rependencies +# git so pip can clone from repository +# libenchant-dev so python-enchant can use it +# python3-lxml so we can use precompiled binaries instead of compiling them + +sudo apt-get install -y python3-pip git libenchant-dev python3-lxml + +# install requirements using pip +sudo pip3 install -r /vagrant/requirements.txt + +# create link from project to ~/bot +ln -sf /vagrant /home/vagrant/bot + +# create start.sh script +cat > /home/vagrant/start.sh << EOF +#!/usr/bin/env bash +cd /home/vagrant/bot +python3 -m cloudbot +EOF