From b205b51c83424f15cad281fda8af305e89f484d7 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Wed, 2 Sep 2020 16:04:28 -0400 Subject: [PATCH] Remove Vagrant (incomplete implementation) OpenDataServices/standard-search#15 --- .gitignore | 1 - README.md | 21 --------------------- Vagrantfile | 33 --------------------------------- vagrant/apache.conf | 15 --------------- vagrant/bootstrap.sh | 37 ------------------------------------- 5 files changed, 107 deletions(-) delete mode 100644 Vagrantfile delete mode 100644 vagrant/apache.conf delete mode 100644 vagrant/bootstrap.sh diff --git a/.gitignore b/.gitignore index af38162..7d1d4ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ __pycache__ -/.vagrant extracted_data.json .ve db.sqlite3 diff --git a/README.md b/README.md index 63d1a2d..2b0d69d 100644 --- a/README.md +++ b/README.md @@ -140,24 +140,3 @@ If a request was made to index a HTTP site, but a user searches against a HTTPS It is currently set up for OCDS. This can be extended for other standards, but at this time we may also try to work out a generic set of interfaces. - -## Vagrant for developers - -A Vagrant box is provided for developers. - -This also builds a static version of the OCDS standard, so you can test it against a development website you can control. - -NOTE: This is not in full working order and needs tweaks! See pull request. - - vagrant up - vagrant ssh - cd /vagrant - python3 ocds-doc-search-cli.py -u http://localhost:6060/ # this indexes to elasticsearch - python3 manage.py runserver 0.0.0.0:5000 - -Try this on the host. - - * http://localhost:6060/en - * http://localhost:6060/fr - * http://localhost:6060/es - diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 9b6109b..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,33 +0,0 @@ -Vagrant.configure(2) do |config| - - config.vm.box = "ubuntu/xenial64" - - config.vm.network "forwarded_port", guest: 9200, host: 9200 - config.vm.network "forwarded_port", guest: 6060, host: 6060 - config.vm.network "forwarded_port", guest: 5000, host: 5000 - - config.vm.define "worker" do |normal| - - config.vm.synced_folder ".", "/vagrant", :owner=> 'ubuntu', :group=>'users', :mount_options => ['dmode=777', 'fmode=777'] - - config.vm.provider "virtualbox" do |vb| - # Display the VirtualBox GUI when booting the machine - vb.gui = false - - # Customize the amount of memory on the VM: - vb.memory = "2048" - - # https://github.com/boxcutter/ubuntu/issues/82#issuecomment-260902424 - vb.customize [ - "modifyvm", :id, - "--cableconnected1", "on", - ] - - end - - config.vm.provision :shell, path: "vagrant/bootstrap.sh" - - end - - -end diff --git a/vagrant/apache.conf b/vagrant/apache.conf deleted file mode 100644 index f45de92..0000000 --- a/vagrant/apache.conf +++ /dev/null @@ -1,15 +0,0 @@ -Listen 6060 - - ServerAdmin webmaster@localhost - DocumentRoot /home/vagrant/standard/build - - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - - - AllowOverride All - Require all granted - - - - diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh deleted file mode 100644 index edbb4ab..0000000 --- a/vagrant/bootstrap.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -set -e - -# Install some requirements -apt-get update -apt-get install -y apt-transport-https openjdk-8-jre python3-pip apache2 - -# Add Elasticsearch repo and install -wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - - -echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list - -apt-get update && apt-get install elasticsearch - -# Configure Elasticsearch and restart -echo "network.host: 0.0.0.0" >> /etc/elasticsearch/elasticsearch.yml - -/etc/init.d/elasticsearch restart - -systemctl enable elasticsearch - -# Install Python Libs -pip3 install -r /vagrant/requirements.txt -pip3 install flake8 - -# Install standard docs -git clone https://github.com/open-contracting/standard.git -cd standard -pip3 install -r requirements.txt -sed -i 's/www.standard-search.default.opendataservices.uk0.bigv.io/localhost:5000/g' src/standard-theme/standard_theme/static/js/search.js -make - -# Configure Apache -cp /vagrant/vagrant/apache.conf /etc/apache2/sites-enabled/000-default.conf -/etc/init.d/apache2 restart -