From d9317acf26babbc1aa31c234c83db138f9475596 Mon Sep 17 00:00:00 2001 From: Christopher Baklid Date: Mon, 19 Feb 2018 23:13:36 +0100 Subject: Add Vagrantfile * attempt to fix stacktrace when initialising logger * adds vagrantfile for local development * restart rethinkdb after setting config * fix source .profile * adds alias python=python3.6 * include more reminder of what to add in hosts file * also install snekchek in vm * update vagrant bootstrap script to properly include environment variables in bashrc --- .gitignore | 3 +++ Vagrant_bootstrap.sh | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Vagrantfile | 24 +++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 Vagrant_bootstrap.sh create mode 100644 Vagrantfile diff --git a/.gitignore b/.gitignore index 23151389..162115dc 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,6 @@ ENV/ # RethinkDB data rethinkdb_data/ + +# Vagrant +.vagrant/ diff --git a/Vagrant_bootstrap.sh b/Vagrant_bootstrap.sh new file mode 100644 index 00000000..32e779f5 --- /dev/null +++ b/Vagrant_bootstrap.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +# Dependencies +apt-get update +apt-get install -y software-properties-common +apt-get install -y python-software-properties +apt-get install -y curl +apt-get install -y apt-transport-https +add-apt-repository -y ppa:jonathonf/python-3.6 +echo "deb http://download.rethinkdb.com/apt xenial main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list +wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add - +apt-get update + +# Python3.6 +apt-get install -y python3.6 +apt-get install -y python3.6-dev +apt-get install -y build-essential +curl -s https://bootstrap.pypa.io/get-pip.py | python3.6 - +python3.6 -m pip install -r /vagrant/requirements.txt +python3.6 -m pip install -r /vagrant/requirements-ci.txt +python3.6 -m pip install gunicorn + +# RethinkDB +apt-get install -y rethinkdb + +tee /etc/rethinkdb/instances.d/rethinkdb.conf <