Skip to content

Commit

Permalink
Merge pull request #620 from getredash/docker
Browse files Browse the repository at this point in the history
Reorganize setup files & update Docker configurations
  • Loading branch information
arikfr committed Nov 26, 2015
2 parents 0343fa7 + 5fe9c2f commit 52b8e98
Show file tree
Hide file tree
Showing 45 changed files with 1,237 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
@@ -1,4 +1,4 @@
rd_ui/dist/
rd_ui/.tmp/
rd_ui/node_modules/
.git/
.vagrant/
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -21,4 +21,4 @@ venv
dump.rdb

# Docker related
docker-compose.yaml
docker-compose.yml
14 changes: 4 additions & 10 deletions Dockerfile
Expand Up @@ -3,11 +3,11 @@ MAINTAINER Di Wu <diwu@yelp.com>

# Ubuntu packages
RUN apt-get update && \
apt-get install -y python-pip python-dev curl build-essential pwgen libffi-dev sudo git-core wget && \
apt-get install -y python-pip python-dev curl build-essential pwgen libffi-dev sudo git-core wget \
# Postgres client
apt-get -y install libpq-dev postgresql-client && \
libpq-dev \
# Additional packages required for data sources:
apt-get install -y libssl-dev libmysqlclient-dev
libssl-dev libmysqlclient-dev

# Users creation
RUN useradd --system --comment " " --create-home redash
Expand All @@ -16,12 +16,6 @@ RUN useradd --system --comment " " --create-home redash
RUN pip install -U setuptools && \
pip install supervisor==3.1.2

# Download latest source and extract into /opt/redash/current
# COPY setup/latest_release_url.py /tmp/latest_release_url.py
# RUN wget $(python /tmp/latest_release_url.py) -O redash.tar.gz && \
# mkdir -p /opt/redash/current && \
# tar -C /opt/redash/current -xvf redash.tar.gz && \
# rm redash.tar.gz
COPY . /opt/redash/current

# Setting working directory
Expand All @@ -34,7 +28,7 @@ RUN pip install -r requirements_all_ds.txt && \
# Setup supervisord
RUN mkdir -p /opt/redash/supervisord && \
mkdir -p /opt/redash/logs && \
cp /opt/redash/current/setup/files/supervisord_docker.conf /opt/redash/supervisord/supervisord.conf
cp /opt/redash/current/setup/docker/supervisord/supervisord.conf /opt/redash/supervisord/supervisord.conf

# Fix permissions
RUN chown -R redash /opt/redash
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -43,7 +43,7 @@ You can try out the demo instance: http://demo.redash.io/ (login with any Google
## Getting help

* [Google Group (mailing list)](https://groups.google.com/forum/#!forum/redash-users): the best place to get updates about new releases or ask general questions.
* Find us [on gitter](https://gitter.im/EverythingMe/redash#) (chat).
* Find us [on gitter](https://gitter.im/getredash/redash#) (chat).
* Contact Arik, the maintainer directly: arik@redash.io.

## Reporting Bugs and Contributing Code
Expand Down
2 changes: 1 addition & 1 deletion bin/release_manager.py
Expand Up @@ -7,7 +7,7 @@

github_token = os.environ['GITHUB_TOKEN']
auth = (github_token, 'x-oauth-basic')
repo = 'EverythingMe/redash'
repo = 'getredash/redash'

def _github_request(method, path, params=None, headers={}):
if not path.startswith('https://api.github.com'):
Expand Down
11 changes: 10 additions & 1 deletion circle.yml
@@ -1,7 +1,9 @@
machine:
services:
- docker
node:
version:
0.10.24
0.12.4
python:
version:
2.7.3
Expand All @@ -23,6 +25,13 @@ deployment:
branch: master
commands:
- make upload
docker:
branch: [master, docker]
commands:
- echo "rd_ui/app" >> .dockerignore
- docker build -t redash/redash:$(./manage.py version | sed -e "s/\+/./") .
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push redash/redash:$(./manage.py version | sed -e "s/\+/./")
notify:
webhooks:
- url: https://webhooks.gitter.im/e/895d09c3165a0913ac2f
Expand Down
8 changes: 7 additions & 1 deletion docker-compose-example.yaml → docker-compose-example.yml
Expand Up @@ -5,7 +5,13 @@ redash:
links:
- redis
- postgres
env_file: .env
environment:
REDASH_STATIC_ASSETS_PATH:"../rd_ui/app/"
REDASH_LOG_LEVEL:"INFO"
REDASH_REDIS_URL:redis://localhost:6379/0
REDASH_DATABASE_URL:"postgresql://redash"
REDASH_COOKIE_SECRET:veryverysecret
REDASH_GOOGLE_APPS_DOMAIN:
redis:
image: redis:2.8
postgres:
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/query_execution.rst
Expand Up @@ -34,7 +34,7 @@ When query execution is done, the result gets stored to
``query_results`` table. Also we check for all queries in the
``queries`` table that have the same query hash and update their
reference to the query result we just saved
(`code <https://github.com/EverythingMe/redash/blob/master/redash/models.py#L235>`__).
(`code <https://github.com/getredash/redash/blob/master/redash/models.py#L235>`__).

Client
------
Expand Down Expand Up @@ -69,7 +69,7 @@ Ideas on how to implement query parameters
Client side only implementation
-------------------------------

(This was actually implemented in. See pull request `#363 <https://github.com/EverythingMe/redash/pull/363>`__ for details.)
(This was actually implemented in. See pull request `#363 <https://github.com/getredash/redash/pull/363>`__ for details.)

The basic idea of how to implement parametized queries is to treat the
query as a template and merge it with parameters taken from query string
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/vagrant.rst
Expand Up @@ -13,7 +13,7 @@ To get started with this box:
1. Make sure you have recent version of
`Vagrant <https://www.vagrantup.com/>`__ installed.
2. Clone the re:dash repository:
``git clone https://github.com/EverythingMe/redash.git``.
``git clone https://github.com/getredash/redash.git``.
3. Change dir into the repository (``cd redash``) and run run
``vagrant up``. This might take some time the first time you run it,
as it downloads the Vagrant virtual box.
Expand Down
10 changes: 5 additions & 5 deletions docs/index.rst
Expand Up @@ -21,7 +21,7 @@ Features
Demo
####

.. figure:: https://raw.github.com/EverythingMe/redash/screenshots/screenshots.gif
.. figure:: https://raw.github.com/getredash/redash/screenshots/screenshots.gif
:alt: Screenshots

You can try out the demo instance: `http://demo.redash.io`_ (login with any Google account).
Expand All @@ -37,11 +37,11 @@ Getting Started
Getting Help
############

* Source: https://github.com/everythingme/redash
* Issues: https://github.com/everythingme/redash/issues
* Source: https://github.com/getredash/redash
* Issues: https://github.com/getredash/redash/issues
* Mailing List: https://groups.google.com/forum/#!forum/redash-users
* Gitter (chat): https://gitter.im/EverythingMe/redash
* Contact Arik, the maintainer directly: arik@everything.me.
* Gitter (chat): https://gitter.im/getredash/redash
* Contact Arik, the maintainer directly: arik@redash.io.

TOC
###
Expand Down
2 changes: 1 addition & 1 deletion docs/setup.rst
Expand Up @@ -2,7 +2,7 @@ Setting up re:dash instance
###########################

The `provisioning
script <https://github.com/EverythingMe/redash/blob/master/setup/bootstrap.sh>`__
script <https://github.com/getredash/redash/blob/master/setup/ubuntu/bootstrap.sh>`__
works on Ubuntu 12.04, Ubuntu 14.04 and Debian Wheezy. This script
installs all needed dependencies and creates basic setup.

Expand Down
2 changes: 1 addition & 1 deletion docs/upgrade.rst
Expand Up @@ -25,7 +25,7 @@ Even if you didn't use the image, it's very likely you can reuse most of
this script with small modifications. What this script does is:

1. Find the URL of the latest release tarball (from `GitHub releases
page <github.com/everythingme/redash/releases>`__).
page <github.com/getredash/redash/releases>`__).
2. Download it.
3. Create new directory for this version (for example:
``/opt/redash/redash.0.5.0.b685``).
Expand Down
12 changes: 0 additions & 12 deletions setup/Vagrantfile_debian

This file was deleted.

1 change: 1 addition & 0 deletions setup/amazon_linux/README.md
@@ -0,0 +1 @@
Bootstrap script for Amazon Linux AMI. *Not supported*, we recommend to use the Docker images instead.
Expand Up @@ -2,8 +2,7 @@
set -eu

REDASH_BASE_PATH=/opt/redash
FILES_BASE_URL=https://raw.githubusercontent.com/EverythingMe/redash/docs_setup/setup/files/
FILE_BASE_URL_FOR_AMAZON_LINUX=https://raw.githubusercontent.com/EverythingMe/redash/master/setup/files/
FILES_BASE_URL=https://raw.githubusercontent.com/getredash/redash/master/setup/amazon_linux/files/
# Verify running as root:
if [ "$(id -u)" != "0" ]; then
if [ $# -ne 0 ]; then
Expand Down Expand Up @@ -106,7 +105,7 @@ fi

# Install latest version
REDASH_VERSION=${REDASH_VERSION-0.6.3.b906}
LATEST_URL="https://github.com/EverythingMe/redash/releases/download/v${REDASH_VERSION}/redash.$REDASH_VERSION.tar.gz"
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
REDASH_TARBALL=/tmp/redash.tar.gz
Expand Down Expand Up @@ -178,7 +177,7 @@ fi


# Get supervisord startup script
sudo -u redash wget -O /opt/redash/supervisord/supervisord.conf $FILE_BASE_URL_FOR_AMAZON_LINUX"supervisord_for_amazon_linux.conf"
sudo -u redash wget -O /opt/redash/supervisord/supervisord.conf $FILES_BASE_URL"supervisord.conf"

# install start-stop-daemon
wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
Expand All @@ -187,7 +186,7 @@ cd apps/sys-utils/start-stop-daemon-IR1_9_18-2/
gcc start-stop-daemon.c -o start-stop-daemon
cp start-stop-daemon /sbin/

wget -O /etc/init.d/redash_supervisord $FILE_BASE_URL_FOR_AMAZON_LINUX"redash_supervisord_init_for_amazon_linux"
wget -O /etc/init.d/redash_supervisord $FILES_BASE_URL"redash_supervisord_init"
add_service "redash_supervisord"

# Nginx setup
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 52b8e98

Please sign in to comment.