Permalink
Browse files

Ama: Consolidate vagrant_provision script, move files to more intuiti…

…ve locations, include command from #1021.

Also reset circle.yml to be as in the main redash repo so our changes are not included in the changeset
Check earlier PR #1027 to follow conversation.
  • Loading branch information...
1 parent f8efb2d commit 90f0b3b49a4c9d1510cc3a3bb6085761ed6e2606 @amasare amasare committed May 9, 2016
Showing with 35 additions and 6 deletions.
  1. +1 −4 Vagrantfile
  2. +21 −0 bin/vagrant_ctl.sh
  3. +4 −2 circle.yml
  4. +9 −0 vagrant_provision.sh → setup/vagrant/provision.sh
View
@@ -9,10 +9,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder "./", "/opt/redash/current"
config.vm.network "forwarded_port", guest: 5000, host: 9001
config.vm.provision "shell" do |s|
- s.inline = "/opt/redash/current/install_requirements.sh"
- end
- config.vm.provision "shell" do |s|
- s.inline = "/opt/redash/current/vagrant_provision.sh"
+ s.inline = "/opt/redash/current/setup/vagrant/provision.sh"
s.privileged = false
end
end
View
@@ -0,0 +1,21 @@
+#!/bin/bash
+set -e
+
+help() {
+ echo "Usage: "
+ echo "`basename "$0"` {start, test}"
+}
+
+case "$1" in
+ start)
+ vagrant up
+ vagrant ssh -c "cd /opt/redash/current; bin/run honcho start -f Procfile.dev;"
+ ;;
+ test)
+ vagrant up
+ vagrant ssh -c "cd /opt/redash/current; make test"
+ ;;
+ *)
+ help
+ ;;
+esac
View
@@ -9,7 +9,9 @@ machine:
2.7.3
dependencies:
pre:
- - ./install_requirements.sh
+ - pip install -r requirements_dev.txt
+ - pip install -r requirements.txt
+ - pip install pymongo==3.2.1
- if [ "$CIRCLE_BRANCH" = "master" ]; then make deps; fi
cache_directories:
- rd_ui/node_modules/
@@ -34,4 +36,4 @@ notify:
general:
branches:
ignore:
- - gh-pages
+ - gh-pages
@@ -1,13 +1,22 @@
#!/usr/bin/env bash
+
cd /opt/redash/current
cp /opt/redash/.env /opt/redash/current
cd /opt/redash/current/rd_ui
bower install
cd /opt/redash/current
+#install requirements
+sudo pip install -r /opt/redash/current/requirements_dev.txt
+sudo pip install -r /opt/redash/current/requirements.txt
+sudo pip install -r /opt/redash/current/requirements_all_ds.txt
+
#update database
bin/run ./manage.py database drop_tables
bin/run ./manage.py database create_tables
bin/run ./manage.py users create --admin --password admin "Admin" "admin"
+#Purge Redis cache
+redis-cli -n 1 FLUSHALL
+

0 comments on commit 90f0b3b

Please sign in to comment.