These are chat archives for getredash/redash

14th
Jan 2016
Arik Fraimovich
@arikfr
Jan 14 2016 07:20
blob
@brentonmallen1 you mean something like this?
@tclass I'm testing the last 0.9.0 build to make sure it's stable, and once it looks like it is I will update the tag.
@tclass can you share how you got it running/what was the issue?
CarpeFridiem
@brentonmallen1
Jan 14 2016 13:49
@arikfr yes
Tobi
@tclass
Jan 14 2016 13:49
@arikfr: I setup the database with manage.py and created an admin user with sudo -u redash -E /opt/redash/current/manage.py users create --admin --password admin "Admin" "admin" don't really know what the role thing problem was. The way to go should be really to use docker instead of AMIs, it's really easy to use once the project is adjusted that way and you get lesser errors due to equality of environment the software is running on. Personally I would never just pump up a 3rd party AMI in my environment. just my 2 cents
Arik Fraimovich
@arikfr
Jan 14 2016 14:05
@brentonmallen1 well, plot.ly supports it (the charting library we use in latest version), so it shouldn't be too hard to add...
@tclass I would really love to fully switch docker containers, I just didn't have the chance to figure out how the upgrade will work. For the images we have the fabric script, that is mostly stable. If you have thoughts on that, I'll be happy to hear.
Tobi
@tclass
Jan 14 2016 14:25
ok, so I can explain a little bit more, what we did with docker+redash and what could be integrated in the project itself. We created a Dockerfile looking like this
 FROM redash/redash:latest

ADD setup.sh /usr/local/bin/setup.sh
CMD ["/usr/local/bin/setup.sh"]

the setup.sh file looked like this

#!/bin/bash

if [ ! -e "/opt/redash/init_done" ]; then
  echo "######################################"
  echo "# Running redash setup.sh            #"
  echo "######################################"
  echo "Waiting for redis and PostgreSQL ..."
  sleep 60
  echo "Creating Tables ..."
  sudo -u redash -E /opt/redash/current/manage.py database create_tables
  echo "Creating Admin user ..."
  sudo -u redash -E /opt/redash/current/manage.py users create --admin --password admin "Admin" "admin"
  echo "Creating run flag ..."
  touch /opt/redash/init_done
  echo "######################################"
  echo "# Redash setup.sh done               #"
  echo "######################################"
fi

echo "Starting supervisord ..."
supervisord -c /opt/redash/supervisord/supervisord.conf

This could be integrated in the project, but it would be nice to have something persistent in the database and ask postgres if we need to setup all the tables or just skip this part

CarpeFridiem
@brentonmallen1
Jan 14 2016 14:33
@arikfr is there any documentation with regards to the use of plot.ly? Our security guys have deemed it unusable due to it not meeting security requirements. Are you guys somehow using it locally on the instance (AWS in this case) or are you sending the data to them?
Arik Fraimovich
@arikfr
Jan 14 2016 14:35
@brentonmallen1 no, we use their charting library. no data is being sent to them (unless you click some button in the UI that shares the data on their website, we couldn't disable it).
@tclass improving database migrations (which will address the ability to know if creating tables is needed) is planned. but what about upgrades? running this every time the container starts feel unstable for me. It's better to be able to control when exactly the database migration are being run.
CarpeFridiem
@brentonmallen1
Jan 14 2016 14:37
@arikfr perfect, in that case the heatmap plot would be an amazing feature :) should I submit a request?
Tobi
@tclass
Jan 14 2016 14:42
but if you pull a newer version from the docker repo and the code needs a database migration then it should run immediately after the docker container start
and the container should always be stateless so you can start/stop it anytime you want
and you just have to run the migrations one time. Maybe I'm missing the problem here...
Arik Fraimovich
@arikfr
Jan 14 2016 14:44
it just that you don't have proper control over the migration execution, so if things fail it's not clear what to do.
Tobi
@tclass
Jan 14 2016 14:47
you could rollback the migrations and use the older docker image, until you know what the problem is. If it fails you don't have that many options anyway. I don't really know how you do it now with the fabric stuff though
amitkuagrawal
@amitkuagrawal
Jan 14 2016 16:26
Hi is it possible to trigger queries with refresh schedule
it seems to not pass on the query to the drill data source
@arikfr any idea on this or is my understanding incorrect ?
Arik Fraimovich
@arikfr
Jan 14 2016 18:21
@tclass someone needs to explicitly pull to update the latest image, right?
@amitkuagrawal I'm not sure I understood the question. Did you set a refresh schedule for the query?
amitkuagrawal
@amitkuagrawal
Jan 14 2016 19:27
@arikfr we set the update schedule but the queries went to postgre db and didnt trigger the drill query
is there a way i can set the ttl in the query indicating that result need not be stored in the postgres or the result get expired after the ttl ?
Arik Fraimovich
@arikfr
Jan 14 2016 20:23
@amitkuagrawal how often did you set it to refresh? maybe there is an error when the query runs? did you try refreshing it manually?
amitkuagrawal
@amitkuagrawal
Jan 14 2016 22:07
@arikfr we set it to run every 5 minutes. The query takes around 2 minutes to complete. The query runs perfectly the 1st time and produces the results correctly. SO i would say there is no error with the query itself. But during the scheduled execution I think the query is running but getting the result from the postgres directly (perhaps with the query id, etc.. it is finiding it in the postgres cache) and thats it. The query is run in redash is based on the assumption that the notification(baloon) comes in the screen and the result is the same.
when i say the query runs correctly the first time it means i can see the query in drill query profile but during the scheduled run we dont see the query being triggered from redash to the drill. In the drill query profile there are no new queries !