mirror of
https://github.com/apache/superset.git
synced 2026-05-08 01:15:46 +00:00
282 lines
13 KiB
HTML
282 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>Installation & Configuration — caravel documentation</title>
|
|
|
|
<link rel="stylesheet" href="_static/basic.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/bootstrap-3.3.4/css/bootstrap.min.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/bootstrap-3.3.4/css/bootstrap-theme.min.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/docs.css" type="text/css" />
|
|
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT: './',
|
|
VERSION: '',
|
|
COLLAPSE_INDEX: false,
|
|
FILE_SUFFIX: '.html',
|
|
HAS_SOURCE: true
|
|
};
|
|
</script>
|
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
|
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script>
|
|
<script type="text/javascript" src="_static/js/jquery-fix.js"></script>
|
|
<script type="text/javascript" src="_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
|
|
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
|
|
<link rel="top" title="caravel documentation" href="index.html" />
|
|
<link rel="next" title="User Guide" href="user_guide.html" />
|
|
<link rel="prev" title="Overview" href="index.html" />
|
|
<meta charset='utf-8'>
|
|
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
|
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
|
</head>
|
|
<body role="document">
|
|
|
|
<div id="navbar" class="navbar navbar-default ">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a class="navbar-brand" href="index.html">
|
|
Caravel Documentation</a>
|
|
<span class="navbar-text navbar-version pull-left"><b></b></span>
|
|
</div>
|
|
|
|
<div class="collapse navbar-collapse nav-collapse">
|
|
<ul class="nav navbar-nav">
|
|
|
|
|
|
<li class="dropdown globaltoc-container">
|
|
<a role="button"
|
|
id="dLabelGlobalToc"
|
|
data-toggle="dropdown"
|
|
data-target="#"
|
|
href="index.html">Topics <b class="caret"></b></a>
|
|
<ul class="dropdown-menu globaltoc"
|
|
role="menu"
|
|
aria-labelledby="dLabelGlobalToc"><ul class="current">
|
|
<li class="toctree-l1 current"><a class="current reference internal" href="">Installation & Configuration</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="user_guide.html">User Guide</a></li>
|
|
</ul>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a role="button"
|
|
id="dLabelLocalToc"
|
|
data-toggle="dropdown"
|
|
data-target="#"
|
|
href="#">Page <b class="caret"></b></a>
|
|
<ul class="dropdown-menu localtoc"
|
|
role="menu"
|
|
aria-labelledby="dLabelLocalToc"><ul>
|
|
<li><a class="reference internal" href="#">Installation & Configuration</a><ul>
|
|
<li><a class="reference internal" href="#getting-started">Getting Started</a></li>
|
|
<li><a class="reference internal" href="#os-dependencies">OS dependencies</a></li>
|
|
<li><a class="reference internal" href="#caravel-installation-and-initialization">Caravel installation and initialization</a></li>
|
|
<li><a class="reference internal" href="#configuration">Configuration</a></li>
|
|
<li><a class="reference internal" href="#caching">Caching</a></li>
|
|
<li><a class="reference internal" href="#druid">Druid</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="hidden-sm"></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<form class="navbar-form navbar-right" action="search.html" method="get">
|
|
<div class="form-group">
|
|
<input type="text" name="q" class="form-control" placeholder="Search" />
|
|
</div>
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="container mainbody">
|
|
|
|
<div class="section" id="installation-configuration">
|
|
<h1>Installation & Configuration<a class="headerlink" href="#installation-configuration" title="Permalink to this headline">¶</a></h1>
|
|
<div class="section" id="getting-started">
|
|
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h2>
|
|
<p>Caravel is currently only tested using Python 2.7.*. Python 3 support is
|
|
on the roadmap, Python 2.6 won’t be supported.</p>
|
|
</div>
|
|
<div class="section" id="os-dependencies">
|
|
<h2>OS dependencies<a class="headerlink" href="#os-dependencies" title="Permalink to this headline">¶</a></h2>
|
|
<p>Caravel stores database connection information in its metadata database.
|
|
For that purpose, we use the <code class="docutils literal"><span class="pre">cryptography</span></code> Python library to encrypt
|
|
connection passwords. Unfortunately this library has OS level dependencies.</p>
|
|
<p>You may want to attempt the next step
|
|
(“Caravel installation and initialization”) and come back to this step if
|
|
you encounter an error.</p>
|
|
<p>Here’s how to install them:</p>
|
|
<p>For <strong>Debian</strong> and <strong>Ubuntu</strong>, the following command will ensure that
|
|
the required dependencies are installed:</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span></span>sudo apt-get install build-essential libssl-dev libffi-dev python-dev
|
|
</pre></div>
|
|
</div>
|
|
<p>For <strong>Fedora</strong> and <strong>RHEL-derivatives</strong>, the following command will ensure
|
|
that the required dependencies are installed:</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span></span>sudo yum install gcc libffi-devel python-devel openssl-devel
|
|
</pre></div>
|
|
</div>
|
|
<p><strong>OSX</strong></p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span></span>brew install pkg-config libffi openssl
|
|
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
|
|
</pre></div>
|
|
</div>
|
|
<p><strong>Windows</strong> isn’t officially supported at this point, but if you want to
|
|
attempt it:</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span></span>C:\> \path\to\vcvarsall.bat x86_amd64
|
|
C:\> set LIB=C:\OpenSSL-1.0.1f-64bit\lib;%LIB%
|
|
C:\> set INCLUDE=C:\OpenSSL-1.0.1f-64bit\include;%INCLUDE%
|
|
C:\> pip install cryptography
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="caravel-installation-and-initialization">
|
|
<h2>Caravel installation and initialization<a class="headerlink" href="#caravel-installation-and-initialization" title="Permalink to this headline">¶</a></h2>
|
|
<p>Follow these few simple steps to install Caravel.:</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span></span># Install caravel
|
|
pip install caravel
|
|
|
|
# Create an admin user
|
|
fabmanager create-admin --app caravel
|
|
|
|
# Initialize the database
|
|
caravel db upgrade
|
|
|
|
# Create default roles and permissions
|
|
caravel init
|
|
|
|
# Load some data to play with
|
|
caravel load_examples
|
|
|
|
# Start the development web server
|
|
caravel runserver -d
|
|
</pre></div>
|
|
</div>
|
|
<p>After installation, you should be able to point your browser to the right
|
|
hostname:port [http://localhost:8088](http://localhost:8088), login using
|
|
the credential you entered while creating the admin account, and navigate to
|
|
<cite>Menu -> Admin -> Refresh Metadata</cite>. This action should bring in all of
|
|
your datasources for Caravel to be aware of, and they should show up in
|
|
<cite>Menu -> Datasources</cite>, from where you can start playing with your data!</p>
|
|
</div>
|
|
<div class="section" id="configuration">
|
|
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
|
|
<p>To configure your application, you need to create a file (module)
|
|
<code class="docutils literal"><span class="pre">caravel_config.py</span></code> and make sure it is in your PYTHONPATH. Here are some
|
|
of the parameters you can copy / paste in that configuration module:</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="c1">#---------------------------------------------------------</span>
|
|
<span class="c1"># Caravel specifix config</span>
|
|
<span class="c1">#---------------------------------------------------------</span>
|
|
<span class="n">ROW_LIMIT</span> <span class="o">=</span> <span class="mi">5000</span>
|
|
<span class="n">WEBSERVER_THREADS</span> <span class="o">=</span> <span class="mi">8</span>
|
|
|
|
<span class="n">CARAVEL_WEBSERVER_PORT</span> <span class="o">=</span> <span class="mi">8088</span>
|
|
<span class="c1">#---------------------------------------------------------</span>
|
|
|
|
<span class="c1">#---------------------------------------------------------</span>
|
|
<span class="c1"># Flask App Builder configuration</span>
|
|
<span class="c1">#---------------------------------------------------------</span>
|
|
<span class="c1"># Your App secret key</span>
|
|
<span class="n">SECRET_KEY</span> <span class="o">=</span> <span class="s1">'</span><span class="se">\2\1</span><span class="s1">thisismyscretkey</span><span class="se">\1\2</span><span class="s1">\e\y\y\h'</span>
|
|
|
|
<span class="c1"># The SQLAlchemy connection string to your database backend</span>
|
|
<span class="c1"># This connection defines the path to the database that stores your</span>
|
|
<span class="c1"># caravel metadata (slices, connections, tables, dashboards, ...).</span>
|
|
<span class="c1"># Note that the connection information to connect to the datasources</span>
|
|
<span class="c1"># you want to explore are managed directly in the web UI</span>
|
|
<span class="n">SQLALCHEMY_DATABASE_URI</span> <span class="o">=</span> <span class="s1">'sqlite:////tmp/caravel.db'</span>
|
|
|
|
<span class="c1"># Flask-WTF flag for CSRF</span>
|
|
<span class="n">CSRF_ENABLED</span> <span class="o">=</span> <span class="bp">True</span>
|
|
|
|
<span class="c1"># Whether to run the web server in debug mode or not</span>
|
|
<span class="n">DEBUG</span> <span class="o">=</span> <span class="bp">True</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>This file also allows you to define configuration parameters used by
|
|
Flask App Builder, the web framework used by Caravel. Please consult
|
|
the <a class="reference external" href="http://flask-appbuilder.readthedocs.org/en/latest/config.html">Flask App Builder Documentation</a>
|
|
for more information on how to configure Caravel.</p>
|
|
</div>
|
|
<div class="section" id="caching">
|
|
<h2>Caching<a class="headerlink" href="#caching" title="Permalink to this headline">¶</a></h2>
|
|
<p>Caravel uses <a class="reference external" href="https://pythonhosted.org/Flask-Cache/">Flask-Cache</a> for
|
|
caching purpose. Configuring your caching backend is as easy as providing
|
|
a <code class="docutils literal"><span class="pre">CACHE_CONFIG</span></code>, constant in your <code class="docutils literal"><span class="pre">caravel_config.py</span></code> that
|
|
complies with the Flask-Cache specifications.</p>
|
|
<p>Flask-Cache supports multiple caching backends (Redis, Memcache,
|
|
SimpleCache (in-memory), or the local filesystem).</p>
|
|
<p>For setting your timeouts, this is done in the Caravel metadata and goes
|
|
up the “timeout searchpath”, from your slice configuration, to your
|
|
data source’s configuration, to your database’s and ultimately falls back
|
|
into your global default defined in <code class="docutils literal"><span class="pre">CACHE_CONFIG</span></code>.</p>
|
|
</div>
|
|
<div class="section" id="druid">
|
|
<h2>Druid<a class="headerlink" href="#druid" title="Permalink to this headline">¶</a></h2>
|
|
<ul>
|
|
<li><dl class="first docutils">
|
|
<dt>From the UI, enter the information about your clusters in the</dt>
|
|
<dd><p class="first last"><code class="docutils literal"><span class="pre">Admin->Clusters</span></code> menu by hitting the + sign.</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt>Once the Druid cluster connection information is entered, hit the</dt>
|
|
<dd><p class="first last"><code class="docutils literal"><span class="pre">Admin->Refresh</span> <span class="pre">Metadata</span></code> menu item to populate</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><p class="first">Navigate to your datasources</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<footer class="footer">
|
|
<div class="container">
|
|
<p class="pull-right">
|
|
<a href="#">Back to top</a>
|
|
|
|
</p>
|
|
<p>
|
|
© Copyright 2015, Maxime Beauchemin, Airbnb.<br/>
|
|
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.6.<br/>
|
|
</p>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html> |