Install observatory extension

Config still points to global common data instead of local observatory
This commit is contained in:
Stefan Verhoeven 2018-02-17 13:54:15 +01:00
parent 66a5be7f09
commit 12977507d9
2 changed files with 14 additions and 0 deletions

View File

@ -209,6 +209,11 @@ RUN git clone https://github.com/CartoDB/data-services.git && \
pip install -r requirements.txt && pip install . && \
cd ../../../../client && PGUSER=postgres make install
# Observertory extension
RUN cd / && git clone --recursive https://github.com/CartoDB/observatory-extension.git && \
cd observatory-extension && \
PGUSER=postgres make deploy
# Copy confs
ADD ./config/CartoDB-dev.js \
/CartoDB-SQL-API/config/environments/development.js

View File

@ -15,6 +15,15 @@ rake cartodb:db:set_unlimited_table_quota[geocoder]
GEOCODER_DB=`echo "SELECT database_name FROM users WHERE username='geocoder'" | psql -U postgres -t carto_db_development`
psql -U postgres $GEOCODER_DB < /cartodb/script/geocoder_server.sql
# Import observatory test dataset
psql -U postgres -d $GEOCODER_DB -f /observatory-extension/src/pg/test/fixtures/load_fixtures.sql
# Setup permissions for observatory
psql -U postgres -d $GEOCODER_DB -c "BEGIN;CREATE EXTENSION IF NOT EXISTS observatory VERSION 'dev'; COMMIT" -e
psql -U postgres -d $GEOCODER_DB -c "BEGIN;GRANT SELECT ON ALL TABLES IN SCHEMA cdb_observatory TO geocoder; COMMIT" -e
psql -U postgres -d $GEOCODER_DB -c "BEGIN;GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA cdb_observatory TO geocoder; COMMIT" -e
psql -U postgres -d $GEOCODER_DB -c "BEGIN;GRANT SELECT ON ALL TABLES IN SCHEMA observatory TO geocoder; COMMIT" -e
psql -U postgres -d $GEOCODER_DB -c "BEGIN;GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA observatory TO geocoder; COMMIT" -e
# Setup dataservices client
# dev user
USER_DB=`echo "SELECT database_name FROM users WHERE username='dev'" | psql -U postgres -t carto_db_development`