From 2c92985a2ea96be524e1b3a98fc0fd708eb2ee31 Mon Sep 17 00:00:00 2001 From: Daniel Axtens Date: Sat, 24 Feb 2018 12:22:54 +1100 Subject: tools: drop vagrant It served us well, but it's now outdated (Trusty, Python 3.4, etc) There is no indication that anyone uses it or keeps it up to date. Signed-off-by: Daniel Axtens Acked-by: Stephen Finucane Reviewed-by: Andrew Donnellan --- .dockerignore | 1 - .gitignore | 3 -- Vagrantfile | 26 -------------- docs/development/contributing.rst | 8 ++--- docs/development/installation.rst | 21 +---------- tools/vagrant/install.sh | 73 --------------------------------------- 6 files changed, 4 insertions(+), 128 deletions(-) delete mode 100644 Vagrantfile delete mode 100644 tools/vagrant/install.sh diff --git a/.dockerignore b/.dockerignore index 83cfa98..76fdeb7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,2 @@ -.vagrant tools/docker/db diff --git a/.gitignore b/.gitignore index 1d8b073..2f8e2c2 100644 --- a/.gitignore +++ b/.gitignore @@ -44,9 +44,6 @@ htmlcov/ # Sphinx stuff /docs/_build -# Vagrant stuff -/.vagrant - # Selenium test artifacts /selenium.log /selenium_screenshots diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 2ddbca0..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,26 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure(2) do |config| - # For a complete reference of available confguration options, please see the - # online documentation at https://docs.vagrantup.com. - - config.vm.box = "ubuntu/trusty32" - - config.vm.network "forwarded_port", guest: 8000, host: 8000 - # Enable this if you want host-only access to the machine using the given IP - # config.vm.network "private_network", ip: "192.168.33.10" - - # Provider-specific configuration so you can fine-tune various - # backing providers for Vagrant. These expose provider-specific options. - # - # config.vm.provider "virtualbox" do |vb| - # # Display the VirtualBox GUI when booting the machine - # vb.gui = true - # - # # Customize the amount of memory on the VM: - # vb.memory = "1024" - # end - - config.vm.provision :shell, :path => "tools/vagrant/install.sh" -end diff --git a/docs/development/contributing.rst b/docs/development/contributing.rst index 8988c9f..e6c0663 100644 --- a/docs/development/contributing.rst +++ b/docs/development/contributing.rst @@ -30,16 +30,14 @@ You may also need to install `tox`. If so, do this now: .. tip:: - If you're using Docker or Vagrant-based installs, you may not need to - install `tox` locally. Instead, it will already be installed inside the - container/VM. For Docker, you can run `tox` like so: + If you're using Docker, you may not need to install `tox` + locally. Instead, it will already be installed inside the + container. For Docker, you can run `tox` like so: .. code-block:: shell $ docker-compose run web tox [ARGS...] - For Vagrant, SSH into the container and run `tox` as below. - Assuming these requirements are met, actually testing Patchwork is quite easy to do. To start, you can show the default targets like so: diff --git a/docs/development/installation.rst b/docs/development/installation.rst index 30fdb54..90c07b5 100644 --- a/docs/development/installation.rst +++ b/docs/development/installation.rst @@ -163,29 +163,10 @@ For more information on Docker itself, please refer to the `docker`_ and .. _docker: https://docs.docker.com/compose/install/ .. _docker-compose: https://docs.docker.com/engine/installation/linux/ -Vagrant-Based Installation --------------------------- - -Patchwork provides a Vagrant-based environment as an alternative to Docker. -Like Docker, Vagrant can be used to quickly configure Patchwork in a -development environment. To configure Patchwork using Vagrant: - -1. Install `**Vagrant** `_ - -2. Run `vagrant up` from the project directory: - - .. code-block:: shell - - $ cd patchwork - $ vagrant up - -Once stacked, follow the on-screen instructions. For more information on -Vagrant itself, refer to the `Vagrant documentation `_. - Manual Installation ------------------- -Manual installation can be used where use of Docker or Vagrant is not possible +Manual installation can be used where use of Docker is not possible or desired. Install Required Packages diff --git a/tools/vagrant/install.sh b/tools/vagrant/install.sh deleted file mode 100644 index a930ddc..0000000 --- a/tools/vagrant/install.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -# Script to set up Patchwork on a Vagrant-powered Ubuntu Trusty host - -echo -e "\n--- Configuring environment ---\n" - -PROJECT_HOME=/vagrant - -db_user=root -db_pass=password - -export DJANGO_SETTINGS_MODULE=patchwork.settings.dev -export DEBIAN_FRONTEND=noninteractive - -echo "mysql-server mysql-server/root_password password $db_pass" | debconf-set-selections -echo "mysql-server mysql-server/root_password_again password $db_pass" | debconf-set-selections - -echo -e "\n--- Updating packages list ---\n" - -apt-get update -qq - -echo -e "\n--- Installing system packages ---\n" - -apt-get install -y python python3-dev python3-pip mysql-server \ - libmysqlclient-dev curl > /dev/null - -echo -e "\n--- Installing Python dependencies ---\n" - -pip3 -q install virtualenv tox -pip3 -q install -r $PROJECT_HOME/requirements-dev.txt - -echo -e "\n--- Configuring database ---\n" - -mysql -u$db_user -p$db_pass << EOF -DROP DATABASE IF EXISTS patchwork; -CREATE DATABASE patchwork CHARACTER SET utf8; -GRANT ALL ON patchwork.* TO 'patchwork'@'localhost' IDENTIFIED BY 'password'; -EOF - -chmod a+x $PROJECT_HOME/manage.py - -echo -e "\n--- Loading initial data ---\n" - -sudo -E -u vagrant python3 $PROJECT_HOME/manage.py migrate > /dev/null -sudo -E -u vagrant python3 $PROJECT_HOME/manage.py loaddata \ - default_tags > /dev/null -sudo -E -u vagrant python3 $PROJECT_HOME/manage.py loaddata \ - default_states > /dev/null -sudo -E -u vagrant python3 $PROJECT_HOME/manage.py loaddata \ - default_projects > /dev/null - -echo -e "\n--- Configuring environment ---\n" - -cat >> /home/vagrant/.bashrc << EOF -export DJANGO_SETTINGS_MODULE='patchwork.settings.dev' - -alias runserver='python3 /vagrant/manage.py runserver 0.0.0.0:8000' -alias createsu='python3 /vagrant/manage.py createsuperuser' -cd /vagrant -EOF - -echo "Done." -echo "You may now log in:" -echo " $ vagrant ssh" -echo "Once logged in, start the server using the 'runserver' alias:" -echo " $ runserver" -echo "You may wish to create a superuser for use with the admin console:" -echo " $ createsuperuser" -echo "For information on the above, and some examples on loading sample date," -echo "please refer to the documentation found in the 'doc' folder." -echo "Alternatively, check out the docs online:" -echo " https://patchwork.readthedocs.io/en/latest/development/" -echo "Happy patchworking." -- cgit v1.2.3