<?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>Features Archives | Clever Cloud</title>
	<atom:link href="https://stagingv6.cleverapps.io/blog/category/features/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>From Code to Product</description>
	<lastBuildDate>Wed, 02 Oct 2024 07:49:07 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>Features Archives | Clever Cloud</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SuperBOL: The COBOL revolution in the Cloud</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2024/09/30/superbol-the-cobol-revolution-in-the-cloud/</link>
		
		<dc:creator><![CDATA[Leo Le Levé Dandé]]></dc:creator>
		<pubDate>Mon, 30 Sep 2024 16:14:02 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=14228</guid>

					<description><![CDATA[<p><img width="1600" height="710" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="SuperBOL: The COBOL revolution in the Cloud" decoding="async" fetchpriority="high" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en.png 1600w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en-300x133.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en-1024x454.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en-768x341.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en-1536x682.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en-1368x607.png 1368w" sizes="(max-width: 1600px) 100vw, 1600px" /></p><!-- wp:paragraph -->
<p>Yet these ageing infrastructures pose constant challenges in terms of maintenance, evolution and cost.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>SuperBOL: the solution that propels COBOL into the cloud era</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><a href="https://superbol.eu/en/">SuperBOL</a> is a solution that enables large companies to migrate their COBOL applications to cloud infrastructures without having to completely rewrite their existing systems. Developed by <a href="https://ocamlpro.com/">OCamlPro</a>, and usable on Clever Cloud's public cloud, SuperBOL allows businesses to keep their COBOL systems while benefiting from the flexibility and scalability of the cloud. SuperBOL also offers a tool for transposing COBOL into C.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>The challenges of COBOL in the modern era</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>After years of existence, COBOL today faces a number of challenges:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Lack of qualified COBOL developers;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>High cost of mainframes and maintenance of legacy infrastructures;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Difficulty of integration with modern technologies;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Complexity of migration to new environments;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>These obstacles prevent many companies from evolving and keep them in costly, inflexible systems.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>How does SuperBOL meet these challenges?</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With SuperBOL, you can modernise your COBOL applications by migrating them to <a href="https://stagingv6.cleverapps.io/multicloud/">flexible cloud infrastructures</a>, without having to rewrite all the code. Here are the key benefits:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Simplified migration of COBOL infrastructures to a <a href="https://stagingv6.cleverapps.io/sovereign-cloud/">sovereign cloud environment</a>;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Reduced mainframe licence and maintenance costs;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://stagingv6.cleverapps.io/fr/cloud-et-green-it-fr/">Optimisation of resources</a> and reduction in the energy footprint of systems;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Possible transpilation from COBOL to C, facilitating integration with other tools;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Secure projects thanks to a <a href="https://stagingv6.cleverapps.io/security/">scalable, high-performance infrastructure</a>.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>Come and discover SuperBOL during our live demo</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>On <strong>15 October 2024 from 11:30 AM</strong>, during a webinar dedicated to SuperBOL, Fabrice Le Fessant, President of OCamlPro and Florent Perreux, Sales Director of Clever Cloud, will be giving a live demonstration of the solution, enabling you to find out how to deploy a COBOL application on Clever Cloud's public cloud.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Whether you're a CIO or a developer, come and find out more about SuperBOL at our webinar on 15 October.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://app.livestorm.co/p/c0f0e8ed-404e-4b74-a87c-c1004c27911b/live?s=cfa3be17-f7e1-4b2a-a48d-6086dd920356">Register now for our webinar</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->]]></description>
										<content:encoded><![CDATA[<p><img width="1600" height="710" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="SuperBOL: The COBOL revolution in the Cloud" decoding="async" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en.png 1600w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en-300x133.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en-1024x454.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en-768x341.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en-1536x682.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/09/2024-09-30-clever-cloud-banniere-blog-superbol-en-1368x607.png 1368w" sizes="(max-width: 1600px) 100vw, 1600px" /></p><!-- wp:paragraph -->
<p>Yet these ageing infrastructures pose constant challenges in terms of maintenance, evolution and cost.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>SuperBOL: the solution that propels COBOL into the cloud era</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><a href="https://superbol.eu/en/">SuperBOL</a> is a solution that enables large companies to migrate their COBOL applications to cloud infrastructures without having to completely rewrite their existing systems. Developed by <a href="https://ocamlpro.com/">OCamlPro</a>, and usable on Clever Cloud's public cloud, SuperBOL allows businesses to keep their COBOL systems while benefiting from the flexibility and scalability of the cloud. SuperBOL also offers a tool for transposing COBOL into C.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>The challenges of COBOL in the modern era</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>After years of existence, COBOL today faces a number of challenges:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Lack of qualified COBOL developers;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>High cost of mainframes and maintenance of legacy infrastructures;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Difficulty of integration with modern technologies;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Complexity of migration to new environments;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>These obstacles prevent many companies from evolving and keep them in costly, inflexible systems.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>How does SuperBOL meet these challenges?</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With SuperBOL, you can modernise your COBOL applications by migrating them to <a href="https://stagingv6.cleverapps.io/multicloud/">flexible cloud infrastructures</a>, without having to rewrite all the code. Here are the key benefits:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Simplified migration of COBOL infrastructures to a <a href="https://stagingv6.cleverapps.io/sovereign-cloud/">sovereign cloud environment</a>;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Reduced mainframe licence and maintenance costs;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://stagingv6.cleverapps.io/fr/cloud-et-green-it-fr/">Optimisation of resources</a> and reduction in the energy footprint of systems;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Possible transpilation from COBOL to C, facilitating integration with other tools;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Secure projects thanks to a <a href="https://stagingv6.cleverapps.io/security/">scalable, high-performance infrastructure</a>.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>Come and discover SuperBOL during our live demo</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>On <strong>15 October 2024 from 11:30 AM</strong>, during a webinar dedicated to SuperBOL, Fabrice Le Fessant, President of OCamlPro and Florent Perreux, Sales Director of Clever Cloud, will be giving a live demonstration of the solution, enabling you to find out how to deploy a COBOL application on Clever Cloud's public cloud.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Whether you're a CIO or a developer, come and find out more about SuperBOL at our webinar on 15 October.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://app.livestorm.co/p/c0f0e8ed-404e-4b74-a87c-c1004c27911b/live?s=cfa3be17-f7e1-4b2a-a48d-6086dd920356">Register now for our webinar</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Materia KV: our easy-to-use serverless key-value database is available to all</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2024/06/11/materia-kv-our-easy-to-use-serverless-key-value-database-is-available-to-all/</link>
		
		<dc:creator><![CDATA[David Legrand]]></dc:creator>
		<pubDate>Tue, 11 Jun 2024 11:37:46 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[release]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=12497</guid>

					<description><![CDATA[<p><img width="1600" height="800" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Materia KV: our easy-to-use serverless key-value database is available to all" decoding="async" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en.png 1600w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en-300x150.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en-1024x512.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en-768x384.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en-1536x768.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en-1368x684.png 1368w" sizes="(max-width: 1600px) 100vw, 1600px" /></p><!-- wp:paragraph -->
<p>They “push” their code, and we deploy it, while ensuring that the environment in which they operate is kept up to date and secure, with one clear objective: maintaining it in operational condition. Whatever the situation, their service responds.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Designing simple, robust and innovative services</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We do this whilst minimizing the footprint on our servers, offering on-demand or automatic horizontal/vertical scaling. This means we can multiply instances or scale them up / down according to the load of your sites. This commitment to simplicity extends beyond applications, as we also offer a wide range of “as-a-service” database (DB) services, enabling you to deploy <a href="https://stagingv6.cleverapps.io/product/mongodb/">MongoDB</a>, <a href="https://stagingv6.cleverapps.io/product/mysql/">MySQL</a>, <a href="https://stagingv6.cleverapps.io/product/postgresql/">PostgreSQL</a> or <a href="https://stagingv6.cleverapps.io/product/redis/">Redis</a> environments in a matter of seconds, with the same tools and guarantees.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>However, over the past few years, we faced a number of recurring requests: not only did some of our customers wish to access other services, but they also regularly asked to take benefit of our infrastructure, spread over three datacenters, to obtain high-availability services. But when it comes to DB, this isn't always easy to implement while ensuring a high level of automation and data consistency. So we decided to develop our own range of products to achieve this.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The “<a href="https://stagingv6.cleverapps.io/materia/">Materia</a>” project was born, based on the <a href="https://www.foundationdb.org/" target="_blank" rel="noreferrer noopener">FoundationDB</a> open-source transactional engine used, for example, by <a href="https://www.apple.com/" target="_blank" rel="noreferrer noopener">Apple</a> for its iCloud services and by <a href="https://www.snowflake.com/en/" target="_blank" rel="noreferrer noopener">Snowflake</a>. We're contributing to it and adapting it to our needs, while taking advantage of its distributed and resilient aspect, notably due to its significant <a href="https://apple.github.io/foundationdb/testing.html" target="_blank" rel="noreferrer noopener">simulation</a> capacity. It allows us to imagine a whole universe of serverless services, very simple to use, invoiced on a pay-per-use basis, with compatibility layers we're developing to enable our customers to “talk” to it using existing protocols such as DynamoDB, GraphQL or PostgreSQL, for example.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Materia KV available to all</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We started with the Redis protocol to introduce Materia KV, <strong>currently in Alpha testing phase</strong>. It's a key-value database synchronously replicated across our three Paris datacenters. When our servers respond, your data has been written three times. Above all, it's very easy to use: go to our <a href="https://console.clever-cloud.com">Console</a>, create a Materia KV add-on, and you'll instantly obtain a token that can be used with any Redis client or by sending commands to our servers directly through the TCP protocol.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Thus, you can now benefit from a high-availability, key-value data storage solution, without having to configure a single instance, and with no minimum monthly fee: you simply pay for what you use. Above all, we provide this service with compatibility to existing protocols. Today Redis, tomorrow DynamoDB and GraphQL. The list of supported commands is available <a href="https://developers.clever-cloud.com/doc/addons/materia-kv/#supported-types-and-commands">here</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Launched at <a href="https://stagingv6.cleverapps.io/blog/company/2024/04/16/materiadb-kv-materia-functions/">Devoxx France mid-April</a>, Materia KV made a big splash on site and during our demonstrations since then. We've therefore decided to make it available to all, to enable our customers and the interested public to give us feedback on how it works for them, and what their needs are. While billing will be on a per-use basis starting with the Beta phase, right now it's free! So give it a try and <a href="https://github.com/CleverCloud/Community/discussions/categories/materia" target="_blank" rel="noreferrer noopener">let us know what you think</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button {"className":"is-style-outline"} -->
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link wp-element-button" href="https://console.clever-cloud.com/users/me/addons/new" target="_blank" rel="noreferrer noopener">Create a Materia KV add-on</a></div>
<!-- /wp:button -->

<!-- wp:button {"className":"is-style-outline"} -->
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link wp-element-button" href="https://developers.clever-cloud.com/doc/addons/materia-kv/" target="_blank" rel="noreferrer noopener">Materia KV documentation</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Already built-in our tools and interfaces</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Materia KV is of course available as an addon-provider in <a href="https://developers.clever-cloud.com/api/">our API</a>, <a href="https://registry.terraform.io/providers/CleverCloud/clevercloud/latest/docs" target="_blank" rel="noreferrer noopener">Terraform</a> (or OpenTofu, for example), but also in our CLI, <a href="https://github.com/CleverCloud/clever-tools" target="_blank" rel="noreferrer noopener">Clever Tools</a>. To create an access token, simply run the following command:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever addon create kv NAME</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This add-on can be linked directly to a Clever Cloud application, injecting its environment variables. But you can also use it from any third-party service, command-line client (CLI) or with graphical user interface (GUI).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While Materia KV and its various interfaces will be developed over time, we've started to think about integrating it into Clever Tools. A test branch, available <a href="https://github.com/CleverCloud/clever-tools/pull/725" target="_blank" rel="noreferrer noopener">as a binary</a> and <a href="https://github.com/CleverCloud/clever-tools/blob/davlgd-embedded-kv-client/docs/kv.md" target="_blank" rel="noreferrer noopener">documented</a>, offers a clever <code>kv command</code>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>With it, you can directly send requests to Materia KV by having the environment variable configured locally, or by specifying an ID in your commands:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash"># With Bash and Zsh
source <(clever addon env ADDON_ID --export)
# With Fish
clever addon env ADDON_ID --export | source

clever kv PING # PONG
clever kv set yourKey theValue
clever kv get yourKey</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>As this demo version doesn't handle all the commands managed by Materia KV, you can send a “raw” command and it will return the answer :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever kv redis_raw 'hset key field1 value1 field2 value2' # 2
clever kv redis_raw 'hget key field2'                      # value2
clever kv redis_raw 'hgetall key'                          # the full hash</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>To demonstrate the possibilities of such integration, you also have the option of directly querying a JSON object stored in a key :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever kv set simpleJson '{"key": "value"}' # the set data
clever kv getJson simpleJson key            # value
clever kv set jsonKey '[{"key": "value"}, {"bigKey": {"subKey1": "subValue1","subKey2": "subValue2"}}]'
clever kv getjson jsonKey bigKey.subKey2    # subValue1
clever kv getjson jsonKey ''                # the full JSON</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>To show just how simple such implementations can be, we've written a Materia KV client <a href="https://github.com/CleverCloud/mkv-go-cli" target="_blank" rel="noreferrer noopener">in Go</a> using Go-Redis. If you'd rather understand how you can send commands and receive responses from Materia KV directly in TCP, you'll find examples in both <a href="https://github.com/CleverCloud/mkv-raw-tcp-v" target="_blank" rel="noreferrer noopener">V</a> or <a href="https://github.com/CleverCloud/mkv-raw-tcp-ruby" target="_blank" rel="noreferrer noopener">Ruby</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Feel free to create your own and let us know ;)</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">A demonstration of Materia KV on Twitch, a community space</h2>
<!-- /wp:heading -->

<!-- wp:image {"id":12691,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2024/06/2024-06-05--clever-cloud--twitch--thumbnail--materia-kv--en-1024x576.png" alt="" class="wp-image-12691"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Want to find out more? Horacio González, our head of DevRel, will be giving a demonstration <a href="https://www.twitch.tv/clevercloud" target="_blank" rel="noreferrer noopener">on Twitch</a> on Tuesday June 18 at 13h15 (Paris Time). Pierre Zemb, creator of Materia at Clever Cloud, will also be discussing with our CTO Steven Le Roux in a video published at the end of June on <a href="https://www.youtube.com/c/Clevercloud-platform" target="_blank" rel="noreferrer noopener">Clever Cloud's YouTube channel</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>And to share your views, questions and requirements, go to the Materia-dedicated section of our <a href="https://github.com/CleverCloud/Community/discussions/categories/materia" target="_blank" rel="noreferrer noopener">GitHub community space</a>.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1600" height="800" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Materia KV: our easy-to-use serverless key-value database is available to all" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en.png 1600w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en-300x150.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en-1024x512.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en-768x384.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en-1536x768.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/06/materia-kv-alpha-publique-en-1368x684.png 1368w" sizes="auto, (max-width: 1600px) 100vw, 1600px" /></p><!-- wp:paragraph -->
<p>They “push” their code, and we deploy it, while ensuring that the environment in which they operate is kept up to date and secure, with one clear objective: maintaining it in operational condition. Whatever the situation, their service responds.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Designing simple, robust and innovative services</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We do this whilst minimizing the footprint on our servers, offering on-demand or automatic horizontal/vertical scaling. This means we can multiply instances or scale them up / down according to the load of your sites. This commitment to simplicity extends beyond applications, as we also offer a wide range of “as-a-service” database (DB) services, enabling you to deploy <a href="https://stagingv6.cleverapps.io/product/mongodb/">MongoDB</a>, <a href="https://stagingv6.cleverapps.io/product/mysql/">MySQL</a>, <a href="https://stagingv6.cleverapps.io/product/postgresql/">PostgreSQL</a> or <a href="https://stagingv6.cleverapps.io/product/redis/">Redis</a> environments in a matter of seconds, with the same tools and guarantees.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>However, over the past few years, we faced a number of recurring requests: not only did some of our customers wish to access other services, but they also regularly asked to take benefit of our infrastructure, spread over three datacenters, to obtain high-availability services. But when it comes to DB, this isn't always easy to implement while ensuring a high level of automation and data consistency. So we decided to develop our own range of products to achieve this.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The “<a href="https://stagingv6.cleverapps.io/materia/">Materia</a>” project was born, based on the <a href="https://www.foundationdb.org/" target="_blank" rel="noreferrer noopener">FoundationDB</a> open-source transactional engine used, for example, by <a href="https://www.apple.com/" target="_blank" rel="noreferrer noopener">Apple</a> for its iCloud services and by <a href="https://www.snowflake.com/en/" target="_blank" rel="noreferrer noopener">Snowflake</a>. We're contributing to it and adapting it to our needs, while taking advantage of its distributed and resilient aspect, notably due to its significant <a href="https://apple.github.io/foundationdb/testing.html" target="_blank" rel="noreferrer noopener">simulation</a> capacity. It allows us to imagine a whole universe of serverless services, very simple to use, invoiced on a pay-per-use basis, with compatibility layers we're developing to enable our customers to “talk” to it using existing protocols such as DynamoDB, GraphQL or PostgreSQL, for example.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Materia KV available to all</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We started with the Redis protocol to introduce Materia KV, <strong>currently in Alpha testing phase</strong>. It's a key-value database synchronously replicated across our three Paris datacenters. When our servers respond, your data has been written three times. Above all, it's very easy to use: go to our <a href="https://console.clever-cloud.com">Console</a>, create a Materia KV add-on, and you'll instantly obtain a token that can be used with any Redis client or by sending commands to our servers directly through the TCP protocol.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Thus, you can now benefit from a high-availability, key-value data storage solution, without having to configure a single instance, and with no minimum monthly fee: you simply pay for what you use. Above all, we provide this service with compatibility to existing protocols. Today Redis, tomorrow DynamoDB and GraphQL. The list of supported commands is available <a href="https://developers.clever-cloud.com/doc/addons/materia-kv/#supported-types-and-commands">here</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Launched at <a href="https://stagingv6.cleverapps.io/blog/company/2024/04/16/materiadb-kv-materia-functions/">Devoxx France mid-April</a>, Materia KV made a big splash on site and during our demonstrations since then. We've therefore decided to make it available to all, to enable our customers and the interested public to give us feedback on how it works for them, and what their needs are. While billing will be on a per-use basis starting with the Beta phase, right now it's free! So give it a try and <a href="https://github.com/CleverCloud/Community/discussions/categories/materia" target="_blank" rel="noreferrer noopener">let us know what you think</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button {"className":"is-style-outline"} -->
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link wp-element-button" href="https://console.clever-cloud.com/users/me/addons/new" target="_blank" rel="noreferrer noopener">Create a Materia KV add-on</a></div>
<!-- /wp:button -->

<!-- wp:button {"className":"is-style-outline"} -->
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link wp-element-button" href="https://developers.clever-cloud.com/doc/addons/materia-kv/" target="_blank" rel="noreferrer noopener">Materia KV documentation</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Already built-in our tools and interfaces</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Materia KV is of course available as an addon-provider in <a href="https://developers.clever-cloud.com/api/">our API</a>, <a href="https://registry.terraform.io/providers/CleverCloud/clevercloud/latest/docs" target="_blank" rel="noreferrer noopener">Terraform</a> (or OpenTofu, for example), but also in our CLI, <a href="https://github.com/CleverCloud/clever-tools" target="_blank" rel="noreferrer noopener">Clever Tools</a>. To create an access token, simply run the following command:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever addon create kv NAME</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This add-on can be linked directly to a Clever Cloud application, injecting its environment variables. But you can also use it from any third-party service, command-line client (CLI) or with graphical user interface (GUI).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While Materia KV and its various interfaces will be developed over time, we've started to think about integrating it into Clever Tools. A test branch, available <a href="https://github.com/CleverCloud/clever-tools/pull/725" target="_blank" rel="noreferrer noopener">as a binary</a> and <a href="https://github.com/CleverCloud/clever-tools/blob/davlgd-embedded-kv-client/docs/kv.md" target="_blank" rel="noreferrer noopener">documented</a>, offers a clever <code>kv command</code>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>With it, you can directly send requests to Materia KV by having the environment variable configured locally, or by specifying an ID in your commands:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash"># With Bash and Zsh
source <(clever addon env ADDON_ID --export)
# With Fish
clever addon env ADDON_ID --export | source

clever kv PING # PONG
clever kv set yourKey theValue
clever kv get yourKey</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>As this demo version doesn't handle all the commands managed by Materia KV, you can send a “raw” command and it will return the answer :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever kv redis_raw 'hset key field1 value1 field2 value2' # 2
clever kv redis_raw 'hget key field2'                      # value2
clever kv redis_raw 'hgetall key'                          # the full hash</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>To demonstrate the possibilities of such integration, you also have the option of directly querying a JSON object stored in a key :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever kv set simpleJson '{"key": "value"}' # the set data
clever kv getJson simpleJson key            # value
clever kv set jsonKey '[{"key": "value"}, {"bigKey": {"subKey1": "subValue1","subKey2": "subValue2"}}]'
clever kv getjson jsonKey bigKey.subKey2    # subValue1
clever kv getjson jsonKey ''                # the full JSON</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>To show just how simple such implementations can be, we've written a Materia KV client <a href="https://github.com/CleverCloud/mkv-go-cli" target="_blank" rel="noreferrer noopener">in Go</a> using Go-Redis. If you'd rather understand how you can send commands and receive responses from Materia KV directly in TCP, you'll find examples in both <a href="https://github.com/CleverCloud/mkv-raw-tcp-v" target="_blank" rel="noreferrer noopener">V</a> or <a href="https://github.com/CleverCloud/mkv-raw-tcp-ruby" target="_blank" rel="noreferrer noopener">Ruby</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Feel free to create your own and let us know ;)</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">A demonstration of Materia KV on Twitch, a community space</h2>
<!-- /wp:heading -->

<!-- wp:image {"id":12691,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2024/06/2024-06-05--clever-cloud--twitch--thumbnail--materia-kv--en-1024x576.png" alt="" class="wp-image-12691"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Want to find out more? Horacio González, our head of DevRel, will be giving a demonstration <a href="https://www.twitch.tv/clevercloud" target="_blank" rel="noreferrer noopener">on Twitch</a> on Tuesday June 18 at 13h15 (Paris Time). Pierre Zemb, creator of Materia at Clever Cloud, will also be discussing with our CTO Steven Le Roux in a video published at the end of June on <a href="https://www.youtube.com/c/Clevercloud-platform" target="_blank" rel="noreferrer noopener">Clever Cloud's YouTube channel</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>And to share your views, questions and requirements, go to the Materia-dedicated section of our <a href="https://github.com/CleverCloud/Community/discussions/categories/materia" target="_blank" rel="noreferrer noopener">GitHub community space</a>.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Get Static on Clever Cloud</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2024/01/25/get-static-on-clever-cloud/</link>
		
		<dc:creator><![CDATA[David Legrand]]></dc:creator>
		<pubDate>Thu, 25 Jan 2024 09:33:11 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=11606</guid>

					<description><![CDATA[<p><img width="1556" height="600" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Banner of the &quot;Get static&quot; post." decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static.png 1556w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static-1536x592.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static-1368x528.png 1368w" sizes="auto, (max-width: 1556px) 100vw, 1556px" /></p><!-- wp:paragraph -->
<p>Clever Cloud’s mission has always been to provide its customers a quick and easy way to deploy applications, based on the more standards tools.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Your partner for efficient hosting</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>They can also benefit of our horizontal and vertical scaling capabilities to ensure that resources are allocated as closely as possible to their load, automatically if needed, billed per second.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>All of this can be done from <a href="https://stagingv6.cleverapps.io/infrastructure/">our own dense infrastructure in Paris</a> or from our partners' datacenters such as OVHcloud and <a href="https://stagingv6.cleverapps.io/blog/press/2023/01/17/clever-cloud-and-scaleway-join-forces-to-unveil-a-sovereign-european-paas-offering/">Scaleway</a>. Thus, you can ensure that you reduce your need for IT ressources, by design.  But some are looking for even more efficient solutions for their websites. In recent years, a trend has emerged to satisfy such demand: Static Site Generators (<a href="https://en.wikipedia.org/wiki/Static_site_generator" target="_blank" rel="noreferrer noopener">SSG</a>). </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Of course, you can deploy them on Clever Cloud!</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Deploy any static website on Clever Cloud</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>They require very few ressources as they don’t rely on complexe software stack: no database nor server side calculations once deployed. In most cases, it’s pure HTML, CSS an client-side JavaScript, generated from <a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="noreferrer noopener">Markdown</a> content, with a theme/template applied.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>There are lots of open source SSG on the market you can use for blogs, documentation or marketing websites for example. We can build them for you and then only deploy and serve the generated files on the Internet. No GitHub Actions or others external CI/CD is needed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To help you in this journey, we’ve published tutorials with examples on how to deploy static website through <a href="https://developers.clever-cloud.com/guides/astro">Astro</a>, <a href="https://developers.clever-cloud.com/guides/docusaurus">Docusaurus</a>, <a href="https://developers.clever-cloud.com/guides/eleventy">Eleventy (11ty)</a>, <a href="https://developers.clever-cloud.com/guides/hexo">Hexo</a>, <a href="https://developers.clever-cloud.com/guides/hugo">Hugo</a>, <a href="https://developers.clever-cloud.com/guides/lume-deno">Lume (Deno)</a>, <a href="https://developers.clever-cloud.com/guides/mkdocs">MkDocs</a>, <a href="https://developers.clever-cloud.com/guides/mdbook">mdBook</a> or <a href="https://developers.clever-cloud.com/guides/nuxt">Nuxt</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><a href="https://developers.clever-cloud.com/guides/#static-site-generator-ssg">Read our guides to deploy static websites on Clever Cloud</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>But others are also compatible! You want more guides or help on other SSG ? Just fill <a href="https://github.com/CleverCloud/documentation/issues" target="_blank" rel="noreferrer noopener">an issue</a>: our documentation is open source, static, based on Hugo with <a href="https://github.com/imfing/hextra" target="_blank" rel="noreferrer noopener">Hextra theme</a>. You can even <a href="https://github.com/CleverCloud/documentation" target="_blank" rel="noreferrer noopener">contribute</a> ;)</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1556" height="600" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Banner of the &quot;Get static&quot; post." decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static.png 1556w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static-1536x592.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/01/get-static-1368x528.png 1368w" sizes="auto, (max-width: 1556px) 100vw, 1556px" /></p><!-- wp:paragraph -->
<p>Clever Cloud’s mission has always been to provide its customers a quick and easy way to deploy applications, based on the more standards tools.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Your partner for efficient hosting</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>They can also benefit of our horizontal and vertical scaling capabilities to ensure that resources are allocated as closely as possible to their load, automatically if needed, billed per second.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>All of this can be done from <a href="https://stagingv6.cleverapps.io/infrastructure/">our own dense infrastructure in Paris</a> or from our partners' datacenters such as OVHcloud and <a href="https://stagingv6.cleverapps.io/blog/press/2023/01/17/clever-cloud-and-scaleway-join-forces-to-unveil-a-sovereign-european-paas-offering/">Scaleway</a>. Thus, you can ensure that you reduce your need for IT ressources, by design.  But some are looking for even more efficient solutions for their websites. In recent years, a trend has emerged to satisfy such demand: Static Site Generators (<a href="https://en.wikipedia.org/wiki/Static_site_generator" target="_blank" rel="noreferrer noopener">SSG</a>). </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Of course, you can deploy them on Clever Cloud!</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Deploy any static website on Clever Cloud</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>They require very few ressources as they don’t rely on complexe software stack: no database nor server side calculations once deployed. In most cases, it’s pure HTML, CSS an client-side JavaScript, generated from <a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="noreferrer noopener">Markdown</a> content, with a theme/template applied.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>There are lots of open source SSG on the market you can use for blogs, documentation or marketing websites for example. We can build them for you and then only deploy and serve the generated files on the Internet. No GitHub Actions or others external CI/CD is needed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To help you in this journey, we’ve published tutorials with examples on how to deploy static website through <a href="https://developers.clever-cloud.com/guides/astro">Astro</a>, <a href="https://developers.clever-cloud.com/guides/docusaurus">Docusaurus</a>, <a href="https://developers.clever-cloud.com/guides/eleventy">Eleventy (11ty)</a>, <a href="https://developers.clever-cloud.com/guides/hexo">Hexo</a>, <a href="https://developers.clever-cloud.com/guides/hugo">Hugo</a>, <a href="https://developers.clever-cloud.com/guides/lume-deno">Lume (Deno)</a>, <a href="https://developers.clever-cloud.com/guides/mkdocs">MkDocs</a>, <a href="https://developers.clever-cloud.com/guides/mdbook">mdBook</a> or <a href="https://developers.clever-cloud.com/guides/nuxt">Nuxt</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><a href="https://developers.clever-cloud.com/guides/#static-site-generator-ssg">Read our guides to deploy static websites on Clever Cloud</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>But others are also compatible! You want more guides or help on other SSG ? Just fill <a href="https://github.com/CleverCloud/documentation/issues" target="_blank" rel="noreferrer noopener">an issue</a>: our documentation is open source, static, based on Hugo with <a href="https://github.com/imfing/hextra" target="_blank" rel="noreferrer noopener">Hextra theme</a>. You can even <a href="https://github.com/CleverCloud/documentation" target="_blank" rel="noreferrer noopener">contribute</a> ;)</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Cloud hosted WordPress with Composer like it&#8217;s 2024</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2024/01/08/wordpress-cloud-2024/</link>
		
		<dc:creator><![CDATA[Julia March]]></dc:creator>
		<pubDate>Mon, 08 Jan 2024 11:11:06 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=7554</guid>

					<description><![CDATA[<p><img width="1076" height="415" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/08/wp-composer-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="wordpress logo with tools and cloud" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/08/wp-composer-1.png 1076w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/08/wp-composer-1-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/08/wp-composer-1-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/08/wp-composer-1-768x296.png 768w" sizes="auto, (max-width: 1076px) 100vw, 1076px" /></p><!-- wp:paragraph -->
<p>Devastating news for Wordpress haters: with a clean, secure, and modern file structure, you can easily migrate it to Clever Cloud. All of this is possible using the tools described in this post.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For those who have never used Git before, we will also cover how to deploy a WordPress installation on Clever Cloud in this post. If you want to give it a try, we'll walk you through the steps. If you choose not to, our platform does offer a GitHub integration.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Requirements:</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>A&nbsp;<a href="https://stagingv6.cleverapps.io" target="_blank" rel="noreferrer noopener">Clever Cloud</a>&nbsp;account</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Le <a href="https://github.com/CleverCloud/clever-wordpress" target="_blank" rel="noreferrer noopener">Bedrock's Composer</a>&nbsp;to deploy WordPress with Clever Cloud, that we have updated.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>A&nbsp;<a href="https://github.com" target="_blank" rel="noreferrer noopener">GitHub</a>&nbsp;account if you deploy the code from it, <strong>or</strong>&nbsp;<a href="https://git-scm.com" target="_blank" rel="noreferrer noopener">Git </a>&nbsp;installed on your computer, if you choose this method.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Deployment and WorpdPress configuration</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Composer will deploy a WordPress site in a matter of minutes, creating a rapid, light, and secure framework for our new website.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Follow the instructions below:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">1. Get the code</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The code can be found in its &nbsp;<a href="https://github.com/CleverCloud/clever-wordpress" target="_blank" rel="noreferrer noopener">"WordPress + Bedrock"</a> . public repository. It has a WordPress architecture that works with Composer. There are two ways to download it: directly from Git or GitHub (the easier choice if you don't feel comfortable using command lines).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Take this post as an opportunity to learn more about command lines on a Terminal and Git, even if you aren't accustomed to them. No worries, by following our directions, you will be able to use this method..</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Option A : Using GitHub</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you really don't want to use Git, simply fork the code and deploy from GitHub on Clever Cloud. Creating a fork will duplicate the code in your own repository.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7536,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/github-fork.png" alt="" class="wp-image-7536"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Open the&nbsp;<a href="https://console.clever-cloud.com" target="_blank" rel="noreferrer noopener">Clever Cloud Console</a>&nbsp;settings, clic on &nbsp;"Profile" and link your GitHub account, if you haven't done it already. That's all, now go directly to step 2.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Option B: Using Git, step by step</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The other option is to download the code to your computer (locally). If that's your first time, here are the instructions:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">Set up</h5>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You must first grant permission for your computer to push code to Clever Cloud before you can proceed. You must create and add an SSH key to your console if you haven't already. Go directly to the next step if it has already been completed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Open your Terminal and:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>type&nbsp;<code>ssh-keygen -t ed25519 -C "[votre@email.ici]</code>&nbsp;the email must be the same you use to log into Clever Cloud.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>When the Terminal asks you in which file you wish to add the key, juste press "Enter". </li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Add a password</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Copy the key content using &nbsp;<code>pbcopy &lt; ~/.ssh/id_[rsa].pub</code> (replace&nbsp;<code>[rsa]</code>&nbsp;by your key id, of course))</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Open the Clever Cloud Console and go to Profile&gt;SSH keys&gt;Add and paste your key's content.</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Your machine is now connected to your Clever Cloud account and ready to push code.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">Clone the code</h5>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Make a&nbsp;<code>sites</code>&nbsp;directory on your computer. It will contait your apps and your websites.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Open your terminal and type&nbsp;<code>cd sites</code>, this will open your "sites" directory.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Still in your terminal, copy-paste&nbsp;<code>git clone git@github.com:CleverCloud/clever-wordpress.git'</code></li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>The code has been downloaded to your computer, inside the&nbsp;<code>sites</code>directory, you'll see a a new&nbsp;<code>clever-wordpress</code>&nbsp;directory. Open it (<code>cd clever-wordpress</code>) et type&nbsp;<code class="lang-shell">ls -a</code> : you'll see all the files and directories it contains.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you just used Git and your Terminal for the first time, you'll find more tutorials and explanations on the Internet. Our teammate David Legrand happens to publish great stuff I &nbsp;<a href="https://www.nextinpact.com/article/43792/apprenez-a-utiliser-git-bases-pour-suivre-evolution-dun-document" target="_blank" rel="noreferrer noopener">greta stuff in French.</a></p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">2. Declare the app on Clever Cloud</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Click "Create" and "An application" from the Clever Cloud Console. After choosing your fork, you can create a new PHP app if you are using GitHub integration. All that remains is for the code to be pushed from GitHub. If you're using Git, the identical procedure can be carried out by entering a short command line.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The Console will ask if you need any add-on, choose a <strong>MySQL database</strong> and proceed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Edit your PHP app <strong>environment variables</strong>&nbsp;in expert mode and past the salts generated on sur <a href="https://cdn.roots.io/salts.html" target="_blank" rel="noreferrer noopener">this page</a> (don't forget to save &nbsp;changes!)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7533,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/variables-environnement.png" alt="Expert mode on Clever Cloud Environnement variables page" class="wp-image-7533"/></figure>
<!-- /wp:image -->

<!-- wp:list {"ordered":true,"start":6} -->
<ol start="6"><!-- wp:list-item -->
<li>Add 3 additional environment variables:<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><code>WP_ENV</code> with value&nbsp;<code>production</code></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><code>WP_HOME</code>&nbsp;with value&nbsp;<code>https://yourdomain.tld</code></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><code>WP_SITEURL</code>&nbsp;with value&nbsp;<code>https://your-domain.tld/wp</code></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:image {"id":7534,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/variables-simple.png" alt="Simple mode on environment variables from the Clever Cloud Console" class="wp-image-7534"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>The Console will provide you with command lines to copy-paste in your Terminal in order to send your code to your new instance, unless you've decided to work with the GitHub integration. The deployment will begin once you've completed this.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While the deployment starts,&nbsp;<strong>create an Cellar addon</strong>&nbsp;and link it to your app (clic on your PHP app, then choose "Linked dependencies" to connect it).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>From the&nbsp;<strong>Cellar</strong> set up page, create&nbsp;<strong>a bucket</strong> and give it a name.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Go back to your PHP app and add the following&nbsp;<strong>environment variable</strong>:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><code>CELLAR_ADDON_BUCKET</code>&nbsp;with the name of your bucket as value.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Tip : You can easily configure a custom domain for your bucket. Check &nbsp;<a href="https://stagingv6.cleverapps.io/doc/deploy/addon/cellar/#using-a-custom-domain" target="_blank" rel="noreferrer noopener">the doc</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Restart your app to incorporate last changes.

Don't forget to set up your domain for the WP_HOME variable (or with a .cleveapps.io for testing purposes).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When you'll visit your website, the installation page from WordPress will then appear (you'll find de database credentials in the Console, either by clicking on the addon, either in your app's environment variables). Once you are logged into WordPress, go to your plugins page and activate&nbsp;<strong>S3 Uploads</strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>That's it. You now have a hosted WordPress on Clever Cloud. Your files and medias will be stored in the Cellar's bucket.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Add a plugin by a single command</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The&nbsp;<code>composer.json</code>&nbsp;file reflects the WordPress themes and plugins directory; you just have to specify what it should reflect. <strong>You don't need to host the plugin directory in your app </strong>to add a new plugin to your site<strong>.</strong> You'll use&nbsp;<a href="https://wpackagist.org">Wpackagist</a>&nbsp;to find and add the plugin's references to&nbsp;<code>composer.json</code>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Find&nbsp;<code>require</code> , this is where the plugins are specified.</p>
<!-- /wp:paragraph -->

<!-- wp:code {"className":"lang-json"} -->
<pre class="wp-block-code lang-json"><code>"require": 
//Here are your further plugins declarations. Add this line wherever you'd like (update the version if necessary)
"wpackagist-plugin/&#91;plugin]": "&#91;version]",</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>You'll find all your favorite plugins on&nbsp;<a href="https://wpackagist.org">Wpackagist</a>&nbsp;to add them to the file. Commit changes (with Git : <code>git add .</code>&nbsp; et <code>git commit -m "un-message"</code>) and push the modified code to Clever Cloud (on GitHub, this action will be done automatically). Wait until your app has redeployed, then go top your WordPress dashboard and activate the plugins you just added.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Welcome aboard!!</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1076" height="415" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/08/wp-composer-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="wordpress logo with tools and cloud" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/08/wp-composer-1.png 1076w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/08/wp-composer-1-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/08/wp-composer-1-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/08/wp-composer-1-768x296.png 768w" sizes="auto, (max-width: 1076px) 100vw, 1076px" /></p><!-- wp:paragraph -->
<p>Devastating news for Wordpress haters: with a clean, secure, and modern file structure, you can easily migrate it to Clever Cloud. All of this is possible using the tools described in this post.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For those who have never used Git before, we will also cover how to deploy a WordPress installation on Clever Cloud in this post. If you want to give it a try, we'll walk you through the steps. If you choose not to, our platform does offer a GitHub integration.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Requirements:</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>A&nbsp;<a href="https://stagingv6.cleverapps.io" target="_blank" rel="noreferrer noopener">Clever Cloud</a>&nbsp;account</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Le <a href="https://github.com/CleverCloud/clever-wordpress" target="_blank" rel="noreferrer noopener">Bedrock's Composer</a>&nbsp;to deploy WordPress with Clever Cloud, that we have updated.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>A&nbsp;<a href="https://github.com" target="_blank" rel="noreferrer noopener">GitHub</a>&nbsp;account if you deploy the code from it, <strong>or</strong>&nbsp;<a href="https://git-scm.com" target="_blank" rel="noreferrer noopener">Git </a>&nbsp;installed on your computer, if you choose this method.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Deployment and WorpdPress configuration</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Composer will deploy a WordPress site in a matter of minutes, creating a rapid, light, and secure framework for our new website.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Follow the instructions below:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">1. Get the code</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The code can be found in its &nbsp;<a href="https://github.com/CleverCloud/clever-wordpress" target="_blank" rel="noreferrer noopener">"WordPress + Bedrock"</a> . public repository. It has a WordPress architecture that works with Composer. There are two ways to download it: directly from Git or GitHub (the easier choice if you don't feel comfortable using command lines).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Take this post as an opportunity to learn more about command lines on a Terminal and Git, even if you aren't accustomed to them. No worries, by following our directions, you will be able to use this method..</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Option A : Using GitHub</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you really don't want to use Git, simply fork the code and deploy from GitHub on Clever Cloud. Creating a fork will duplicate the code in your own repository.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7536,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/github-fork.png" alt="" class="wp-image-7536"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Open the&nbsp;<a href="https://console.clever-cloud.com" target="_blank" rel="noreferrer noopener">Clever Cloud Console</a>&nbsp;settings, clic on &nbsp;"Profile" and link your GitHub account, if you haven't done it already. That's all, now go directly to step 2.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Option B: Using Git, step by step</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The other option is to download the code to your computer (locally). If that's your first time, here are the instructions:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">Set up</h5>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You must first grant permission for your computer to push code to Clever Cloud before you can proceed. You must create and add an SSH key to your console if you haven't already. Go directly to the next step if it has already been completed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Open your Terminal and:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>type&nbsp;<code>ssh-keygen -t ed25519 -C "[votre@email.ici]</code>&nbsp;the email must be the same you use to log into Clever Cloud.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>When the Terminal asks you in which file you wish to add the key, juste press "Enter". </li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Add a password</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Copy the key content using &nbsp;<code>pbcopy &lt; ~/.ssh/id_[rsa].pub</code> (replace&nbsp;<code>[rsa]</code>&nbsp;by your key id, of course))</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Open the Clever Cloud Console and go to Profile&gt;SSH keys&gt;Add and paste your key's content.</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Your machine is now connected to your Clever Cloud account and ready to push code.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">Clone the code</h5>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Make a&nbsp;<code>sites</code>&nbsp;directory on your computer. It will contait your apps and your websites.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Open your terminal and type&nbsp;<code>cd sites</code>, this will open your "sites" directory.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Still in your terminal, copy-paste&nbsp;<code>git clone git@github.com:CleverCloud/clever-wordpress.git'</code></li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>The code has been downloaded to your computer, inside the&nbsp;<code>sites</code>directory, you'll see a a new&nbsp;<code>clever-wordpress</code>&nbsp;directory. Open it (<code>cd clever-wordpress</code>) et type&nbsp;<code class="lang-shell">ls -a</code> : you'll see all the files and directories it contains.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you just used Git and your Terminal for the first time, you'll find more tutorials and explanations on the Internet. Our teammate David Legrand happens to publish great stuff I &nbsp;<a href="https://www.nextinpact.com/article/43792/apprenez-a-utiliser-git-bases-pour-suivre-evolution-dun-document" target="_blank" rel="noreferrer noopener">greta stuff in French.</a></p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">2. Declare the app on Clever Cloud</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Click "Create" and "An application" from the Clever Cloud Console. After choosing your fork, you can create a new PHP app if you are using GitHub integration. All that remains is for the code to be pushed from GitHub. If you're using Git, the identical procedure can be carried out by entering a short command line.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The Console will ask if you need any add-on, choose a <strong>MySQL database</strong> and proceed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Edit your PHP app <strong>environment variables</strong>&nbsp;in expert mode and past the salts generated on sur <a href="https://cdn.roots.io/salts.html" target="_blank" rel="noreferrer noopener">this page</a> (don't forget to save &nbsp;changes!)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7533,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/variables-environnement.png" alt="Expert mode on Clever Cloud Environnement variables page" class="wp-image-7533"/></figure>
<!-- /wp:image -->

<!-- wp:list {"ordered":true,"start":6} -->
<ol start="6"><!-- wp:list-item -->
<li>Add 3 additional environment variables:<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><code>WP_ENV</code> with value&nbsp;<code>production</code></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><code>WP_HOME</code>&nbsp;with value&nbsp;<code>https://yourdomain.tld</code></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><code>WP_SITEURL</code>&nbsp;with value&nbsp;<code>https://your-domain.tld/wp</code></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:image {"id":7534,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/variables-simple.png" alt="Simple mode on environment variables from the Clever Cloud Console" class="wp-image-7534"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>The Console will provide you with command lines to copy-paste in your Terminal in order to send your code to your new instance, unless you've decided to work with the GitHub integration. The deployment will begin once you've completed this.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While the deployment starts,&nbsp;<strong>create an Cellar addon</strong>&nbsp;and link it to your app (clic on your PHP app, then choose "Linked dependencies" to connect it).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>From the&nbsp;<strong>Cellar</strong> set up page, create&nbsp;<strong>a bucket</strong> and give it a name.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Go back to your PHP app and add the following&nbsp;<strong>environment variable</strong>:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><code>CELLAR_ADDON_BUCKET</code>&nbsp;with the name of your bucket as value.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Tip : You can easily configure a custom domain for your bucket. Check &nbsp;<a href="https://stagingv6.cleverapps.io/doc/deploy/addon/cellar/#using-a-custom-domain" target="_blank" rel="noreferrer noopener">the doc</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Restart your app to incorporate last changes.

Don't forget to set up your domain for the WP_HOME variable (or with a .cleveapps.io for testing purposes).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When you'll visit your website, the installation page from WordPress will then appear (you'll find de database credentials in the Console, either by clicking on the addon, either in your app's environment variables). Once you are logged into WordPress, go to your plugins page and activate&nbsp;<strong>S3 Uploads</strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>That's it. You now have a hosted WordPress on Clever Cloud. Your files and medias will be stored in the Cellar's bucket.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Add a plugin by a single command</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The&nbsp;<code>composer.json</code>&nbsp;file reflects the WordPress themes and plugins directory; you just have to specify what it should reflect. <strong>You don't need to host the plugin directory in your app </strong>to add a new plugin to your site<strong>.</strong> You'll use&nbsp;<a href="https://wpackagist.org">Wpackagist</a>&nbsp;to find and add the plugin's references to&nbsp;<code>composer.json</code>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Find&nbsp;<code>require</code> , this is where the plugins are specified.</p>
<!-- /wp:paragraph -->

<!-- wp:code {"className":"lang-json"} -->
<pre class="wp-block-code lang-json"><code>"require": 
//Here are your further plugins declarations. Add this line wherever you'd like (update the version if necessary)
"wpackagist-plugin/&#91;plugin]": "&#91;version]",</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>You'll find all your favorite plugins on&nbsp;<a href="https://wpackagist.org">Wpackagist</a>&nbsp;to add them to the file. Commit changes (with Git : <code>git add .</code>&nbsp; et <code>git commit -m "un-message"</code>) and push the modified code to Clever Cloud (on GitHub, this action will be done automatically). Wait until your app has redeployed, then go top your WordPress dashboard and activate the plugins you just added.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Welcome aboard!!</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Deploy a custom ChatGPT, based on PHP</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2023/10/11/deploy-a-custom-chatgpt-based-on-php/</link>
		
		<dc:creator><![CDATA[David Legrand]]></dc:creator>
		<pubDate>Wed, 11 Oct 2023 07:30:48 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[IA]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=10621</guid>

					<description><![CDATA[<p><img width="573" height="266" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/10/2.svg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="bannier Chatgpt with PHP" decoding="async" loading="lazy" /></p><!-- wp:paragraph -->
<p><strong>Since last year, OpenAI has been in the news with its large language models (LLM), notably GPT-3.5 and GPT-4, available through ChatGPT. But you can also include them within your own applications thanks to an API. Here's an example of how you can take advantage of it on Clever Cloud.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We'll use the open source <a href="https://github.com/unconv/chat-wtf" target="_blank" rel="noreferrer noopener">chat-wtf</a> project, created by Unconventional Coding, who detailed the conception stages in <a href="https://www.youtube.com/watch?v=0FUz4CtalhY" target="_blank" rel="noreferrer noopener">a series of videos</a>. It is primarily based on <a href="https://stagingv6.cleverapps.io/product/mysql/">the PHP language</a>  and data storage via sessions, SQLite or <a href="https://stagingv6.cleverapps.io/fr/product/mysql-a-traduire-en-fr/">MySQL</a>, according to user choice. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">An open-source ChatGPT, you can use on demand</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>It requires you to use <a href="https://platform.openai.com/overview" target="_blank" rel="noreferrer noopener">the OpenAI API</a>, but you may look at compatible models if you're more daring. The settings file also allows you to specify a "system message". So, you can provide the AI with informations about you or your expectations, which it should take into consideration when answering your questions.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This PHP application has not been developed in any particular way for Clever Cloud, but you can host it on our infrastructure in just a few minutes, configure it according to your needs, stop and start it on demand. Here's how.</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><a href="https://api.clever-cloud.com/v2/session/signup">Create a Clever Cloud account</a>&nbsp;(and get 20 euros in credits)</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>To get started, you'll need a Clever Cloud account and an OpenAI API key. You can create the application and follow this tutorial using our web interface, <a href="https://console.clever-cloud.com/">the Console</a>, but also through our open source CLI: <a href="https://github.com/CleverCloud/clever-tools" target="_blank" rel="noreferrer noopener">Clever Tools</a>. That's what we'll describe below.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Getting the code and configuration</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We'll assume that your machine is running <a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git" target="_blank" rel="noreferrer noopener">git</a> and a recent version of <a href="https://nodejs.dev/en/learn/how-to-install-nodejs/" target="_blank" rel="noreferrer noopener">Node.js</a>. If you haven't yet installed Clever Tools on your system, type (with system administrator rights, or <code>sudo</code> if necessary):</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">npm i -g clever-tools
clever login</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once logged in, you can check that everything has gone smoothly with the following command:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever profile</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Then you can create a fork of chat-wtf that can be deployed on Clever Cloud from your GitHub account. In this guide, we'll clone the repository locally and create a Clever Cloud application in it. A remote required for its deployment will be automatically added:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">git clone https://github.com/unconv/chat-wtf.git && cd chat-wtf
clever create -t php chat-wtf</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Thus, you have a local copy of the latest version of the chat-wtf application, which you can configure to match your needs. Rename <code>settings.sample.php</code> to <code>settings.php</code>. We'll start with some minor modifications.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Put in the following content to use environment variables:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-php">&#x3C;?php
return [
    &#x22;api_key&#x22; =&#x3E; getenv("OPENAI_API_KEY"),
    &#x22;system_message&#x22; =&#x3E; getenv("SYSTEM_MESSAGE"),
    &#x22;model&#x22; =&#x3E; &#x22;gpt-3.5-turbo&#x22;,
    &#x22;base_uri&#x22; =&#x3E; &#x22;&#x22;,
    &#x22;storage_type&#x22; =&#x3E; &#x22;session&#x22;,
];</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Edit the <code>.gitignore</code> file and remove <code>settings.php</code> so that it can be deployed with your application. Now that it's configured, you only need to set the environment variables required to ensure it works properly, and then deploy. Note that it runs on PHP 8.x. We'll be using the 8.2 branch:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever env set CC_PHP_VERSION "8.2"
clever env set OPENAI_API_KEY "Your OpenAI API key"
clever env set SYSTEM_MESSAGE "Your system message"
git add . && git commit -m "First deploy"
clever deploy && clever open</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once the environment variables have been set, we perform a simple Git Push. The application is then deployed on Clever Cloud, an archive is created to ease its redeployment, and if all has gone well, it's opened in your browser:</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":10576,"sizeSlug":"full","linkDestination":"media"} -->
<figure class="wp-block-image aligncenter size-full"><a href="https://cdn.clever-cloud.com/uploads/2023/10/image-2.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/10/image-2.png" alt="Chat WTF on Clever Cloud" class="wp-image-10576"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>As with any application hosted within our service, you can simply assign it a domain that will benefit from our <a href="https://www.sozu.io/" target="_blank" rel="noreferrer noopener">Sōzu</a> load balancer and a Let's Encrypt certificate, get its status and activity, stop or restart it. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><a href="https://console.clever-cloud.com">The Console</a> provides metrics and links to a Grafana dashboard to monitor its status. You can also adjust the size of the instance or activate auto-scalability to handle different load levels:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever console

clever domain
clever domain add domain.tld

clever status
clever activity

clever scale --min-instances 1 --max-instances 4 --min-flavor pico --max-flavor M
clever scale --instances 1 --flavor pico

clever restart
clever stop</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Let's add a database to our chat-wtf instance</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As mentioned previously, this project can store its data within PHP sessions, but also via SQLite or MySQL. In this example, we'll opt for the latter to show you how it can be done, in a very simple way.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>First, let's create a MySQL database within your Clever Cloud account, linking it directly to your application. By default it's a DEV instance, shared and free, but you can request <a href="https://stagingv6.cleverapps.io/pricing/">a larger plan</a> if needed:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever addon create mysql-addon chat-wtf-mysql --link chat-wtf</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This "link" allows connection parameters to be injected directly into the application using environment variables. These are visible in the Console or via Clever Tools :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever env</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Thus, all you need is to modify the <code>settings.php</code> file as follows to use it:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-php">    &#x22;storage_type&#x22; =&#x3E; &#x22;sql&#x22;,
    &#x22;db&#x22; =&#x3E; [
        &#x22;dsn&#x22; =&#x3E; &#x22;mysql:host=&#x22; . getenv(&#x27;MYSQL_ADDON_HOST&#x27;) . &#x22;;
                    port=&#x22; . getenv(&#x27;MYSQL_ADDON_PORT&#x27;) . &#x22;;
                    dbname=&#x22; . getenv(&#x27;MYSQL_ADDON_DB&#x27;),
        &#x22;username&#x22; =&#x3E; getenv(&#x27;MYSQL_ADDON_USER&#x27;),
        &#x22;password&#x22; =&#x3E; getenv(&#x27;MYSQL_ADDON_PASSWORD&#x27;),
    ],</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Then go to the MySQL database dashboard, accessible in the Console. You'll find a link to its PHPMyAdmin interface. Click on the database name in the left-hand menu, then you'll get to the import function. This will enable you to initiate the DB structure by importing the <code>mysql.sql</code> file located in the repository's db folder. Set its location and click on "Import". You're done:</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":10570,"sizeSlug":"full","linkDestination":"media"} -->
<figure class="wp-block-image size-full"><a href="https://cdn.clever-cloud.com/uploads/2023/10/image.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/10/image.png" alt="MySQL Import" class="wp-image-10570"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>You can also do this via a Shell script that checks if the database is empty, and import the default data if necessary. Create a file named <code>init.sh</code> with this code:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">SSE="SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='$MYSQL_ADDON_DB';"
PARAMS="-u $MYSQL_ADDON_USER -h $MYSQL_ADDON_HOST -P $MYSQL_ADDON_PORT -D $MYSQL_ADDON_DB"

TABLE_COUNT=$(MYSQL_PWD=$MYSQL_ADDON_PASSWORD mysql $PARAMS -sse"$SSE")

if [ "$TABLE_COUNT" -eq 0 ]; then
  echo "Database is empty, we fill it with the default data."
  MYSQL_PWD=$MYSQL_ADDON_PASSWORD mysql $PARAMS < db/mysql.sql 
  
else
  echo "Database contains $TABLE_COUNT tables."
fi

rm init.sh</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You'll need to run it during application deployment :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever env set CC_PRE_BUILD_HOOK "bash init.sh"</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>All that you remains to do is redeploy your application, which will now use the MySQL database to store its data rather than PHP sessions:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">git add settings.php && git commit -m "Add MySQL support"
clever deploy && clever open</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>If this doesn't work, check errors in your instance logs on the Console or via :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever logs</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Want to find out more?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>To discover in greater detail the hosting PHP applications on Clever Cloud or <a href="https://stagingv6.cleverapps.io/product/">our managed database services</a>, come and meet us at the PHP Forum from October 12 to 13 at Disneyland Paris. We'll also be exhibiting at Devoxx Maroc and Volcamp:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><a href="https://stagingv6.cleverapps.io/blog/company/2023/09/26/back-to-work-events-for-clever-cloud/">Back-to-work events for Clever Cloud</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->]]></description>
										<content:encoded><![CDATA[<p><img width="573" height="266" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/10/2.svg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="bannier Chatgpt with PHP" decoding="async" loading="lazy" /></p><!-- wp:paragraph -->
<p><strong>Since last year, OpenAI has been in the news with its large language models (LLM), notably GPT-3.5 and GPT-4, available through ChatGPT. But you can also include them within your own applications thanks to an API. Here's an example of how you can take advantage of it on Clever Cloud.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We'll use the open source <a href="https://github.com/unconv/chat-wtf" target="_blank" rel="noreferrer noopener">chat-wtf</a> project, created by Unconventional Coding, who detailed the conception stages in <a href="https://www.youtube.com/watch?v=0FUz4CtalhY" target="_blank" rel="noreferrer noopener">a series of videos</a>. It is primarily based on <a href="https://stagingv6.cleverapps.io/product/mysql/">the PHP language</a>  and data storage via sessions, SQLite or <a href="https://stagingv6.cleverapps.io/fr/product/mysql-a-traduire-en-fr/">MySQL</a>, according to user choice. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">An open-source ChatGPT, you can use on demand</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>It requires you to use <a href="https://platform.openai.com/overview" target="_blank" rel="noreferrer noopener">the OpenAI API</a>, but you may look at compatible models if you're more daring. The settings file also allows you to specify a "system message". So, you can provide the AI with informations about you or your expectations, which it should take into consideration when answering your questions.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This PHP application has not been developed in any particular way for Clever Cloud, but you can host it on our infrastructure in just a few minutes, configure it according to your needs, stop and start it on demand. Here's how.</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><a href="https://api.clever-cloud.com/v2/session/signup">Create a Clever Cloud account</a>&nbsp;(and get 20 euros in credits)</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>To get started, you'll need a Clever Cloud account and an OpenAI API key. You can create the application and follow this tutorial using our web interface, <a href="https://console.clever-cloud.com/">the Console</a>, but also through our open source CLI: <a href="https://github.com/CleverCloud/clever-tools" target="_blank" rel="noreferrer noopener">Clever Tools</a>. That's what we'll describe below.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Getting the code and configuration</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We'll assume that your machine is running <a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git" target="_blank" rel="noreferrer noopener">git</a> and a recent version of <a href="https://nodejs.dev/en/learn/how-to-install-nodejs/" target="_blank" rel="noreferrer noopener">Node.js</a>. If you haven't yet installed Clever Tools on your system, type (with system administrator rights, or <code>sudo</code> if necessary):</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">npm i -g clever-tools
clever login</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once logged in, you can check that everything has gone smoothly with the following command:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever profile</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Then you can create a fork of chat-wtf that can be deployed on Clever Cloud from your GitHub account. In this guide, we'll clone the repository locally and create a Clever Cloud application in it. A remote required for its deployment will be automatically added:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">git clone https://github.com/unconv/chat-wtf.git && cd chat-wtf
clever create -t php chat-wtf</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Thus, you have a local copy of the latest version of the chat-wtf application, which you can configure to match your needs. Rename <code>settings.sample.php</code> to <code>settings.php</code>. We'll start with some minor modifications.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Put in the following content to use environment variables:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-php">&#x3C;?php
return [
    &#x22;api_key&#x22; =&#x3E; getenv("OPENAI_API_KEY"),
    &#x22;system_message&#x22; =&#x3E; getenv("SYSTEM_MESSAGE"),
    &#x22;model&#x22; =&#x3E; &#x22;gpt-3.5-turbo&#x22;,
    &#x22;base_uri&#x22; =&#x3E; &#x22;&#x22;,
    &#x22;storage_type&#x22; =&#x3E; &#x22;session&#x22;,
];</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Edit the <code>.gitignore</code> file and remove <code>settings.php</code> so that it can be deployed with your application. Now that it's configured, you only need to set the environment variables required to ensure it works properly, and then deploy. Note that it runs on PHP 8.x. We'll be using the 8.2 branch:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever env set CC_PHP_VERSION "8.2"
clever env set OPENAI_API_KEY "Your OpenAI API key"
clever env set SYSTEM_MESSAGE "Your system message"
git add . && git commit -m "First deploy"
clever deploy && clever open</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once the environment variables have been set, we perform a simple Git Push. The application is then deployed on Clever Cloud, an archive is created to ease its redeployment, and if all has gone well, it's opened in your browser:</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":10576,"sizeSlug":"full","linkDestination":"media"} -->
<figure class="wp-block-image aligncenter size-full"><a href="https://cdn.clever-cloud.com/uploads/2023/10/image-2.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/10/image-2.png" alt="Chat WTF on Clever Cloud" class="wp-image-10576"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>As with any application hosted within our service, you can simply assign it a domain that will benefit from our <a href="https://www.sozu.io/" target="_blank" rel="noreferrer noopener">Sōzu</a> load balancer and a Let's Encrypt certificate, get its status and activity, stop or restart it. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><a href="https://console.clever-cloud.com">The Console</a> provides metrics and links to a Grafana dashboard to monitor its status. You can also adjust the size of the instance or activate auto-scalability to handle different load levels:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever console

clever domain
clever domain add domain.tld

clever status
clever activity

clever scale --min-instances 1 --max-instances 4 --min-flavor pico --max-flavor M
clever scale --instances 1 --flavor pico

clever restart
clever stop</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Let's add a database to our chat-wtf instance</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As mentioned previously, this project can store its data within PHP sessions, but also via SQLite or MySQL. In this example, we'll opt for the latter to show you how it can be done, in a very simple way.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>First, let's create a MySQL database within your Clever Cloud account, linking it directly to your application. By default it's a DEV instance, shared and free, but you can request <a href="https://stagingv6.cleverapps.io/pricing/">a larger plan</a> if needed:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever addon create mysql-addon chat-wtf-mysql --link chat-wtf</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This "link" allows connection parameters to be injected directly into the application using environment variables. These are visible in the Console or via Clever Tools :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever env</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Thus, all you need is to modify the <code>settings.php</code> file as follows to use it:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-php">    &#x22;storage_type&#x22; =&#x3E; &#x22;sql&#x22;,
    &#x22;db&#x22; =&#x3E; [
        &#x22;dsn&#x22; =&#x3E; &#x22;mysql:host=&#x22; . getenv(&#x27;MYSQL_ADDON_HOST&#x27;) . &#x22;;
                    port=&#x22; . getenv(&#x27;MYSQL_ADDON_PORT&#x27;) . &#x22;;
                    dbname=&#x22; . getenv(&#x27;MYSQL_ADDON_DB&#x27;),
        &#x22;username&#x22; =&#x3E; getenv(&#x27;MYSQL_ADDON_USER&#x27;),
        &#x22;password&#x22; =&#x3E; getenv(&#x27;MYSQL_ADDON_PASSWORD&#x27;),
    ],</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Then go to the MySQL database dashboard, accessible in the Console. You'll find a link to its PHPMyAdmin interface. Click on the database name in the left-hand menu, then you'll get to the import function. This will enable you to initiate the DB structure by importing the <code>mysql.sql</code> file located in the repository's db folder. Set its location and click on "Import". You're done:</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":10570,"sizeSlug":"full","linkDestination":"media"} -->
<figure class="wp-block-image size-full"><a href="https://cdn.clever-cloud.com/uploads/2023/10/image.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/10/image.png" alt="MySQL Import" class="wp-image-10570"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>You can also do this via a Shell script that checks if the database is empty, and import the default data if necessary. Create a file named <code>init.sh</code> with this code:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">SSE="SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='$MYSQL_ADDON_DB';"
PARAMS="-u $MYSQL_ADDON_USER -h $MYSQL_ADDON_HOST -P $MYSQL_ADDON_PORT -D $MYSQL_ADDON_DB"

TABLE_COUNT=$(MYSQL_PWD=$MYSQL_ADDON_PASSWORD mysql $PARAMS -sse"$SSE")

if [ "$TABLE_COUNT" -eq 0 ]; then
  echo "Database is empty, we fill it with the default data."
  MYSQL_PWD=$MYSQL_ADDON_PASSWORD mysql $PARAMS < db/mysql.sql 
  
else
  echo "Database contains $TABLE_COUNT tables."
fi

rm init.sh</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You'll need to run it during application deployment :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever env set CC_PRE_BUILD_HOOK "bash init.sh"</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>All that you remains to do is redeploy your application, which will now use the MySQL database to store its data rather than PHP sessions:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">git add settings.php && git commit -m "Add MySQL support"
clever deploy && clever open</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>If this doesn't work, check errors in your instance logs on the Console or via :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever logs</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Want to find out more?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>To discover in greater detail the hosting PHP applications on Clever Cloud or <a href="https://stagingv6.cleverapps.io/product/">our managed database services</a>, come and meet us at the PHP Forum from October 12 to 13 at Disneyland Paris. We'll also be exhibiting at Devoxx Maroc and Volcamp:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><a href="https://stagingv6.cleverapps.io/blog/company/2023/09/26/back-to-work-events-for-clever-cloud/">Back-to-work events for Clever Cloud</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Bun: how to host your apps on Clever Cloud</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2023/09/22/bun-on-clever-cloud/</link>
		
		<dc:creator><![CDATA[David Legrand]]></dc:creator>
		<pubDate>Fri, 22 Sep 2023 15:01:59 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[clevercloud]]></category>
		<category><![CDATA[Developers]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=10008</guid>

					<description><![CDATA[<p><img width="1480" height="740" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/09/banner-bun-on-clever-cloud.svg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="BANNIER bun" decoding="async" loading="lazy" /></p><!-- wp:paragraph -->
<p><strong>For more than a year now, Jarred Sumner and his team have been working on a new open source JavaScript runtime: <a href="https://github.com/oven-sh/bun" target="_blank" rel="noreferrer noopener">Bun</a>. <strong> It's touted as more efficient and feature-rich than current solutions such as Node.js or Deno</strong>. Version 1.0.3 <a href="https://github.com/oven-sh/bun/releases" target="_blank" rel="noreferrer noopener">has just been released</a>, and you can already use it for your projects hosted by Clever Cloud.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While we like to automate and simplify everything for our customers, we do so while leaving as much freedom as possible. Thus, hosting <a href="https://stagingv6.cleverapps.io/product/node-js-applications/">a Node.js application</a> with the framework or package manager of your choice can be done without any particular constraints, and deploying a website takes only a few minutes.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We already support <a href="https://stagingv6.cleverapps.io/blog/engineering/2020/05/19/deploy-deno/">Deno</a>, <a href="https://stagingv6.cleverapps.io/doc/deploy/application/javascript/by-framework/meteor/">Meteor.js</a>, <a href="https://stagingv6.cleverapps.io/doc/deploy/application/javascript/by-framework/nodejs/#supported-package-managers">yarn</a>. While we haven't yet taken the decision to integrate Bun natively into our images, as we await initial feedback from our customers, it's all very straightforward.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Hello, Bun on Clever Cloud!</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Want to give it a try? All you need is a Clever Cloud account, or create one from an e-mail address or GitHub account. We'll give you 20 euros worth of credits when you sign up.</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><a href="https://api.clever-cloud.com/v2/session/signup">Create a Clever Cloud account</a> (and get 20 euros in credits)</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>For this first example, we'll assume that you have a machine running <a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git" target="_blank" rel="noreferrer noopener">git</a> and a recent version of <a href="https://nodejs.dev/en/learn/how-to-install-nodejs/" target="_blank" rel="noreferrer noopener">Node.js</a>. If you haven't yet installed our open source <a href="https://github.com/CleverCloud/clever-tools" target="_blank" rel="noreferrer noopener">Clever Tools</a> command line interface (CLI), type (with administrator rights on your system or <code>sudo</code> if necessary) :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">npm i -g clever-tools
clever login</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once logged in, you can check that everything has gone correctly with the following command:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever profile</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Let's install Bun and create our first application:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">npm install -g bun
mkdir clevbun &amp;&amp; cd clevbun<br>bun init -y &amp;&amp; git init</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This will create a local git repository and a whole series of files, including <code>package.json</code> which contains your project's configuration. But also <code>index.ts</code> and <code>ts.config.json</code>, which are specific to the TypeScript language used by Bun by default. Don't worry, it handles simple JavaScript files just as well as <a href="https://bun.sh/docs/runtime/jsx" target="_blank" rel="noreferrer noopener">JSX/TSX</a>, ECMAScript and CommonJS modules, which are imported <a href="https://bun.sh/docs/runtime/modules" target="_blank" rel="noreferrer noopener">in a unified way</a>, <a href="https://bun.sh/docs/api/ffi" target="_blank" rel="noreferrer noopener">low-level languages</a> or <a href="https://bun.sh/docs/api/sqlite" target="_blank" rel="noreferrer noopener">SQLite</a>. That's one of its strengths.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Let's check that everything worked as planned:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">&gt; bun index.ts
Hello via Bun!</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">An application using Bun's HTTP server</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Our aim is to host a web application, so we're going to use an HTTP server. It's a good thing that Bun has its own, in addition to ensuring compatibility with Node.js functionalities and APIs. Developed using the <a href="https://fr.wikipedia.org/wiki/Zig_(langage)" target="_blank" rel="noreferrer noopener">Zig language</a>, using the <a href="https://fr.wikipedia.org/wiki/JavaScriptCore" target="_blank" rel="noreferrer noopener">JavaScriptCore</a> engine rather than v8, this runtime claims to be much more efficient for such uses.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Modify the contents of the <code>index.ts</code> file as follows:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">Bun.serve({
  port: 8080,
  hostname: '0.0.0.0',
  fetch(req) {
    const url = new URL(req.url);
    if (url.pathname === "/") return new Response("Home page!");
    if (url.pathname === "/blog") return new Response("Blog!");
    return new Response("404!");
  },
  error(error) {
    return new Response(`&lt;pre&gt;${error}\n${error.stack}&lt;/pre&gt;`, {
      headers: {
        "Content-Type": "text/html",
      },
    });
  },
});</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This creates an HTTP server that sends a different response depending on the route (<code>url.pathname</code>) and a 404 error if none matches. If a problem occurs, a dedicated page will be displayed. Note that port 8080 is here specified in the code, but it could be defined with an environment variable: <code>$PORT</code>, <code>$BUN_PORT</code> or <code>$NODE_PORT</code>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Clever deploy!</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Now let's get down to the nitty-gritty of deploying on Clever Cloud, starting by preparing the application:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever create -t node clevbun
clever env set CC_PRE_BUILD_HOOK "npm i -g bun"
clever env set CC_NODE_BUILD_TOOL "custom"
clever env set CC_CUSTOM_BUILD_TOOL "bun install"
clever env set CC_RUN_COMMAND "bun run index.ts"</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>The first command creates the application within your Clever Cloud account. Then we define environment variables for installing Bun within the image, followed by instructions for configuring dependencies and launching the project. As with Node.js, you can specify that an application is ready for production by assigning the value <code>production</code> to the <code>NODE_ENV</code> environment variable.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It is then available from our infrastructure and opened in your browser. Note that you can use this configuration to use Bun on a Node.js application already hosted by Clever Cloud by adapting <code>CC_RUN_COMMAND</code> to your project.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Now that our application has been created, it can be deployed. It's as simple as a <code>git push</code>!</p>
<!-- /wp:paragraph -->

<!-- wp:code {"className":"language-bash"} -->
<pre class="wp-block-code language-bash"><code>git add . &amp;&amp; git commit -m "First commit"
clever deploy &amp;&amp; clever open</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>This should deploy the application on our infrastructure and open it in your browser. You can add <code>/blog</code> or <code>/random</code> at the end of the URL to check that routing works properly. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Many possibilities</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You don't have to worry about configuring HTTPS access, log collection or metrics - everything is already set up, accessible through Clever Tools or <a href="https://console.clever-cloud.com/">the Console</a>. You can also use the latter to activate <a href="https://stagingv6.cleverapps.io/fr/blog/features/2021/10/28/grafana-pour-des-metriques-d-applications/">Grafana</a> in your account settings. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever console</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Other Clever Tools features let you assign it a domain, view its parameters and activity, modify the number and type of instances used, and stop or restart it. Take a look at our CLI help with <code>--help</code> or <a href="https://github.com/CleverCloud/clever-tools/tree/master#how-to-use" target="_blank" rel="noreferrer noopener">its documentation</a> to find out more:</p>
<!-- /wp:paragraph -->

<!-- wp:code {"className":"language-bash"} -->
<pre class="wp-block-code language-bash"><code>clever domain
clever domain add domain.tld

clever status
clever activity

clever scale --min-instances 1 --max-instances 4 --min-flavor pico --max-flavor M
clever scale --instances 1 --flavor pico

clever restart
clever stop</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>Of course, you can also go further with Bun and deploy applications using <a href="https://twitter.com/davlgd/status/1700478826755530822" target="_blank" rel="noreferrer noopener">the Elysia web framework</a> or static site generators <a href="https://twitter.com/davlgd/status/1700599956359262313" target="_blank" rel="noreferrer noopener">such as Astro</a>. We'll tell you all about that in future blog posts! Meanwhile, let us know what you expect from our JavaScript runtime images.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1480" height="740" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/09/banner-bun-on-clever-cloud.svg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="BANNIER bun" decoding="async" loading="lazy" /></p><!-- wp:paragraph -->
<p><strong>For more than a year now, Jarred Sumner and his team have been working on a new open source JavaScript runtime: <a href="https://github.com/oven-sh/bun" target="_blank" rel="noreferrer noopener">Bun</a>. <strong> It's touted as more efficient and feature-rich than current solutions such as Node.js or Deno</strong>. Version 1.0.3 <a href="https://github.com/oven-sh/bun/releases" target="_blank" rel="noreferrer noopener">has just been released</a>, and you can already use it for your projects hosted by Clever Cloud.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While we like to automate and simplify everything for our customers, we do so while leaving as much freedom as possible. Thus, hosting <a href="https://stagingv6.cleverapps.io/product/node-js-applications/">a Node.js application</a> with the framework or package manager of your choice can be done without any particular constraints, and deploying a website takes only a few minutes.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We already support <a href="https://stagingv6.cleverapps.io/blog/engineering/2020/05/19/deploy-deno/">Deno</a>, <a href="https://stagingv6.cleverapps.io/doc/deploy/application/javascript/by-framework/meteor/">Meteor.js</a>, <a href="https://stagingv6.cleverapps.io/doc/deploy/application/javascript/by-framework/nodejs/#supported-package-managers">yarn</a>. While we haven't yet taken the decision to integrate Bun natively into our images, as we await initial feedback from our customers, it's all very straightforward.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Hello, Bun on Clever Cloud!</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Want to give it a try? All you need is a Clever Cloud account, or create one from an e-mail address or GitHub account. We'll give you 20 euros worth of credits when you sign up.</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><a href="https://api.clever-cloud.com/v2/session/signup">Create a Clever Cloud account</a> (and get 20 euros in credits)</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>For this first example, we'll assume that you have a machine running <a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git" target="_blank" rel="noreferrer noopener">git</a> and a recent version of <a href="https://nodejs.dev/en/learn/how-to-install-nodejs/" target="_blank" rel="noreferrer noopener">Node.js</a>. If you haven't yet installed our open source <a href="https://github.com/CleverCloud/clever-tools" target="_blank" rel="noreferrer noopener">Clever Tools</a> command line interface (CLI), type (with administrator rights on your system or <code>sudo</code> if necessary) :</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">npm i -g clever-tools
clever login</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once logged in, you can check that everything has gone correctly with the following command:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever profile</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Let's install Bun and create our first application:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">npm install -g bun
mkdir clevbun &amp;&amp; cd clevbun<br>bun init -y &amp;&amp; git init</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This will create a local git repository and a whole series of files, including <code>package.json</code> which contains your project's configuration. But also <code>index.ts</code> and <code>ts.config.json</code>, which are specific to the TypeScript language used by Bun by default. Don't worry, it handles simple JavaScript files just as well as <a href="https://bun.sh/docs/runtime/jsx" target="_blank" rel="noreferrer noopener">JSX/TSX</a>, ECMAScript and CommonJS modules, which are imported <a href="https://bun.sh/docs/runtime/modules" target="_blank" rel="noreferrer noopener">in a unified way</a>, <a href="https://bun.sh/docs/api/ffi" target="_blank" rel="noreferrer noopener">low-level languages</a> or <a href="https://bun.sh/docs/api/sqlite" target="_blank" rel="noreferrer noopener">SQLite</a>. That's one of its strengths.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Let's check that everything worked as planned:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">&gt; bun index.ts
Hello via Bun!</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">An application using Bun's HTTP server</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Our aim is to host a web application, so we're going to use an HTTP server. It's a good thing that Bun has its own, in addition to ensuring compatibility with Node.js functionalities and APIs. Developed using the <a href="https://fr.wikipedia.org/wiki/Zig_(langage)" target="_blank" rel="noreferrer noopener">Zig language</a>, using the <a href="https://fr.wikipedia.org/wiki/JavaScriptCore" target="_blank" rel="noreferrer noopener">JavaScriptCore</a> engine rather than v8, this runtime claims to be much more efficient for such uses.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Modify the contents of the <code>index.ts</code> file as follows:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">Bun.serve({
  port: 8080,
  hostname: '0.0.0.0',
  fetch(req) {
    const url = new URL(req.url);
    if (url.pathname === "/") return new Response("Home page!");
    if (url.pathname === "/blog") return new Response("Blog!");
    return new Response("404!");
  },
  error(error) {
    return new Response(`&lt;pre&gt;${error}\n${error.stack}&lt;/pre&gt;`, {
      headers: {
        "Content-Type": "text/html",
      },
    });
  },
});</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This creates an HTTP server that sends a different response depending on the route (<code>url.pathname</code>) and a 404 error if none matches. If a problem occurs, a dedicated page will be displayed. Note that port 8080 is here specified in the code, but it could be defined with an environment variable: <code>$PORT</code>, <code>$BUN_PORT</code> or <code>$NODE_PORT</code>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Clever deploy!</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Now let's get down to the nitty-gritty of deploying on Clever Cloud, starting by preparing the application:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever create -t node clevbun
clever env set CC_PRE_BUILD_HOOK "npm i -g bun"
clever env set CC_NODE_BUILD_TOOL "custom"
clever env set CC_CUSTOM_BUILD_TOOL "bun install"
clever env set CC_RUN_COMMAND "bun run index.ts"</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>The first command creates the application within your Clever Cloud account. Then we define environment variables for installing Bun within the image, followed by instructions for configuring dependencies and launching the project. As with Node.js, you can specify that an application is ready for production by assigning the value <code>production</code> to the <code>NODE_ENV</code> environment variable.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It is then available from our infrastructure and opened in your browser. Note that you can use this configuration to use Bun on a Node.js application already hosted by Clever Cloud by adapting <code>CC_RUN_COMMAND</code> to your project.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Now that our application has been created, it can be deployed. It's as simple as a <code>git push</code>!</p>
<!-- /wp:paragraph -->

<!-- wp:code {"className":"language-bash"} -->
<pre class="wp-block-code language-bash"><code>git add . &amp;&amp; git commit -m "First commit"
clever deploy &amp;&amp; clever open</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>This should deploy the application on our infrastructure and open it in your browser. You can add <code>/blog</code> or <code>/random</code> at the end of the URL to check that routing works properly. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Many possibilities</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You don't have to worry about configuring HTTPS access, log collection or metrics - everything is already set up, accessible through Clever Tools or <a href="https://console.clever-cloud.com/">the Console</a>. You can also use the latter to activate <a href="https://stagingv6.cleverapps.io/fr/blog/features/2021/10/28/grafana-pour-des-metriques-d-applications/">Grafana</a> in your account settings. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever console</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Other Clever Tools features let you assign it a domain, view its parameters and activity, modify the number and type of instances used, and stop or restart it. Take a look at our CLI help with <code>--help</code> or <a href="https://github.com/CleverCloud/clever-tools/tree/master#how-to-use" target="_blank" rel="noreferrer noopener">its documentation</a> to find out more:</p>
<!-- /wp:paragraph -->

<!-- wp:code {"className":"language-bash"} -->
<pre class="wp-block-code language-bash"><code>clever domain
clever domain add domain.tld

clever status
clever activity

clever scale --min-instances 1 --max-instances 4 --min-flavor pico --max-flavor M
clever scale --instances 1 --flavor pico

clever restart
clever stop</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>Of course, you can also go further with Bun and deploy applications using <a href="https://twitter.com/davlgd/status/1700478826755530822" target="_blank" rel="noreferrer noopener">the Elysia web framework</a> or static site generators <a href="https://twitter.com/davlgd/status/1700599956359262313" target="_blank" rel="noreferrer noopener">such as Astro</a>. We'll tell you all about that in future blog posts! Meanwhile, let us know what you expect from our JavaScript runtime images.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>A metric tile to simplify application monitoring</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2023/03/16/a-metric-tile-to-simplify-application-monitoring/</link>
		
		<dc:creator><![CDATA[David Legrand]]></dc:creator>
		<pubDate>Thu, 16 Mar 2023 11:09:43 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[feature]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=7858</guid>

					<description><![CDATA[<p></p><!-- wp:paragraph -->
<p>Hosting your sites through a service such as Clever Cloud is not just about sending your files to a server. It is gaining in simplicity of execution, in velocity, and more importantly, ensuring that they are kept in operating conditions.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For each application or add-on deployed, you automatically get services such as backups, log management or metrics monitoring. So you can be assured that you are ready for production.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">A new metric tile</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>This also includes a number of features that make it easy for you to access essential information through our <a href="https://console.clever-cloud.com/">Console</a>. Among its recent improvements, we added a new "tile" in the overview of each of your applications:</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7864,"sizeSlug":"full","linkDestination":"media"} -->
<figure class="wp-block-image size-full"><a href="https://cdn.clever-cloud.com/uploads/2023/03/overview-en.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/03/overview-en.png" alt="Dashboard Metric tile" class="wp-image-7864"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Here you will find the vCPU and memory usage over a 24-hour period, in the form of a graph with 24 bars, each representing one hour. An average value is also displayed, corresponding to the last hour.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A three-level color scheme allows you to instantly identify a situation that needs your attention, or to make sure that everything is fine. An information panel explains how the elements are working and you have shortcuts to more complete metrics or to the Grafana dashboard related to your application.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>And if you don't want to have to worry about the load level of your application and want to feel more peaceful, think about activating the auto-scalability. It allows you to constantly increase or decrease the size or number of your instances as needed, while respecting the limits you defined.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">A convenient and accessible web component</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Of course, <a href="https://stagingv6.cleverapps.io/doc/clever-components/?path=/story/%F0%9F%9B%A0-overview-cc-tile-metrics--default-story" target="_blank" rel="noreferrer noopener">this tile has been developed as <strong>a Web Component</strong>, documented here</a>, that you can freely use. It is also <strong>the first one to follow our accessibility rules</strong>, from buttons and links to screen reader handling: it will feature a table for the graphic.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p></p><!-- wp:paragraph -->
<p>Hosting your sites through a service such as Clever Cloud is not just about sending your files to a server. It is gaining in simplicity of execution, in velocity, and more importantly, ensuring that they are kept in operating conditions.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For each application or add-on deployed, you automatically get services such as backups, log management or metrics monitoring. So you can be assured that you are ready for production.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">A new metric tile</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>This also includes a number of features that make it easy for you to access essential information through our <a href="https://console.clever-cloud.com/">Console</a>. Among its recent improvements, we added a new "tile" in the overview of each of your applications:</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7864,"sizeSlug":"full","linkDestination":"media"} -->
<figure class="wp-block-image size-full"><a href="https://cdn.clever-cloud.com/uploads/2023/03/overview-en.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/03/overview-en.png" alt="Dashboard Metric tile" class="wp-image-7864"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Here you will find the vCPU and memory usage over a 24-hour period, in the form of a graph with 24 bars, each representing one hour. An average value is also displayed, corresponding to the last hour.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A three-level color scheme allows you to instantly identify a situation that needs your attention, or to make sure that everything is fine. An information panel explains how the elements are working and you have shortcuts to more complete metrics or to the Grafana dashboard related to your application.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>And if you don't want to have to worry about the load level of your application and want to feel more peaceful, think about activating the auto-scalability. It allows you to constantly increase or decrease the size or number of your instances as needed, while respecting the limits you defined.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">A convenient and accessible web component</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Of course, <a href="https://stagingv6.cleverapps.io/doc/clever-components/?path=/story/%F0%9F%9B%A0-overview-cc-tile-metrics--default-story" target="_blank" rel="noreferrer noopener">this tile has been developed as <strong>a Web Component</strong>, documented here</a>, that you can freely use. It is also <strong>the first one to follow our accessibility rules</strong>, from buttons and links to screen reader handling: it will feature a table for the graphic.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The Clever Cloud Console continues its makeover</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2023/02/14/the-clever-cloud-console-continues-its-makeover/</link>
		
		<dc:creator><![CDATA[David Legrand]]></dc:creator>
		<pubDate>Tue, 14 Feb 2023 12:37:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[feature]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=7805</guid>

					<description><![CDATA[<p><img width="2800" height="1080" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole.png 2800w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-1536x592.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-2048x790.png 2048w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-1368x528.png 1368w" sizes="auto, (max-width: 2800px) 100vw, 2800px" /></p><!-- wp:paragraph -->
<p>In 2022, Clever Cloud has more than doubled its team to improve services and develop new ones by strengthening its R&amp;D department. We also wanted to take more time to fine-tune the core of our customers' daily life: <a href="https://console.clever-cloud.com/">the Console</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is the web interface they use to manage and deploy their applications and add-ons, access their metrics, logs, etc. It is developed by our front-end team, led by Hubert Sablonnière, who recently welcomed 4 new members.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Since then, they’ve been focused on improving the consistency of the Console's elements, with an important concern for both user experience and accessibility. Background work has been done as well: general improvement of the code, testing and deployment procedures, redesign of the notification system, icon management, generation of the <a href="https://stagingv6.cleverapps.io/doc/clever-components/">Clever Components</a> documentation and clarification of some prices.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">SSH keys: a more useful and clear interface&nbsp;</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>A few weeks ago, we also implemented a new SSH keys management form, using Clever Components for a better accessibility and an adjustment to all screens. It is especially more understandable, with contextual help, explicit error messages, better focus management, etc.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>There are now three sections: one for adding a new key, a second one listing existing keys, which you can delete, and finally the one used to import GitHub keys. For every case, the basic commands are explained:</p>
<!-- /wp:paragraph -->

<!-- wp:gallery {"linkTo":"none"} -->
<figure class="wp-block-gallery has-nested-images columns-default is-cropped"><!-- wp:image {"id":7834,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/ssh-keys-previous-overview.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/ssh-keys-previous-overview-1.png" alt="Clever Cloud Console SSH Keys 2022" class="wp-image-7834"/></a><figcaption class="wp-element-caption">Before</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":7829,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/ssh-keys-overview-1.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/ssh-keys-overview-1.png" alt="" class="wp-image-7829"/></a><figcaption class="wp-element-caption">After</figcaption></figure>
<!-- /wp:image --></figure>
<!-- /wp:gallery -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Streamlined email and member management&nbsp;</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We have done the same with email and member management of an organization. The core elements have also been redesigned to use our components and better adapt to different device formats with improved accessibility.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But we especially made sure that useful elements are presented in a clear way. For example, the primary and secondary emails of an account are distinguished, with a mention in case of verification and the possibility to change the status at any time:</p>
<!-- /wp:paragraph -->

<!-- wp:gallery {"linkTo":"none"} -->
<figure class="wp-block-gallery has-nested-images columns-default is-cropped"><!-- wp:image {"id":7820,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/emails-before-not-verified.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/emails-before-not-verified.png" alt="Clever Cloud Console Emails 2022" class="wp-image-7820"/></a><figcaption class="wp-element-caption">Before</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":7821,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/emails-after-not-verified.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/emails-after-not-verified.png" alt="Clever Cloud Console Emails 2023" class="wp-image-7821"/></a><figcaption class="wp-element-caption">After</figcaption></figure>
<!-- /wp:image --></figure>
<!-- /wp:gallery -->

<!-- wp:paragraph -->
<p>For the management of an organization, a three-zone structure has been implemented: one for inviting members, another for listing those present and their roles, as well as their management (editing, deleting), and finally a third for leaving an organization, identified as a "danger zone".&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A thorough work has also been done on the messages and information provided, especially to better identify members who have not activated the double authentication on their account (2FA), with a specific filter available:</p>
<!-- /wp:paragraph -->

<!-- wp:gallery {"linkTo":"none"} -->
<figure class="wp-block-gallery has-nested-images columns-default is-cropped"><!-- wp:image {"id":7823,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/orga-members-before-editing.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/orga-members-before-editing.png" alt="Clever Cloud Console Organisation 2022" class="wp-image-7823"/></a><figcaption class="wp-element-caption">Before</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":7822,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/orga-members-after-overview-admin-1-1.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/orga-members-after-overview-admin-1.png" alt="Clever Cloud Console Organisation 2023" class="wp-image-7822"/></a><figcaption class="wp-element-caption">After</figcaption></figure>
<!-- /wp:image --></figure>
<!-- /wp:gallery -->

<!-- wp:paragraph -->
<p>These improvements are only the beginning of the Console evolution, which will continue throughout 2023, with a roadmap already well underway and big projects about to be completed. Good news by the way: the new logs interface is being finalized, we'll tell you about it soon ;)</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="2800" height="1080" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole.png 2800w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-1536x592.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-2048x790.png 2048w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/02/bannerconsole-1368x528.png 1368w" sizes="auto, (max-width: 2800px) 100vw, 2800px" /></p><!-- wp:paragraph -->
<p>In 2022, Clever Cloud has more than doubled its team to improve services and develop new ones by strengthening its R&amp;D department. We also wanted to take more time to fine-tune the core of our customers' daily life: <a href="https://console.clever-cloud.com/">the Console</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is the web interface they use to manage and deploy their applications and add-ons, access their metrics, logs, etc. It is developed by our front-end team, led by Hubert Sablonnière, who recently welcomed 4 new members.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Since then, they’ve been focused on improving the consistency of the Console's elements, with an important concern for both user experience and accessibility. Background work has been done as well: general improvement of the code, testing and deployment procedures, redesign of the notification system, icon management, generation of the <a href="https://stagingv6.cleverapps.io/doc/clever-components/">Clever Components</a> documentation and clarification of some prices.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">SSH keys: a more useful and clear interface&nbsp;</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>A few weeks ago, we also implemented a new SSH keys management form, using Clever Components for a better accessibility and an adjustment to all screens. It is especially more understandable, with contextual help, explicit error messages, better focus management, etc.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>There are now three sections: one for adding a new key, a second one listing existing keys, which you can delete, and finally the one used to import GitHub keys. For every case, the basic commands are explained:</p>
<!-- /wp:paragraph -->

<!-- wp:gallery {"linkTo":"none"} -->
<figure class="wp-block-gallery has-nested-images columns-default is-cropped"><!-- wp:image {"id":7834,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/ssh-keys-previous-overview.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/ssh-keys-previous-overview-1.png" alt="Clever Cloud Console SSH Keys 2022" class="wp-image-7834"/></a><figcaption class="wp-element-caption">Before</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":7829,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/ssh-keys-overview-1.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/ssh-keys-overview-1.png" alt="" class="wp-image-7829"/></a><figcaption class="wp-element-caption">After</figcaption></figure>
<!-- /wp:image --></figure>
<!-- /wp:gallery -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Streamlined email and member management&nbsp;</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We have done the same with email and member management of an organization. The core elements have also been redesigned to use our components and better adapt to different device formats with improved accessibility.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But we especially made sure that useful elements are presented in a clear way. For example, the primary and secondary emails of an account are distinguished, with a mention in case of verification and the possibility to change the status at any time:</p>
<!-- /wp:paragraph -->

<!-- wp:gallery {"linkTo":"none"} -->
<figure class="wp-block-gallery has-nested-images columns-default is-cropped"><!-- wp:image {"id":7820,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/emails-before-not-verified.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/emails-before-not-verified.png" alt="Clever Cloud Console Emails 2022" class="wp-image-7820"/></a><figcaption class="wp-element-caption">Before</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":7821,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/emails-after-not-verified.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/emails-after-not-verified.png" alt="Clever Cloud Console Emails 2023" class="wp-image-7821"/></a><figcaption class="wp-element-caption">After</figcaption></figure>
<!-- /wp:image --></figure>
<!-- /wp:gallery -->

<!-- wp:paragraph -->
<p>For the management of an organization, a three-zone structure has been implemented: one for inviting members, another for listing those present and their roles, as well as their management (editing, deleting), and finally a third for leaving an organization, identified as a "danger zone".&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A thorough work has also been done on the messages and information provided, especially to better identify members who have not activated the double authentication on their account (2FA), with a specific filter available:</p>
<!-- /wp:paragraph -->

<!-- wp:gallery {"linkTo":"none"} -->
<figure class="wp-block-gallery has-nested-images columns-default is-cropped"><!-- wp:image {"id":7823,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/orga-members-before-editing.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/orga-members-before-editing.png" alt="Clever Cloud Console Organisation 2022" class="wp-image-7823"/></a><figcaption class="wp-element-caption">Before</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"id":7822,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://cdn.clever-cloud.com/uploads/2023/02/orga-members-after-overview-admin-1-1.png" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/02/orga-members-after-overview-admin-1.png" alt="Clever Cloud Console Organisation 2023" class="wp-image-7822"/></a><figcaption class="wp-element-caption">After</figcaption></figure>
<!-- /wp:image --></figure>
<!-- /wp:gallery -->

<!-- wp:paragraph -->
<p>These improvements are only the beginning of the Console evolution, which will continue throughout 2023, with a roadmap already well underway and big projects about to be completed. Good news by the way: the new logs interface is being finalized, we'll tell you about it soon ;)</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>GlitchTip on Clever Cloud, a Sentry alternative</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2022/06/21/glitchtip-on-clever-cloud-a-sentry-alternative/</link>
		
		<dc:creator><![CDATA[Aurélien Hebert]]></dc:creator>
		<pubDate>Tue, 21 Jun 2022 15:13:11 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[observability]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=6478</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="glitchtip" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph -->
<p>At Clever Cloud, we like to have some context about our application status and logs. That's why we have a lot of tools deployed to gain some observability. A lot of them are freely available for our customers (a log view, a metrics view or Grafana). Still, there are some tools that we use internally that could be helpful to many. We discovered recently <a href="https://glitchtip.com/" target="_blank" rel="noreferrer noopener">glichtip</a>, which is an open source error tracking. Glichtip is a great alternative to Sentry and less complex to deploy. We will add that Glichtip is compatible with the <a href="https://docs.sentry.io/platforms/">Sentry's open source SDK</a>.  </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Context</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We used Sentry to analyse the errors coming from our own application logs. We were still using the <code>9.1</code> version until we had too many trouble to keep it running. We then had to upgrade or find a new solution. All Sentry version post <code>9.1</code> require many more components to deploy (as Kafka, Snuba or Clickhouse). This is still possible to deploy it with a <a href="https://develop.sentry.dev/self-hosted/">self hosted script</a>. We wanted every component to be standalone outside of the main Sentry application, it meant that we had to provide authentication to all components. It was not a big issue, but it took us more time that what we first expected. And at the same time, we discovered a new project: Glitchtip. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Glitchtip</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>All started by a French <a href="https://twitter.com/aeris22/status/1516411508225417228?t=EdjijoImwBdKwOjI63m5-A&amp;s=19">tweet</a>, about the discovery of a new tool: <a href="https://glitchtip.com/">Glitchtip</a>. This tweet said that Glitchtip is compatible to Sentry, free and easy to self host it, so it was evident that we were going to give it a try.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>What does Glitchtip provide? Inside your application, with the Sentry SDK, you will transfer some of your error logs. Then the tool help you to track those errors, to better understand when a new version tool creates new errors,  organize or search them... In a quick word, it's a very useful tool to debug your deployed software. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Clever Cloud deploy </h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3>Setup</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>First, we will download Glitchtip <code>Docker</code> project and customize it a bit to match how docker applications are run in Clever Cloud.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Get latest Glitchtip release
git clone https://gitlab.com/glitchtip/glitchtip.git

# Go to the folder
cd glitchtip
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Then open your favorite code IDE and open the <code>Dockerfile</code>: </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Remove
FROM glitchtip/glitchtip:latest

# And add instead:
FROM glitchtip/glitchtip:v1.12.2

COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Here we will set-up the last Glitchtip release. When we were writing this blog it was the <code>v1.12.2</code>. You can find them <a href="https://hub.docker.com/r/glitchtip/glitchtip/tags">here</a>. We set up a new script to use <code>docker-entrypoint.sh</code> which will enable us to start or the Glitchtip web application or the Glitchtip worker. The <code>docker-entrypoint.sh</code> should contain the following script:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># docker-entrypoint.sh script:
#!/bin/bash

if [ "${START_TARGET}" = "worker" ]; then
  mkdir /tmp/sandboxed
	cd /tmp/sandboxed &amp;&amp; nohup python -m http.server 8080 &amp;
	/code/bin/run-celery-with-beat.sh
else
  /code/bin/start.sh
fi

# Don't forget to make it executable:
chmod u+x docker-entrypoint.sh
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Deploy</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Glitchtip comes with a <code>Dockerfile</code>, which means we will use a <a href="https://stagingv6.cleverapps.io/doc/deploy/application/java/java-jar/">a docker runtime</a>. It also requires a <a href="https://www.postgresql.org/">PostgreSQL Database</a> and <a href="https://redis.io/">a Redis cache</a>, which means we will deploy a <a href="https://stagingv6.cleverapps.io/doc/deploy/addon/postgresql/postgresql/">PostgreSQL addon</a> and a <a href="https://stagingv6.cleverapps.io/doc/deploy/addon/redis/">Redis addon.</a> Adding a <code>-o</code> option in all <code>create</code> command line can be used to specify which organisation to use.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Create the docker applications:
clever create --type docker glitchtip-web
clever create --type docker glitchtip-worker

# Create the PG addon
clever addon create postgresql-addon --plan s_sml --addon-version 14 glitchtip-postgres

# Link the addon
clever service link-addon glitchtip-postgres -a glitchtip-web
clever service link-addon glitchtip-postgres -a glitchtip-worker

# Create the Redis addon
clever addon create redis-addon --plan s_mono glitchtip-redis

# Link the addon
clever service link-addon glitchtip-redis -a glitchtip-web
clever service link-addon glitchtip-redis -a glitchtip-worker
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Config</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>For now we will configure Glitchtip through environment variables. As we use several applications, let's deploy an addon configuration provider. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Create a config addon:
clever addon create config-provider --plan std glitchtip-config

# Link the addon
clever service link-addon glitchtip-config -a glitchtip-web
clever service link-addon glitchtip-config -a glitchtip-worker

</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Now that we have deployed a config addon provider let's update its configuration. To do it go to the Clever Cloud console and then select the <code>glitchtip-config</code>. In the variable panel, select the <code>expert</code> mode and add the following required variable, (fill their value based on the provided commentary):</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># In the config addon provider add:
CC_DOCKER_EXPOSED_HTTP_PORT="8080"
# Copy paste here the POSTGRESQL_ADDON_URI environment variable of the glitchtip-postgres addon 
DATABASE_URL="postgresql://user:password@host:port/database"
# Provide a valid email server
EMAIL_URL="smtp://email:password@smtp_url:port"
# Copy paste here the application domain name of the glitchtip-web application instead (should look like: https://app-da7a7a7a-da7a-4242-7a7a-da7a42427a7a.cleverapps.io)
GLITCHTIP_DOMAIN="MY_APP_DOMAIN_NAME"
# Copy paste here the REDIS_ADDON's environment variable of the glitchtip-redis addon 
REDIS_HOST= &lt; REDIS_HOST &gt;
REDIS_PASSWORD= &lt; REDIS_PASSWORD &gt; 
REDIS_PORT= &lt; REDIS_PORT &gt;
# Generate your own custom secret key for Glitchtip
SECRET_KEY= &lt; choose a secret key &gt;
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Note that you can find more information about how to configure Glitchtip in its <a href="https://glitchtip.com/documentation/install#configuration">documentation</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Each docker application requires some custom configuration too:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">#glitchtip-web custom env
clever env set CC_RUN_SUCCEEDED_HOOK "./manage.py migrate" -a glitchtip-web
clever env set START_TARGET "web" -a glitchtip-web
#glitchtip-worker custom env
clever env set START_TARGET "worker" -a glitchtip-worker
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Deploy and run</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Now that everything is set, it's time to deploy and run your Glitchtip application. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Remove initial git
rm -r .git 

# Init a git repository
git init

# Add your files
git add .

# Commit the changes
git commit -m "clever init and deploy"

# Deploy the application
clever deploy -a glitchtip-web
clever deploy -a glitchtip-worker

# Open Glitchtip in your browser
clever open -a glitchtip-web
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Your glitchtip is now almost ready to use. One last action is required: you need to create a super user to administrate Glitchtip. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Connect in SSH to your Clever application:
clever ssh -a glitchtip-web

# Run 
./manage.py createsuperuser
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Great job! You should now have an access to glitchtip admin page (available on your application /admin path). You can then create users or connect to your favorite social application to authenticate your users. You will find more information on the <a href="https://glitchtip.com/documentation/install#django-admin">documentation</a>. You can set your <a href="https://stagingv6.cleverapps.io/blog/fonctionnalites/2022/05/11/how-to-deploy-keycloak-on-clever-cloud/">own keycloak on Clever Cloud</a> and use it to connect to Glitchtip! </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Connect Glitchtip to an application</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We will reuse the akka application example we used for our <a href="https://stagingv6.cleverapps.io/blog/fonctionnalites">scala exemple blogpost</a>. And we will then see how we can forward our own error logs to Glitchtip.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Create a Glitchtip project</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The first step will be to login with new root user (or any Glitchtip user you created or linked with a social application). Glitchtip will ask you to create your organisation. In our case let's set <code>clever-cloud</code>. As we want to monitore our application error's logs, we will need to create a new project directly in Glitchtip UI. Let's call it "myakka" and create it's associated "Scala-dev" team. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Once this project is create you will be able to get a <code>DSN</code>. We will load it later as environment variable for the akka application. </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Create a Glitchtip Token </h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Go to <code>Profile/auth token</code> and craft a new glitchtip token with at least the following project rights: read, write and releases. Save it for later.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Setup the AKKA example application on Clever Cloud</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The first step will be to deploy AKKA example application on Clever Cloud as mentionned in the <a href="https://stagingv6.cleverapps.io/blog/fonctionnalites">scala exemple blogpost</a>. <a href="https://github.com/CleverCloud/scala-akka-http-postgres-example" target="_blank" rel="noreferrer noopener">Clone</a> the project and instead of the main branch, use the <code>blogpost-sentry</code> one. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Clone Clever Cloud akka example project:
git clone https://github.com/CleverCloud/scala-akka-http-postgres-example.git

# Checkout blogpost-sentry
git checkout blogpost-sentry
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>In this branch, we update a bit the application to connect it to Sentry. Then we send only the starting server HTTP logs with a custom status tag (success or failure). This is code we use in the <code>blogpost-sentry</code> branch:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Register Sentry
Sentry.init(sentryConfig.sentryDsn)

# Send a message to Sentry with a tag
Sentry.getContext().addTag("status", status)
Sentry.capture(message)
Sentry.getContext().clear()
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p><strong>In addition, you have to</strong> <strong>add</strong> a <code>.sentryclirc</code> file. This file should contain:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">[defaults]
url=GLITCHTIP_APP_DOMAIN_NAME
org=clever-cloud
project=myakka
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Configure Glitchtip environment variables</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Use the <code>post_build.sh</code> script as <code>CC_POST_BUILD_HOOK</code>. This will run the  mandatory <code>sbt flywayMigrate</code> as well as create a new release on Sentry (based on the commit ID). </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Set CC_POST_BUILD_HOOK
clever env -a myakka set CC_POST_BUILD_HOOK "./post_build.sh"
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You also need to set Glitchtip token and Glitchtip dsn as environnement variables:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Set Glitchip required env variables
clever env -a myakka set SENTRY_AUTH_TOKEN &lt; custom_glitchtip_token &gt;  
clever env -a myakka set SENTRY_DSN &lt; custom_glitchtip_dsn &gt;  
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Deploy the application</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You can now deploy myakka project:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Deploy myakka
clever deploy
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Try it </h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As soon as this done, you should see your first issue on Glitchip! That's all, you can now add all the application you want to Glitchtip and enjoy this tool to centralise your application logs and errors.  If you're used to this product or just try it feel free to share with us any feedback <a href="https://twitter.com/clever_cloud">on Twitter</a>.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="glitchtip" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/glitchtip-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph -->
<p>At Clever Cloud, we like to have some context about our application status and logs. That's why we have a lot of tools deployed to gain some observability. A lot of them are freely available for our customers (a log view, a metrics view or Grafana). Still, there are some tools that we use internally that could be helpful to many. We discovered recently <a href="https://glitchtip.com/" target="_blank" rel="noreferrer noopener">glichtip</a>, which is an open source error tracking. Glichtip is a great alternative to Sentry and less complex to deploy. We will add that Glichtip is compatible with the <a href="https://docs.sentry.io/platforms/">Sentry's open source SDK</a>.  </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Context</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We used Sentry to analyse the errors coming from our own application logs. We were still using the <code>9.1</code> version until we had too many trouble to keep it running. We then had to upgrade or find a new solution. All Sentry version post <code>9.1</code> require many more components to deploy (as Kafka, Snuba or Clickhouse). This is still possible to deploy it with a <a href="https://develop.sentry.dev/self-hosted/">self hosted script</a>. We wanted every component to be standalone outside of the main Sentry application, it meant that we had to provide authentication to all components. It was not a big issue, but it took us more time that what we first expected. And at the same time, we discovered a new project: Glitchtip. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Glitchtip</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>All started by a French <a href="https://twitter.com/aeris22/status/1516411508225417228?t=EdjijoImwBdKwOjI63m5-A&amp;s=19">tweet</a>, about the discovery of a new tool: <a href="https://glitchtip.com/">Glitchtip</a>. This tweet said that Glitchtip is compatible to Sentry, free and easy to self host it, so it was evident that we were going to give it a try.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>What does Glitchtip provide? Inside your application, with the Sentry SDK, you will transfer some of your error logs. Then the tool help you to track those errors, to better understand when a new version tool creates new errors,  organize or search them... In a quick word, it's a very useful tool to debug your deployed software. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Clever Cloud deploy </h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3>Setup</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>First, we will download Glitchtip <code>Docker</code> project and customize it a bit to match how docker applications are run in Clever Cloud.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Get latest Glitchtip release
git clone https://gitlab.com/glitchtip/glitchtip.git

# Go to the folder
cd glitchtip
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Then open your favorite code IDE and open the <code>Dockerfile</code>: </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Remove
FROM glitchtip/glitchtip:latest

# And add instead:
FROM glitchtip/glitchtip:v1.12.2

COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Here we will set-up the last Glitchtip release. When we were writing this blog it was the <code>v1.12.2</code>. You can find them <a href="https://hub.docker.com/r/glitchtip/glitchtip/tags">here</a>. We set up a new script to use <code>docker-entrypoint.sh</code> which will enable us to start or the Glitchtip web application or the Glitchtip worker. The <code>docker-entrypoint.sh</code> should contain the following script:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># docker-entrypoint.sh script:
#!/bin/bash

if [ "${START_TARGET}" = "worker" ]; then
  mkdir /tmp/sandboxed
	cd /tmp/sandboxed &amp;&amp; nohup python -m http.server 8080 &amp;
	/code/bin/run-celery-with-beat.sh
else
  /code/bin/start.sh
fi

# Don't forget to make it executable:
chmod u+x docker-entrypoint.sh
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Deploy</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Glitchtip comes with a <code>Dockerfile</code>, which means we will use a <a href="https://stagingv6.cleverapps.io/doc/deploy/application/java/java-jar/">a docker runtime</a>. It also requires a <a href="https://www.postgresql.org/">PostgreSQL Database</a> and <a href="https://redis.io/">a Redis cache</a>, which means we will deploy a <a href="https://stagingv6.cleverapps.io/doc/deploy/addon/postgresql/postgresql/">PostgreSQL addon</a> and a <a href="https://stagingv6.cleverapps.io/doc/deploy/addon/redis/">Redis addon.</a> Adding a <code>-o</code> option in all <code>create</code> command line can be used to specify which organisation to use.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Create the docker applications:
clever create --type docker glitchtip-web
clever create --type docker glitchtip-worker

# Create the PG addon
clever addon create postgresql-addon --plan s_sml --addon-version 14 glitchtip-postgres

# Link the addon
clever service link-addon glitchtip-postgres -a glitchtip-web
clever service link-addon glitchtip-postgres -a glitchtip-worker

# Create the Redis addon
clever addon create redis-addon --plan s_mono glitchtip-redis

# Link the addon
clever service link-addon glitchtip-redis -a glitchtip-web
clever service link-addon glitchtip-redis -a glitchtip-worker
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Config</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>For now we will configure Glitchtip through environment variables. As we use several applications, let's deploy an addon configuration provider. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Create a config addon:
clever addon create config-provider --plan std glitchtip-config

# Link the addon
clever service link-addon glitchtip-config -a glitchtip-web
clever service link-addon glitchtip-config -a glitchtip-worker

</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Now that we have deployed a config addon provider let's update its configuration. To do it go to the Clever Cloud console and then select the <code>glitchtip-config</code>. In the variable panel, select the <code>expert</code> mode and add the following required variable, (fill their value based on the provided commentary):</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># In the config addon provider add:
CC_DOCKER_EXPOSED_HTTP_PORT="8080"
# Copy paste here the POSTGRESQL_ADDON_URI environment variable of the glitchtip-postgres addon 
DATABASE_URL="postgresql://user:password@host:port/database"
# Provide a valid email server
EMAIL_URL="smtp://email:password@smtp_url:port"
# Copy paste here the application domain name of the glitchtip-web application instead (should look like: https://app-da7a7a7a-da7a-4242-7a7a-da7a42427a7a.cleverapps.io)
GLITCHTIP_DOMAIN="MY_APP_DOMAIN_NAME"
# Copy paste here the REDIS_ADDON's environment variable of the glitchtip-redis addon 
REDIS_HOST= &lt; REDIS_HOST &gt;
REDIS_PASSWORD= &lt; REDIS_PASSWORD &gt; 
REDIS_PORT= &lt; REDIS_PORT &gt;
# Generate your own custom secret key for Glitchtip
SECRET_KEY= &lt; choose a secret key &gt;
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Note that you can find more information about how to configure Glitchtip in its <a href="https://glitchtip.com/documentation/install#configuration">documentation</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Each docker application requires some custom configuration too:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">#glitchtip-web custom env
clever env set CC_RUN_SUCCEEDED_HOOK "./manage.py migrate" -a glitchtip-web
clever env set START_TARGET "web" -a glitchtip-web
#glitchtip-worker custom env
clever env set START_TARGET "worker" -a glitchtip-worker
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Deploy and run</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Now that everything is set, it's time to deploy and run your Glitchtip application. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Remove initial git
rm -r .git 

# Init a git repository
git init

# Add your files
git add .

# Commit the changes
git commit -m "clever init and deploy"

# Deploy the application
clever deploy -a glitchtip-web
clever deploy -a glitchtip-worker

# Open Glitchtip in your browser
clever open -a glitchtip-web
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Your glitchtip is now almost ready to use. One last action is required: you need to create a super user to administrate Glitchtip. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Connect in SSH to your Clever application:
clever ssh -a glitchtip-web

# Run 
./manage.py createsuperuser
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Great job! You should now have an access to glitchtip admin page (available on your application /admin path). You can then create users or connect to your favorite social application to authenticate your users. You will find more information on the <a href="https://glitchtip.com/documentation/install#django-admin">documentation</a>. You can set your <a href="https://stagingv6.cleverapps.io/blog/fonctionnalites/2022/05/11/how-to-deploy-keycloak-on-clever-cloud/">own keycloak on Clever Cloud</a> and use it to connect to Glitchtip! </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Connect Glitchtip to an application</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We will reuse the akka application example we used for our <a href="https://stagingv6.cleverapps.io/blog/fonctionnalites">scala exemple blogpost</a>. And we will then see how we can forward our own error logs to Glitchtip.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Create a Glitchtip project</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The first step will be to login with new root user (or any Glitchtip user you created or linked with a social application). Glitchtip will ask you to create your organisation. In our case let's set <code>clever-cloud</code>. As we want to monitore our application error's logs, we will need to create a new project directly in Glitchtip UI. Let's call it "myakka" and create it's associated "Scala-dev" team. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Once this project is create you will be able to get a <code>DSN</code>. We will load it later as environment variable for the akka application. </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Create a Glitchtip Token </h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Go to <code>Profile/auth token</code> and craft a new glitchtip token with at least the following project rights: read, write and releases. Save it for later.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Setup the AKKA example application on Clever Cloud</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The first step will be to deploy AKKA example application on Clever Cloud as mentionned in the <a href="https://stagingv6.cleverapps.io/blog/fonctionnalites">scala exemple blogpost</a>. <a href="https://github.com/CleverCloud/scala-akka-http-postgres-example" target="_blank" rel="noreferrer noopener">Clone</a> the project and instead of the main branch, use the <code>blogpost-sentry</code> one. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Clone Clever Cloud akka example project:
git clone https://github.com/CleverCloud/scala-akka-http-postgres-example.git

# Checkout blogpost-sentry
git checkout blogpost-sentry
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>In this branch, we update a bit the application to connect it to Sentry. Then we send only the starting server HTTP logs with a custom status tag (success or failure). This is code we use in the <code>blogpost-sentry</code> branch:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Register Sentry
Sentry.init(sentryConfig.sentryDsn)

# Send a message to Sentry with a tag
Sentry.getContext().addTag("status", status)
Sentry.capture(message)
Sentry.getContext().clear()
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p><strong>In addition, you have to</strong> <strong>add</strong> a <code>.sentryclirc</code> file. This file should contain:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">[defaults]
url=GLITCHTIP_APP_DOMAIN_NAME
org=clever-cloud
project=myakka
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Configure Glitchtip environment variables</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Use the <code>post_build.sh</code> script as <code>CC_POST_BUILD_HOOK</code>. This will run the  mandatory <code>sbt flywayMigrate</code> as well as create a new release on Sentry (based on the commit ID). </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Set CC_POST_BUILD_HOOK
clever env -a myakka set CC_POST_BUILD_HOOK "./post_build.sh"
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You also need to set Glitchtip token and Glitchtip dsn as environnement variables:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Set Glitchip required env variables
clever env -a myakka set SENTRY_AUTH_TOKEN &lt; custom_glitchtip_token &gt;  
clever env -a myakka set SENTRY_DSN &lt; custom_glitchtip_dsn &gt;  
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Deploy the application</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You can now deploy myakka project:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash"># Deploy myakka
clever deploy
</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Try it </h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As soon as this done, you should see your first issue on Glitchip! That's all, you can now add all the application you want to Glitchtip and enjoy this tool to centralise your application logs and errors.  If you're used to this product or just try it feel free to share with us any feedback <a href="https://twitter.com/clever_cloud">on Twitter</a>.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Announcing our new Ticket Center</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2022/05/19/announcing-our-new-ticket-center/</link>
		
		<dc:creator><![CDATA[Julie Nolot]]></dc:creator>
		<pubDate>Thu, 19 May 2022 06:34:43 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=6444</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="ticket_center" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph -->
<p>We are delighted to announce the arrival of our new support system: the Ticket Center. In order to continue to provide one of the best support services on the market, we remain attentive to our customers' feedback on our quality of service. In this context, we have received numerous requests to implement a system that better distinguishes each conversation.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We therefore considered how best to continue to provide a fast and quality service and the introduction of a ticketing system seemed to be the most appropriate solution to meet the needs and expectations of our users.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What's new</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Ticket-oriented use</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Now, the platform usage is more "ticket" than "chat" oriented. This allows for a unique authentication of each request to ensure better follow-up.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Adding participants to the conversation</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You can now choose to automatically add members of the relevant organisation when opening a ticket. This improves your Crisp experience by ensuring that the response from our support team is accessible to all your organisation team.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When you open a ticket :</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>If you are an admin, the other admins in the organisation will be added</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>If your role is different of admin, members of the organisation with the same role as you will be added</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading">How does the Ticket Center work?</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Accessing the Ticket Center from an organisation</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We have integrated a new button "Contact support team" in the console, at the top of an organisation. It will allow you to open the Ticket Center directly in the context of the organisation you are in. This allows support to know at a glance which organisation you are opening a ticket for.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6543,"width":413,"height":287,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large is-resized"><img src="https://cdn.clever-cloud.com/uploads/2022/05/capture-decran-2022-05-05-a-14-51-07.png" alt="contact_support_team " class="wp-image-6543" style="width:413px;height:287px" width="413" height="287"/><figcaption class="wp-element-caption">"Contact support team" to access the Ticket Center</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Accessing the Ticket Center from the console's main menu</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The button used until now, which was called "talk to a human" still exists, under the name "contact support". You can find it as before, at the bottom left of the main console menu. A "Select your organisation" page will then open to allow you to specify the organisation for which you wish to create a ticket.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6547,"width":327,"height":261,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large is-resized"><img src="https://cdn.clever-cloud.com/uploads/2022/05/capture-decran-2022-05-05-a-14-51-21.png" alt="contacter_un_humain_legacy" class="wp-image-6547" style="width:327px;height:261px" width="327" height="261"/><figcaption class="wp-element-caption">The "Contact support team" button,<br>formerly known as "talk to a human"</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"align":"center","id":6548,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/05/capture-decran-2022-05-05-a-14-58-56.png" alt="contexte_organisation" class="wp-image-6548"/><figcaption class="wp-element-caption">Select the organisation for wish you're opening your ticket</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Create a ticket</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>When you open the Ticket Center, you will find the history of your previous tickets. Please note that all your previous chat conversations with support have been converted into a single ticket, so you will be able to access all your former discussions if required.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6551,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/05/historique-et-creation-de-ticket.png" alt="historique-et-creation-de-ticket" class="wp-image-6551"/><figcaption class="wp-element-caption">Ticket history</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Here you can also: get information on the status of your request, view the associated conversation and open a new ticket.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6554,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/05/screenshot-2022-05-18-at-16-44-52.png" alt="créer_un_nouveau_ticket" class="wp-image-6554"/><figcaption class="wp-element-caption">Open a new ticket</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Giving your feedback</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Once the ticket is closed, you will receive an email as usual to give your feedback, this is the time to give us your opinion on the service that was provided to you by the support.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6556,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/05/donner-son-avis-crisp.png" alt="donner_son_avis_crisp" class="wp-image-6556"/><figcaption class="wp-element-caption">Give your feedback</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What it allows</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With the old way of working, conversations between support and a user often contained several different topics. Today, each request counts, in a unique way, which brings :&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Better follow-up of requests.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>A more collaborative tool, by allowing you to add participants to the conversation</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>A more efficient response thanks to the unique identification of each ticket.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>We are confident this new Ticket Center will allow us to continue to provide a fast and quality service. Feel free to contact us and give us your feedback and ideas regarding this new system.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="ticket_center" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/ticket-center-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph -->
<p>We are delighted to announce the arrival of our new support system: the Ticket Center. In order to continue to provide one of the best support services on the market, we remain attentive to our customers' feedback on our quality of service. In this context, we have received numerous requests to implement a system that better distinguishes each conversation.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We therefore considered how best to continue to provide a fast and quality service and the introduction of a ticketing system seemed to be the most appropriate solution to meet the needs and expectations of our users.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What's new</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Ticket-oriented use</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Now, the platform usage is more "ticket" than "chat" oriented. This allows for a unique authentication of each request to ensure better follow-up.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Adding participants to the conversation</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You can now choose to automatically add members of the relevant organisation when opening a ticket. This improves your Crisp experience by ensuring that the response from our support team is accessible to all your organisation team.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When you open a ticket :</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>If you are an admin, the other admins in the organisation will be added</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>If your role is different of admin, members of the organisation with the same role as you will be added</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading">How does the Ticket Center work?</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Accessing the Ticket Center from an organisation</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We have integrated a new button "Contact support team" in the console, at the top of an organisation. It will allow you to open the Ticket Center directly in the context of the organisation you are in. This allows support to know at a glance which organisation you are opening a ticket for.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6543,"width":413,"height":287,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large is-resized"><img src="https://cdn.clever-cloud.com/uploads/2022/05/capture-decran-2022-05-05-a-14-51-07.png" alt="contact_support_team " class="wp-image-6543" style="width:413px;height:287px" width="413" height="287"/><figcaption class="wp-element-caption">"Contact support team" to access the Ticket Center</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Accessing the Ticket Center from the console's main menu</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The button used until now, which was called "talk to a human" still exists, under the name "contact support". You can find it as before, at the bottom left of the main console menu. A "Select your organisation" page will then open to allow you to specify the organisation for which you wish to create a ticket.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6547,"width":327,"height":261,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large is-resized"><img src="https://cdn.clever-cloud.com/uploads/2022/05/capture-decran-2022-05-05-a-14-51-21.png" alt="contacter_un_humain_legacy" class="wp-image-6547" style="width:327px;height:261px" width="327" height="261"/><figcaption class="wp-element-caption">The "Contact support team" button,<br>formerly known as "talk to a human"</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"align":"center","id":6548,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/05/capture-decran-2022-05-05-a-14-58-56.png" alt="contexte_organisation" class="wp-image-6548"/><figcaption class="wp-element-caption">Select the organisation for wish you're opening your ticket</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Create a ticket</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>When you open the Ticket Center, you will find the history of your previous tickets. Please note that all your previous chat conversations with support have been converted into a single ticket, so you will be able to access all your former discussions if required.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6551,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/05/historique-et-creation-de-ticket.png" alt="historique-et-creation-de-ticket" class="wp-image-6551"/><figcaption class="wp-element-caption">Ticket history</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Here you can also: get information on the status of your request, view the associated conversation and open a new ticket.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6554,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/05/screenshot-2022-05-18-at-16-44-52.png" alt="créer_un_nouveau_ticket" class="wp-image-6554"/><figcaption class="wp-element-caption">Open a new ticket</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Giving your feedback</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Once the ticket is closed, you will receive an email as usual to give your feedback, this is the time to give us your opinion on the service that was provided to you by the support.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6556,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/05/donner-son-avis-crisp.png" alt="donner_son_avis_crisp" class="wp-image-6556"/><figcaption class="wp-element-caption">Give your feedback</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What it allows</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With the old way of working, conversations between support and a user often contained several different topics. Today, each request counts, in a unique way, which brings :&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Better follow-up of requests.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>A more collaborative tool, by allowing you to add participants to the conversation</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>A more efficient response thanks to the unique identification of each ticket.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>We are confident this new Ticket Center will allow us to continue to provide a fast and quality service. Feel free to contact us and give us your feedback and ideas regarding this new system.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
