<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>data Archives | Clever Cloud</title>
	<atom:link href="https://stagingv6.cleverapps.io/blog/tag/data/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>From Code to Product</description>
	<lastBuildDate>Thu, 07 Nov 2024 15:12:50 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>data Archives | Clever Cloud</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Enabling PromQL queries with Erlenmeyer</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2021/10/12/enabling-promql-queries-with-erlenmeyer/</link>
		
		<dc:creator><![CDATA[Aurélien Hebert]]></dc:creator>
		<pubDate>Tue, 12 Oct 2021 07:28:09 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[observability]]></category>
		<category><![CDATA[prometheus]]></category>
		<category><![CDATA[warp10]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/?p=3031</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="erlenmeyer-promql banner" decoding="async" fetchpriority="high" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1-1368x528.jpg 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><div>You are using Clever Cloud to deploy <strong>applications runtimes</strong> or <strong>add-ons</strong>. But do you know that all Clever Cloud services are producing <strong>metrics?</strong> And that <a href="https://stagingv6.cleverapps.io/doc/administrate/metrics/overview/">you already have&nbsp;<strong>access</strong> to all of them</a>? Indeed, we register an <strong>agent</strong> on our side, whose job is to collect all local data.<span id="more-3031"></span>Once it's done, they are stored in a Time Series database called <strong><a href="https://www.warp10.io/">Warp10</a></strong>.</div>
<div><img class="alignleft wp-image-3049 size-full" src="https://cdn.clever-cloud.com/uploads/2021/08/erlenmeyer_logo.png" alt="Erlenmeyer logo" width="643" height="205">
<div>
<div>To simplify the adoption of Warp10, the OVHcloud Metrics team built the <strong><a href="https://github.com/ovh/erlenmeyer">Erlenmeyer</a></strong> tool. In the first place, this tool enables the use of <strong>several open source protocols</strong> as PromQL, OpenTSDB, InfluxQL or Graphite to query Warp10 stored metrics.</div>
<div>Secondly, Erlenmeyer works as a proxy in front of a Warp10 cluster. Then we deployed a couple of&nbsp;Erlenmeyer instances in front of our Warp10 infrastructure, naturally providing new ways to query your application metrics.</div>
</div>
<blockquote>In this post, we will review what Erlenmeyer brings and how to handle Clever Cloud services metrics with <strong>PromQL</strong>.</blockquote>
</div>
<div>
<h2>Erlenmeyer protocols</h2>
<div>
<div>Erlenmeyer almost entirely enables <a href="https://www.ovh.com/blog/erlenmeyer-and-promql-compatibility/">PromQL queries</a>, OpenTSDB, InfluxQL and some of the Graphite functions. Moreover, you can retrieve the documentation about each protocol implementation and usage on Erlenmeyer's GitHub:</div>
<ul>
 	<li><a href="https://github.com/ovh/erlenmeyer/blob/master/doc/promql.md">PromQL</a></li>
 	<li><a href="https://github.com/ovh/erlenmeyer/blob/master/doc/openTSDB.md">OpenTSDB</a></li>
 	<li><a href="https://github.com/ovh/erlenmeyer/blob/master/doc/influxql.md">InfluxQL</a></li>
 	<li><a href="https://github.com/ovh/erlenmeyer/blob/master/doc/graphite.md">Graphite</a></li>
</ul>
On Clever Cloud, we deployed an <code>Erlenmeyer</code> in front of our Warp10 backend. This means <strong>all</strong> these <strong>open source protocols</strong> can be used to query our application Metrics. The <strong>host</strong> is <code>https://PROTO-c1-warp10-clevercloud-customers.services.clever-cloud.com/PROTO</code> with <code>PROTO</code> being:

</div>
<div>
<div>
<ul>
 	<li>for PromQL: <code>prometheus</code>,</li>
 	<li>for OpenTSDB: <code>opentsdb</code>,</li>
 	<li>for InfluxQL: <code>influxql</code>,</li>
 	<li>for Graphite: <code>graphite</code>.</li>
</ul>
<div>To authenticate your request, you need to use the Warp10 READ TOKEN as the password of the basic authentication. You can find it in the metrics panel of any Clever Cloud application:</div>
<div></div>
<div></div>
<div>
<div><img class="aligncenter wp-image-3059 size-full" src="https://cdn.clever-cloud.com/uploads/2021/09/Token.png" alt="Metrics token in the console" width="858" height="359"></div>
<div></div>
</div>
</div>
</div>
<div></div>
<div>
<div>
<div>
<div>
<h2>Retrieve the memory data with PromQL</h2>
<div>As a first step, let's store the Warp10 <code>READ TOKEN</code> and an <code>APP_ID</code> as an <strong>environment variable</strong>:</div>
</div>
<div></div>
</div>
<div>
<div>
<pre><code class="language-shell">export TOKEN=MY_AWESOME_TOKEN # Replace the value by your Clever Cloud Warp10 token
export APP_ID=app_test # Replace the value by one of your own Clever Cloud application
</code></pre>
</div>
</div>
</div>
<div>
<h3>Get raw data</h3>
</div>
<div>
<div>
<div>
<div>To retrieve the <code>mem.used_percent</code> in <strong>PromQL</strong>, we need to send an <code>HTTP GET</code> request to Erlenmeyer, with the TOKEN as basic AUTH. In that case, the PromQL <code>GET</code> request requires four parameters: query, start, end and step. Similarly, to learn more about the PromQL language, you can read the <a href="https://prometheus.io/docs/prometheus/latest/querying/basics/">Prometheus documentation</a>. In our case we will create a simple query to get the raw data:</div>
</div>
</div>
</div>
<div>
<div>
<div>
<pre><code class="language-shell">api/v1/query_range?
query=mem.used_percent{app_id="$APP_ID"}&amp;
start=1623289800&amp;
end=1623311400&amp;
step=120s</code></pre>
</div>
<div>
<div>The <code>query</code> parameter is used for the PromQL queries: <code>start</code> and <code>end</code> are milliseconds timestamps corresponding to the time limit to get data. And the <code>step</code> one is the <strong>sampling</strong> parameter.</div>
<div>As data are collected around every minute, let's set at least twice the duration:&nbsp;<code>120s</code>.</div>
<div></div>
<div>Now, to get the result, execute the following <code>cURL</code> <strong>url encoded</strong>:</div>
<div></div>
</div>
<pre><code class="language-shell">curl --request GET --url "https://u:${TOKEN}@prometheus-c1-warp10-clevercloud-customers.services.clever-cloud.com/prometheus/api/v1/query_range?query=mem.used_percent%7Bapp_id%3D%22${APP_ID}%22%7D&amp;start=1623289800&amp;end=1623311400&amp;step=120s" --header 'Content-Type: application/json'
</code></pre>
<div>
<div>
<h3>Group by example</h3>
A group by query can be useful in the Clever Cloud case to merge some series (multiple deployments or instances). Thus we will <strong>group</strong> data based on the <code>app_id</code> labels in the following example.
<div>We will re-use the stored variable <code>READ_TOKEN</code>&nbsp; and <code>APP_ID</code>. To compute a group by in our case we apply the <code>max</code> PromQL <strong>function</strong> grouped by the series <code>app_id</code> label:</div>
<div></div>
</div>
<pre><code class="language-shell">api/v1/query_range?
query=max(mem.used_percent{app_id="$APP_ID"}) by (app_id)&amp;
start=1623289800&amp;
end=1623311400&amp;
step=120s
</code></pre>
<div>
<div>Finally to get the result, execute the following <code>cURL</code> <strong>url encoded</strong>:</div>
<div></div>
<pre><code class="language-shell">curl --request GET --url "https://u:${TOKEN}@prometheus-c1-warp10-clevercloud-customers.services.clever-cloud.com/prometheus/api/v1/query_range?query=max(mem.used_percent%7Bapp_id%3D%22${APP_ID}%22%7D)%20by%20(app_id)&amp;start=1623289800&amp;end=1623311400&amp;step=120s" --header 'Content-Type: application/json'
</code></pre>
</div>
</div>
<div>
<div>
<h2>Grafana PromQL data source</h2>
You may use <a href="https://grafana.com/">Grafana</a> to create you own dashboards, which is an open source interactive visualisation web application (to deploy a Grafana as a Clever Cloud application, we provide a <a href="https://github.com/CleverCloud/grafana-example">github example</a> and you can also follow this <a href="https://blog.kbdev.io/dev/2021/08/24/grafana-clevercloud.html">French blog post</a>). Of course you can configure a <strong>PromQL</strong> <strong>data source</strong> to get Clever Cloud applications metrics:

</div>
<ul>
 	<li>create a <strong>Prometheus</strong> source,</li>
 	<li>then set Prometheus source <strong>host</strong> to <code>https://prometheus-c1-warp10-clevercloud-customers.services.clever-cloud.com/prometheus</code>,</li>
 	<li>in addition activate the<strong> basic authentication</strong> with a <strong>user</strong> set to <code>metrics</code> and a <strong>password</strong> containing your <code>read Warp10 token</code>,</li>
 	<li>to conclude, click on <code>Save and Test</code>, your Prometheus data source should now be working!</li>
</ul>
</div>
</div>
<div>
<div>
<div>
<div>
<div><img class="aligncenter wp-image-3076 size-full" src="https://cdn.clever-cloud.com/uploads/2021/09/PromQL_source_grafana.png" alt="PromQL Grafana data source configuration" width="773" height="781"></div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<h2>Prometheus UI with remote_read endpoint</h2>
Like with Grafana, you can use <a href="https://prometheus.io/docs/introduction/overview/">Prometheus</a> and plot Clever Cloud metrics in the <strong>Web UI</strong>. And as a matter of fact, simply fill your Prometheus <strong>configuration</strong> with a <strong>remote_read</strong> source:
<pre><code class="language-yaml">api/v1/query_range?
remote_read:
  - url: "https://prometheus-c1-warp10-clevercloud-customers.services.clever-cloud.com/prometheus/remote_read/"
  basic_auth:
    username: "metrics"
    password: "TOKEN"
</code></pre>
<div></div>
<div>Restart Prometheus, then simply execute a Prometheus query in the UI as below:</div>
<pre><code class="language-shell">{ __name__= "mem.used_percent", app_id="$APP_ID" }
</code></pre>
<div>Our backend is able to correctly resolve <code>.</code>&nbsp; which are invalid prometheus characters. Nonetheless the backend response will always translate those <code>.</code> values in series data (name or labels) into valid <code>_</code>.</div>
</div>
<h2>To Sum Up</h2>
As you can see with this post, you can get metrics of Clever Cloud applications and add-ons. Presently you now have <strong>one more way</strong> to query them, as Erlenmeyer allows the use of <code>PromQL</code>. However the drawback is that you will have to <strong>update regularly your token</strong>, as they expire in a few days. We are working on a solution to improve the user experience. First, we will soon provide our customers with access to a <strong>Grafana</strong> with <strong>configured data source and already pre-filled dashboards</strong>. The <strong>token</strong> will be handled on our side and you will then be able to build your own graphs with <code>PromQL</code> or <code>WarpScript</code> queries.

</div>
</div>
</div>]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="erlenmeyer-promql banner" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/10/erlenmeyer-promql-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><div>You are using Clever Cloud to deploy <strong>applications runtimes</strong> or <strong>add-ons</strong>. But do you know that all Clever Cloud services are producing <strong>metrics?</strong> And that <a href="https://stagingv6.cleverapps.io/doc/administrate/metrics/overview/">you already have&nbsp;<strong>access</strong> to all of them</a>? Indeed, we register an <strong>agent</strong> on our side, whose job is to collect all local data.<span id="more-3031"></span>Once it's done, they are stored in a Time Series database called <strong><a href="https://www.warp10.io/">Warp10</a></strong>.</div>
<div><img class="alignleft wp-image-3049 size-full" src="https://cdn.clever-cloud.com/uploads/2021/08/erlenmeyer_logo.png" alt="Erlenmeyer logo" width="643" height="205">
<div>
<div>To simplify the adoption of Warp10, the OVHcloud Metrics team built the <strong><a href="https://github.com/ovh/erlenmeyer">Erlenmeyer</a></strong> tool. In the first place, this tool enables the use of <strong>several open source protocols</strong> as PromQL, OpenTSDB, InfluxQL or Graphite to query Warp10 stored metrics.</div>
<div>Secondly, Erlenmeyer works as a proxy in front of a Warp10 cluster. Then we deployed a couple of&nbsp;Erlenmeyer instances in front of our Warp10 infrastructure, naturally providing new ways to query your application metrics.</div>
</div>
<blockquote>In this post, we will review what Erlenmeyer brings and how to handle Clever Cloud services metrics with <strong>PromQL</strong>.</blockquote>
</div>
<div>
<h2>Erlenmeyer protocols</h2>
<div>
<div>Erlenmeyer almost entirely enables <a href="https://www.ovh.com/blog/erlenmeyer-and-promql-compatibility/">PromQL queries</a>, OpenTSDB, InfluxQL and some of the Graphite functions. Moreover, you can retrieve the documentation about each protocol implementation and usage on Erlenmeyer's GitHub:</div>
<ul>
 	<li><a href="https://github.com/ovh/erlenmeyer/blob/master/doc/promql.md">PromQL</a></li>
 	<li><a href="https://github.com/ovh/erlenmeyer/blob/master/doc/openTSDB.md">OpenTSDB</a></li>
 	<li><a href="https://github.com/ovh/erlenmeyer/blob/master/doc/influxql.md">InfluxQL</a></li>
 	<li><a href="https://github.com/ovh/erlenmeyer/blob/master/doc/graphite.md">Graphite</a></li>
</ul>
On Clever Cloud, we deployed an <code>Erlenmeyer</code> in front of our Warp10 backend. This means <strong>all</strong> these <strong>open source protocols</strong> can be used to query our application Metrics. The <strong>host</strong> is <code>https://PROTO-c1-warp10-clevercloud-customers.services.clever-cloud.com/PROTO</code> with <code>PROTO</code> being:

</div>
<div>
<div>
<ul>
 	<li>for PromQL: <code>prometheus</code>,</li>
 	<li>for OpenTSDB: <code>opentsdb</code>,</li>
 	<li>for InfluxQL: <code>influxql</code>,</li>
 	<li>for Graphite: <code>graphite</code>.</li>
</ul>
<div>To authenticate your request, you need to use the Warp10 READ TOKEN as the password of the basic authentication. You can find it in the metrics panel of any Clever Cloud application:</div>
<div></div>
<div></div>
<div>
<div><img class="aligncenter wp-image-3059 size-full" src="https://cdn.clever-cloud.com/uploads/2021/09/Token.png" alt="Metrics token in the console" width="858" height="359"></div>
<div></div>
</div>
</div>
</div>
<div></div>
<div>
<div>
<div>
<div>
<h2>Retrieve the memory data with PromQL</h2>
<div>As a first step, let's store the Warp10 <code>READ TOKEN</code> and an <code>APP_ID</code> as an <strong>environment variable</strong>:</div>
</div>
<div></div>
</div>
<div>
<div>
<pre><code class="language-shell">export TOKEN=MY_AWESOME_TOKEN # Replace the value by your Clever Cloud Warp10 token
export APP_ID=app_test # Replace the value by one of your own Clever Cloud application
</code></pre>
</div>
</div>
</div>
<div>
<h3>Get raw data</h3>
</div>
<div>
<div>
<div>
<div>To retrieve the <code>mem.used_percent</code> in <strong>PromQL</strong>, we need to send an <code>HTTP GET</code> request to Erlenmeyer, with the TOKEN as basic AUTH. In that case, the PromQL <code>GET</code> request requires four parameters: query, start, end and step. Similarly, to learn more about the PromQL language, you can read the <a href="https://prometheus.io/docs/prometheus/latest/querying/basics/">Prometheus documentation</a>. In our case we will create a simple query to get the raw data:</div>
</div>
</div>
</div>
<div>
<div>
<div>
<pre><code class="language-shell">api/v1/query_range?
query=mem.used_percent{app_id="$APP_ID"}&amp;
start=1623289800&amp;
end=1623311400&amp;
step=120s</code></pre>
</div>
<div>
<div>The <code>query</code> parameter is used for the PromQL queries: <code>start</code> and <code>end</code> are milliseconds timestamps corresponding to the time limit to get data. And the <code>step</code> one is the <strong>sampling</strong> parameter.</div>
<div>As data are collected around every minute, let's set at least twice the duration:&nbsp;<code>120s</code>.</div>
<div></div>
<div>Now, to get the result, execute the following <code>cURL</code> <strong>url encoded</strong>:</div>
<div></div>
</div>
<pre><code class="language-shell">curl --request GET --url "https://u:${TOKEN}@prometheus-c1-warp10-clevercloud-customers.services.clever-cloud.com/prometheus/api/v1/query_range?query=mem.used_percent%7Bapp_id%3D%22${APP_ID}%22%7D&amp;start=1623289800&amp;end=1623311400&amp;step=120s" --header 'Content-Type: application/json'
</code></pre>
<div>
<div>
<h3>Group by example</h3>
A group by query can be useful in the Clever Cloud case to merge some series (multiple deployments or instances). Thus we will <strong>group</strong> data based on the <code>app_id</code> labels in the following example.
<div>We will re-use the stored variable <code>READ_TOKEN</code>&nbsp; and <code>APP_ID</code>. To compute a group by in our case we apply the <code>max</code> PromQL <strong>function</strong> grouped by the series <code>app_id</code> label:</div>
<div></div>
</div>
<pre><code class="language-shell">api/v1/query_range?
query=max(mem.used_percent{app_id="$APP_ID"}) by (app_id)&amp;
start=1623289800&amp;
end=1623311400&amp;
step=120s
</code></pre>
<div>
<div>Finally to get the result, execute the following <code>cURL</code> <strong>url encoded</strong>:</div>
<div></div>
<pre><code class="language-shell">curl --request GET --url "https://u:${TOKEN}@prometheus-c1-warp10-clevercloud-customers.services.clever-cloud.com/prometheus/api/v1/query_range?query=max(mem.used_percent%7Bapp_id%3D%22${APP_ID}%22%7D)%20by%20(app_id)&amp;start=1623289800&amp;end=1623311400&amp;step=120s" --header 'Content-Type: application/json'
</code></pre>
</div>
</div>
<div>
<div>
<h2>Grafana PromQL data source</h2>
You may use <a href="https://grafana.com/">Grafana</a> to create you own dashboards, which is an open source interactive visualisation web application (to deploy a Grafana as a Clever Cloud application, we provide a <a href="https://github.com/CleverCloud/grafana-example">github example</a> and you can also follow this <a href="https://blog.kbdev.io/dev/2021/08/24/grafana-clevercloud.html">French blog post</a>). Of course you can configure a <strong>PromQL</strong> <strong>data source</strong> to get Clever Cloud applications metrics:

</div>
<ul>
 	<li>create a <strong>Prometheus</strong> source,</li>
 	<li>then set Prometheus source <strong>host</strong> to <code>https://prometheus-c1-warp10-clevercloud-customers.services.clever-cloud.com/prometheus</code>,</li>
 	<li>in addition activate the<strong> basic authentication</strong> with a <strong>user</strong> set to <code>metrics</code> and a <strong>password</strong> containing your <code>read Warp10 token</code>,</li>
 	<li>to conclude, click on <code>Save and Test</code>, your Prometheus data source should now be working!</li>
</ul>
</div>
</div>
<div>
<div>
<div>
<div>
<div><img class="aligncenter wp-image-3076 size-full" src="https://cdn.clever-cloud.com/uploads/2021/09/PromQL_source_grafana.png" alt="PromQL Grafana data source configuration" width="773" height="781"></div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<h2>Prometheus UI with remote_read endpoint</h2>
Like with Grafana, you can use <a href="https://prometheus.io/docs/introduction/overview/">Prometheus</a> and plot Clever Cloud metrics in the <strong>Web UI</strong>. And as a matter of fact, simply fill your Prometheus <strong>configuration</strong> with a <strong>remote_read</strong> source:
<pre><code class="language-yaml">api/v1/query_range?
remote_read:
  - url: "https://prometheus-c1-warp10-clevercloud-customers.services.clever-cloud.com/prometheus/remote_read/"
  basic_auth:
    username: "metrics"
    password: "TOKEN"
</code></pre>
<div></div>
<div>Restart Prometheus, then simply execute a Prometheus query in the UI as below:</div>
<pre><code class="language-shell">{ __name__= "mem.used_percent", app_id="$APP_ID" }
</code></pre>
<div>Our backend is able to correctly resolve <code>.</code>&nbsp; which are invalid prometheus characters. Nonetheless the backend response will always translate those <code>.</code> values in series data (name or labels) into valid <code>_</code>.</div>
</div>
<h2>To Sum Up</h2>
As you can see with this post, you can get metrics of Clever Cloud applications and add-ons. Presently you now have <strong>one more way</strong> to query them, as Erlenmeyer allows the use of <code>PromQL</code>. However the drawback is that you will have to <strong>update regularly your token</strong>, as they expire in a few days. We are working on a solution to improve the user experience. First, we will soon provide our customers with access to a <strong>Grafana</strong> with <strong>configured data source and already pre-filled dashboards</strong>. The <strong>token</strong> will be handled on our side and you will then be able to build your own graphs with <code>PromQL</code> or <code>WarpScript</code> queries.

</div>
</div>
</div>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to deploy Apache Superset on Clever Cloud</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2021/05/04/how-to-deploy-apache-superset-on-clever-cloud/</link>
		
		<dc:creator><![CDATA[Aurélien Hebert]]></dc:creator>
		<pubDate>Tue, 04 May 2021 09:15:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2021/05/04/how-to-deploy-apache-superset-on-clever-cloud/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>At Clever Cloud we manage most of our own data and when we want to gather a particular information, we open our SQL interpreter and query all the things manually. This somehow worked because most of us are technical but it's not necessary the case anymore. So we want a nice dashboarding solution to make data available in a nicer way. This is how we came to try Superset.

<span id="more-2834"></span>

What is Superset? In their own words:
<blockquote>Superset is fast, lightweight, intuitive, and loaded with options that make it easy for users of all skill sets to explore and visualize their data.</blockquote>
You can configure different sort of visualizations from simple line charts to highly detailed geo-spatial charts and organize them in dashboard. Take a look at <a href="https://superset.apache.org/">their documentation</a> to grasp the full extent of what you can do.
<h2 id="how-to-deploy-superset">How to deploy Superset</h2>
Superset is written in Python and requires a PostgreSQL database. In Clever Cloud terms it means you will need to create a brand <a href="https://stagingv6.cleverapps.io/doc/deploy/application/python/python_apps/">new Python runtime</a> with a <a href="https://stagingv6.cleverapps.io/doc/deploy/addon/postgresql/">PostgreSQL addon</a>.
<pre><code class="language-bash"># Clone last superset release
git clone --depth 1 -b 0.38.1  https://github.com/apache/superset.git

# Move in superset repository
cd superset

# Create the python application
clever create --type python Superset

# Create the PostgreSQL instance                                
clever addon create postgresql-addon --plan m SupersetPG
    
# link the addon 
clever service link-addon SupersetPG
</code></pre>
Once the application is created, edit it's information. As you need to build Superset backend and frontend, you need to enable a <a href="https://stagingv6.cleverapps.io/doc/administrate/apps-management/#edit-application-configuration">dedicated build instance</a>, select the <code>L</code> one. Don't foget to save the update.
<h3 id="superset-environment">Superset environment</h3>
Set the following environment, <code>YOUR_APP_ID</code> corresponds to your own application id, <code>A_SECRET_KEY</code> is a random secret key you choose, and <code>AN_ADMIN_PASSWORD</code> will be the admin password for the superset application:
<pre><code class="language-bash"># Use gunicorn as python mode 
clever env set CC_PYTHON_BACKEND gunicorn

# Start the app using create_app() 
clever env set CC_PYTHON_MODULE superset.app:create_app()

# Python version to use
clever env set CC_PYTHON_VERSION 3.7

# Load all superset requirements
clever env set CC_PIP_REQUIREMENTS_FILE requirements/base.txt

# Application port
clever env set PORT 8080

# PYTHONPATH
clever env set PYTHONPATH /home/bas/YOUR_APP_ID/config/

# App secret key
clever env set SECRET_KEY A_SECRET_KEY

# Post build commands
clever env set CC_POST_BUILD_HOOK ./init.sh

# Superset admin password
clever env set ADMIN_PASSWORD AN_ADMIN_PASSWORD
</code></pre>
<h3 id="configure-superset">Configure superset</h3>
Superset need a local config python file. Wrote locally a <code>clever_config.py</code>:
<pre><code class="language-python">import os
# Superset specific config
ROW_LIMIT = 5000

SUPERSET_WEBSERVER_PORT = os.getenv("PORT")
SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0"

# Flask App Builder configuration
# Your App secret key
SECRET_KEY = os.getenv("SECRET_KEY")

# The SQLAlchemy connection string to your database backend
# This connection defines the path to the database that stores your
# superset metadata (slices, connections, tables, dashboards, ...).
# Note that the connection information to connect to the datasources
# you want to explore are managed directly in the web UI
SQLALCHEMY_DATABASE_URI = os.getenv("POSTGRESQL_ADDON_URI")

# Flask-WTF flag for CSRF
WTF_CSRF_ENABLED = True
# Add endpoints that need to be exempt from CSRF protection
WTF_CSRF_EXEMPT_LIST = []
# A CSRF token that expires in 1 year
WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365

# Set this API key to enable Mapbox visualizations
MAPBOX_API_KEY = ''
</code></pre>
<h3 id="superset-build-scipt">Superset build scipt</h3>
The next step is to write an <code>init.sh</code>file that will include all build tasks for superset:
<pre><code class="language-bash">#!/bin/bash

# Load configuration file in PYTHONPATH
mkdir $APP_HOME/config
cp clever_config.py $APP_HOME/config/superset_config.py

# Create an admin user (you will be prompted to set username, first and last name before setting a password)
superset fab create-admin \
    --username admin \
    --firstname admin \
    --lastname admin \
    --email admin@admin.com \
    --password ${ADMIN_PASSWORD}

# Upgrade the database
superset db upgrade

# Loading examples data set (optional)
superset load_examples

# Create default roles and permissions
superset init

# Build frontend
cd superset-frontend 
npm install -f --no-optional
npm run build
</code></pre>
Clever supports <a href="https://stagingv6.cleverapps.io/doc/develop/build-hooks/#post-build-cc_post_build_hook">post build hooks</a>, this <code>init.sh</code> file will be played at the end of the build phase.

It's used to set the config file we wrote before into <code>PYTHONPATH</code> used by the application. Then it will start some superset commands required for the first start of the application (create the admin user if it doesn't exists, upgrade the database, and file it with examples and finally init the superset appication). Those superset commands could be remove of the init file after the first success build. Finally, this script is used to also build the frontend of the superset application.
<h3 id="superset-requirements">Superset requirements</h3>
When you added the <code>CC_PIP_REQUIREMENTS_FILE</code>, it told clever cloud to load custom requirement for superset which are locate in the <code>requirements/base.txt</code> file. As you are using the PostgreSQL add-on, you need to add its requirement in this base file:
<pre><code class="language-bash">echo "psycopg2&gt;=2.7 --no-binary psycopg2" &gt;&gt; requirements/base.txt
</code></pre>
The Clever Cloud python application still needs a local <code>requirements.txt</code> to start the install. Generate it with:
<pre><code class="language-bash">pip3 freeze &gt; requirements.txt 
</code></pre>
As we use gunicorn and the PostgreSQL add-on, they are required in the <code>requirements.txt</code> file, add them:
<pre><code class="language-bash">echo "psycopg2&gt;=2.7 --no-binary psycopg2" &gt;&gt; requirements.txt

# gunicorn valid versions are located in setup.py file
echo "gunicorn&gt;=20.0.2, &lt;20.1" &gt;&gt; requirements.txt
</code></pre>
<h3 id="deploy">Deploy</h3>
Deploy the superset application into Clever cloud:
<pre><code class="language-bash">chmod u+x init.sh

# Add your files
git add .

# Create the first commit
git commit -m "clever init"

# Deploy the application
clever deploy

# Run the application
clever open
</code></pre>
Once this is done you should be able to access the superset application, enjoy!

After the first successful <code>superset</code> deployement you can remove on the <code>init.sh</code> file all commands starting with superset (they are required for the first start).]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/superset-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>At Clever Cloud we manage most of our own data and when we want to gather a particular information, we open our SQL interpreter and query all the things manually. This somehow worked because most of us are technical but it's not necessary the case anymore. So we want a nice dashboarding solution to make data available in a nicer way. This is how we came to try Superset.

<span id="more-2834"></span>

What is Superset? In their own words:
<blockquote>Superset is fast, lightweight, intuitive, and loaded with options that make it easy for users of all skill sets to explore and visualize their data.</blockquote>
You can configure different sort of visualizations from simple line charts to highly detailed geo-spatial charts and organize them in dashboard. Take a look at <a href="https://superset.apache.org/">their documentation</a> to grasp the full extent of what you can do.
<h2 id="how-to-deploy-superset">How to deploy Superset</h2>
Superset is written in Python and requires a PostgreSQL database. In Clever Cloud terms it means you will need to create a brand <a href="https://stagingv6.cleverapps.io/doc/deploy/application/python/python_apps/">new Python runtime</a> with a <a href="https://stagingv6.cleverapps.io/doc/deploy/addon/postgresql/">PostgreSQL addon</a>.
<pre><code class="language-bash"># Clone last superset release
git clone --depth 1 -b 0.38.1  https://github.com/apache/superset.git

# Move in superset repository
cd superset

# Create the python application
clever create --type python Superset

# Create the PostgreSQL instance                                
clever addon create postgresql-addon --plan m SupersetPG
    
# link the addon 
clever service link-addon SupersetPG
</code></pre>
Once the application is created, edit it's information. As you need to build Superset backend and frontend, you need to enable a <a href="https://stagingv6.cleverapps.io/doc/administrate/apps-management/#edit-application-configuration">dedicated build instance</a>, select the <code>L</code> one. Don't foget to save the update.
<h3 id="superset-environment">Superset environment</h3>
Set the following environment, <code>YOUR_APP_ID</code> corresponds to your own application id, <code>A_SECRET_KEY</code> is a random secret key you choose, and <code>AN_ADMIN_PASSWORD</code> will be the admin password for the superset application:
<pre><code class="language-bash"># Use gunicorn as python mode 
clever env set CC_PYTHON_BACKEND gunicorn

# Start the app using create_app() 
clever env set CC_PYTHON_MODULE superset.app:create_app()

# Python version to use
clever env set CC_PYTHON_VERSION 3.7

# Load all superset requirements
clever env set CC_PIP_REQUIREMENTS_FILE requirements/base.txt

# Application port
clever env set PORT 8080

# PYTHONPATH
clever env set PYTHONPATH /home/bas/YOUR_APP_ID/config/

# App secret key
clever env set SECRET_KEY A_SECRET_KEY

# Post build commands
clever env set CC_POST_BUILD_HOOK ./init.sh

# Superset admin password
clever env set ADMIN_PASSWORD AN_ADMIN_PASSWORD
</code></pre>
<h3 id="configure-superset">Configure superset</h3>
Superset need a local config python file. Wrote locally a <code>clever_config.py</code>:
<pre><code class="language-python">import os
# Superset specific config
ROW_LIMIT = 5000

SUPERSET_WEBSERVER_PORT = os.getenv("PORT")
SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0"

# Flask App Builder configuration
# Your App secret key
SECRET_KEY = os.getenv("SECRET_KEY")

# The SQLAlchemy connection string to your database backend
# This connection defines the path to the database that stores your
# superset metadata (slices, connections, tables, dashboards, ...).
# Note that the connection information to connect to the datasources
# you want to explore are managed directly in the web UI
SQLALCHEMY_DATABASE_URI = os.getenv("POSTGRESQL_ADDON_URI")

# Flask-WTF flag for CSRF
WTF_CSRF_ENABLED = True
# Add endpoints that need to be exempt from CSRF protection
WTF_CSRF_EXEMPT_LIST = []
# A CSRF token that expires in 1 year
WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365

# Set this API key to enable Mapbox visualizations
MAPBOX_API_KEY = ''
</code></pre>
<h3 id="superset-build-scipt">Superset build scipt</h3>
The next step is to write an <code>init.sh</code>file that will include all build tasks for superset:
<pre><code class="language-bash">#!/bin/bash

# Load configuration file in PYTHONPATH
mkdir $APP_HOME/config
cp clever_config.py $APP_HOME/config/superset_config.py

# Create an admin user (you will be prompted to set username, first and last name before setting a password)
superset fab create-admin \
    --username admin \
    --firstname admin \
    --lastname admin \
    --email admin@admin.com \
    --password ${ADMIN_PASSWORD}

# Upgrade the database
superset db upgrade

# Loading examples data set (optional)
superset load_examples

# Create default roles and permissions
superset init

# Build frontend
cd superset-frontend 
npm install -f --no-optional
npm run build
</code></pre>
Clever supports <a href="https://stagingv6.cleverapps.io/doc/develop/build-hooks/#post-build-cc_post_build_hook">post build hooks</a>, this <code>init.sh</code> file will be played at the end of the build phase.

It's used to set the config file we wrote before into <code>PYTHONPATH</code> used by the application. Then it will start some superset commands required for the first start of the application (create the admin user if it doesn't exists, upgrade the database, and file it with examples and finally init the superset appication). Those superset commands could be remove of the init file after the first success build. Finally, this script is used to also build the frontend of the superset application.
<h3 id="superset-requirements">Superset requirements</h3>
When you added the <code>CC_PIP_REQUIREMENTS_FILE</code>, it told clever cloud to load custom requirement for superset which are locate in the <code>requirements/base.txt</code> file. As you are using the PostgreSQL add-on, you need to add its requirement in this base file:
<pre><code class="language-bash">echo "psycopg2&gt;=2.7 --no-binary psycopg2" &gt;&gt; requirements/base.txt
</code></pre>
The Clever Cloud python application still needs a local <code>requirements.txt</code> to start the install. Generate it with:
<pre><code class="language-bash">pip3 freeze &gt; requirements.txt 
</code></pre>
As we use gunicorn and the PostgreSQL add-on, they are required in the <code>requirements.txt</code> file, add them:
<pre><code class="language-bash">echo "psycopg2&gt;=2.7 --no-binary psycopg2" &gt;&gt; requirements.txt

# gunicorn valid versions are located in setup.py file
echo "gunicorn&gt;=20.0.2, &lt;20.1" &gt;&gt; requirements.txt
</code></pre>
<h3 id="deploy">Deploy</h3>
Deploy the superset application into Clever cloud:
<pre><code class="language-bash">chmod u+x init.sh

# Add your files
git add .

# Create the first commit
git commit -m "clever init"

# Deploy the application
clever deploy

# Run the application
clever open
</code></pre>
Once this is done you should be able to access the superset application, enjoy!

After the first successful <code>superset</code> deployement you can remove on the <code>init.sh</code> file all commands starting with superset (they are required for the first start).]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to deploy Metabase to make sense of your data</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2019/02/20/how-to-install-metabase/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Wed, 20 Feb 2019 17:28:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[metabase]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2019/02/20/how-to-install-metabase/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>At Clever Cloud we manage most of our own data and when we want to gather a particular information, we open our SQL interpreter and query all the things manually. This somehow worked because most of us are technical but it's not necessary the case anymore. So we want a nice dashboarding solution to make data available in a nicer way. This is how we came upon Metabase.

<span id="more-2817"></span>

What is Metabase? In their own words:
<blockquote>The fastest, easiest way to share data and analytics inside your company.</blockquote>
You can configure different questions/queries/visualisations and organize them in dashboard. Take a look at <a href="https://www.metabase.com/docs/latest/getting-started.html">their documentation</a> to grasp the full extend of what you can do.

<a href="https://stagingv6.cleverapps.io/fr/blog/entreprise/2024/11/07/metabase-sur-le-cloud-interrogez-et-visualisez-facilement-vos-donnees/">You can now integrate Metabase directly from Clever Cloud.</a>
<h2 id="how-to-deploy-metabase">How to deploy Metabase</h2>
Metabase is written in java and available as a jar you can download and requires a PostgreSQL database. In Clever Cloud terms it means you will need a Java runtime and a PostgreSQL addon. It's dead easy to setup. Here's what you need to do to deploy it:
<pre><code class="language-bash">mkdir metabase # Create a metabase Folder
touch metabase.jar # Create a dummy placeholder file for the jar we will download.
git init # Create the git repository
git add . # Add your files
git commit -m"init" # Create the first commit
clever create --type jar Metabase # Create the java application
clever addon create postgresql-addon --plan m MetabasePG # Create the PostgreSQL instance
clever sevice link-addon MetabasePG # link the addon
clever env set CC_JAR_PATH ./metabase.jar # Configure the jar path
clever env set CC_PRE_BUILD_HOOK 'rm ./metabase.jar &amp;&amp; wget -O metabase.jar http://downloads.metabase.com/v0.33.0/metabase.jar' # make sure you download the latest metabase release
clever env set MB_ENCRYPTION_SECRET_KEY `openssl rand -base64 32` # Generate a random key to encrypt the database configuration
clever env set MB_JETTY_PORT  # Tell Metabase to use the port 8080
clever env set MB_DB_TYPE postgres # Tell Metabase to use Postgres instead of the default H2
# Metabase uses it's own environment variables to configure postgres so you have to copy the one we give you:
clever env set MB_DB_DBNAME dbName
clever env set MB_DB_HOST host
clever env set MB_DB_PASS password
clever env set MB_DB_PORT port
clever env set MB_DB_USER user
clever deploy # Deploy the application
</code></pre>
Now you should see the logs showing up. Once it's over you can type <code>clever open</code> and it will take you straight to your Metabase instance. You should see a wizard to help you create your admin user and connect a first database. If you ave set the <code>MB_ENCRYPTION_SECRET_KEY</code> variable, don't wory the databases credentials you enter in the Metabase will be encrypted.

Now you have a lot of things to do. And there is a lot more you can configure as you will see in their <a href="https://www.metabase.com/docs/latest/administration-guide/start.html">admin guide</a>: Enable Emailing, Slack integration, add new authentication connectors… With that you should be ready to setup and query most of the datasources available to you and produce awesome dahsboards. Happy hacking!]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/metabase-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>At Clever Cloud we manage most of our own data and when we want to gather a particular information, we open our SQL interpreter and query all the things manually. This somehow worked because most of us are technical but it's not necessary the case anymore. So we want a nice dashboarding solution to make data available in a nicer way. This is how we came upon Metabase.

<span id="more-2817"></span>

What is Metabase? In their own words:
<blockquote>The fastest, easiest way to share data and analytics inside your company.</blockquote>
You can configure different questions/queries/visualisations and organize them in dashboard. Take a look at <a href="https://www.metabase.com/docs/latest/getting-started.html">their documentation</a> to grasp the full extend of what you can do.

<a href="https://stagingv6.cleverapps.io/fr/blog/entreprise/2024/11/07/metabase-sur-le-cloud-interrogez-et-visualisez-facilement-vos-donnees/">You can now integrate Metabase directly from Clever Cloud.</a>
<h2 id="how-to-deploy-metabase">How to deploy Metabase</h2>
Metabase is written in java and available as a jar you can download and requires a PostgreSQL database. In Clever Cloud terms it means you will need a Java runtime and a PostgreSQL addon. It's dead easy to setup. Here's what you need to do to deploy it:
<pre><code class="language-bash">mkdir metabase # Create a metabase Folder
touch metabase.jar # Create a dummy placeholder file for the jar we will download.
git init # Create the git repository
git add . # Add your files
git commit -m"init" # Create the first commit
clever create --type jar Metabase # Create the java application
clever addon create postgresql-addon --plan m MetabasePG # Create the PostgreSQL instance
clever sevice link-addon MetabasePG # link the addon
clever env set CC_JAR_PATH ./metabase.jar # Configure the jar path
clever env set CC_PRE_BUILD_HOOK 'rm ./metabase.jar &amp;&amp; wget -O metabase.jar http://downloads.metabase.com/v0.33.0/metabase.jar' # make sure you download the latest metabase release
clever env set MB_ENCRYPTION_SECRET_KEY `openssl rand -base64 32` # Generate a random key to encrypt the database configuration
clever env set MB_JETTY_PORT  # Tell Metabase to use the port 8080
clever env set MB_DB_TYPE postgres # Tell Metabase to use Postgres instead of the default H2
# Metabase uses it's own environment variables to configure postgres so you have to copy the one we give you:
clever env set MB_DB_DBNAME dbName
clever env set MB_DB_HOST host
clever env set MB_DB_PASS password
clever env set MB_DB_PORT port
clever env set MB_DB_USER user
clever deploy # Deploy the application
</code></pre>
Now you should see the logs showing up. Once it's over you can type <code>clever open</code> and it will take you straight to your Metabase instance. You should see a wizard to help you create your admin user and connect a first database. If you ave set the <code>MB_ENCRYPTION_SECRET_KEY</code> variable, don't wory the databases credentials you enter in the Metabase will be encrypted.

Now you have a lot of things to do. And there is a lot more you can configure as you will see in their <a href="https://www.metabase.com/docs/latest/administration-guide/start.html">admin guide</a>: Enable Emailing, Slack integration, add new authentication connectors… With that you should be ready to setup and query most of the datasources available to you and produce awesome dahsboards. Happy hacking!]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
