Skip to content

Commit

Permalink
Update bootstrap.sh:
Browse files Browse the repository at this point in the history
- Update version to 0.11.1.
- Move all apt commands to the beginning of the script and add the missing ones (lib-sasl).
- Fix the Redash Metadata data source creation command.
  • Loading branch information
arikfr committed Aug 3, 2016
1 parent 17fa957 commit 7598048
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion setup/amazon_linux/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ REDASH_BASE_PATH=/opt/redash
REDASH_BRANCH="${REDASH_BRANCH:-master}"

# Install latest version if not specified in REDASH_VERSION env var
REDASH_VERSION=${REDASH_VERSION-0.10.1.b1834}
REDASH_VERSION=${REDASH_VERSION-0.11.1.b2095}
LATEST_URL="https://github.com/getredash/redash/releases/download/v${REDASH_VERSION}/redash.${REDASH_VERSION}.tar.gz"
VERSION_DIR="/opt/redash/redash.${REDASH_VERSION}"
REDASH_TARBALL=/tmp/redash.tar.gz
Expand Down
31 changes: 15 additions & 16 deletions setup/ubuntu/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ REDASH_BASE_PATH=/opt/redash
REDASH_BRANCH="${REDASH_BRANCH:-master}"

# Install latest version if not specified in REDASH_VERSION env var
REDASH_VERSION=${REDASH_VERSION-0.10.1.b1834}
REDASH_VERSION=${REDASH_VERSION-0.11.1.b2095}
LATEST_URL="https://github.com/getredash/redash/releases/download/v${REDASH_VERSION}/redash.${REDASH_VERSION}.tar.gz"
VERSION_DIR="/opt/redash/redash.${REDASH_VERSION}"
REDASH_TARBALL=/tmp/redash.tar.gz
Expand All @@ -28,7 +28,18 @@ fi
# Base packages
apt-get -y update
apt-get -y dist-upgrade
apt-get install -y python-pip python-dev nginx curl build-essential pwgen libffi-dev
apt-get install -y python-pip python-dev nginx curl build-essential pwgen
# BigQuery dependencies:
apt-get install -y libffi-dev libssl-dev
# MySQL dependencies:
apt-get install -y libmysqlclient-dev
# Microsoft SQL Server dependencies:
apt-get install -y freetds-dev
# Hive dependencies:
apt-get install -y libsasl2-dev
#Saml dependency
apt-get install -y xmlsec1

pip install -U setuptools==23.1.0

# redash user
Expand Down Expand Up @@ -148,24 +159,12 @@ if [ $pg_user_exists -ne 0 ]; then
sudo -u postgres psql -c "CREATE ROLE redash_reader WITH PASSWORD '$REDASH_READER_PASSWORD' NOCREATEROLE NOCREATEDB NOSUPERUSER LOGIN"
sudo -u redash psql -c "grant select(id,name,type) ON data_sources to redash_reader;" redash
sudo -u redash psql -c "grant select(id,name) ON users to redash_reader;" redash
sudo -u redash psql -c "grant select on events, queries, dashboards, widgets, visualizations, query_results to redash_reader;" redash
sudo -u redash psql -c "grant select on alerts, alert_subscriptions, groups, events, queries, dashboards, widgets, visualizations, query_results to redash_reader;" redash

cd /opt/redash/current
sudo -u redash bin/run ./manage.py ds new -n "re:dash metadata" -t "pg" -o "{\"user\": \"redash_reader\", \"password\": \"$REDASH_READER_PASSWORD\", \"host\": \"localhost\", \"dbname\": \"redash\"}"
sudo -u redash bin/run ./manage.py ds new "Re:dash Metadata" --type "pg" --options "{\"user\": \"redash_reader\", \"password\": \"$REDASH_READER_PASSWORD\", \"host\": \"localhost\", \"dbname\": \"redash\"}"
fi

# BigQuery dependencies:
apt-get install -y libffi-dev libssl-dev

# MySQL dependencies:
apt-get install -y libmysqlclient-dev

# Microsoft SQL Server dependencies:
apt-get install -y freetds-dev

#Saml dependency
apt-get install -y xmlsec1

# Pip requirements for all data source types
cd /opt/redash/current
pip install -r requirements_all_ds.txt
Expand Down

0 comments on commit 7598048

Please sign in to comment.