Redash 5 with oracle configuration [Docker]


#1

please i need your help with configuring redash with oracle , i think i have tried almost everything but there is no way i have found oracle at the front end of redash as data source . It will be much appreciable if you point me out where im doing wrong.

configuration process :

git clone https://github.com/getredash/redash.git
cd redash/
docker build -t redash_oracle
docker-compose -f docker-compose.yml run --rm server create_db
docker-compose -f docker-compose.yml up -d
**Dockerfile config**

FROM redash/base:latest

# Controls whether to install extra dependencies needed for all data sources.

ARG skip_ds_deps

ENV ORACLE_HOME=/usr/lib/oracle/12.2/client64

ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

ENV PATH=$PATH:$ORACLE_HOME/bin

ENV REDASH_ADDITIONAL_QUERY_RUNNERS=redash.query_runner.oracle

# We first copy only the requirements file, to avoid rebuilding on every file

# change.

COPY requirements.txt requirements_dev.txt requirements_all_ds.txt ./

RUN pip install -r requirements.txt -r requirements_dev.txt

RUN if [ "x$skip_ds_deps" = "x" ] ; then pip install -r requirements_all_ds.txt ; else echo "Skipping pip install -r requirements_all_ds.txt" ; fi

COPY . ./

RUN npm install && npm run bundle && npm run build && rm -rf node_modules

RUN chown -R redash /app

USER redash

ENTRYPOINT ["/app/bin/docker-entrypoint"]

CMD ["server"]


docker-compose.yml
version: '2'
services:
  server:
    image: redash_oracle
    command: server
    depends_on:
      - postgres
      - redis
    ports:
      - "5000:5000"
    environment:
      PYTHONUNBUFFERED: 0
      REDASH_LOG_LEVEL: "INFO"
      REDASH_REDIS_URL: "redis://redis:6379/0"
      REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
      REDASH_COOKIE_SECRET: veryverysecret
      REDASH_WEB_WORKERS: 4
    restart: always
  worker:
    image: redash_oracle
    command: scheduler
    environment:
      PYTHONUNBUFFERED: 0
      REDASH_LOG_LEVEL: "INFO"
      REDASH_REDIS_URL: "redis://redis:6379/0"
      REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
      QUEUES: "queries,scheduled_queries,celery"
      WORKERS_COUNT: 2
    restart: always
  redis:
    image: redis:3.0-alpine
    restart: always
  postgres:
    image: postgres:9.5.6-alpine
    # volumes:
    #   - /opt/postgres-data:/var/lib/postgresql/data
    restart: always
  nginx:
    image: redash/nginx:latest
    ports:
      - "80:80"
    depends_on:
      - server
    links:
      - server:redash
    restart: always

#2

Excerpt when I configured redash3 with Oracle, maybe could be help you… have a good day.

#INICIO - CONFIGURACION DE ORACLE EN REDASH
ADD oracle/instantclient-basic-linux.x64-11.2.0.4.0.zip /tmp/instantclient-basic-linux.x64-11.2.0.4.0.zip
ADD oracle/instantclient-sdk-linux.x64-11.2.0.4.0.zip /tmp/instantclient-sdk-linux.x64-11.2.0.4.0.zip
ADD oracle/instantclient-sqlplus-linux.x64-11.2.0.4.0.zip /tmp/instantclient-sqlplus-linux.x64-11.2.0.4.0.zip
RUN apt-get update -y
RUN apt-get install -y unzip libaio-dev
RUN unzip /tmp/instantclient-basic-linux.x64-11.2.0.4.0.zip -d /usr/local/
RUN unzip /tmp/instantclient-sdk-linux.x64-11.2.0.4.0.zip -d /usr/local/

RUN unzip /tmp/instantclient-sqlplus-linux.x64-11.2.0.4.0.zip -d /usr/local/
RUN ln -s /usr/local/instantclient_11_2 /usr/local/instantclient
RUN ln -s /usr/local/instantclient/libclntsh.so.11.1 /usr/local/instantclient/libclntsh.so
RUN ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus
#RUN apt-get install libaio-dev -y
RUN apt-get clean -y
ENV ORACLE_HOME=/usr/local/instantclient
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/instantclient
RUN pip install cx_Oracle==5.2.1
ENV REDASH_ADDITIONAL_QUERY_RUNNERS=redash.query_runner.oracle
#FIN - CONFIGURACION DE ORACLE EN REDASH

RUN pip install --upgrade pip
COPY requirements.txt requirements_all_ds.txt ./
RUN pip install -r requirements_all_ds.txt
RUN pip install -r requirements.txt
COPY . ./
RUN npm config set cafile “/usr/local/share/ca-certificates/ca.crt”
RUN npm install && npm run build && rm -rf node_modules
RUN chown -R redash /app
USER redash
ENV REDASH_ADDITIONAL_QUERY_RUNNERS=redash.query_runner.oracle
ENV REDASH_MAIL_SERVER=“smtp.gmail.com