<?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>CLI Archives | Clever Cloud</title>
	<atom:link href="https://www.clever.cloud/blog/tag/cli/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.clever.cloud/blog/tag/cli/</link>
	<description>From Code to Product</description>
	<lastBuildDate>Thu, 27 Nov 2025 15:23:36 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://cdn.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>CLI Archives | Clever Cloud</title>
	<link>https://www.clever.cloud/blog/tag/cli/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Clever Tools: a year of enhancements for your deployments, on the road to v4</title>
		<link>https://www.clever.cloud/blog/features/2024/12/20/clever-tools-v3/</link>
		
		<dc:creator><![CDATA[David Legrand]]></dc:creator>
		<pubDate>Fri, 20 Dec 2024 09:00:54 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[clever tools]]></category>
		<category><![CDATA[CLI]]></category>
		<guid isPermaLink="false">https://www.clever-cloud.com/?p=15390</guid>

					<description><![CDATA[<p><img width="800" height="355" src="https://cdn.clever-cloud.com/uploads/2024/12/2024-12-17-clever-cloud-banniere-blog-clever-tools-fr-2.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="2024 12 17 clever cloud banniere blog clever tools fr 2" decoding="async" fetchpriority="high" srcset="https://cdn.clever-cloud.com/uploads/2024/12/2024-12-17-clever-cloud-banniere-blog-clever-tools-fr-2.png 800w, https://cdn.clever-cloud.com/uploads/2024/12/2024-12-17-clever-cloud-banniere-blog-clever-tools-fr-2-300x133.png 300w, https://cdn.clever-cloud.com/uploads/2024/12/2024-12-17-clever-cloud-banniere-blog-clever-tools-fr-2-768x341.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></p><!-- wp:paragraph -->
<p>Our main goal is to offer our users a tool that's easy to handle, makes their lives easier, and can be used in scripts as a complement to <a href="https://www.clever.cloud/developers/api/">our API</a> and <a href="https://console.clever-cloud.com">Console</a>. In 2023, we decided to rework <a href="https://github.com/CleverCloud/clever-tools" target="_blank" rel="noreferrer noopener">this open source project</a> to give it a new impulse. Here's a report on our first year's work.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">v3: the foundations for renewal</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We started out from an observation: our CLI had not evolved much for two years. Of course, we had released a few updates and beta versions, but nothing more. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Yet a tool like Clever Tools is used on a daily basis by our customers, and is vital in the progress of our offering. Based on our public API, it enables us to deliver new services easily and quickly, so that our customers can use them in a wide range of situations.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As we prepared to make major changes to Clever Cloud, Clever Tools had to reflect this evolution. Capitalizing on our teams' growth, Hubert Sablonnière, in charge of the “Front” and lead developer of the project at the time, launched an initiative to integrate new contributors and organize regular exchanges on its progress.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Release of Clever Tools 3.0 at the end of 2023 was an initial turning point. More than just a technical upgrade to Node.js 18, this version paved the way for a more powerful, easy-to-use CLI. Its distribution mode has been entirely reworked to facilitate releases, but also to avoid alpha/beta channels: each PR leads to the creation of test binaries.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Our new log stack appeared first in Clever Tools, with text and date/duration search capabilities, improved formatting and more. Above all, this release set the scene for all the enhancements we were planning for 2024.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Streamlined management</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>In 2024, we introduced some long-awaited features to simplify your day-to-day operations. In small ways, such as updating zones in auto-completion, no longer having to provide a name when creating an application, <a href="https://www.clever.cloud/developers/doc/develop/tasks/">Clever Tasks</a> creation, displaying useful information at various places. But we've also adopted new paradigms.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The best example is probably the introduction and generalization of the <code>--app</code> option to commands linked to applications in our “Big Summer Update”. Until last July, you had to “link” a Clever Cloud application to a local folder to control it. Since release 3.8.0, this is no longer necessary. You can, for example, <code>clever ssh</code> or <code>clever restart</code> any application simply by specifying its name or ID. It was also at this time that we introduced a command to list all the applications an account has access to, by organization (<code>clever applications list</code>).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We've done the same with the <code>--format</code>/<code>-F</code> option, generalized to as many commands as possible, to provide classic output by default but to be able to request a JSON formatted result, which can be handy in scripts/CI or for passing to tools such as <a href="https://github.com/jqlang/jq" target="_blank" rel="noreferrer noopener">jq</a>/<a href="https://github.com/PaulJuliusMartinez/jless" target="_blank" rel="noreferrer noopener">jless</a>. Sometimes we've also introduced specific formats, such as <code>json-stream</code> for (access) logs, or <code>shell</code> for some commands linked to environment variables.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">An open project that evolves to fit your needs</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Providing greater flexibility of use was another of our concerns this year. Here, one of the best examples is probably the official integration of the clever curl command, which lets you make requests to our API in the context of the current user. This has been accompanied by enhanced context-sensitive help. At the same time, we revamped the <a href="https://github.com/CleverCloud/clever-tools/tree/master/docs#readme">Clever Tools documentation</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It is also through our CLI that we have introduced features enabling us to respond to customer needs, such as the ability <a href="https://www.clever.cloud/developers/changelog/2024-11-27-clever-tools-3.10/">to add plugins</a> as soon as an Elasticsearch add-on is created. With <a href="https://www.clever.cloud/developers/changelog/2024-12-18-clever-tools-3.11/">release 3.11 which went live yesterday</a>, we've introduced a feature flags system that takes over from the old alpha/beta channels. This gives us greater flexibility in the deployment of new features, allowing us to test and refine them according to your feedback. So don't hesitate to share your needs, ideas and comments with us, through<a href="https://github.com/CleverCloud/clever-tools/issues" target="_blank" rel="noreferrer noopener"> issues on the project</a> or even <a href="https://github.com/CleverCloud/clever-tools/pulls" target="_blank" rel="noreferrer noopener">by contributing to it</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash"># We create a Materia KV add-on
clever addon create kv myMateriaKV

# Then we use it instantly with the experimental clever kv command
clever features enable kv
clever kv myMateriaKV PING

# We write data, instantly replicated over 3 data centers in Paris
clever kv myMateriaKV SET myKey myValue
clever kv myMateriaKV GET myKey</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">The beginning of a technical overhaul, a more didactic approach</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Clever Tools follow our evolution, with the introduction of token expiration dates ( displayed in <code>clever profile</code>), and support for the many add-ons launched this year: <a href="https://www.clever.cloud/developers/doc/addons/keycloak/">Keycloak</a>, <a href="https://www.clever.cloud/developers/doc/addons/materia-kv/">Materia KV</a>, <a href="https://www.clever.cloud/developers/doc/addons/metabase/">Metabase</a>, <a href="https://www.clever.cloud/developers/doc/addons/otoroshi/">Otoroshi with LLM</a>, etc.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The latter were also an opportunity for us to pursue the didactic approach introduced around <code>clever curl</code>, adding instructions following the creation of an add-on. Our aim here is to support our customers in the use of new services and tools, with increasing references to useful information and cross-references to our documentation.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But also diagnostic commands such as <code>clever domain diag</code>, which lets you check whether application's DNS are correctly configured. Its addition was accompanied by the <code>clever domain overview</code> command, which lists all the domains and paths linked to your various applications.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">On the road to v4, a continuous improvement</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We spent part of the summer cleaning up the code under the hood. We migrated to <a href="https://nodejs.org/api/esm.html#modules-ecmascript-modules" target="_blank" rel="noreferrer noopener">EcmaScript Modules</a> (ESM) with the introduction of a bundling step. All this has given us a more modern and maintainable code base, paving the way for future developments in Clever Tools architecture.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>2025 promises to be just as rich in new features, with the imminent arrival of release 4.0. It will mark the transition to Node 22, introduce a new self-packaging build system and continue to improve the user experience. We will also soon add access to Network Groups with the experimental <code>clever ng</code> command.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The focus will be on improved ergonomics, new functionalities and, above all, a complete overhaul of commands naming and organization, which will be introduced progressively. Documentation generation will be automated and releases scheduled on a regular basis. All this will be made possible by a major upgrade of the Clever Tools technical stack.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This new phase reflects our ongoing commitment to provide you with a reliable, efficient tool tailored to your needs. Beyond the technical features, it's the collaboration with our community that guides the evolution of Clever Tools. The changes made since 2023 are just the beginning of a new era for your deployment CLI.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Check back in a few weeks to start discovering all the possibilities version 4 has to offer. Don't forget to follow <a href="https://www.clever.cloud/developers/changelog/">our changelog </a>to be informed of the latest developments.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="800" height="355" src="https://cdn.clever-cloud.com/uploads/2024/12/2024-12-17-clever-cloud-banniere-blog-clever-tools-fr-2.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="2024 12 17 clever cloud banniere blog clever tools fr 2" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2024/12/2024-12-17-clever-cloud-banniere-blog-clever-tools-fr-2.png 800w, https://cdn.clever-cloud.com/uploads/2024/12/2024-12-17-clever-cloud-banniere-blog-clever-tools-fr-2-300x133.png 300w, https://cdn.clever-cloud.com/uploads/2024/12/2024-12-17-clever-cloud-banniere-blog-clever-tools-fr-2-768x341.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></p><!-- wp:paragraph -->
<p>Our main goal is to offer our users a tool that's easy to handle, makes their lives easier, and can be used in scripts as a complement to <a href="https://www.clever.cloud/developers/api/">our API</a> and <a href="https://console.clever-cloud.com">Console</a>. In 2023, we decided to rework <a href="https://github.com/CleverCloud/clever-tools" target="_blank" rel="noreferrer noopener">this open source project</a> to give it a new impulse. Here's a report on our first year's work.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">v3: the foundations for renewal</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We started out from an observation: our CLI had not evolved much for two years. Of course, we had released a few updates and beta versions, but nothing more. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Yet a tool like Clever Tools is used on a daily basis by our customers, and is vital in the progress of our offering. Based on our public API, it enables us to deliver new services easily and quickly, so that our customers can use them in a wide range of situations.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As we prepared to make major changes to Clever Cloud, Clever Tools had to reflect this evolution. Capitalizing on our teams' growth, Hubert Sablonnière, in charge of the “Front” and lead developer of the project at the time, launched an initiative to integrate new contributors and organize regular exchanges on its progress.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Release of Clever Tools 3.0 at the end of 2023 was an initial turning point. More than just a technical upgrade to Node.js 18, this version paved the way for a more powerful, easy-to-use CLI. Its distribution mode has been entirely reworked to facilitate releases, but also to avoid alpha/beta channels: each PR leads to the creation of test binaries.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Our new log stack appeared first in Clever Tools, with text and date/duration search capabilities, improved formatting and more. Above all, this release set the scene for all the enhancements we were planning for 2024.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Streamlined management</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>In 2024, we introduced some long-awaited features to simplify your day-to-day operations. In small ways, such as updating zones in auto-completion, no longer having to provide a name when creating an application, <a href="https://www.clever.cloud/developers/doc/develop/tasks/">Clever Tasks</a> creation, displaying useful information at various places. But we've also adopted new paradigms.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The best example is probably the introduction and generalization of the <code>--app</code> option to commands linked to applications in our “Big Summer Update”. Until last July, you had to “link” a Clever Cloud application to a local folder to control it. Since release 3.8.0, this is no longer necessary. You can, for example, <code>clever ssh</code> or <code>clever restart</code> any application simply by specifying its name or ID. It was also at this time that we introduced a command to list all the applications an account has access to, by organization (<code>clever applications list</code>).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We've done the same with the <code>--format</code>/<code>-F</code> option, generalized to as many commands as possible, to provide classic output by default but to be able to request a JSON formatted result, which can be handy in scripts/CI or for passing to tools such as <a href="https://github.com/jqlang/jq" target="_blank" rel="noreferrer noopener">jq</a>/<a href="https://github.com/PaulJuliusMartinez/jless" target="_blank" rel="noreferrer noopener">jless</a>. Sometimes we've also introduced specific formats, such as <code>json-stream</code> for (access) logs, or <code>shell</code> for some commands linked to environment variables.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">An open project that evolves to fit your needs</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Providing greater flexibility of use was another of our concerns this year. Here, one of the best examples is probably the official integration of the clever curl command, which lets you make requests to our API in the context of the current user. This has been accompanied by enhanced context-sensitive help. At the same time, we revamped the <a href="https://github.com/CleverCloud/clever-tools/tree/master/docs#readme">Clever Tools documentation</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It is also through our CLI that we have introduced features enabling us to respond to customer needs, such as the ability <a href="https://www.clever.cloud/developers/changelog/2024-11-27-clever-tools-3.10/">to add plugins</a> as soon as an Elasticsearch add-on is created. With <a href="https://www.clever.cloud/developers/changelog/2024-12-18-clever-tools-3.11/">release 3.11 which went live yesterday</a>, we've introduced a feature flags system that takes over from the old alpha/beta channels. This gives us greater flexibility in the deployment of new features, allowing us to test and refine them according to your feedback. So don't hesitate to share your needs, ideas and comments with us, through<a href="https://github.com/CleverCloud/clever-tools/issues" target="_blank" rel="noreferrer noopener"> issues on the project</a> or even <a href="https://github.com/CleverCloud/clever-tools/pulls" target="_blank" rel="noreferrer noopener">by contributing to it</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash"># We create a Materia KV add-on
clever addon create kv myMateriaKV

# Then we use it instantly with the experimental clever kv command
clever features enable kv
clever kv myMateriaKV PING

# We write data, instantly replicated over 3 data centers in Paris
clever kv myMateriaKV SET myKey myValue
clever kv myMateriaKV GET myKey</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">The beginning of a technical overhaul, a more didactic approach</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Clever Tools follow our evolution, with the introduction of token expiration dates ( displayed in <code>clever profile</code>), and support for the many add-ons launched this year: <a href="https://www.clever.cloud/developers/doc/addons/keycloak/">Keycloak</a>, <a href="https://www.clever.cloud/developers/doc/addons/materia-kv/">Materia KV</a>, <a href="https://www.clever.cloud/developers/doc/addons/metabase/">Metabase</a>, <a href="https://www.clever.cloud/developers/doc/addons/otoroshi/">Otoroshi with LLM</a>, etc.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The latter were also an opportunity for us to pursue the didactic approach introduced around <code>clever curl</code>, adding instructions following the creation of an add-on. Our aim here is to support our customers in the use of new services and tools, with increasing references to useful information and cross-references to our documentation.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But also diagnostic commands such as <code>clever domain diag</code>, which lets you check whether application's DNS are correctly configured. Its addition was accompanied by the <code>clever domain overview</code> command, which lists all the domains and paths linked to your various applications.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">On the road to v4, a continuous improvement</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We spent part of the summer cleaning up the code under the hood. We migrated to <a href="https://nodejs.org/api/esm.html#modules-ecmascript-modules" target="_blank" rel="noreferrer noopener">EcmaScript Modules</a> (ESM) with the introduction of a bundling step. All this has given us a more modern and maintainable code base, paving the way for future developments in Clever Tools architecture.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>2025 promises to be just as rich in new features, with the imminent arrival of release 4.0. It will mark the transition to Node 22, introduce a new self-packaging build system and continue to improve the user experience. We will also soon add access to Network Groups with the experimental <code>clever ng</code> command.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The focus will be on improved ergonomics, new functionalities and, above all, a complete overhaul of commands naming and organization, which will be introduced progressively. Documentation generation will be automated and releases scheduled on a regular basis. All this will be made possible by a major upgrade of the Clever Tools technical stack.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This new phase reflects our ongoing commitment to provide you with a reliable, efficient tool tailored to your needs. Beyond the technical features, it's the collaboration with our community that guides the evolution of Clever Tools. The changes made since 2023 are just the beginning of a new era for your deployment CLI.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Check back in a few weeks to start discovering all the possibilities version 4 has to offer. Don't forget to follow <a href="https://www.clever.cloud/developers/changelog/">our changelog </a>to be informed of the latest developments.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Force HTTPS on Clever Cloud applications</title>
		<link>https://www.clever.cloud/blog/features/2020/06/02/force-https/</link>
		
		<dc:creator><![CDATA[Valeriane Venance]]></dc:creator>
		<pubDate>Tue, 02 Jun 2020 17:41:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[HTTPS]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2020/06/02/force-https/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="bannerhttps 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>It is now possible to force HTTPS redirection! No more .htaccess black magic, no redirection handling code…  Let&#39;s have a tour of this new feature.</p>
<span id="more-2975"></span>

<h2 id="forcing-https-on-clever-cloud">Forcing HTTPS on Clever Cloud</h2>
<p>Let&#39;s start practical. There are two ways to achieve our goal.</p>
<h3 id="using-the-cli">Using the CLI</h3>
<p>In your linked application, in your own terminal just type in <code>clever config set force-https enabled</code>.</p>
<p><code>clever config</code> is a new CLI command that allows you to display in your console the current configuration of your application. You can edit any setting with <code>clever config set {name} {value}</code> and bulk edit with <code>clever config update [options]</code>.</p>
<p>Here we just set the force https option to <strong>enabled</strong> and if we want to set if off we can just <code>clever config set force-https disabled</code>.</p>
<p>If this does not work for you, make sure you are running version 2.5.0 or newer (with <code>clever version</code>).</p>
<h3 id="using-the-clever-cloud-console">Using the Clever Cloud console</h3>
<p>In the information page of each application, you will find a checkbox form with options you can tune in and out. One of them is <strong>Force HTTPS</strong>. Enable its checkbox and save.</p>
<figure>
  <a href="https://cdn.clever-cloud.com/uploads/2021/08/enable-https.png" rel="noopener noreferrer" target="_blank"><img style="width:100%" src="https://cdn.clever-cloud.com/uploads/2021/08/enable-https.png"></a>
</figure>

<p>From now on and as long as you do not disable it, every non-secured HTTP request to this application will be redirected to HTTPS with a <a href="https://en.wikipedia.org/wiki/HTTP_301">301 Moved Permanently</a> status code.</p>
<h2 id="how-the-magic-happens">How the magic happens</h2>
<h3 id="the-clever-cloud-way">The Clever Cloud way</h3>
<p>The redirection is handled at the reverse proxy level so you don&#39;t need to update your application to use it. Each time the browser will request a resource using HTTP, it will get a 301 response back with the same resource prefixed by <code>https</code> in the Location header field. The 301 redirection is recognized as the best practice for HTTPS upgrade.</p>
<figure>
  <a href="https://cdn.clever-cloud.com/uploads/2021/08/force-https-schema.png" rel="noopener noreferrer" target="_blank"><img style="width:100%" src="https://cdn.clever-cloud.com/uploads/2021/08/force-https-schema.png"></a>
</figure>

<h2 id="why-enforce-https">Why enforce HTTPS</h2>
<p>Before explaining why it is important, I shall provide a definition of HTTPS.</p>
<h3 id="simple-definition">Simple definition</h3>
<p>First of all, HTTPS is an extension of the HTTP protocol. Which itself is the application protocol the world wide web is relying on for communications. Full definition to be found on <a href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">wikipedia</a>.</p>
<p>The main difference between HTTP and HTTPS communication is encryption.</p>
<p>Using HTTPS, the communication is bidirectionaly encrypted between the client and the server. Both the headers and the response/request data are ciphered. This is achieved using TLS cryptographic protocol in addition to operations involved in a simple HTTP transmission.</p>
<p>The identification process requires the server administrator to create a public key certificate signed by a trusted certificate authority.</p>
<p>We have automated this part. So every time you create a new application on Clever Cloud, a cleverapps.io subdomain name is given to your application and comes along with encryption because a certificate covers cleverapps.io and all its subdomains. And each time you add a custom domain to your application like <code>example.com</code>, Clever Cloud asks Let&#39;s Encrypt for a TLS public key certificate that we automatically add to your application&#39;s configuration on our reverse proxies. Thanks to that, you can accept HTTPS requests on a brand new application without further configuration.</p>
<h3 id="enforcing-https-is-just-the-beginning">Enforcing HTTPS is just the beginning</h3>
<p>I explained to you how HTTPS enforcing was working on Clever Cloud and that felt very simple, right?</p>
<p>To be honest this is because the tech team has decided only to handle the first step of the process.</p>
<p>Strong security on an application requires knowledge on many topics.</p>
<p>Sometimes, your application itself will link to HTTP content, which will result in <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content">mixed-content</a>. When HTTP resources are served by the application on a page requested using HTTPS the browser will usually not load those resources.</p>
<p>You will also probably want to know more about HTTP Strict Transport Security (HSTS), and the <code>Content-Security-Policy</code> header.</p>
<p>You can start by reading <a href="https://scotthelme.co.uk/migrating-from-http-to-https-ease-the-pain-with-csp-and-hsts/">this great article from Scott Helme</a> to start your journey. If you cannot handle advanced security yourself, think about asking for the help of a security expert.</p>
<h2 id="https-is-good-for-everyone-except-hackers">HTTPS is good for everyone, except hackers</h2>
<p>In 2020 the HTTPS protocol is ubiquitous. It&#39;s more and more widely used thanks to the <a href="https://letsencrypt.org/">Let&#39;s Encrypt</a> initiative which made it free for everyone; which makes the web more secure for both applications creators and clients.</p>
<p>The clients know they can trust the integrity of the content that&#39;s being displayed to them and feel safer about using the Internet in general. This safety feeling extends to their privacy. Today the regular user&#39;s main concern is about what the owner of the website do with their data. Not about that black hooded bad guy they were freaking out about a few years ago. The most used websites have raised their confidence about communications ciphering to such a level it&#39;s now the norm. Everyone puts credit-card numbers in forms eyes wide shut.</p>
<p>Yeah, but me ? Having a website to offer to the world, I want to meet my client’s expectations, of course. But HTTPS has more to offer me. From the SEO perspective, having it will naturally boost ranking. I also ensure my user&#39;s privacy and confidentiality. Most importantly, I can trust that the data I receive from my client has not been altered. That doesn’t mean that I shall trust my user intentions obviously. But now if I need to watch out for a hacker, it will not come from a <a href="https://en.wikipedia.org/wiki/Man-in-the-middle_attack">man in the middle</a> or this kind of attack.</p>
<p>Anyway, this is everywhere now and already almost mandatory. Take this train now! This feature is free, does not require extra code and works out of the box with the automatically generated Let&#39;s Encrypt certificates.</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="bannerhttps 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/bannerhttps-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>It is now possible to force HTTPS redirection! No more .htaccess black magic, no redirection handling code…  Let&#39;s have a tour of this new feature.</p>
<span id="more-2975"></span>

<h2 id="forcing-https-on-clever-cloud">Forcing HTTPS on Clever Cloud</h2>
<p>Let&#39;s start practical. There are two ways to achieve our goal.</p>
<h3 id="using-the-cli">Using the CLI</h3>
<p>In your linked application, in your own terminal just type in <code>clever config set force-https enabled</code>.</p>
<p><code>clever config</code> is a new CLI command that allows you to display in your console the current configuration of your application. You can edit any setting with <code>clever config set {name} {value}</code> and bulk edit with <code>clever config update [options]</code>.</p>
<p>Here we just set the force https option to <strong>enabled</strong> and if we want to set if off we can just <code>clever config set force-https disabled</code>.</p>
<p>If this does not work for you, make sure you are running version 2.5.0 or newer (with <code>clever version</code>).</p>
<h3 id="using-the-clever-cloud-console">Using the Clever Cloud console</h3>
<p>In the information page of each application, you will find a checkbox form with options you can tune in and out. One of them is <strong>Force HTTPS</strong>. Enable its checkbox and save.</p>
<figure>
  <a href="https://cdn.clever-cloud.com/uploads/2021/08/enable-https.png" rel="noopener noreferrer" target="_blank"><img style="width:100%" src="https://cdn.clever-cloud.com/uploads/2021/08/enable-https.png"></a>
</figure>

<p>From now on and as long as you do not disable it, every non-secured HTTP request to this application will be redirected to HTTPS with a <a href="https://en.wikipedia.org/wiki/HTTP_301">301 Moved Permanently</a> status code.</p>
<h2 id="how-the-magic-happens">How the magic happens</h2>
<h3 id="the-clever-cloud-way">The Clever Cloud way</h3>
<p>The redirection is handled at the reverse proxy level so you don&#39;t need to update your application to use it. Each time the browser will request a resource using HTTP, it will get a 301 response back with the same resource prefixed by <code>https</code> in the Location header field. The 301 redirection is recognized as the best practice for HTTPS upgrade.</p>
<figure>
  <a href="https://cdn.clever-cloud.com/uploads/2021/08/force-https-schema.png" rel="noopener noreferrer" target="_blank"><img style="width:100%" src="https://cdn.clever-cloud.com/uploads/2021/08/force-https-schema.png"></a>
</figure>

<h2 id="why-enforce-https">Why enforce HTTPS</h2>
<p>Before explaining why it is important, I shall provide a definition of HTTPS.</p>
<h3 id="simple-definition">Simple definition</h3>
<p>First of all, HTTPS is an extension of the HTTP protocol. Which itself is the application protocol the world wide web is relying on for communications. Full definition to be found on <a href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">wikipedia</a>.</p>
<p>The main difference between HTTP and HTTPS communication is encryption.</p>
<p>Using HTTPS, the communication is bidirectionaly encrypted between the client and the server. Both the headers and the response/request data are ciphered. This is achieved using TLS cryptographic protocol in addition to operations involved in a simple HTTP transmission.</p>
<p>The identification process requires the server administrator to create a public key certificate signed by a trusted certificate authority.</p>
<p>We have automated this part. So every time you create a new application on Clever Cloud, a cleverapps.io subdomain name is given to your application and comes along with encryption because a certificate covers cleverapps.io and all its subdomains. And each time you add a custom domain to your application like <code>example.com</code>, Clever Cloud asks Let&#39;s Encrypt for a TLS public key certificate that we automatically add to your application&#39;s configuration on our reverse proxies. Thanks to that, you can accept HTTPS requests on a brand new application without further configuration.</p>
<h3 id="enforcing-https-is-just-the-beginning">Enforcing HTTPS is just the beginning</h3>
<p>I explained to you how HTTPS enforcing was working on Clever Cloud and that felt very simple, right?</p>
<p>To be honest this is because the tech team has decided only to handle the first step of the process.</p>
<p>Strong security on an application requires knowledge on many topics.</p>
<p>Sometimes, your application itself will link to HTTP content, which will result in <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content">mixed-content</a>. When HTTP resources are served by the application on a page requested using HTTPS the browser will usually not load those resources.</p>
<p>You will also probably want to know more about HTTP Strict Transport Security (HSTS), and the <code>Content-Security-Policy</code> header.</p>
<p>You can start by reading <a href="https://scotthelme.co.uk/migrating-from-http-to-https-ease-the-pain-with-csp-and-hsts/">this great article from Scott Helme</a> to start your journey. If you cannot handle advanced security yourself, think about asking for the help of a security expert.</p>
<h2 id="https-is-good-for-everyone-except-hackers">HTTPS is good for everyone, except hackers</h2>
<p>In 2020 the HTTPS protocol is ubiquitous. It&#39;s more and more widely used thanks to the <a href="https://letsencrypt.org/">Let&#39;s Encrypt</a> initiative which made it free for everyone; which makes the web more secure for both applications creators and clients.</p>
<p>The clients know they can trust the integrity of the content that&#39;s being displayed to them and feel safer about using the Internet in general. This safety feeling extends to their privacy. Today the regular user&#39;s main concern is about what the owner of the website do with their data. Not about that black hooded bad guy they were freaking out about a few years ago. The most used websites have raised their confidence about communications ciphering to such a level it&#39;s now the norm. Everyone puts credit-card numbers in forms eyes wide shut.</p>
<p>Yeah, but me ? Having a website to offer to the world, I want to meet my client’s expectations, of course. But HTTPS has more to offer me. From the SEO perspective, having it will naturally boost ranking. I also ensure my user&#39;s privacy and confidentiality. Most importantly, I can trust that the data I receive from my client has not been altered. That doesn’t mean that I shall trust my user intentions obviously. But now if I need to watch out for a hacker, it will not come from a <a href="https://en.wikipedia.org/wiki/Man-in-the-middle_attack">man in the middle</a> or this kind of attack.</p>
<p>Anyway, this is everywhere now and already almost mandatory. Take this train now! This feature is free, does not require extra code and works out of the box with the automatically generated Let&#39;s Encrypt certificates.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>TCP ports are now configurable from Clever Tools</title>
		<link>https://www.clever.cloud/blog/features/2020/05/12/tcp-redirection/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Tue, 12 May 2020 10:35:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[changelog]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[wpu]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2020/05/12/tcp-redirection/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="bannertcpports 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Good news everyone, you can now open a TCP port on your application. Everything you need is now available in our <a href="https://www.clever.cloud/developers/api/">API</a> and <a href="https://www.clever.cloud/developers/clever-tools/tcp-redirections/">Clever Tools</a>.

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

Before this new release of <a href="https://github.com/CleverCloud/clever-tools/">clever-tools</a> you were limited to HTTP only applications. Or you had to ask our support team to open a TCP port if you needed one. Now you can open one yourself like so:
<pre><code class="language-bash">$ clever tcp-redirs add --namespace cleverapps
Successfully added tcp redirection on port: 21562
</code></pre>
What happened here is we changed the configuration of all the cleverapps.io proxies to forward every incoming request from yourapp.cleverapps.io:21562 to the port 4040 of the VM that runs your app. The <code>--namespace</code> option is here to tell us on which proxy we need to update the configuration. The <code>cleverapps</code> namespace is used for the cleverapps.io domain. The <code>default</code> namespace is used for all your custom domains. If you have your own set of proxies, you will also have a custom namespace. You can get the list of available domains with:
<pre><code class="language-bash">$ clever tcp-redirs list-namespaces
Available namespaces: default, cleverapps
</code></pre>
You will find more details about it on our <a href="https://www.clever.cloud/developers/clever-tools/tcp-redirections/">dedicated documentation</a>.

Please keep in mind that this feature is still in Beta, as such it is currently free, but will be billed once we get out of Beta.

To make sure everything works as it should, your application has to listen to port 4040 for TCP and the usual 8080 for HTTP. We still run health check of your applications on port 8080 so you still need an HTTP server.

This opens a door to new possibilities like deploying MQTT servers, LDAP directories, or this quick TCP chat that my colleague Hubert wrote: <a href="https://github.com/CleverCloud/tcp-chat">https://github.com/CleverCloud/tcp-chat</a>

Let's try this out:
<pre><code class="language-bash">$ git clone https://github.com/CleverCloud/tcp-chat
$ cd tcp-chat
$ clever create --type node tcp-chat
$ clever tcp-redirs add --namespace cleverapps
$ Successfully added tcp redirection on port: 21562
$ clever domain add mychat.cleverapps.io
$ telnet mychat.cleverapps.io 21562
</code></pre>
And now you are in a <a href="https://en.wikipedia.org/wiki/Telnet">telnet</a> session chatting with whoever join that telnet session as well. Are you aware that vi and telnet have one thing in common? No one remembers how to quit(type <code>]</code> then <code>exit</code>).

Please let us know what you want to deploy thanks to this new feature.]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="bannertcpports 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/bannertcpports-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Good news everyone, you can now open a TCP port on your application. Everything you need is now available in our <a href="https://www.clever.cloud/developers/api/">API</a> and <a href="https://www.clever.cloud/developers/clever-tools/tcp-redirections/">Clever Tools</a>.

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

Before this new release of <a href="https://github.com/CleverCloud/clever-tools/">clever-tools</a> you were limited to HTTP only applications. Or you had to ask our support team to open a TCP port if you needed one. Now you can open one yourself like so:
<pre><code class="language-bash">$ clever tcp-redirs add --namespace cleverapps
Successfully added tcp redirection on port: 21562
</code></pre>
What happened here is we changed the configuration of all the cleverapps.io proxies to forward every incoming request from yourapp.cleverapps.io:21562 to the port 4040 of the VM that runs your app. The <code>--namespace</code> option is here to tell us on which proxy we need to update the configuration. The <code>cleverapps</code> namespace is used for the cleverapps.io domain. The <code>default</code> namespace is used for all your custom domains. If you have your own set of proxies, you will also have a custom namespace. You can get the list of available domains with:
<pre><code class="language-bash">$ clever tcp-redirs list-namespaces
Available namespaces: default, cleverapps
</code></pre>
You will find more details about it on our <a href="https://www.clever.cloud/developers/clever-tools/tcp-redirections/">dedicated documentation</a>.

Please keep in mind that this feature is still in Beta, as such it is currently free, but will be billed once we get out of Beta.

To make sure everything works as it should, your application has to listen to port 4040 for TCP and the usual 8080 for HTTP. We still run health check of your applications on port 8080 so you still need an HTTP server.

This opens a door to new possibilities like deploying MQTT servers, LDAP directories, or this quick TCP chat that my colleague Hubert wrote: <a href="https://github.com/CleverCloud/tcp-chat">https://github.com/CleverCloud/tcp-chat</a>

Let's try this out:
<pre><code class="language-bash">$ git clone https://github.com/CleverCloud/tcp-chat
$ cd tcp-chat
$ clever create --type node tcp-chat
$ clever tcp-redirs add --namespace cleverapps
$ Successfully added tcp redirection on port: 21562
$ clever domain add mychat.cleverapps.io
$ telnet mychat.cleverapps.io 21562
</code></pre>
And now you are in a <a href="https://en.wikipedia.org/wiki/Telnet">telnet</a> session chatting with whoever join that telnet session as well. Are you aware that vi and telnet have one thing in common? No one remembers how to quit(type <code>]</code> then <code>exit</code>).

Please let us know what you want to deploy thanks to this new feature.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Access Logs are now available from Clever Tools</title>
		<link>https://www.clever.cloud/blog/features/2020/04/09/access-logs-clever-tools/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Thu, 09 Apr 2020 11:35:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[accesslogs]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[logs]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2020/04/09/access-logs-clever-tools/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="access logs clever tools 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Yes you read it right, you can now access your access logs. How you ask? With the latest release of Clever Tools. But before we see how it works, let me explain what access logs are.

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

Access logs contain all incoming requests to a web server. They are available in different formats. One of the most common being CLF which stands for <a href="https://en.wikipedia.org/wiki/Common_Log_Format">Common Log Format</a>. Here's an example where you can find the IP of the client, date, HTTP verb, URL target, status code and size of the answer: <code>255.255.255.255 - - [06/Feb/2020:07:59:22 +0100] "GET /aget/to/your/beautiful/website -" 200 1453</code>
<h2 id="how-to-get-your-access-logs">How to get your access logs</h2>
To get your access logs you need to use <a href="https://github.com/CleverCloud/clever-tools/">clever-tools</a> and run this in a linked application:

<code>clever accesslogs</code>

You will get all the requests that came to this app in the last hour. This also work for most dedicated add-ons using <code>--addon</code> followed by the add-on id:

<code>clever accesslogs --addon addon_41c5a60f-11c6-442a-9803-f4604fe8638b</code>

You can also choose a date span using <code>--after</code> and <code>--before</code> like so:

<code>clever accesslogs --after 2020-03-27 --before 2020-03-29</code>

Any date you give must follow ISO 8601. You could for instance have a microsecond precision like this:

<code>clever accesslogs --after 2020-03-29T11:01:02.120000Z --before 2020-03-29T11:01:02.123456Z</code>

You can also change the format of the logs with <code>-F</code> (or <code>--format</code>):

<code>clever accesslogs --after 2020-03-28 --before 2020-03-29 -F json</code>

Here's an example of JSON entry, it contains all of the information currently available for each request:
<pre><code class="language-json">{
  "t": "2020-03-10T11:24:34.220324Z",
  "a": "app_87d748d4-3c7b-4baa-8f52-c748e1123ab3",
  "adc": "par-cleverapps-adc-n6",
  "o": "user_51f7098f-604e-4d9e-8fb6-4026fd1767bb",
  "i": "0805330e-cff6-4fd5-87c0-26974d8bcb4e",
  "ipS": "255.255.255.255",
  "pS": 38566,
  "s": {
    "lt": 48.6719,
    "lg": 1.3002,
    "ct": "Aunay-sous-Crecy",
    "co": "FR"
  },
  "ipD": "255.258.258.258",
  "pD": 11810,
  "d": {
    "lt": 48.7967,
    "lg": 2.3338,
    "ct": "Cachan",
    "co": "FR"
  },
  "vb": "GET",
  "path": "/status-codes/500",
  "bIn": 411,
  "bOut": 443,
  "h": "app-87d748d4-3c7b-4baa-8f52-c748e1123ab3.cleverapps.io",
  "rTime": "3ms",
  "sTime": "115μs",
  "scheme": "HTTPS",
  "sC": 500,
  "sT": "Internal Server Error",
  "w": "WRK-01",
  "r": "b6bcab8a-c6d0-4546-9000-57b43d009a49",
  "tlsV": "TLS1.3"
}
</code></pre>
You will find the details for every field in our <a href="https://www.clever.cloud/developers/administrate/metrics/overview/#access-logs-metrics">access logs documentation</a>.
<h2 id="what-you-can-do-with-your-logs">What you can do with your logs</h2>
Now let's say you want to know what are the most returned status codes from a log file, here's how you can do it:
<pre><code class="language-bash">clever accesslogs --after 2020-03-10 --before 2020-03-20 -F json | jq .sC | sort | uniq -c | sort -nr
</code></pre>
Here we use the JSON format and <code>jq</code> to select the field we want, then <code>sort</code> and <code>uniq</code> to get a proper output, which would yield something like:
<pre><code class="language-text">  99999 200
     56 500
     33 404
      2 400
      1 403
      1 301
      1 202
</code></pre>
The first column being the number of hits and the second being the status code.

Now for something a bit more practical, here's a script that allows you to split access logs for each day between two dates:
<pre><code class="language-bash">#!/bin/bash

input_start=2020-01-01
input_end=2020-03-27

startdate=$(date -I -d "$input_start") || exit -1
enddate=$(date -I -d "$input_end")     || exit -1

d="$startdate"
while [ "$d" != "$enddate" ]; do 
  clever accesslogs --alias prod --after $d --before $(date -I -d "$bv d + 1 day") -F clf &gt; access-$d.out
  d=$(date -I -d "$d + 1 day")
done
</code></pre>
It's hard to visualize so much data if you don't have the proper tools. So I really invite you to try <a href="https://goaccess.io/">GoAccess</a>. Combine the script above and this command <code>goaccess access* -o report.html --log-format=COMMON --anonymize-ip</code>. You will get this neat, anonymized HTML report:
<figure><img src="https://cdn.clever-cloud.com/uploads/2021/08/goaccess.png" alt="Demonstrating the filter" />
<figcaption>Viusalize CLF logs with GoAccess</figcaption></figure>
There are of course lots of other tools you can use to visualize logs, like our latest <a href="https://www.clever.cloud/developers/addons/elastic/">Elastic add-on</a> for instance :) Or you can go straight into the metrics tab of your application or add-on and start playing with Warp10. This is actually what we use when you see the live map under the Overview tab of your application.

We hope you'll find this new feature practical and as always welcome your input to make this better. Happy coding!]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="access logs clever tools 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/access-logs-clever-tools-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Yes you read it right, you can now access your access logs. How you ask? With the latest release of Clever Tools. But before we see how it works, let me explain what access logs are.

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

Access logs contain all incoming requests to a web server. They are available in different formats. One of the most common being CLF which stands for <a href="https://en.wikipedia.org/wiki/Common_Log_Format">Common Log Format</a>. Here's an example where you can find the IP of the client, date, HTTP verb, URL target, status code and size of the answer: <code>255.255.255.255 - - [06/Feb/2020:07:59:22 +0100] "GET /aget/to/your/beautiful/website -" 200 1453</code>
<h2 id="how-to-get-your-access-logs">How to get your access logs</h2>
To get your access logs you need to use <a href="https://github.com/CleverCloud/clever-tools/">clever-tools</a> and run this in a linked application:

<code>clever accesslogs</code>

You will get all the requests that came to this app in the last hour. This also work for most dedicated add-ons using <code>--addon</code> followed by the add-on id:

<code>clever accesslogs --addon addon_41c5a60f-11c6-442a-9803-f4604fe8638b</code>

You can also choose a date span using <code>--after</code> and <code>--before</code> like so:

<code>clever accesslogs --after 2020-03-27 --before 2020-03-29</code>

Any date you give must follow ISO 8601. You could for instance have a microsecond precision like this:

<code>clever accesslogs --after 2020-03-29T11:01:02.120000Z --before 2020-03-29T11:01:02.123456Z</code>

You can also change the format of the logs with <code>-F</code> (or <code>--format</code>):

<code>clever accesslogs --after 2020-03-28 --before 2020-03-29 -F json</code>

Here's an example of JSON entry, it contains all of the information currently available for each request:
<pre><code class="language-json">{
  "t": "2020-03-10T11:24:34.220324Z",
  "a": "app_87d748d4-3c7b-4baa-8f52-c748e1123ab3",
  "adc": "par-cleverapps-adc-n6",
  "o": "user_51f7098f-604e-4d9e-8fb6-4026fd1767bb",
  "i": "0805330e-cff6-4fd5-87c0-26974d8bcb4e",
  "ipS": "255.255.255.255",
  "pS": 38566,
  "s": {
    "lt": 48.6719,
    "lg": 1.3002,
    "ct": "Aunay-sous-Crecy",
    "co": "FR"
  },
  "ipD": "255.258.258.258",
  "pD": 11810,
  "d": {
    "lt": 48.7967,
    "lg": 2.3338,
    "ct": "Cachan",
    "co": "FR"
  },
  "vb": "GET",
  "path": "/status-codes/500",
  "bIn": 411,
  "bOut": 443,
  "h": "app-87d748d4-3c7b-4baa-8f52-c748e1123ab3.cleverapps.io",
  "rTime": "3ms",
  "sTime": "115μs",
  "scheme": "HTTPS",
  "sC": 500,
  "sT": "Internal Server Error",
  "w": "WRK-01",
  "r": "b6bcab8a-c6d0-4546-9000-57b43d009a49",
  "tlsV": "TLS1.3"
}
</code></pre>
You will find the details for every field in our <a href="https://www.clever.cloud/developers/administrate/metrics/overview/#access-logs-metrics">access logs documentation</a>.
<h2 id="what-you-can-do-with-your-logs">What you can do with your logs</h2>
Now let's say you want to know what are the most returned status codes from a log file, here's how you can do it:
<pre><code class="language-bash">clever accesslogs --after 2020-03-10 --before 2020-03-20 -F json | jq .sC | sort | uniq -c | sort -nr
</code></pre>
Here we use the JSON format and <code>jq</code> to select the field we want, then <code>sort</code> and <code>uniq</code> to get a proper output, which would yield something like:
<pre><code class="language-text">  99999 200
     56 500
     33 404
      2 400
      1 403
      1 301
      1 202
</code></pre>
The first column being the number of hits and the second being the status code.

Now for something a bit more practical, here's a script that allows you to split access logs for each day between two dates:
<pre><code class="language-bash">#!/bin/bash

input_start=2020-01-01
input_end=2020-03-27

startdate=$(date -I -d "$input_start") || exit -1
enddate=$(date -I -d "$input_end")     || exit -1

d="$startdate"
while [ "$d" != "$enddate" ]; do 
  clever accesslogs --alias prod --after $d --before $(date -I -d "$bv d + 1 day") -F clf &gt; access-$d.out
  d=$(date -I -d "$d + 1 day")
done
</code></pre>
It's hard to visualize so much data if you don't have the proper tools. So I really invite you to try <a href="https://goaccess.io/">GoAccess</a>. Combine the script above and this command <code>goaccess access* -o report.html --log-format=COMMON --anonymize-ip</code>. You will get this neat, anonymized HTML report:
<figure><img src="https://cdn.clever-cloud.com/uploads/2021/08/goaccess.png" alt="Demonstrating the filter" />
<figcaption>Viusalize CLF logs with GoAccess</figcaption></figure>
There are of course lots of other tools you can use to visualize logs, like our latest <a href="https://www.clever.cloud/developers/addons/elastic/">Elastic add-on</a> for instance :) Or you can go straight into the metrics tab of your application or add-on and start playing with Warp10. This is actually what we use when you see the live map under the Overview tab of your application.

We hope you'll find this new feature practical and as always welcome your input to make this better. Happy coding!]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The story of clever-tools 1.0.0</title>
		<link>https://www.clever.cloud/blog/features/2018/10/15/the-story-of-clever-tools-1-0-0/</link>
		
		<dc:creator><![CDATA[Hubert Sablonnière]]></dc:creator>
		<pubDate>Mon, 15 Oct 2018 16:00:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[clever tools]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[jenkins]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2018/10/15/the-story-of-clever-tools-1-0-0/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="clever tools 1 0 0 story 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>We have some news about our dear clever-tools, the Clever Cloud CLI for humans, robots and others.</p>
<p>Back in January, we released version 0.10.1 which contained <a href="https://github.com/CleverCloud/clever-tools/blob/master/CHANGELOG.md#0101-2018-01-16">some new commands and a few bug fixes</a>. Today we&#39;re releasing version 1.0.0!</p>
<p>You can find all the details about the user oriented changes in the <a href="https://github.com/CleverCloud/clever-tools/blob/master/CHANGELOG.md#100-2018-10-15">CHANGELOG</a>. In this article, we&#39;ll cover the structural changes related to the project:</p>
<ul>
<li>Improved error handling = better usage in CI/CD pipelines</li>
<li>ES2015 refactor + ESLint = better contributing experience</li>
<li>Goodbye nodegit, hello isomorphic-git!</li>
<li>Improved Jenkins build = more release methods and beta channel (npm, deb, rpm, arch, homebrew and chocolatey)</li>
</ul>
<p>Now let me tell you the story of this release...</p>
<span id="more-2945"></span>

<h2 id="improved-error-handling--better-usage-in-cicd-pipelines">Improved error handling = better usage in CI/CD pipelines</h2>
<p>It all started with <a href="https://github.com/CleverCloud/clever-tools/issues/195">issue 195</a>. With the previous version, when a user tried to <code>clever deploy</code> a non existing branch, the error message was <a href="https://github.com/CleverCloud/clever-tools/issues/195#issuecomment-371101087">a bit too raw</a>. Our colleague <a href="https://twitter.com/k33g_org">Philippe</a> wanted emojis, but we had to decline 😭.</p>
<p>While investigating this error message and how to improve it, we realized that the command was not returning a proper error exit status. This is a very important rule to follow when you&#39;re writing a terminal command/script:</p>
<ul>
<li>If everything went well: return exit status <code>0</code></li>
<li>If something went wrong: return exit status <code>1</code> (or <a href="http://www.tldp.org/LDP/abs/html/exitcodes.html">another one more specific</a>)</li>
</ul>
<p>Our CLI is built for humans AND robots. We want to empower our terminal addicted users. Moreover, we want to empower our users to automate anything related to Clever Cloud in their CI/CD pipeline. In such cases, returning a proper error exit status is crucial to mark a CI/CD job as successful or failed.</p>
<p>We took a quick look at the rest of the codebase and noticed that other commands were concerned by this problem. We reworked the code of <code>clever deploy</code> and decided to apply the same error handling to all the other commands:</p>
<ul>
<li>For humans: Always have an <code>[ERROR]</code> prefix (colored in red) when we display an error message.</li>
<li>For robots: Always log error messages to <code>stderr</code>.</li>
<li>For robots: Always return <code>1</code> as exit status when something goes wrong.</li>
</ul>
<p>This obviously required some significant work. We had to go through all the 28 commands. Nevertheless, we&#39;re sure this will help you to build more robust and automated jobs, interacting with the Clever Cloud platform.</p>
<h2 id="es2015-refactor--eslint--better-contributing-experience">ES2015 refactor + ESLint = better contributing experience</h2>
<p>While we went through the codebase, we took the opportunity to do a bit of refactoring.</p>
<p>First, we decided to update all our code to ES2015+ syntax. We tried to use most of the modern good practices of the JavaScript ecosystem when it made sense (destructuring, rest parameters, fat arrows...). We also decided to setup an <a href="https://github.com/CleverCloud/clever-tools/blob/master/.eslintrc.js">ESLint config file</a> (based on <a href="https://github.com/standard/standard">StandardJS</a>) to enforce our codestyle for the next iterations. This lint check is now part of our automated test suite on <a href="https://travis-ci.org/CleverCloud/clever-tools">Travis CI</a> which is triggered on each pull-request.</p>
<p>This big refactoring took some time but it allowed us to reduce the number of lines of code while improving the overall consistency and readability. We hope this will drive more users to customize the clever-tools and propose pull-requests for bug fixes and feature requests.</p>
<p>Looking at how easily the new <code>clever console</code> was added by <a href="https://github.com/CleverCloud/clever-tools/pull/248">an outside contributor</a>, it seems like we&#39;re on the right path.</p>
<h2 id="goodbye-nodegit">Goodbye nodegit</h2>
<p>During this refactoring, we updated most of our dependencies but one of them required special attention: <a href="https://github.com/nodegit/nodegit">NodeGit</a>.</p>
<p>NodeGit is a node.js module which provides bindings over <a href="https://libgit2.org/">libgit2</a>, a portable and pure C implementation of the git core methods. This is commonly referred to as a &quot;native module&quot; in the node.js ecosystem. Each time you install NodeGit, npm will try to build libgit2 from source (in some situations, it will try to download pre-builds). Because we want our users to have a straightforward installation experience, this native module thing had many drawbacks:</p>
<ul>
<li>In our Travis CI config, we had to <a href="https://github.com/CleverCloud/clever-tools/blob/0.10.0/.travis.yml#L5-L10">install some native dependencies</a> so npm could build libgit2 from source.</li>
<li>Some of our users tried to install the clever-tools via npm and had difficulties because of this.</li>
<li>Our users don&#39;t all use the same version of node.js, this also multiplied the number of weird cases we had to support.</li>
<li>Each time we wanted to update NodeGit, it was a puzzle to resolve.</li>
</ul>
<p>All those problems pushed us to stop releasing the clever-tools via npm. ⚠️ SPOILER ALERT: it&#39;s back for version 1.0.0.</p>
<p>The second problem is that we use <a href="https://github.com/zeit/pkg/">pkg</a>. This tool is great. It lets you compile a node.js project to different portable binaries for MacOS, Windows and GNU/Linux. We&#39;ve been using it for a while to provide various installation methods. When we dropped installation via npm for 0.10.1, the binaries built with pkg where the only official way to use the clever-tools.</p>
<p>This mix of NodeGit + pkg complicated the situation even more:</p>
<ul>
<li>The binaries built with pkg did not include native dependencies. We had to distribute the right <code>nodegit.node</code> file along with our main binary file and users had to have it in their <code>PATH</code>.</li>
<li>On some GNU/Linux distributions, we <a href="https://github.com/nodegit/nodegit/search?q=libcurl-gnutls&amp;type=Issues">had problems with native dependencies</a> like <code>libcurl-gnutls</code>, <code>libnghttp2-git</code> or <code>libssh2</code></li>
</ul>
<p>We already looked for a replacement solution but a fairly new one came up <a href="https://twitter.com/mojavelinux/status/968432035680284673">to our attention in February</a>...</p>
<h2 id="hello-isomorphic-git">Hello isomorphic-git</h2>
<p><a href="https://github.com/isomorphic-git/isomorphic-git">isomorphic-git</a> is a &quot;pure JavaScript implementation of git that works in node and browser environments&quot;. The project was created by <a href="https://twitter.com/wmhilton">William Hilton</a>. This guy is awesome!</p>
<p>As I said, we heard about it in February but we only tried to use it for our use-case in July. It does not support all the git feature set (yet) but it has strong foundations and we only need a few things for the clever-tools:</p>
<ul>
<li>list and resolve branches</li>
<li>list and resolve commits</li>
<li>add/rm remotes</li>
<li>push to repos (via HTTPS)</li>
</ul>
<p>We were missing a few features so we reached out to William to see if we could help and/or contribute. In the end, <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hsablonniere">we contributed a few features</a> in the codebase and <a href="https://isomorphic-git.org/blog/2018/07/23/isomorphic-git-dot-org-corporate-sponsors-and-a-new-CORS-proxy">we sponsored the hosting of the CORS-proxy</a> which is used to demo the project in browsers.</p>
<p>By replacing NodeGit with isomorphic-git, we can say goodbye to most of the problems we described earlier:</p>
<ul>
<li>no need to worry about different node.js versions</li>
<li>no need to have native dependencies on our CI server to build/test the project</li>
<li>no need to distribute <code>nodegit.node</code> with the pkg binary</li>
<li>no need for a user to have the right native dependencies on his/her system to use it</li>
<li>npm releases are back</li>
</ul>
<h2 id="improved-jenkins-build--more-release-methods-and-beta-channel">Improved Jenkins build = more release methods and beta channel</h2>
<p>Because we decided to ditch NodeGit, we were able to simplify the packaging (no more <code>nodegit.node</code> and no native dependencies). This required some rework on our Jenkins builds but it was a good occasion to migrate 5 different jobs to one multibranch pipeline project.</p>
<p>We&#39;ll discuss the details of this new build system and how we set it up in another article. For now though, here&#39;s what changed:</p>
<ul>
<li>All platforms:<ul>
<li>Added: installation via npm is back</li>
</ul>
</li>
<li>GNU/Linux:<ul>
<li>Added: rpm packages (stable &amp; beta) with a <a href="https://bintray.com/clevercloud/rpm/clever-tools">yum repo on Bintray</a></li>
<li>Added: deb packages (stable &amp; beta) with an <a href="https://bintray.com/clevercloud/deb/clever-tools">apt repo on Bintray</a></li>
<li>Added: Exherbo exheres <a href="https://github.com/CleverCloud/CleverCloud-exheres/tree/master/packages/dev-util/clever-tools-bin">clever-tools-bin</a></li>
<li>Changed: <a href="https://aur.archlinux.org/packages/clever-tools-bin">dedicated AUR package</a> for beta versions</li>
</ul>
</li>
<li>MacOS:<ul>
<li>Changed: <a href="https://github.com/CleverCloud/homebrew-tap">dedicated homebrew tap</a> for beta versions</li>
</ul>
</li>
<li>Windows:<ul>
<li>Changed: chocolatey packages are now automatically published (no more manual upload, no more manual review from chocolatey&#39;s team)</li>
<li>Changed: chocolatey packages are no longer published on chocolatey.org</li>
<li>Changed: chocolatey packages are published (beta &amp; stable) on <a href="https://bintray.com/clevercloud/nupkg/clever-tools">Bintray</a> but you can still use the <code>choco</code> CLI to install them (see <a href="https://github.com/CleverCloud/clever-tools/#using-chocolatey">chocolatey installation docs</a> for the specifics).</li>
</ul>
</li>
</ul>
<p>The structural changes of this release will help us to be more reactive on the project. We&#39;ll be able to publish new features and bug fixes more easily and more often. Hopefully, this will improve the quality of the clever-tools and push more customers who only use the Web console to try the CLI way of life.</p>
<p>We&#39;re looking forward to read your feedbacks on this release through are usual channels: support chat, email, Twitter, GitHub issues…</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="clever tools 1 0 0 story 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-1-0-0-story-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>We have some news about our dear clever-tools, the Clever Cloud CLI for humans, robots and others.</p>
<p>Back in January, we released version 0.10.1 which contained <a href="https://github.com/CleverCloud/clever-tools/blob/master/CHANGELOG.md#0101-2018-01-16">some new commands and a few bug fixes</a>. Today we&#39;re releasing version 1.0.0!</p>
<p>You can find all the details about the user oriented changes in the <a href="https://github.com/CleverCloud/clever-tools/blob/master/CHANGELOG.md#100-2018-10-15">CHANGELOG</a>. In this article, we&#39;ll cover the structural changes related to the project:</p>
<ul>
<li>Improved error handling = better usage in CI/CD pipelines</li>
<li>ES2015 refactor + ESLint = better contributing experience</li>
<li>Goodbye nodegit, hello isomorphic-git!</li>
<li>Improved Jenkins build = more release methods and beta channel (npm, deb, rpm, arch, homebrew and chocolatey)</li>
</ul>
<p>Now let me tell you the story of this release...</p>
<span id="more-2945"></span>

<h2 id="improved-error-handling--better-usage-in-cicd-pipelines">Improved error handling = better usage in CI/CD pipelines</h2>
<p>It all started with <a href="https://github.com/CleverCloud/clever-tools/issues/195">issue 195</a>. With the previous version, when a user tried to <code>clever deploy</code> a non existing branch, the error message was <a href="https://github.com/CleverCloud/clever-tools/issues/195#issuecomment-371101087">a bit too raw</a>. Our colleague <a href="https://twitter.com/k33g_org">Philippe</a> wanted emojis, but we had to decline 😭.</p>
<p>While investigating this error message and how to improve it, we realized that the command was not returning a proper error exit status. This is a very important rule to follow when you&#39;re writing a terminal command/script:</p>
<ul>
<li>If everything went well: return exit status <code>0</code></li>
<li>If something went wrong: return exit status <code>1</code> (or <a href="http://www.tldp.org/LDP/abs/html/exitcodes.html">another one more specific</a>)</li>
</ul>
<p>Our CLI is built for humans AND robots. We want to empower our terminal addicted users. Moreover, we want to empower our users to automate anything related to Clever Cloud in their CI/CD pipeline. In such cases, returning a proper error exit status is crucial to mark a CI/CD job as successful or failed.</p>
<p>We took a quick look at the rest of the codebase and noticed that other commands were concerned by this problem. We reworked the code of <code>clever deploy</code> and decided to apply the same error handling to all the other commands:</p>
<ul>
<li>For humans: Always have an <code>[ERROR]</code> prefix (colored in red) when we display an error message.</li>
<li>For robots: Always log error messages to <code>stderr</code>.</li>
<li>For robots: Always return <code>1</code> as exit status when something goes wrong.</li>
</ul>
<p>This obviously required some significant work. We had to go through all the 28 commands. Nevertheless, we&#39;re sure this will help you to build more robust and automated jobs, interacting with the Clever Cloud platform.</p>
<h2 id="es2015-refactor--eslint--better-contributing-experience">ES2015 refactor + ESLint = better contributing experience</h2>
<p>While we went through the codebase, we took the opportunity to do a bit of refactoring.</p>
<p>First, we decided to update all our code to ES2015+ syntax. We tried to use most of the modern good practices of the JavaScript ecosystem when it made sense (destructuring, rest parameters, fat arrows...). We also decided to setup an <a href="https://github.com/CleverCloud/clever-tools/blob/master/.eslintrc.js">ESLint config file</a> (based on <a href="https://github.com/standard/standard">StandardJS</a>) to enforce our codestyle for the next iterations. This lint check is now part of our automated test suite on <a href="https://travis-ci.org/CleverCloud/clever-tools">Travis CI</a> which is triggered on each pull-request.</p>
<p>This big refactoring took some time but it allowed us to reduce the number of lines of code while improving the overall consistency and readability. We hope this will drive more users to customize the clever-tools and propose pull-requests for bug fixes and feature requests.</p>
<p>Looking at how easily the new <code>clever console</code> was added by <a href="https://github.com/CleverCloud/clever-tools/pull/248">an outside contributor</a>, it seems like we&#39;re on the right path.</p>
<h2 id="goodbye-nodegit">Goodbye nodegit</h2>
<p>During this refactoring, we updated most of our dependencies but one of them required special attention: <a href="https://github.com/nodegit/nodegit">NodeGit</a>.</p>
<p>NodeGit is a node.js module which provides bindings over <a href="https://libgit2.org/">libgit2</a>, a portable and pure C implementation of the git core methods. This is commonly referred to as a &quot;native module&quot; in the node.js ecosystem. Each time you install NodeGit, npm will try to build libgit2 from source (in some situations, it will try to download pre-builds). Because we want our users to have a straightforward installation experience, this native module thing had many drawbacks:</p>
<ul>
<li>In our Travis CI config, we had to <a href="https://github.com/CleverCloud/clever-tools/blob/0.10.0/.travis.yml#L5-L10">install some native dependencies</a> so npm could build libgit2 from source.</li>
<li>Some of our users tried to install the clever-tools via npm and had difficulties because of this.</li>
<li>Our users don&#39;t all use the same version of node.js, this also multiplied the number of weird cases we had to support.</li>
<li>Each time we wanted to update NodeGit, it was a puzzle to resolve.</li>
</ul>
<p>All those problems pushed us to stop releasing the clever-tools via npm. ⚠️ SPOILER ALERT: it&#39;s back for version 1.0.0.</p>
<p>The second problem is that we use <a href="https://github.com/zeit/pkg/">pkg</a>. This tool is great. It lets you compile a node.js project to different portable binaries for MacOS, Windows and GNU/Linux. We&#39;ve been using it for a while to provide various installation methods. When we dropped installation via npm for 0.10.1, the binaries built with pkg where the only official way to use the clever-tools.</p>
<p>This mix of NodeGit + pkg complicated the situation even more:</p>
<ul>
<li>The binaries built with pkg did not include native dependencies. We had to distribute the right <code>nodegit.node</code> file along with our main binary file and users had to have it in their <code>PATH</code>.</li>
<li>On some GNU/Linux distributions, we <a href="https://github.com/nodegit/nodegit/search?q=libcurl-gnutls&amp;type=Issues">had problems with native dependencies</a> like <code>libcurl-gnutls</code>, <code>libnghttp2-git</code> or <code>libssh2</code></li>
</ul>
<p>We already looked for a replacement solution but a fairly new one came up <a href="https://twitter.com/mojavelinux/status/968432035680284673">to our attention in February</a>...</p>
<h2 id="hello-isomorphic-git">Hello isomorphic-git</h2>
<p><a href="https://github.com/isomorphic-git/isomorphic-git">isomorphic-git</a> is a &quot;pure JavaScript implementation of git that works in node and browser environments&quot;. The project was created by <a href="https://twitter.com/wmhilton">William Hilton</a>. This guy is awesome!</p>
<p>As I said, we heard about it in February but we only tried to use it for our use-case in July. It does not support all the git feature set (yet) but it has strong foundations and we only need a few things for the clever-tools:</p>
<ul>
<li>list and resolve branches</li>
<li>list and resolve commits</li>
<li>add/rm remotes</li>
<li>push to repos (via HTTPS)</li>
</ul>
<p>We were missing a few features so we reached out to William to see if we could help and/or contribute. In the end, <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hsablonniere">we contributed a few features</a> in the codebase and <a href="https://isomorphic-git.org/blog/2018/07/23/isomorphic-git-dot-org-corporate-sponsors-and-a-new-CORS-proxy">we sponsored the hosting of the CORS-proxy</a> which is used to demo the project in browsers.</p>
<p>By replacing NodeGit with isomorphic-git, we can say goodbye to most of the problems we described earlier:</p>
<ul>
<li>no need to worry about different node.js versions</li>
<li>no need to have native dependencies on our CI server to build/test the project</li>
<li>no need to distribute <code>nodegit.node</code> with the pkg binary</li>
<li>no need for a user to have the right native dependencies on his/her system to use it</li>
<li>npm releases are back</li>
</ul>
<h2 id="improved-jenkins-build--more-release-methods-and-beta-channel">Improved Jenkins build = more release methods and beta channel</h2>
<p>Because we decided to ditch NodeGit, we were able to simplify the packaging (no more <code>nodegit.node</code> and no native dependencies). This required some rework on our Jenkins builds but it was a good occasion to migrate 5 different jobs to one multibranch pipeline project.</p>
<p>We&#39;ll discuss the details of this new build system and how we set it up in another article. For now though, here&#39;s what changed:</p>
<ul>
<li>All platforms:<ul>
<li>Added: installation via npm is back</li>
</ul>
</li>
<li>GNU/Linux:<ul>
<li>Added: rpm packages (stable &amp; beta) with a <a href="https://bintray.com/clevercloud/rpm/clever-tools">yum repo on Bintray</a></li>
<li>Added: deb packages (stable &amp; beta) with an <a href="https://bintray.com/clevercloud/deb/clever-tools">apt repo on Bintray</a></li>
<li>Added: Exherbo exheres <a href="https://github.com/CleverCloud/CleverCloud-exheres/tree/master/packages/dev-util/clever-tools-bin">clever-tools-bin</a></li>
<li>Changed: <a href="https://aur.archlinux.org/packages/clever-tools-bin">dedicated AUR package</a> for beta versions</li>
</ul>
</li>
<li>MacOS:<ul>
<li>Changed: <a href="https://github.com/CleverCloud/homebrew-tap">dedicated homebrew tap</a> for beta versions</li>
</ul>
</li>
<li>Windows:<ul>
<li>Changed: chocolatey packages are now automatically published (no more manual upload, no more manual review from chocolatey&#39;s team)</li>
<li>Changed: chocolatey packages are no longer published on chocolatey.org</li>
<li>Changed: chocolatey packages are published (beta &amp; stable) on <a href="https://bintray.com/clevercloud/nupkg/clever-tools">Bintray</a> but you can still use the <code>choco</code> CLI to install them (see <a href="https://github.com/CleverCloud/clever-tools/#using-chocolatey">chocolatey installation docs</a> for the specifics).</li>
</ul>
</li>
</ul>
<p>The structural changes of this release will help us to be more reactive on the project. We&#39;ll be able to publish new features and bug fixes more easily and more often. Hopefully, this will improve the quality of the clever-tools and push more customers who only use the Web console to try the CLI way of life.</p>
<p>We&#39;re looking forward to read your feedbacks on this release through are usual channels: support chat, email, Twitter, GitHub issues…</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>One Framework a Day keeps the Boredom Away: step 0</title>
		<link>https://www.clever.cloud/blog/features/2017/10/09/1fdba-step0/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Mon, 09 Oct 2017 14:25:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[1fdba]]></category>
		<category><![CDATA[clevercloud]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[cloud]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2017/10/09/1fdba-step0/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="1fdba step0 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>Welcome to the first edition of <em>One Framework a Day keeps the Boredom Away</em>. In this series I will show you how to deploy a particular framework on Clever Cloud.</p>
<span id="more-2905"></span>

<p>This post 0 is a little different as its goal is to explain you how Clever Cloud works and to help you get setup. If you already know Clever Cloud and have the CLI installed, wait for the next post tomorrow :)</p>
<h2 id="what-is-clever-cloud">What is Clever Cloud?</h2>
<p>Clever Cloud is a Platform as a Service. We like to say we provide IT Automation and Application Sustainability. That and additional sleeping hours and serenity for our users.</p>
<h3 id="it-automation">IT Automation</h3>
<p>What we mean by IT Automation is that we automate things. Beyond this obvious statement, what is important is that we do it, so you don&#39;t have to. You should be able to focus on writing code because it is what brings value to your organization. Anything else than code is infrastructure. It&#39;s a cost. We&#39;ll manage it.</p>
<p>To make it work you just have to agree with a couple of loose rules (well, <a href="https://12factor.net/">12 actually</a>) and everything will be fine. If you use a build tool, just add a json file telling us which build tool goal we have to run, push your code and we do the rest.</p>
<p>From now on your application is up and running on Clever Cloud. That&#39;s where Application Sustainability kicks in.</p>
<h3 id="application-sustainability">Application Sustainability</h3>
<p>What we mean by Application Sustainability is making sure your application stays in production. To do so we provide hardware monitoring out of the box. Even better, since you are usually using a build tool we know what runtime you are using so we know how to monitor it. We automatically integrate with Java&#39;s JMX or Haskell&#39;s EKG for instance.</p>
<p>This monitoring allow* us to give you additional features like self-healing: If your application crashes or does not answer we restart it automatically. We also bring automatic scalability both vertically and horizontally. And everything happens without downtime because we do blue/green deployment. Meaning, when we need to update a VM (say for an OS update or a security fix), we don&#39;t update it per se. We restart the same cycle on a brand new, updated VM. Once it&#39;s up, our reverse proxy simply redirects traffic to the new one(s). In that way, we decorelate service uptime from server uptime.</p>
<p>We can do all that because we embraced Immutable Infrastructure. This concept appeared somewhere around 2010 and is a full paradigm shift. Basically, not a single part of your infrastructure will ever be updated in place. It will either be created or removed, never modified. Modifying something creates uncertainty and possibly an inability to be reproduced. Immutable Infrastructure ensures reproducibility.</p>
<h3 id="applications-or-add-ons">Applications or add-ons?</h3>
<p>To support this, we manage two different concepts: Application and Add-on. Applications are stateless. They are represented by a runtime and sometimes a build tool. For example a Wordpress website does not need a build tool, just a runtime: a web server. As developers, application is where we spend the most time on. This is where we create value. All applications instances (VMs) are immutable. So you need to make sure your deployments are stateless. You have to store state in a database, object store or filesystem.</p>
<p>Which is where add-ons come in handy. They are not yet managed as Immutable Infrastructure (it is however part of our plan). They  all our DBaaS (which all have automatic and on-demand backups), our shared filesystem, object storage like S3 etc… It also includes stuff like Jenkins, Artifactory, GitHub Enteprise, Gitlab and more.</p>
<p>Hopefuly this gave you a much better idea of what is Clever Cloud. We could go on longer but I will assume you are bored already. So moving on to practical things :D</p>
<h2 id="deploy-your-first-application">Deploy your first Application</h2>
<p>To create an account, simply go to our <a href="https://www.clever.cloud/">website</a> and click on &#39;Sign UP and Try&#39;. If you do not have a GitHub account you can signup manually <a href="https://www.clever.cloud/#regular-signup">here</a>. Once you have an account you can start playing around with your free credits. Take a look at some of the videos we made on our <a href="https://www.youtube.com/channel/UC-Fl-rLmJ-Xv1nZHVPBzUkQ">YouTube channel</a>.</p>
<h3 id="setup-the-cli">Setup the CLI</h3>
<p>After you have setup your accout you can install our CLI. It will be heavily used on most posts of the <em>One Framework a Day</em> series. There are a couple of ways you can install it. First you can checkout the <a href="https://github.com/CleverCloud/clever-tools">GitHub project</a> and build it from source. It&#39;s Node.js app so you will need npm, node and a couple of other dependencies described in the Readme.</p>
<p>You can also use a package manager or installer. Head over to our <a href="https://www.clever.cloud/developers/clever-tools/getting_started/">documentation</a> to get the details for MacOS and homebrew, Windows and chocolatey or Linux and its prebuilt binaries.</p>
<h3 id="test-the-cli">Test the CLI</h3>
<p>If you have an account and installed the CLI, you should be able to test your first application. First thing to do is to link your account to the CLI. Simply type <code>clever login</code>. This will get you through a login prompt to retrieve your newly created identification tokens.</p>
<p>Create a new directory called <code>hello-world-app</code> and inside create an <code>index.html</code> file containing the string <code>Hello World</code>. Then initiate a new git repository and commit the html file. Here are the steps you need to follow if you have a Unix system:</p>
<pre><code class="language-bash">mkdir hello-world-app
cd hello-world-app
touch index.html
echo &#39;Hello World&#39; &gt; index.html
git init
git add index.html
git commit -m &quot;my new website&quot;
</code></pre>
<p>You now have a static website ready to be deployed to Clever Cloud. First you need to create an application of type static, then deploy the content of your site to the newly created application. Once it&#39;s done, open the website in your default browser:</p>
<pre><code class="language-bash">clever create --type static-apache hello
clever deploy
clever open
</code></pre>
<h2 id="conclusion">Conclusion</h2>
<p>Now you should know more about Clever Cloud and you have deployed your first application. Please note that if you don&#39;t like command line, you can also do all of this from our web console or our API. Actually, both the CLI and the console use our API :) This also means you can script whatever you want! And now remember that all the next posts will be dedicated to deploying a particular framework on Clever Cloud. See you soon :)</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="1fdba step0 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/1fdba-step0-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>Welcome to the first edition of <em>One Framework a Day keeps the Boredom Away</em>. In this series I will show you how to deploy a particular framework on Clever Cloud.</p>
<span id="more-2905"></span>

<p>This post 0 is a little different as its goal is to explain you how Clever Cloud works and to help you get setup. If you already know Clever Cloud and have the CLI installed, wait for the next post tomorrow :)</p>
<h2 id="what-is-clever-cloud">What is Clever Cloud?</h2>
<p>Clever Cloud is a Platform as a Service. We like to say we provide IT Automation and Application Sustainability. That and additional sleeping hours and serenity for our users.</p>
<h3 id="it-automation">IT Automation</h3>
<p>What we mean by IT Automation is that we automate things. Beyond this obvious statement, what is important is that we do it, so you don&#39;t have to. You should be able to focus on writing code because it is what brings value to your organization. Anything else than code is infrastructure. It&#39;s a cost. We&#39;ll manage it.</p>
<p>To make it work you just have to agree with a couple of loose rules (well, <a href="https://12factor.net/">12 actually</a>) and everything will be fine. If you use a build tool, just add a json file telling us which build tool goal we have to run, push your code and we do the rest.</p>
<p>From now on your application is up and running on Clever Cloud. That&#39;s where Application Sustainability kicks in.</p>
<h3 id="application-sustainability">Application Sustainability</h3>
<p>What we mean by Application Sustainability is making sure your application stays in production. To do so we provide hardware monitoring out of the box. Even better, since you are usually using a build tool we know what runtime you are using so we know how to monitor it. We automatically integrate with Java&#39;s JMX or Haskell&#39;s EKG for instance.</p>
<p>This monitoring allow* us to give you additional features like self-healing: If your application crashes or does not answer we restart it automatically. We also bring automatic scalability both vertically and horizontally. And everything happens without downtime because we do blue/green deployment. Meaning, when we need to update a VM (say for an OS update or a security fix), we don&#39;t update it per se. We restart the same cycle on a brand new, updated VM. Once it&#39;s up, our reverse proxy simply redirects traffic to the new one(s). In that way, we decorelate service uptime from server uptime.</p>
<p>We can do all that because we embraced Immutable Infrastructure. This concept appeared somewhere around 2010 and is a full paradigm shift. Basically, not a single part of your infrastructure will ever be updated in place. It will either be created or removed, never modified. Modifying something creates uncertainty and possibly an inability to be reproduced. Immutable Infrastructure ensures reproducibility.</p>
<h3 id="applications-or-add-ons">Applications or add-ons?</h3>
<p>To support this, we manage two different concepts: Application and Add-on. Applications are stateless. They are represented by a runtime and sometimes a build tool. For example a Wordpress website does not need a build tool, just a runtime: a web server. As developers, application is where we spend the most time on. This is where we create value. All applications instances (VMs) are immutable. So you need to make sure your deployments are stateless. You have to store state in a database, object store or filesystem.</p>
<p>Which is where add-ons come in handy. They are not yet managed as Immutable Infrastructure (it is however part of our plan). They  all our DBaaS (which all have automatic and on-demand backups), our shared filesystem, object storage like S3 etc… It also includes stuff like Jenkins, Artifactory, GitHub Enteprise, Gitlab and more.</p>
<p>Hopefuly this gave you a much better idea of what is Clever Cloud. We could go on longer but I will assume you are bored already. So moving on to practical things :D</p>
<h2 id="deploy-your-first-application">Deploy your first Application</h2>
<p>To create an account, simply go to our <a href="https://www.clever.cloud/">website</a> and click on &#39;Sign UP and Try&#39;. If you do not have a GitHub account you can signup manually <a href="https://www.clever.cloud/#regular-signup">here</a>. Once you have an account you can start playing around with your free credits. Take a look at some of the videos we made on our <a href="https://www.youtube.com/channel/UC-Fl-rLmJ-Xv1nZHVPBzUkQ">YouTube channel</a>.</p>
<h3 id="setup-the-cli">Setup the CLI</h3>
<p>After you have setup your accout you can install our CLI. It will be heavily used on most posts of the <em>One Framework a Day</em> series. There are a couple of ways you can install it. First you can checkout the <a href="https://github.com/CleverCloud/clever-tools">GitHub project</a> and build it from source. It&#39;s Node.js app so you will need npm, node and a couple of other dependencies described in the Readme.</p>
<p>You can also use a package manager or installer. Head over to our <a href="https://www.clever.cloud/developers/clever-tools/getting_started/">documentation</a> to get the details for MacOS and homebrew, Windows and chocolatey or Linux and its prebuilt binaries.</p>
<h3 id="test-the-cli">Test the CLI</h3>
<p>If you have an account and installed the CLI, you should be able to test your first application. First thing to do is to link your account to the CLI. Simply type <code>clever login</code>. This will get you through a login prompt to retrieve your newly created identification tokens.</p>
<p>Create a new directory called <code>hello-world-app</code> and inside create an <code>index.html</code> file containing the string <code>Hello World</code>. Then initiate a new git repository and commit the html file. Here are the steps you need to follow if you have a Unix system:</p>
<pre><code class="language-bash">mkdir hello-world-app
cd hello-world-app
touch index.html
echo &#39;Hello World&#39; &gt; index.html
git init
git add index.html
git commit -m &quot;my new website&quot;
</code></pre>
<p>You now have a static website ready to be deployed to Clever Cloud. First you need to create an application of type static, then deploy the content of your site to the newly created application. Once it&#39;s done, open the website in your default browser:</p>
<pre><code class="language-bash">clever create --type static-apache hello
clever deploy
clever open
</code></pre>
<h2 id="conclusion">Conclusion</h2>
<p>Now you should know more about Clever Cloud and you have deployed your first application. Please note that if you don&#39;t like command line, you can also do all of this from our web console or our API. Actually, both the CLI and the console use our API :) This also means you can script whatever you want! And now remember that all the next posts will be dedicated to deploying a particular framework on Clever Cloud. See you soon :)</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SSH Gateway General Availability</title>
		<link>https://www.clever.cloud/blog/features/2017/09/18/ssh-gateway-ga/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Mon, 18 Sep 2017 11:55:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[ssh]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2017/09/18/ssh-gateway-ga/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="ssh gateway ga 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Today we announce the general availability of our SSH gateway. It was in Beta for a while but is now production ready. All of this means you can now SSH to your VMs \o/.

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

If you are in a hurry, everything is explained in our <a href="https://www.clever.cloud/developers/doc/administrate/ssh-clever-tools/">documentation</a>. Now I would advise you to still read what follows because it's important.
<h2 id="friends-dont-let-friends-ssh-on-production">Friends don't let Friends SSH on production</h2>
Or do they? Delicate question. At Clever Cloud we get scared when an SSH connection is opened to a production VM. This usually means something is wrong. Then there are two options.
<ul>
 	<li>A user gets on the machine to debug something, fixes it on their code, pushes and redeploys.</li>
 	<li>A user gets on the machine to debug something, fixes it on the machine and calls it a day.</li>
</ul>
The second option is the one we dread. Since Clever Cloud embraces Immutable Infrastructure, all our machines can be replaced by new ones at any time. Which means that if our user logged in a machine with SSH and fixed something wrong on that very machine, all they did will be lost after a new deployment.

So as a reminder, we really want you to be careful and to always remember that doing things manually through SSH is a bad practice, that it should have been automated. It is however perfectly ok to use SSH to figure out what is wrong on the machine and then fix your code :)
<h2 id="how-does-it-work">How does it work?</h2>
You can SSH to an instance of your application in two different ways. You can use SSH or the <a href="https://www.clever.cloud/developers/clever-tools/getting_started/">clever-tools</a> CLI.
<h3 id="with-ssh">With SSH</h3>
Super simple, simply type <code>ssh -t ssh@sshgateway-clevercloud-customers.services.clever-cloud.com &lt;app_id&gt;</code> and you are in.
<h3 id="with-clever-tools">With Clever Tools</h3>
Even simpler, if you have our CLI tool installed:
<pre><code class="language-bash">clever ssh
&gt; Opening an ssh shell
&gt; bas@67fbf787-3518-47bb-abd9-2c2575844edd ~ $ 
</code></pre>
If multiple instances are running, you will be asked which one to use:
<pre><code class="language-bash">clever ssh
&gt; 1) Sleepy Ponita - Instance 0 - UP (11281f38-31ff-43a7-8595-a2d82630c32b)
&gt; 2) Tense Caterpie - Instance 1 - UP (b10d19d9-5238-408b-b038-3e32c7a301c2)
&gt; Your choice: 1
&gt; Opening an ssh shell
&gt; bas@11281f38-31ff-43a7-8595-a2d82630c32b ~ $
</code></pre>
And that's all! We hope you like that new feature and that you will put it to good use. Remember that with great power comes great responsibilities!]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="ssh gateway ga 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/ssh-gateway-ga-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Today we announce the general availability of our SSH gateway. It was in Beta for a while but is now production ready. All of this means you can now SSH to your VMs \o/.

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

If you are in a hurry, everything is explained in our <a href="https://www.clever.cloud/developers/doc/administrate/ssh-clever-tools/">documentation</a>. Now I would advise you to still read what follows because it's important.
<h2 id="friends-dont-let-friends-ssh-on-production">Friends don't let Friends SSH on production</h2>
Or do they? Delicate question. At Clever Cloud we get scared when an SSH connection is opened to a production VM. This usually means something is wrong. Then there are two options.
<ul>
 	<li>A user gets on the machine to debug something, fixes it on their code, pushes and redeploys.</li>
 	<li>A user gets on the machine to debug something, fixes it on the machine and calls it a day.</li>
</ul>
The second option is the one we dread. Since Clever Cloud embraces Immutable Infrastructure, all our machines can be replaced by new ones at any time. Which means that if our user logged in a machine with SSH and fixed something wrong on that very machine, all they did will be lost after a new deployment.

So as a reminder, we really want you to be careful and to always remember that doing things manually through SSH is a bad practice, that it should have been automated. It is however perfectly ok to use SSH to figure out what is wrong on the machine and then fix your code :)
<h2 id="how-does-it-work">How does it work?</h2>
You can SSH to an instance of your application in two different ways. You can use SSH or the <a href="https://www.clever.cloud/developers/clever-tools/getting_started/">clever-tools</a> CLI.
<h3 id="with-ssh">With SSH</h3>
Super simple, simply type <code>ssh -t ssh@sshgateway-clevercloud-customers.services.clever-cloud.com &lt;app_id&gt;</code> and you are in.
<h3 id="with-clever-tools">With Clever Tools</h3>
Even simpler, if you have our CLI tool installed:
<pre><code class="language-bash">clever ssh
&gt; Opening an ssh shell
&gt; bas@67fbf787-3518-47bb-abd9-2c2575844edd ~ $ 
</code></pre>
If multiple instances are running, you will be asked which one to use:
<pre><code class="language-bash">clever ssh
&gt; 1) Sleepy Ponita - Instance 0 - UP (11281f38-31ff-43a7-8595-a2d82630c32b)
&gt; 2) Tense Caterpie - Instance 1 - UP (b10d19d9-5238-408b-b038-3e32c7a301c2)
&gt; Your choice: 1
&gt; Opening an ssh shell
&gt; bas@11281f38-31ff-43a7-8595-a2d82630c32b ~ $
</code></pre>
And that's all! We hope you like that new feature and that you will put it to good use. Remember that with great power comes great responsibilities!]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Clever Tools Packaged!</title>
		<link>https://www.clever.cloud/blog/features/2017/09/06/clever-tools-packaged-windows-macos-gnu-linux/</link>
		
		<dc:creator><![CDATA[Clément Nivolle]]></dc:creator>
		<pubDate>Wed, 06 Sep 2017 11:47:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[clever tools]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[command line tool]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2017/09/06/clever-tools-packaged-windows-macos-gnu-linux/</guid>

					<description><![CDATA[<p><img width="1440" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="clever cli packaged 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1.png 1440w, https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1-300x113.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1-1024x384.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1-768x288.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1-1368x513.png 1368w" sizes="auto, (max-width: 1440px) 100vw, 1440px" /></p>We have packaged the Clever Tools CLI for Windows, MacOs &amp; GNU/Linux. This makes it way easier to setup. Discover how to do it for these platforms.

<span id="more-2901"></span>
<h2 id="clever-tools-should-better-be-called-clever-cool">Clever Tools should better be called Clever Cool</h2>
First of all, what is Clever Tools? Ok, basically it's all what you can do in the <a href="https://api.clever-cloud.com/v2/sessions/login/">console.clever-cloud.com</a> web UI but through a command line tool.

How is that awesome?

Well, it is. For most of our users, going back and forth in the web console is slowing their development workflow. Even if the web console is indispensable for people more comfortable with it, we wanted our users to be able to exactly to do the same in both. By the way, did you know you can also use the API to do everything?

Anyway, the cool part with Clever Tools is that you stay in the comfy shell. You can use Clever Tools along with vim, git and even grep. That's pretty handy to manage logs for instance.

Earlier this year, we released <a href="https://www.clever.cloud/blog/features/2017/02/09/clever-tools-release/">new features in the CLI 0.7.0</a> such as fine-grained access to logs, ssh into a running instance for debugging purposes (eg. list files, view logs locally,...)

So here is a short review of whay you can do:
<pre><code class="language-bash"># Deploying on the production server
$ clever deploy --alias prod
# Displaying the (live-updated) status of an app
$ clever activity --follow --alias preprod
# Show the logs
$ clever logs
# Create a free plan PG addon named my-addon in the Montreal zone
$ clever addon create postgresql-addon my-addon-pg --plan dev --region mtl
# Create a node.js app named my-app-dev in the Paris zone
$ clever create my-app-dev --type node --alias dev --region par
</code></pre>
But you can also set notifications, start and stop your apps... well, as we said: everything!

If you want to dig it a bit more, you will find<a href="https://www.clever.cloud/developers/doc/quickstart"> everything you can do within the CLI.</a>

Ok, but I already knew all that!

Ok, now what's new is that we packaged Clever Tools for Windows, GNU/Linux and MacOS.

But why is that a big deal?

Before that, you had to download and install node and npm to install <code>clever tools</code>. Now it's over, it's all packaged in a binary and very easy to setup.
<h2 id="how-to-install-on-macos">How to install on MacOS?</h2>
Clever Tools is packaged using <a href="https://brew.sh/">Homebrew</a>:
<pre><code class="language-bash">brew install CleverCloud/tap/clever-tools
</code></pre>
If you don't want to use <code>brew</code>, a pre-compiled version is available: <a href="https://clever-tools.cellar.services.clever-cloud.com/releases/0.9.0/clever-tools-0.9.0_macos.tar.gz">clever-tools-0.9.0_macos.tar.gz</a>. You need to put both files (<code>clever</code> and <code>nodegit.node</code>) in your <code>PATH</code> to use the application.
<h3 id="autocompletion">Autocompletion</h3>
Clever Tools comes with a comprehensive auto-completion system. The brew package installs it automatically (for <code>bash</code> and <code>zsh</code>). Make sure <code>bash-completions</code> or <code>zsh-completions</code> are properly set up.
<pre><code class="language-bash"># In ~/.bash_profile
./usr/local/etc/bash_completion

# In ~/.zshrc
fpath=(/usr/local/share/zsh-completions $fpath)
</code></pre>
<a href="https://www.clever.cloud/developers/clever-tools/getting_started/#macos">Documentation</a>.
<h2 id="how-to-install-on-windows">How to install on Windows?</h2>
Clever Tools is packaged using <a href="https://chocolatey.org/">Chocolatey</a>:
<pre><code class="language-bash">choco install clever-tools
</code></pre>
If you don't want to use <code>chocolatey</code>, a pre-compiled version is available: <a href="https://clever-tools.cellar.services.clever-cloud.com/releases/0.9.0/clever-tools-0.9.0_windows.zip">clever-tools-0.9.0_windows.zip</a>. You need to add both files (<code>clever.exe</code> and <code>nodegit.node</code>) to your <code>PATH</code> to use the application.

<a href="https://www.clever.cloud/developers/clever-tools/getting_started/#windows">Documentation</a>.
<h2 id="for-gnulinux">For GNU/Linux</h2>
Now what, we are still hesitating on the distributions to package it for. We would like to have your feedback on that. Feel free to give your point of view in the comments below are by email @ <a href="mailto:support@clever-cloud.com">support@clever-cloud.com</a>. Also, if someone wants to manage a PPA, that would be great.

A pre-compiled version is available: <a href="https://clever-tools.cellar.services.clever-cloud.com/releases/0.9.0/clever-tools-0.9.0_linux.tar.gz">clever-tools-0.9.0_linux.tar.gz</a>. You need to add both files (clever and nodegit.node) to your <code>PATH</code> to use the application.
<h3 id="autocompletion-1">Autocompletion</h3>
Clever Tools comes with a comprehensive auto-completion system, this is one way to install it:
<pre><code class="language-bash"># for bash
clever --bash-autocomplete-script $(which clever) | sudo tee /usr/share/bash-completion/completions/clever

# for zsh
clever --zsh-autocomplete-script $(which clever) | sudo tee /usr/share/zsh/site-functions
</code></pre>
<h3 id="in-case-of-libcurl-version-mismatch">In case of libcurl version mismatch</h3>
On some distributions (eg. archlinux), a <code>libcurl</code> version mismatch between the system default and the expected version can happen. If you see <code>Error: /usr/lib/libcurl.so.4: version 'CURL_OPENSSL_3' not found (required by /usr/bin/nodegit.node)</code> in the logs, you can fix the issue by using a compatible libcurl version:
<pre><code class="language-bash"># install libcurl-compat
pacman -S libcurl-compat # on archlinux

# add an alias to start clever tools with a compatible libcurl version
alias clever='LD_PRELOAD=libcurl.so.3 clever'
</code></pre>
<h3 id="manual-installation-advanced">Manual installation (advanced)</h3>
Even though we provide packaged versions, you can still install Clever Tools with npm: <code>npm install -g clever-tools</code>.

You can also install it from <a href="https://github.com/CleverCloud/clever-tools">source</a>.
<h2 id="thats-all-folks">That's all folks!</h2>
We hope you will enjoy these improvements and use more Clever Tools.

As always, feel free to contact us for any feedback. Have a look at the <a href="https://github.com/CleverCloud/clever-tools/issues">open issues</a>.]]></description>
										<content:encoded><![CDATA[<p><img width="1440" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="clever cli packaged 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1.png 1440w, https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1-300x113.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1-1024x384.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1-768x288.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/clever-cli-packaged-1-1368x513.png 1368w" sizes="auto, (max-width: 1440px) 100vw, 1440px" /></p>We have packaged the Clever Tools CLI for Windows, MacOs &amp; GNU/Linux. This makes it way easier to setup. Discover how to do it for these platforms.

<span id="more-2901"></span>
<h2 id="clever-tools-should-better-be-called-clever-cool">Clever Tools should better be called Clever Cool</h2>
First of all, what is Clever Tools? Ok, basically it's all what you can do in the <a href="https://api.clever-cloud.com/v2/sessions/login/">console.clever-cloud.com</a> web UI but through a command line tool.

How is that awesome?

Well, it is. For most of our users, going back and forth in the web console is slowing their development workflow. Even if the web console is indispensable for people more comfortable with it, we wanted our users to be able to exactly to do the same in both. By the way, did you know you can also use the API to do everything?

Anyway, the cool part with Clever Tools is that you stay in the comfy shell. You can use Clever Tools along with vim, git and even grep. That's pretty handy to manage logs for instance.

Earlier this year, we released <a href="https://www.clever.cloud/blog/features/2017/02/09/clever-tools-release/">new features in the CLI 0.7.0</a> such as fine-grained access to logs, ssh into a running instance for debugging purposes (eg. list files, view logs locally,...)

So here is a short review of whay you can do:
<pre><code class="language-bash"># Deploying on the production server
$ clever deploy --alias prod
# Displaying the (live-updated) status of an app
$ clever activity --follow --alias preprod
# Show the logs
$ clever logs
# Create a free plan PG addon named my-addon in the Montreal zone
$ clever addon create postgresql-addon my-addon-pg --plan dev --region mtl
# Create a node.js app named my-app-dev in the Paris zone
$ clever create my-app-dev --type node --alias dev --region par
</code></pre>
But you can also set notifications, start and stop your apps... well, as we said: everything!

If you want to dig it a bit more, you will find<a href="https://www.clever.cloud/developers/doc/quickstart"> everything you can do within the CLI.</a>

Ok, but I already knew all that!

Ok, now what's new is that we packaged Clever Tools for Windows, GNU/Linux and MacOS.

But why is that a big deal?

Before that, you had to download and install node and npm to install <code>clever tools</code>. Now it's over, it's all packaged in a binary and very easy to setup.
<h2 id="how-to-install-on-macos">How to install on MacOS?</h2>
Clever Tools is packaged using <a href="https://brew.sh/">Homebrew</a>:
<pre><code class="language-bash">brew install CleverCloud/tap/clever-tools
</code></pre>
If you don't want to use <code>brew</code>, a pre-compiled version is available: <a href="https://clever-tools.cellar.services.clever-cloud.com/releases/0.9.0/clever-tools-0.9.0_macos.tar.gz">clever-tools-0.9.0_macos.tar.gz</a>. You need to put both files (<code>clever</code> and <code>nodegit.node</code>) in your <code>PATH</code> to use the application.
<h3 id="autocompletion">Autocompletion</h3>
Clever Tools comes with a comprehensive auto-completion system. The brew package installs it automatically (for <code>bash</code> and <code>zsh</code>). Make sure <code>bash-completions</code> or <code>zsh-completions</code> are properly set up.
<pre><code class="language-bash"># In ~/.bash_profile
./usr/local/etc/bash_completion

# In ~/.zshrc
fpath=(/usr/local/share/zsh-completions $fpath)
</code></pre>
<a href="https://www.clever.cloud/developers/clever-tools/getting_started/#macos">Documentation</a>.
<h2 id="how-to-install-on-windows">How to install on Windows?</h2>
Clever Tools is packaged using <a href="https://chocolatey.org/">Chocolatey</a>:
<pre><code class="language-bash">choco install clever-tools
</code></pre>
If you don't want to use <code>chocolatey</code>, a pre-compiled version is available: <a href="https://clever-tools.cellar.services.clever-cloud.com/releases/0.9.0/clever-tools-0.9.0_windows.zip">clever-tools-0.9.0_windows.zip</a>. You need to add both files (<code>clever.exe</code> and <code>nodegit.node</code>) to your <code>PATH</code> to use the application.

<a href="https://www.clever.cloud/developers/clever-tools/getting_started/#windows">Documentation</a>.
<h2 id="for-gnulinux">For GNU/Linux</h2>
Now what, we are still hesitating on the distributions to package it for. We would like to have your feedback on that. Feel free to give your point of view in the comments below are by email @ <a href="mailto:support@clever-cloud.com">support@clever-cloud.com</a>. Also, if someone wants to manage a PPA, that would be great.

A pre-compiled version is available: <a href="https://clever-tools.cellar.services.clever-cloud.com/releases/0.9.0/clever-tools-0.9.0_linux.tar.gz">clever-tools-0.9.0_linux.tar.gz</a>. You need to add both files (clever and nodegit.node) to your <code>PATH</code> to use the application.
<h3 id="autocompletion-1">Autocompletion</h3>
Clever Tools comes with a comprehensive auto-completion system, this is one way to install it:
<pre><code class="language-bash"># for bash
clever --bash-autocomplete-script $(which clever) | sudo tee /usr/share/bash-completion/completions/clever

# for zsh
clever --zsh-autocomplete-script $(which clever) | sudo tee /usr/share/zsh/site-functions
</code></pre>
<h3 id="in-case-of-libcurl-version-mismatch">In case of libcurl version mismatch</h3>
On some distributions (eg. archlinux), a <code>libcurl</code> version mismatch between the system default and the expected version can happen. If you see <code>Error: /usr/lib/libcurl.so.4: version 'CURL_OPENSSL_3' not found (required by /usr/bin/nodegit.node)</code> in the logs, you can fix the issue by using a compatible libcurl version:
<pre><code class="language-bash"># install libcurl-compat
pacman -S libcurl-compat # on archlinux

# add an alias to start clever tools with a compatible libcurl version
alias clever='LD_PRELOAD=libcurl.so.3 clever'
</code></pre>
<h3 id="manual-installation-advanced">Manual installation (advanced)</h3>
Even though we provide packaged versions, you can still install Clever Tools with npm: <code>npm install -g clever-tools</code>.

You can also install it from <a href="https://github.com/CleverCloud/clever-tools">source</a>.
<h2 id="thats-all-folks">That's all folks!</h2>
We hope you will enjoy these improvements and use more Clever Tools.

As always, feel free to contact us for any feedback. Have a look at the <a href="https://github.com/CleverCloud/clever-tools/issues">open issues</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>New version of our CLI: clever-tools 0.7.0 released</title>
		<link>https://www.clever.cloud/blog/features/2017/02/09/clever-tools-release/</link>
		
		<dc:creator><![CDATA[Clement Delafargue]]></dc:creator>
		<pubDate>Thu, 09 Feb 2017 16:17:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[ssh]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2017/02/09/clever-tools-release/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="clever tools update 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>Since <a href="https://www.clever.cloud/blog/features/2015/09/21/public-api-available/">its first release</a>, we&#39;ve been quietly improving our CLI tool, <code>clever-tools</code>. Today, we&#39;ve released version <code>0.7.0</code>, with better support for node 7 and many improvements.</p>
<span id="more-2886"></span>

<h3 id="new-features-in-070">New features in 0.7.0</h3>
<p>The most important change is better support for node 7. The installation phase is now way faster for node 7 users.</p>
<p>Another important feature is <code>clever ssh</code>, available in preview mode for <code>clever-tools</code> users.  <code>clever ssh</code> allows you to ssh into a running instance for debugging purposes (eg. list files, view logs locally, …). Please get in touch with the <a href="mailto:support@clever-cloud.com">support</a> if you want to try it out.  We&#39;ll release complete documentation and examples once this feature hits GA.</p>
<h3 id="why-use-clever-tools">Why use Clever Tools?</h3>
<p>The web console is nice to use and doesn&#39;t require any installation. Why bother with <code>clever-tools</code> then? Here are a few use cases where <code>clever-tools</code> really shines.</p>
<h4 id="perfect-for-terminal-heavy-multitaskers">Perfect for terminal-heavy multitaskers</h4>
<p>If, like me, you&#39;re working on several projects in several terminal windows, going back to the web console to check logs and deployments can get tedious. With <code>clever-tools</code>, you can work on different projects without ever leaving your comfy terminal window. You can launch 5 deployments in parallel and see how they go, side-by-side without having to switch from app to app in your browser.</p>
<h4 id="fine-grained-access-to-logs">Fine-grained access to logs</h4>
<p>The web console is great for displaying logs as they come, but reading old logs requires a lot of scrolling. If you want to inspect logs around a specific date/time to investigate e.g. a user report, worry not:</p>
<pre><code class="language-bash">clever logs --after &quot;2017-02-08T08:28&quot; --before &quot;2017-02-08T08:32&quot;
</code></pre>
<p>Also, if you want to search for a specific term you can just <code>grep</code> the output:</p>
<pre><code class="language-bash">clever logs | grep NullPointerException
</code></pre>
<p>The best part: new lines will appear in real time.</p>
<h4 id="no-ssh-configuration-necessary">No SSH configuration necessary</h4>
<p>From version <code>0.6.0</code> upwards, <code>clever deploy</code> pushes over HTTPS and doesn&#39;t require SSH configuration. If your platform makes ssh configuration more difficult than it should be (I&#39;m looking at you, Windows), then just use <code>clever deploy</code>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="clever tools update 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/clever-tools-update-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>Since <a href="https://www.clever.cloud/blog/features/2015/09/21/public-api-available/">its first release</a>, we&#39;ve been quietly improving our CLI tool, <code>clever-tools</code>. Today, we&#39;ve released version <code>0.7.0</code>, with better support for node 7 and many improvements.</p>
<span id="more-2886"></span>

<h3 id="new-features-in-070">New features in 0.7.0</h3>
<p>The most important change is better support for node 7. The installation phase is now way faster for node 7 users.</p>
<p>Another important feature is <code>clever ssh</code>, available in preview mode for <code>clever-tools</code> users.  <code>clever ssh</code> allows you to ssh into a running instance for debugging purposes (eg. list files, view logs locally, …). Please get in touch with the <a href="mailto:support@clever-cloud.com">support</a> if you want to try it out.  We&#39;ll release complete documentation and examples once this feature hits GA.</p>
<h3 id="why-use-clever-tools">Why use Clever Tools?</h3>
<p>The web console is nice to use and doesn&#39;t require any installation. Why bother with <code>clever-tools</code> then? Here are a few use cases where <code>clever-tools</code> really shines.</p>
<h4 id="perfect-for-terminal-heavy-multitaskers">Perfect for terminal-heavy multitaskers</h4>
<p>If, like me, you&#39;re working on several projects in several terminal windows, going back to the web console to check logs and deployments can get tedious. With <code>clever-tools</code>, you can work on different projects without ever leaving your comfy terminal window. You can launch 5 deployments in parallel and see how they go, side-by-side without having to switch from app to app in your browser.</p>
<h4 id="fine-grained-access-to-logs">Fine-grained access to logs</h4>
<p>The web console is great for displaying logs as they come, but reading old logs requires a lot of scrolling. If you want to inspect logs around a specific date/time to investigate e.g. a user report, worry not:</p>
<pre><code class="language-bash">clever logs --after &quot;2017-02-08T08:28&quot; --before &quot;2017-02-08T08:32&quot;
</code></pre>
<p>Also, if you want to search for a specific term you can just <code>grep</code> the output:</p>
<pre><code class="language-bash">clever logs | grep NullPointerException
</code></pre>
<p>The best part: new lines will appear in real time.</p>
<h4 id="no-ssh-configuration-necessary">No SSH configuration necessary</h4>
<p>From version <code>0.6.0</code> upwards, <code>clever deploy</code> pushes over HTTPS and doesn&#39;t require SSH configuration. If your platform makes ssh configuration more difficult than it should be (I&#39;m looking at you, Windows), then just use <code>clever deploy</code>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Introducing Notifications</title>
		<link>https://www.clever.cloud/blog/features/2016/11/16/notifications/</link>
		
		<dc:creator><![CDATA[Alexandre Berthaud]]></dc:creator>
		<pubDate>Wed, 16 Nov 2016 17:05:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[notifications]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2016/11/16/notifications/</guid>

					<description><![CDATA[<p><img width="48" height="48" src="https://cdn.clever-cloud.com/uploads/2021/04/notifications.svg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="notifications" decoding="async" loading="lazy" /></p>Historically, deployment result e-mails (deployment succeeded or failed) were always sent to the owners of an application, namely the user themselves or the organisation's members.

This changes today.

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

You will now find a <em>Notifications</em> tab in your personal space and organisations. Our CLI tool, <a href="https://www.clever.cloud/developers/clever-tools/getting_started/">clever-tools</a>, also gained two commands: <code>notify-email</code> and <code>webhooks</code>.

This will allow you to disable the default deployment e-mails but also to set up more e-mail notifications and, of course, webhooks!
<h2 id="whats-a-webhook-though">What's a Webhook though?</h2>
Here is what Wikipedia has to say:
<blockquote>A webhook in web development is a method of augmenting or altering the behavior of a web page, or web application, with custom callbacks. These callbacks may be maintained, modified, and managed by third-party users and developers who may not necessarily be affiliated with the originating website or application.</blockquote>
In practical terms, this means that you can choose to receive notifications corresponding to events happening on Clever Cloud in a specific format, directly to the application of your choice.

For example, you can choose to receive the deployment results of your applications in a Slack channel!
<figure><img style="width: 100%;" src="https://www2.cleverapps.io/app/uploads/2021/08/notifications-slack.png" /></figure>
<h2 id="neat-how-do-you-do-that">Neat! How do you do that?</h2>
You're in luck, it's explained in our documentation. You can do it via the <a href="https://www.clever.cloud/developers/doc/">dashboard</a> or via the <a href="https://www.clever.cloud/developers/reference/clever-tools/notifications/">CLI</a>.

Enjoy!
<h2 id="coming-soon">Coming soon</h2>
Aside from more e-mail notifications and more events handled, we also intend to add a way to define notifications targeting every member of an organisation <em>except</em> some users (right now, you have to define the full list of people) as well as a way to edit an existing hook in the dashboard.]]></description>
										<content:encoded><![CDATA[<p><img width="48" height="48" src="https://cdn.clever-cloud.com/uploads/2021/04/notifications.svg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="notifications" decoding="async" loading="lazy" /></p>Historically, deployment result e-mails (deployment succeeded or failed) were always sent to the owners of an application, namely the user themselves or the organisation's members.

This changes today.

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

You will now find a <em>Notifications</em> tab in your personal space and organisations. Our CLI tool, <a href="https://www.clever.cloud/developers/clever-tools/getting_started/">clever-tools</a>, also gained two commands: <code>notify-email</code> and <code>webhooks</code>.

This will allow you to disable the default deployment e-mails but also to set up more e-mail notifications and, of course, webhooks!
<h2 id="whats-a-webhook-though">What's a Webhook though?</h2>
Here is what Wikipedia has to say:
<blockquote>A webhook in web development is a method of augmenting or altering the behavior of a web page, or web application, with custom callbacks. These callbacks may be maintained, modified, and managed by third-party users and developers who may not necessarily be affiliated with the originating website or application.</blockquote>
In practical terms, this means that you can choose to receive notifications corresponding to events happening on Clever Cloud in a specific format, directly to the application of your choice.

For example, you can choose to receive the deployment results of your applications in a Slack channel!
<figure><img style="width: 100%;" src="https://www2.cleverapps.io/app/uploads/2021/08/notifications-slack.png" /></figure>
<h2 id="neat-how-do-you-do-that">Neat! How do you do that?</h2>
You're in luck, it's explained in our documentation. You can do it via the <a href="https://www.clever.cloud/developers/doc/">dashboard</a> or via the <a href="https://www.clever.cloud/developers/reference/clever-tools/notifications/">CLI</a>.

Enjoy!
<h2 id="coming-soon">Coming soon</h2>
Aside from more e-mail notifications and more events handled, we also intend to add a way to define notifications targeting every member of an organisation <em>except</em> some users (right now, you have to define the full list of people) as well as a way to edit an existing hook in the dashboard.]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
