<?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>Engineering Archives | Clever Cloud</title>
	<atom:link href="https://stagingv6.cleverapps.io/blog/category/engineering/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>From Code to Product</description>
	<lastBuildDate>Wed, 06 Nov 2024 12:26:38 +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>Engineering Archives | Clever Cloud</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What is cloud computing?</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2024/11/04/what-is-cloud-computing/</link>
		
		<dc:creator><![CDATA[Leo Le Levé Dandé]]></dc:creator>
		<pubDate>Mon, 04 Nov 2024 12:37:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=14745</guid>

					<description><![CDATA[<p><img width="1600" height="710" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="All you need to know about cloud computing" decoding="async" fetchpriority="high" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en.png 1600w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en-300x133.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en-1024x454.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en-768x341.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en-1536x682.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en-1368x607.png 1368w" sizes="(max-width: 1600px) 100vw, 1600px" /></p><!-- wp:paragraph -->
<p>Back to basics with this first article in a new series. Let's take a look at how cloud computing works, its different architectures (public, private, hybrid), its many benefits for businesses, and the differences between cloud computing, edge computing and on-premise to help you choose the solution best suited to your needs.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Cloud computing: definition and origins</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing has profoundly transformed the way businesses and individuals access IT resources. The idea is simple but innovative: rather than owning and managing their own servers and data centres, users can now access IT services on demand, via a network. These services include computing power, data storage and sometimes even database management, offering unprecedented flexibility and accessibility. It's not an idea that dates back to yesterday...</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">How cloud computing has evolved over time</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The concept of cloud computing, although widely popularised in the early 2000s, has its roots in the 1960s. At that time, computer pioneers were already considering the idea of making computing power accessible as a public utility. During the 1990s, network diagrams began to use the image of a ‘cloud’ to represent the Internet, symbolising the complexity and interconnectedness of the networks that today enable cloud computing to function as a global and flexible architecture.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The real strength of the cloud lies in its ability to provide remote and scalable computing resources, enabling businesses to simplify the management of their infrastructure, avoid wasting resources, and <a href="https://stagingv6.cleverapps.io/cloud-and-green-it/">improve energy efficiency</a> through three pillars:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><strong>Unified billing</strong>: The cloud offers a <a href="https://developers.clever-cloud.com/doc/billing/unified-invoices/">single billing system</a> that simplifies cost management for businesses. This transparency makes it possible to accurately track expenditure and optimise costs;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><strong>Centralised, secure access</strong>: The cloud offers a single interface that simplifies access to services, while centralising management. IAM (Identity and Access Management) systems provide enhanced security, with auditability tools for improved compliance;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><strong>A rich and diverse marketplace</strong>: The cloud provides a vast marketplace, giving businesses access to a <a href="https://stagingv6.cleverapps.io/product/">wide range of products</a> and services. This diversity promotes the flexibility and scalability of the solutions deployed.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">How do you simply define cloud computing?</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>In simple terms, cloud computing is defined as remote access to shared computing resources, without the complexity of managing the underlying physical infrastructure. This approach enables businesses to make a long-term investment in the long-term management and hosting of their data, while giving them the flexibility to rapidly adjust their capacity as required. Clever Cloud, for example, automates the scalability, optimising resources in real time to meet demand.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">How does cloud computing work?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Based on a network-based computing services model, the cloud enables businesses to access resources such as data storage, computing power and access to a catalogue of online applications, without the need to manage the hardware infrastructure directly. This approach offers greater flexibility, cost optimisation and operational efficiency, all of which encourage innovation.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">The key elements of cloud operation</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>There are several fundamental elements that ensure the efficiency and scalability of the cloud. Here's an overview of the key elements.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">The physical infrastructure</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>At the heart of the cloud is a <a href="https://stagingv6.cleverapps.io/infrastructure/">physical infrastructure</a> made up of servers, storage systems and interconnected networks. These infrastructures are located in data centres around the world, promising very high availability, <a href="https://stagingv6.cleverapps.io/security/">enhanced security</a> and optimum performance. Cloud providers like Clever Cloud invest heavily to maintain high quality standards, verified through various certifications.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Virtualisation</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>This fundamental principle enables the creation of virtual versions of physical resources, such as servers or storage systems. Virtualisation improves efficiency by enabling several users or applications to use the same resources in an optimised way: the famous Virtual Machines (VMs). This technology also simplifies management and reduces operating costs by disconnecting the hardware infrastructure from the user experience.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Access interfaces and APIs</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud service interfaces are designed to be secure and high-performance, making it easier to manage resources and deploy applications. APIs offer system administrators, DevOps and developers the possibility of automating and integrating cloud services into their own systems, maximising customisation, efficiency and flexibility and extending the range of possible functionalities.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">The different cloud architectures: public, private and hybrid</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Each cloud architecture has its own advantages and addresses different needs. The key is to choose the one that best aligns with your organisation's strategic objectives and operational constraints.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Public Cloud: simplified accessibility and scalability for data hosting</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The public cloud is the most common architecture. Here, IT resources are hosted on servers belonging to cloud service providers, such as Clever Cloud. These services are accessible via the network, providing a scalable solution that can adapt quickly to changing business needs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The public cloud offers different levels of service, from Infrastructure as a Service (IaaS) to Platform as a Service (PaaS), via Software as a Service (SaaS). This diversity means that businesses can choose the solution best suited to their needs, while benefiting from the fact that there is no initial investment in infrastructure.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Private cloud: controlled, secure data hosting</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>By definition, the private cloud is a solution dedicated to a single organisation. Unlike the public cloud, the customer's servers are dedicated to that organisation. This is often a hosting zone behind the customer's firewall, made available by a cloud provider. This architecture offers total control over data and enhanced security, which is ideal for sectors subject to strict regulations (financial, health, pharmaceutical, public, defence, legal, industrial, etc.). The private cloud allows greater customisation of the data hosting architecture, tailored to the specific needs of the business.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Hybrid cloud: don't put all your eggs in one basket</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The hybrid cloud offers greater resilience by combining the advantages of the public and private clouds. By diversifying environments, businesses avoid putting all their eggs in one basket. For example, they can store sensitive data in a private cloud while using a public cloud for backups or less critical workloads. This means they can switch from one environment to the other depending on their needs in terms of performance, cost or security. However, with the high egress fees charged by hyperscalers, this approach can become costly.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In reality, the hybrid cloud is already common practice, often without companies being fully aware of it. Since the democratisation of SaaS, the majority of applications are no longer solely on-premises, but are based on a mix of public cloud, private cloud and SaaS services.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What are the different types of cloud computing?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing is divided into several main categories: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), Software as a Service (SaaS) and Function as a Service (FaaS). Each type offers different levels of control, flexibility and management, so you can choose the one that best suits your needs.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Infrastructure as a Service (IaaS) for maximum customisation</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Infrastructure as a Service (IaaS) is historically the most widespread model of cloud computing. With IaaS, businesses rent IT resources such as servers, virtual machines, storage and networks directly from a cloud service provider.&nbsp; Customers take care of maintaining their OS, databases, runtimes, etc. in operational conditions, using system administrators, either in-house or from an outsourcer. This allows companies to have a specific architecture that meets their needs.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Platform as a Service (PaaS) for rapid deployment and automatic updates</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><a href="https://stagingv6.cleverapps.io/">Platform as a Service (PaaS)</a> goes a step further than IaaS by providing an OS, middleware and a console for easy deployment of runtimes and even databases or third-party services, known as add-ons. The customer no longer has to worry about maintaining the system in operational condition (MCO), which is the responsibility of the cloud provider.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>PaaS solutions make it easy to deploy applications quickly, while automatically maintaining and updating the infrastructure. With integrated development tools and a modular architecture, Clever Cloud simplifies the work of developers and DevOps teams by offering them a ready-to-use environment to accelerate innovation: deploy code, we'll take care of the rest!&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Software as a Service (SaaS) for greater simplicity</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Software as a Service (SaaS) is the most common cloud computing model. SaaS applications are hosted and managed by service providers, enabling users to access them via the Internet, usually on a subscription basis. This model eliminates the need to install and maintain software locally, reducing costs and technical complexity.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>SaaS is particularly useful for businesses looking to standardise their software tools without investing in IT infrastructure. For example, collaboration tools, customer relationship management (CRM) systems and office suites are often deployed as SaaS services for maximum simplicity.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Functions as a Service (FaaS) for greater agility</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Functions as a Service (FaaS) is an evolution of the PaaS model that allows developers to create and deploy individual functions without worrying about server management. The cloud provider takes care of all the infrastructure, scaling and resource management, charging only for the time it takes to run the functions.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The functions are triggered by events defined in advance, enabling the function to launch its action (processing an image, converting a file, etc.) and therefore to switch on, be active for the duration of the action and then switch off. services for economic reasons. FaaS is often complementary to PaaS.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What are the advantages of cloud computing?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Whether in terms of scalability or security, the cloud offers a number of benefits for organisations that decide to adopt it.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Cost optimisation: a strategic approach rather than just savings</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing can be part of a financial strategy, in particular by transforming capital expenditure (CAPEX) into operational expenditure (OPEX). This budgetary transition enables companies to outsource their initial IT infrastructure costs (purchase of servers, data centre maintenance, fibre management, recruitment of a dedicated team, etc.). Organisations can adopt a pay-as-you-go model, adjusting their spending according to their real needs. Some hyperscalers will still offer to pay for reserved instances, which will have to be paid for even if they are not used, but this is not the majority of usage.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Scalability: the cloud adapts to your needs</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Whether you need to increase processing capacity during peak periods or reduce resources during off-peak periods, the cloud is flexible and scalable on demand, thanks to probes and orchestrators. This responsiveness ensures optimum use of resources and gives businesses greater agility to respond to changes in the market and in demand. At Clever Cloud, scalability is automatic, which means it adapts in real time to your needs, so you only pay for what you actually use.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Security: a key pillar for businesses</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing greatly improves the security of your data. Cloud providers invest, keep a constant watch and have the role of warning their customers or updating exposed areas. Storage in the cloud and its backups provide great resilience. Backed-up data can easily be accessed or a disaster recovery plan (DRP) or business continuity plan (BCP) can be launched. At Clever Cloud, we go even further: our Materia databases are automatically replicated to our three Paris data centres, giving you peace of mind. Another key point is that many security certifications may be required when hosting critical or personal data. Cloud providers undertake to comply with them.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Accessibility: instantaneous response to new work trends</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing makes your data more accessible, enabling your teams to collaborate effectively, regardless of their location. Data and applications hosted in the cloud can be available 24/7. This facilitates teleworking, speeds up decision-making processes and improves team productivity, while guaranteeing real-time synchronisation of information.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Automatic updates and operational maintenance</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With cloud computing, software updates and security patches are automatically managed by the supplier, without the intervention of the customer's IT team. This not only reduces the internal workload, but also ensures that the systems have no security holes.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Who uses cloud computing?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing is now an essential component for businesses of all sizes and in all sectors. Its massive adoption is driven by the outsourcing of management and MCO, the unification of costs and access to a marketplace.&nbsp; Whether it's for data storage and backup, Big Data analysis, mail server hosting or web application development and deployment, the cloud has become essential for meeting the growing demands of the market.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For example, organisations in the financial sector are using cloud computing to detect and prevent fraud in real time, using machine learning algorithms and predictive analysis. Healthcare companies, meanwhile, are exploiting these technologies to offer more personalised treatments, thereby improving the quality of care for their patients. The entertainment sector and video game creators are relying on the cloud to deliver their content to millions of users around the world, guaranteeing a fluid and immersive experience.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But this technology is not just for large companies: SMEs, start-ups, freelancers and private individuals are also adopting the cloud to benefit from a scalable infrastructure without having to bear the high costs associated with physical data centres. By opting for these solutions, they can concentrate on what they need.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What are the uses of cloud computing?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing offers a multitude of uses for businesses and individuals, including the following.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Storing and backing up data</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The cloud enables businesses to protect their information while benefiting from a large storage capacity, all the while retaining control over billing. Data can be easily accessed from any connected device, making it easier to recover in the event of a technical problem.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Hosting applications and websites</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Hosting applications and websites is another key use of cloud computing, enabling applications to be created and deployed with a high degree of scalability. Developers benefit from a reliable solution that delivers a fluid, high-performance user experience.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Distributing software and content as a service</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing also facilitates the development of software and content as a service (SaaS). This model reduces the need for local installations and enables companies to offer regular updates without service interruption, accessible at any time and on any type of device. They can focus on the continuous improvement of their products while simplifying the management of software versions.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Data analysis and artificial intelligence (AI)</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Data analysis and the integration of artificial intelligence (AI) are made possible by the capabilities and performance of cloud computing. Companies can centralise their data in cloud systems, such as datalakes or data warehouses, and use and train machine learning services to extract the desired elements. These technologies help to develop predictive models, automate processes, generate text or images, etc.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Application testing and development</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The cloud is also a powerful tool for application testing and development. Thanks to the standardisation of test environments, it is now possible to obtain dedicated spaces in just a few clicks, saving time for teams of developers. Cloud infrastructures offer a high degree of flexibility for creating, testing and deploying applications, while facilitating continuous integration and continuous deployment (CI/CD). This approach accelerates the development cycle and enables companies to reduce their time to market.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Edge computing and cloud computing: the differences</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing and edge computing are two distinct architectures that meet different needs. Whereas cloud computing centralises resources and processing in large data centres, edge computing moves these operations closer to the data sources using small-scale infrastructures.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This approach enables edge computing to reduce latency and improve processing speed, which is essential for applications such as the Internet of Things (IoT), autonomous vehicles and augmented reality. The choice between these two technologies often depends on the context and on performance, security and connectivity requirements. Edge computing also makes it possible to offer a hybrid architecture, which can take over in the event of availability problems.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Cloud computing is distinguished by its ability to offer scalable, pooled resources, accessible via the Internet, making it an ideal solution for applications requiring high computing and storage power. By contrast, edge computing favours local processing for real-time responses, reducing dependency on network connectivity.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">When should you choose edge computing rather than cloud computing?</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Choosing between edge computing and cloud computing depends on several key factors:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Reactivity and low latency: Edge computing is the best solution when instant response is crucial. For example, in industrial control systems or autonomous vehicles, every millisecond counts. Local processing of data by edge computing reduces delays and improves the reliability of operations;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Volume of data to be processed: When the volume of data generated is too large to be transferred quickly to a central data centre, edge computing becomes essential. It enables data to be filtered and processed at source, minimising network traffic and optimising bandwidth use;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Isolated environments or those with limited connectivity: In areas where the Internet connection is unstable or non-existent, edge computing ensures that data is processed without interruption. This makes it an ideal solution for remote sites, such as industrial facilities or critical infrastructures;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Data security and confidentiality: Edge computing provides an extra layer of security by processing data locally, limiting its exposure to potential cyber threats. This is particularly important for sensitive sectors such as healthcare or financial services.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>So, while cloud computing is suited to tasks requiring vast resources and global accessibility, edge computing is essential in contexts where speed, locality and data security are paramount.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">On-premise and cloud computing: the differences</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The evolution of IT infrastructures has led to two main approaches: on-premise and cloud computing. These two solutions differ fundamentally in terms of deployment, management, cost and scalability. <a href="https://stagingv6.cleverapps.io/fr/clever-cloud-on-premises/">On-premises</a> involves purchasing, installing and managing hardware and software directly on the company's servers by a trained team, offering total control over data, network and security. Cloud computing, on the other hand, is based on outsourcing these tasks so that the company can concentrate on its core business.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">When should you choose on-premise rather than cloud computing?</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Opting for an on-premise infrastructure can be a strategic choice, from a budgetary, technical and HR point of view. If the company wants to pay for and amortise its investments, control the entire value chain and be able to recruit and retain its talent, the on-premise option may be just what it needs. If it wants to concentrate on its core business, it will find it easier to turn to cloud computing to outsource this work to a service provider whose job it is.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">The future of cloud computing</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing continues to evolve at lightning speed, and its potential continues to grow. We are at the dawn of an era where cutting-edge technologies such as artificial intelligence (AI), quantum computing and edge computing will redefine current cloud paradigms. This future promises increased integration of low-code and no-code platforms, as well as massive adoption of the Internet of Things (IoT), enabling businesses and developers to design innovative solutions without necessarily benefiting from advanced technical expertise.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1600" height="710" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="All you need to know about cloud computing" decoding="async" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en.png 1600w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en-300x133.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en-1024x454.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en-768x341.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en-1536x682.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/11/2024-11-04-clever-cloud-banniere-blog-cloud-computing-en-1368x607.png 1368w" sizes="(max-width: 1600px) 100vw, 1600px" /></p><!-- wp:paragraph -->
<p>Back to basics with this first article in a new series. Let's take a look at how cloud computing works, its different architectures (public, private, hybrid), its many benefits for businesses, and the differences between cloud computing, edge computing and on-premise to help you choose the solution best suited to your needs.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Cloud computing: definition and origins</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing has profoundly transformed the way businesses and individuals access IT resources. The idea is simple but innovative: rather than owning and managing their own servers and data centres, users can now access IT services on demand, via a network. These services include computing power, data storage and sometimes even database management, offering unprecedented flexibility and accessibility. It's not an idea that dates back to yesterday...</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">How cloud computing has evolved over time</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The concept of cloud computing, although widely popularised in the early 2000s, has its roots in the 1960s. At that time, computer pioneers were already considering the idea of making computing power accessible as a public utility. During the 1990s, network diagrams began to use the image of a ‘cloud’ to represent the Internet, symbolising the complexity and interconnectedness of the networks that today enable cloud computing to function as a global and flexible architecture.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The real strength of the cloud lies in its ability to provide remote and scalable computing resources, enabling businesses to simplify the management of their infrastructure, avoid wasting resources, and <a href="https://stagingv6.cleverapps.io/cloud-and-green-it/">improve energy efficiency</a> through three pillars:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><strong>Unified billing</strong>: The cloud offers a <a href="https://developers.clever-cloud.com/doc/billing/unified-invoices/">single billing system</a> that simplifies cost management for businesses. This transparency makes it possible to accurately track expenditure and optimise costs;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><strong>Centralised, secure access</strong>: The cloud offers a single interface that simplifies access to services, while centralising management. IAM (Identity and Access Management) systems provide enhanced security, with auditability tools for improved compliance;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><strong>A rich and diverse marketplace</strong>: The cloud provides a vast marketplace, giving businesses access to a <a href="https://stagingv6.cleverapps.io/product/">wide range of products</a> and services. This diversity promotes the flexibility and scalability of the solutions deployed.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">How do you simply define cloud computing?</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>In simple terms, cloud computing is defined as remote access to shared computing resources, without the complexity of managing the underlying physical infrastructure. This approach enables businesses to make a long-term investment in the long-term management and hosting of their data, while giving them the flexibility to rapidly adjust their capacity as required. Clever Cloud, for example, automates the scalability, optimising resources in real time to meet demand.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">How does cloud computing work?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Based on a network-based computing services model, the cloud enables businesses to access resources such as data storage, computing power and access to a catalogue of online applications, without the need to manage the hardware infrastructure directly. This approach offers greater flexibility, cost optimisation and operational efficiency, all of which encourage innovation.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">The key elements of cloud operation</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>There are several fundamental elements that ensure the efficiency and scalability of the cloud. Here's an overview of the key elements.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">The physical infrastructure</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>At the heart of the cloud is a <a href="https://stagingv6.cleverapps.io/infrastructure/">physical infrastructure</a> made up of servers, storage systems and interconnected networks. These infrastructures are located in data centres around the world, promising very high availability, <a href="https://stagingv6.cleverapps.io/security/">enhanced security</a> and optimum performance. Cloud providers like Clever Cloud invest heavily to maintain high quality standards, verified through various certifications.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Virtualisation</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>This fundamental principle enables the creation of virtual versions of physical resources, such as servers or storage systems. Virtualisation improves efficiency by enabling several users or applications to use the same resources in an optimised way: the famous Virtual Machines (VMs). This technology also simplifies management and reduces operating costs by disconnecting the hardware infrastructure from the user experience.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Access interfaces and APIs</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud service interfaces are designed to be secure and high-performance, making it easier to manage resources and deploy applications. APIs offer system administrators, DevOps and developers the possibility of automating and integrating cloud services into their own systems, maximising customisation, efficiency and flexibility and extending the range of possible functionalities.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">The different cloud architectures: public, private and hybrid</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Each cloud architecture has its own advantages and addresses different needs. The key is to choose the one that best aligns with your organisation's strategic objectives and operational constraints.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Public Cloud: simplified accessibility and scalability for data hosting</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The public cloud is the most common architecture. Here, IT resources are hosted on servers belonging to cloud service providers, such as Clever Cloud. These services are accessible via the network, providing a scalable solution that can adapt quickly to changing business needs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The public cloud offers different levels of service, from Infrastructure as a Service (IaaS) to Platform as a Service (PaaS), via Software as a Service (SaaS). This diversity means that businesses can choose the solution best suited to their needs, while benefiting from the fact that there is no initial investment in infrastructure.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Private cloud: controlled, secure data hosting</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>By definition, the private cloud is a solution dedicated to a single organisation. Unlike the public cloud, the customer's servers are dedicated to that organisation. This is often a hosting zone behind the customer's firewall, made available by a cloud provider. This architecture offers total control over data and enhanced security, which is ideal for sectors subject to strict regulations (financial, health, pharmaceutical, public, defence, legal, industrial, etc.). The private cloud allows greater customisation of the data hosting architecture, tailored to the specific needs of the business.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Hybrid cloud: don't put all your eggs in one basket</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The hybrid cloud offers greater resilience by combining the advantages of the public and private clouds. By diversifying environments, businesses avoid putting all their eggs in one basket. For example, they can store sensitive data in a private cloud while using a public cloud for backups or less critical workloads. This means they can switch from one environment to the other depending on their needs in terms of performance, cost or security. However, with the high egress fees charged by hyperscalers, this approach can become costly.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In reality, the hybrid cloud is already common practice, often without companies being fully aware of it. Since the democratisation of SaaS, the majority of applications are no longer solely on-premises, but are based on a mix of public cloud, private cloud and SaaS services.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What are the different types of cloud computing?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing is divided into several main categories: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), Software as a Service (SaaS) and Function as a Service (FaaS). Each type offers different levels of control, flexibility and management, so you can choose the one that best suits your needs.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Infrastructure as a Service (IaaS) for maximum customisation</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Infrastructure as a Service (IaaS) is historically the most widespread model of cloud computing. With IaaS, businesses rent IT resources such as servers, virtual machines, storage and networks directly from a cloud service provider.&nbsp; Customers take care of maintaining their OS, databases, runtimes, etc. in operational conditions, using system administrators, either in-house or from an outsourcer. This allows companies to have a specific architecture that meets their needs.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Platform as a Service (PaaS) for rapid deployment and automatic updates</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><a href="https://stagingv6.cleverapps.io/">Platform as a Service (PaaS)</a> goes a step further than IaaS by providing an OS, middleware and a console for easy deployment of runtimes and even databases or third-party services, known as add-ons. The customer no longer has to worry about maintaining the system in operational condition (MCO), which is the responsibility of the cloud provider.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>PaaS solutions make it easy to deploy applications quickly, while automatically maintaining and updating the infrastructure. With integrated development tools and a modular architecture, Clever Cloud simplifies the work of developers and DevOps teams by offering them a ready-to-use environment to accelerate innovation: deploy code, we'll take care of the rest!&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Software as a Service (SaaS) for greater simplicity</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Software as a Service (SaaS) is the most common cloud computing model. SaaS applications are hosted and managed by service providers, enabling users to access them via the Internet, usually on a subscription basis. This model eliminates the need to install and maintain software locally, reducing costs and technical complexity.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>SaaS is particularly useful for businesses looking to standardise their software tools without investing in IT infrastructure. For example, collaboration tools, customer relationship management (CRM) systems and office suites are often deployed as SaaS services for maximum simplicity.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Functions as a Service (FaaS) for greater agility</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Functions as a Service (FaaS) is an evolution of the PaaS model that allows developers to create and deploy individual functions without worrying about server management. The cloud provider takes care of all the infrastructure, scaling and resource management, charging only for the time it takes to run the functions.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The functions are triggered by events defined in advance, enabling the function to launch its action (processing an image, converting a file, etc.) and therefore to switch on, be active for the duration of the action and then switch off. services for economic reasons. FaaS is often complementary to PaaS.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What are the advantages of cloud computing?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Whether in terms of scalability or security, the cloud offers a number of benefits for organisations that decide to adopt it.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Cost optimisation: a strategic approach rather than just savings</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing can be part of a financial strategy, in particular by transforming capital expenditure (CAPEX) into operational expenditure (OPEX). This budgetary transition enables companies to outsource their initial IT infrastructure costs (purchase of servers, data centre maintenance, fibre management, recruitment of a dedicated team, etc.). Organisations can adopt a pay-as-you-go model, adjusting their spending according to their real needs. Some hyperscalers will still offer to pay for reserved instances, which will have to be paid for even if they are not used, but this is not the majority of usage.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Scalability: the cloud adapts to your needs</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Whether you need to increase processing capacity during peak periods or reduce resources during off-peak periods, the cloud is flexible and scalable on demand, thanks to probes and orchestrators. This responsiveness ensures optimum use of resources and gives businesses greater agility to respond to changes in the market and in demand. At Clever Cloud, scalability is automatic, which means it adapts in real time to your needs, so you only pay for what you actually use.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Security: a key pillar for businesses</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing greatly improves the security of your data. Cloud providers invest, keep a constant watch and have the role of warning their customers or updating exposed areas. Storage in the cloud and its backups provide great resilience. Backed-up data can easily be accessed or a disaster recovery plan (DRP) or business continuity plan (BCP) can be launched. At Clever Cloud, we go even further: our Materia databases are automatically replicated to our three Paris data centres, giving you peace of mind. Another key point is that many security certifications may be required when hosting critical or personal data. Cloud providers undertake to comply with them.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Accessibility: instantaneous response to new work trends</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing makes your data more accessible, enabling your teams to collaborate effectively, regardless of their location. Data and applications hosted in the cloud can be available 24/7. This facilitates teleworking, speeds up decision-making processes and improves team productivity, while guaranteeing real-time synchronisation of information.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Automatic updates and operational maintenance</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With cloud computing, software updates and security patches are automatically managed by the supplier, without the intervention of the customer's IT team. This not only reduces the internal workload, but also ensures that the systems have no security holes.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Who uses cloud computing?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing is now an essential component for businesses of all sizes and in all sectors. Its massive adoption is driven by the outsourcing of management and MCO, the unification of costs and access to a marketplace.&nbsp; Whether it's for data storage and backup, Big Data analysis, mail server hosting or web application development and deployment, the cloud has become essential for meeting the growing demands of the market.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For example, organisations in the financial sector are using cloud computing to detect and prevent fraud in real time, using machine learning algorithms and predictive analysis. Healthcare companies, meanwhile, are exploiting these technologies to offer more personalised treatments, thereby improving the quality of care for their patients. The entertainment sector and video game creators are relying on the cloud to deliver their content to millions of users around the world, guaranteeing a fluid and immersive experience.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But this technology is not just for large companies: SMEs, start-ups, freelancers and private individuals are also adopting the cloud to benefit from a scalable infrastructure without having to bear the high costs associated with physical data centres. By opting for these solutions, they can concentrate on what they need.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What are the uses of cloud computing?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing offers a multitude of uses for businesses and individuals, including the following.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Storing and backing up data</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The cloud enables businesses to protect their information while benefiting from a large storage capacity, all the while retaining control over billing. Data can be easily accessed from any connected device, making it easier to recover in the event of a technical problem.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Hosting applications and websites</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Hosting applications and websites is another key use of cloud computing, enabling applications to be created and deployed with a high degree of scalability. Developers benefit from a reliable solution that delivers a fluid, high-performance user experience.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Distributing software and content as a service</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing also facilitates the development of software and content as a service (SaaS). This model reduces the need for local installations and enables companies to offer regular updates without service interruption, accessible at any time and on any type of device. They can focus on the continuous improvement of their products while simplifying the management of software versions.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Data analysis and artificial intelligence (AI)</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Data analysis and the integration of artificial intelligence (AI) are made possible by the capabilities and performance of cloud computing. Companies can centralise their data in cloud systems, such as datalakes or data warehouses, and use and train machine learning services to extract the desired elements. These technologies help to develop predictive models, automate processes, generate text or images, etc.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Application testing and development</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The cloud is also a powerful tool for application testing and development. Thanks to the standardisation of test environments, it is now possible to obtain dedicated spaces in just a few clicks, saving time for teams of developers. Cloud infrastructures offer a high degree of flexibility for creating, testing and deploying applications, while facilitating continuous integration and continuous deployment (CI/CD). This approach accelerates the development cycle and enables companies to reduce their time to market.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Edge computing and cloud computing: the differences</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing and edge computing are two distinct architectures that meet different needs. Whereas cloud computing centralises resources and processing in large data centres, edge computing moves these operations closer to the data sources using small-scale infrastructures.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This approach enables edge computing to reduce latency and improve processing speed, which is essential for applications such as the Internet of Things (IoT), autonomous vehicles and augmented reality. The choice between these two technologies often depends on the context and on performance, security and connectivity requirements. Edge computing also makes it possible to offer a hybrid architecture, which can take over in the event of availability problems.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Cloud computing is distinguished by its ability to offer scalable, pooled resources, accessible via the Internet, making it an ideal solution for applications requiring high computing and storage power. By contrast, edge computing favours local processing for real-time responses, reducing dependency on network connectivity.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">When should you choose edge computing rather than cloud computing?</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Choosing between edge computing and cloud computing depends on several key factors:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Reactivity and low latency: Edge computing is the best solution when instant response is crucial. For example, in industrial control systems or autonomous vehicles, every millisecond counts. Local processing of data by edge computing reduces delays and improves the reliability of operations;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Volume of data to be processed: When the volume of data generated is too large to be transferred quickly to a central data centre, edge computing becomes essential. It enables data to be filtered and processed at source, minimising network traffic and optimising bandwidth use;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Isolated environments or those with limited connectivity: In areas where the Internet connection is unstable or non-existent, edge computing ensures that data is processed without interruption. This makes it an ideal solution for remote sites, such as industrial facilities or critical infrastructures;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Data security and confidentiality: Edge computing provides an extra layer of security by processing data locally, limiting its exposure to potential cyber threats. This is particularly important for sensitive sectors such as healthcare or financial services.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>So, while cloud computing is suited to tasks requiring vast resources and global accessibility, edge computing is essential in contexts where speed, locality and data security are paramount.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">On-premise and cloud computing: the differences</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The evolution of IT infrastructures has led to two main approaches: on-premise and cloud computing. These two solutions differ fundamentally in terms of deployment, management, cost and scalability. <a href="https://stagingv6.cleverapps.io/fr/clever-cloud-on-premises/">On-premises</a> involves purchasing, installing and managing hardware and software directly on the company's servers by a trained team, offering total control over data, network and security. Cloud computing, on the other hand, is based on outsourcing these tasks so that the company can concentrate on its core business.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">When should you choose on-premise rather than cloud computing?</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Opting for an on-premise infrastructure can be a strategic choice, from a budgetary, technical and HR point of view. If the company wants to pay for and amortise its investments, control the entire value chain and be able to recruit and retain its talent, the on-premise option may be just what it needs. If it wants to concentrate on its core business, it will find it easier to turn to cloud computing to outsource this work to a service provider whose job it is.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">The future of cloud computing</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Cloud computing continues to evolve at lightning speed, and its potential continues to grow. We are at the dawn of an era where cutting-edge technologies such as artificial intelligence (AI), quantum computing and edge computing will redefine current cloud paradigms. This future promises increased integration of low-code and no-code platforms, as well as massive adoption of the Internet of Things (IoT), enabling businesses and developers to design innovative solutions without necessarily benefiting from advanced technical expertise.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>A minor update resulted in a cascade of errors: how it went wrong, what we’ve learnt</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2024/08/14/a-minor-update-resulted-in-a-cascade-of-errors/</link>
		
		<dc:creator><![CDATA[David Legrand]]></dc:creator>
		<pubDate>Wed, 14 Aug 2024 14:42:09 +0000</pubDate>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[downtime]]></category>
		<category><![CDATA[postmortem]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=13738</guid>

					<description><![CDATA[<p><img width="1600" height="710" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Incident" decoding="async" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1.png 1600w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1-300x133.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1-1024x454.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1-768x341.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1-1536x682.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1-1368x607.png 1368w" sizes="(max-width: 1600px) 100vw, 1600px" /></p><!-- wp:heading -->
<h2 class="wp-block-heading">Minor update, bigger consequences</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The global incident started after we initiated a minor rolling maintenance upgrade of Apache Pulsar (3.3.1). It enabled a new balancer algorithm for bundles placement optimization which caused troubles. We quickly detected it, kept the 3.3.1 release and rolled back the defective configuration.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The initial problem, although fixed, resulted in a metadata conflict. We had to stop all messaging brokers to start only one, preventing metadata conflict between them, and succeeded in getting back to a nominal situation. But after that our infrastructure experienced I/O and memory pressure, causing some hypervisors to crash.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The unavailability of the Apache Pulsar messaging layer has led to the buffering of some telemetry agents on the virtual machines (VMs) running on hypervisors (HVs). They started to buffer in memory while messaging service endpoints weren’t available.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Reach the limits of our smaller VMs&nbsp;</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>For small VMs it reached a memory limit which triggered a lot of pressure on the kernel. When it happens, the kernel tries to flush memory and caches, remove processes from memory to load them instruction per instruction from disk. This is generating a lot of I/O disk pressure on the underlying hypervisor. A few minutes after HVs load increased, we started to see kernel panics on some of them.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Small VMs are spreaded globally among our Availability Zones, so we ended up having an overloaded server infrastructure. As we needed the scheduler to manage the situation, the control plane was performing suboptimally and the infrastructure struggled to provide available resources.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>So we had to shut down all non critical services and our SRE team redeployed one by one the overloaded small VMs. Then we started to regain control over all hypervisors and were able to take our infrastructure back to its optimal state.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What’s next?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>For non minor releases, we use a simulation process that emulates a full environment where we inject changes. This validates upgrades and changes by observing the infrastructure behavior before going to production. This process wasn’t used for minor maintenance upgrades or (apparently) small changes in the configuration profile.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This incident taught us a lot and we identified some progress areas regarding our images, tools configuration and integration, or small VMs setup. We’ve taken some immediate actions and will work on more deep topics in the coming weeks.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>We sincerely apologize for any inconvenience this incident may have caused. Your trust is paramount to us, and we are committed to providing you with the highest level of service reliability.&nbsp;</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You can learn more about the schedule and technical analysis of the incident in <a href="https://developers.clever-cloud.com/postmortem/2024-08-02/">our public postmortem</a>. If you have any questions or concerns, please don't hesitate to <a href="https://console.clever-cloud.com/ticket-center-choice">reach out to our support team</a>.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1600" height="710" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Incident" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1.png 1600w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1-300x133.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1-1024x454.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1-768x341.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1-1536x682.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/08/2024-08-14-clever-cloud-banniere-blog-incident-2-aout-2024-en-1-1368x607.png 1368w" sizes="auto, (max-width: 1600px) 100vw, 1600px" /></p><!-- wp:heading -->
<h2 class="wp-block-heading">Minor update, bigger consequences</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The global incident started after we initiated a minor rolling maintenance upgrade of Apache Pulsar (3.3.1). It enabled a new balancer algorithm for bundles placement optimization which caused troubles. We quickly detected it, kept the 3.3.1 release and rolled back the defective configuration.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The initial problem, although fixed, resulted in a metadata conflict. We had to stop all messaging brokers to start only one, preventing metadata conflict between them, and succeeded in getting back to a nominal situation. But after that our infrastructure experienced I/O and memory pressure, causing some hypervisors to crash.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The unavailability of the Apache Pulsar messaging layer has led to the buffering of some telemetry agents on the virtual machines (VMs) running on hypervisors (HVs). They started to buffer in memory while messaging service endpoints weren’t available.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Reach the limits of our smaller VMs&nbsp;</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>For small VMs it reached a memory limit which triggered a lot of pressure on the kernel. When it happens, the kernel tries to flush memory and caches, remove processes from memory to load them instruction per instruction from disk. This is generating a lot of I/O disk pressure on the underlying hypervisor. A few minutes after HVs load increased, we started to see kernel panics on some of them.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Small VMs are spreaded globally among our Availability Zones, so we ended up having an overloaded server infrastructure. As we needed the scheduler to manage the situation, the control plane was performing suboptimally and the infrastructure struggled to provide available resources.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>So we had to shut down all non critical services and our SRE team redeployed one by one the overloaded small VMs. Then we started to regain control over all hypervisors and were able to take our infrastructure back to its optimal state.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What’s next?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>For non minor releases, we use a simulation process that emulates a full environment where we inject changes. This validates upgrades and changes by observing the infrastructure behavior before going to production. This process wasn’t used for minor maintenance upgrades or (apparently) small changes in the configuration profile.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This incident taught us a lot and we identified some progress areas regarding our images, tools configuration and integration, or small VMs setup. We’ve taken some immediate actions and will work on more deep topics in the coming weeks.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>We sincerely apologize for any inconvenience this incident may have caused. Your trust is paramount to us, and we are committed to providing you with the highest level of service reliability.&nbsp;</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You can learn more about the schedule and technical analysis of the incident in <a href="https://developers.clever-cloud.com/postmortem/2024-08-02/">our public postmortem</a>. If you have any questions or concerns, please don't hesitate to <a href="https://console.clever-cloud.com/ticket-center-choice">reach out to our support team</a>.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Deploy from GitLab or GitHub</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2024/04/10/deploy-from-gitlab-or-github/</link>
		
		<dc:creator><![CDATA[Julia March]]></dc:creator>
		<pubDate>Wed, 10 Apr 2024 12:06:47 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[ci/cd]]></category>
		<category><![CDATA[giltab]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[heptapod]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=12101</guid>

					<description><![CDATA[<p><img width="6912" height="3456" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Deploy review apps on Clever Cloud from GitHub and GitLab" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments.png 6912w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-300x150.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-1024x512.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-768x384.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-1536x768.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-2048x1024.png 2048w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-1368x684.png 1368w" sizes="auto, (max-width: 6912px) 100vw, 6912px" /></p><!-- wp:paragraph -->
<p>Over the past few months, some customers have raised questions about CI/CD building to deploy from GitHub or GitLab. The two platforms differ significantly on the subject, but are the ones massively used to store code and collaborate.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we're committed to providing a wide range of products and features to facilitate application deployment and maintenance. We aim to constantly improve our customers' experience as well. In this article, we detail how we have approached the subject of CI/CD to simplify deployments, regardless of where you store your code.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Two platforms, one common principle</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Clever Cloud provides a CLI for deploying and managing both applications and add-ons. So far, we've suggested that our customers use it to build their CI/CD. However, writing a pipeline, even with a facilitating tool like a CLI to connect to Clever Cloud, is a long and tedious task. Especially when you're busy developing your application.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Keeping in mind one of our founding principles, to make the work of developers and IT teams as easy as possible, we started to provide slightly more advanced CI/CD tools, both for GitHub and GitLab.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Deploying from GitHub: go further with review apps</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Customers using GitHub are already familiar with <a href="https://developers.clever-cloud.com/doc/ci-cd/#deploy-from-github">our integration, enabling them to deploy from this platform</a>. In addition to this integration, anyone could use the CLI to customize their pipeline.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Based on this configuration, we've provided <a href="https://github.com/CleverCloud/clever-cloud-review-app">a workflow template </a>for deploying review apps from GitHub to Clever Cloud. This script performs the following actions:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Create and deploy an app on Clever Cloud from the branch where the PR is open, with a test domain name ;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Update the application with each new commit ;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Delete the application when the PR is closed.</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>A comment posts the link to the review app with each new deployment, and announces the deletion of the app once this job has been completed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The script retrieves the environment variables and secrets added to your project from GitHub. It's possible to go further and add commands; for example, to connect the review app to a test database, you could add the command <code>clever service link-addon &lt;addon-name&gt;</code>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This template is under constant development to progressively simplify your workflow and make it more efficient. Eventually, this Action should work solely with inputs rather than command lines. In the meantime, feel free to <a href="https://github.com/CleverCloud/clever-cloud-review-app/issues/new">open an issue on the project</a> according to your needs.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://github.com/CleverCloud/clever-cloud-review-app" target="_blank" rel="noreferrer noopener">Check the template on GitHub</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Deploying from GitLab</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Our customers working on GitLab (as a SasS or self-hosted instance) have also expressed similar needs for automating their deployments. GitLab differs significantly from GitHub, with a much more DIY approach to CI/CD and different configurations. On GitLab, <a href="https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#predefined-variables-for-merge-request-pipelines">there are no variables</a> for detecting the state of a Merge Request (open or closed), unlike GitHub. If we want to launch a job automatically when it closes, we'<a href="https://docs.gitlab.com/ee/ci/environments/#environment-states"> ll have to use the state of the environments</a> instead, and not that of the MRs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we already had different deployment pipelines in place from GitLab for certain projects. We've unified and simplified them by creating pipeline components in the GitLab CI/CD catalog. The components replace <a href="https://docs.gitlab.com/ee/development/cicd/templates.html">GitLab's old template catalog</a>, and enable a modular pipeline to be built using inputs. No need to manually customize a script file anymore.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Our contribution to the catalog currently comprises four components:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Deploy in production;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Creating a review app from a Merge Request;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Update review app;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Delete review app.</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>The input values have been predefined to save you time when using them. These components can be used both on gitlab.com and on your self-hosted instance. There's nothing to modify in the project, but <a href="https://docs.gitlab.com/ee/ci/components/#use-a-gitlabcom-component-in-a-self-managed-instance">a few configurations of your instance to check</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In both cases, we advise you to test the manual triggering of components on your project first. We'll be adding more components as our customers' needs change, and are open to your proposals, to be submitted directly on the project dedicated to them.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://gitlab.com/explore/catalog/CleverCloud/clever-cloud-pipeline" target="_blank" rel="noreferrer noopener">Check the catalog on GitLab</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">The best of both worlds: Heptapod</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you use the GitLab Community Edition fork hosted on Clever Cloud, you'll benefit from the advantages of a GitLab as a Service offering, as well as hosting on European servers managed by a French company.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The CI/CD pipeline catalog is already integrated into our Heptapod offer, enabling you to use the components directly in your project, with no instance configuration required.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://developers.clever-cloud.com/doc/addons/heptapod/" target="_blank" rel="noreferrer noopener">Check Heptapod doc</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:heading -->
<h2 class="wp-block-heading">A simplified pipeline</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Clever Cloud integrates the build, install and run phases of your deployments. All you have to do is push your code, the process is automatic. By including deployment on Clever Cloud in your pipeline, you'll get logs of your application's deployment and its various stages directly in the runner's console. This means:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>You can skip the build job in your pipeline - our platform already takes care of that.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>You can monitor your pipeline and its logs directly from GitHub, GitLab or Heptapod, from start to finish.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Remember: if the deployment fails on Clever Cloud, your app will stay up with the last commit  you pushed before your update. It won't crash and your users won't notice anything. <a href="https://stagingv6.cleverapps.io/blog/company/2022/09/06/whats-clever-in-our-cloud/" target="_blank" rel="noreferrer noopener">We got you!</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As both projects are in constant development, we plan to go even further in adding flexibility and agility to your deployment processes. We remain open to your suggestions!</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="6912" height="3456" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Deploy review apps on Clever Cloud from GitHub and GitLab" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments.png 6912w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-300x150.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-1024x512.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-768x384.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-1536x768.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-2048x1024.png 2048w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/github-gitlab-deployments-1368x684.png 1368w" sizes="auto, (max-width: 6912px) 100vw, 6912px" /></p><!-- wp:paragraph -->
<p>Over the past few months, some customers have raised questions about CI/CD building to deploy from GitHub or GitLab. The two platforms differ significantly on the subject, but are the ones massively used to store code and collaborate.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we're committed to providing a wide range of products and features to facilitate application deployment and maintenance. We aim to constantly improve our customers' experience as well. In this article, we detail how we have approached the subject of CI/CD to simplify deployments, regardless of where you store your code.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Two platforms, one common principle</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Clever Cloud provides a CLI for deploying and managing both applications and add-ons. So far, we've suggested that our customers use it to build their CI/CD. However, writing a pipeline, even with a facilitating tool like a CLI to connect to Clever Cloud, is a long and tedious task. Especially when you're busy developing your application.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Keeping in mind one of our founding principles, to make the work of developers and IT teams as easy as possible, we started to provide slightly more advanced CI/CD tools, both for GitHub and GitLab.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Deploying from GitHub: go further with review apps</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Customers using GitHub are already familiar with <a href="https://developers.clever-cloud.com/doc/ci-cd/#deploy-from-github">our integration, enabling them to deploy from this platform</a>. In addition to this integration, anyone could use the CLI to customize their pipeline.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Based on this configuration, we've provided <a href="https://github.com/CleverCloud/clever-cloud-review-app">a workflow template </a>for deploying review apps from GitHub to Clever Cloud. This script performs the following actions:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Create and deploy an app on Clever Cloud from the branch where the PR is open, with a test domain name ;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Update the application with each new commit ;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Delete the application when the PR is closed.</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>A comment posts the link to the review app with each new deployment, and announces the deletion of the app once this job has been completed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The script retrieves the environment variables and secrets added to your project from GitHub. It's possible to go further and add commands; for example, to connect the review app to a test database, you could add the command <code>clever service link-addon &lt;addon-name&gt;</code>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This template is under constant development to progressively simplify your workflow and make it more efficient. Eventually, this Action should work solely with inputs rather than command lines. In the meantime, feel free to <a href="https://github.com/CleverCloud/clever-cloud-review-app/issues/new">open an issue on the project</a> according to your needs.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://github.com/CleverCloud/clever-cloud-review-app" target="_blank" rel="noreferrer noopener">Check the template on GitHub</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Deploying from GitLab</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Our customers working on GitLab (as a SasS or self-hosted instance) have also expressed similar needs for automating their deployments. GitLab differs significantly from GitHub, with a much more DIY approach to CI/CD and different configurations. On GitLab, <a href="https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#predefined-variables-for-merge-request-pipelines">there are no variables</a> for detecting the state of a Merge Request (open or closed), unlike GitHub. If we want to launch a job automatically when it closes, we'<a href="https://docs.gitlab.com/ee/ci/environments/#environment-states"> ll have to use the state of the environments</a> instead, and not that of the MRs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we already had different deployment pipelines in place from GitLab for certain projects. We've unified and simplified them by creating pipeline components in the GitLab CI/CD catalog. The components replace <a href="https://docs.gitlab.com/ee/development/cicd/templates.html">GitLab's old template catalog</a>, and enable a modular pipeline to be built using inputs. No need to manually customize a script file anymore.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Our contribution to the catalog currently comprises four components:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Deploy in production;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Creating a review app from a Merge Request;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Update review app;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Delete review app.</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>The input values have been predefined to save you time when using them. These components can be used both on gitlab.com and on your self-hosted instance. There's nothing to modify in the project, but <a href="https://docs.gitlab.com/ee/ci/components/#use-a-gitlabcom-component-in-a-self-managed-instance">a few configurations of your instance to check</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In both cases, we advise you to test the manual triggering of components on your project first. We'll be adding more components as our customers' needs change, and are open to your proposals, to be submitted directly on the project dedicated to them.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://gitlab.com/explore/catalog/CleverCloud/clever-cloud-pipeline" target="_blank" rel="noreferrer noopener">Check the catalog on GitLab</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">The best of both worlds: Heptapod</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you use the GitLab Community Edition fork hosted on Clever Cloud, you'll benefit from the advantages of a GitLab as a Service offering, as well as hosting on European servers managed by a French company.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The CI/CD pipeline catalog is already integrated into our Heptapod offer, enabling you to use the components directly in your project, with no instance configuration required.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://developers.clever-cloud.com/doc/addons/heptapod/" target="_blank" rel="noreferrer noopener">Check Heptapod doc</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:heading -->
<h2 class="wp-block-heading">A simplified pipeline</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Clever Cloud integrates the build, install and run phases of your deployments. All you have to do is push your code, the process is automatic. By including deployment on Clever Cloud in your pipeline, you'll get logs of your application's deployment and its various stages directly in the runner's console. This means:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>You can skip the build job in your pipeline - our platform already takes care of that.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>You can monitor your pipeline and its logs directly from GitHub, GitLab or Heptapod, from start to finish.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Remember: if the deployment fails on Clever Cloud, your app will stay up with the last commit  you pushed before your update. It won't crash and your users won't notice anything. <a href="https://stagingv6.cleverapps.io/blog/company/2022/09/06/whats-clever-in-our-cloud/" target="_blank" rel="noreferrer noopener">We got you!</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As both projects are in constant development, we plan to go even further in adding flexibility and agility to your deployment processes. We remain open to your suggestions!</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Metrics: Offloading billions of datapoints each month</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2024/04/04/metrics-offloading-billions-of-datapoints-each-month/</link>
		
		<dc:creator><![CDATA[Alexandre Burgoni]]></dc:creator>
		<pubDate>Thu, 04 Apr 2024 14:40:13 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=12046</guid>

					<description><![CDATA[<p><img width="1600" height="710" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2.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/2024/04/1-2.png 1600w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2-300x133.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2-1024x454.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2-768x341.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2-1536x682.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2-1368x607.png 1368w" sizes="auto, (max-width: 1600px) 100vw, 1600px" /></p><!-- wp:paragraph -->
<p>To ensure a Clever Cloud application has enough resources allocated in our infrastructure, we use metrics to know when to scale up/down.Those metrics, along with those from our internal systems, are stored into a time series database which is growing at a pace of 2 TB per week. As we want to keep them for any further analysis, we had to set up a solution to automatically offload this data every month into our <a href="https://stagingv6.cleverapps.io/product/cellar-object-storage/">Cellar</a> object storage.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Our metric infrastructure</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With thousands of customer applications, and hundreds of internal applications, we needed a time series database capable of ingesting hundreds of thousands data points per second.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>That’s why our customer-facing cluster,<strong>warp10-c2</strong>, in production since October 2023, is using <a href="https://warp10.io/">Warp10</a>. It effortlessly satisfies our performance requirements thanks to the underlying storage layer, <a href="https://www.foundationdb.org/">FoundationDB</a>. In its distributed version, it can handle ingestion spikes of over 500,000 data points per second while processing reads of over 5,000,000 data points per second.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Continuously growing cluster</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Even though we could handle metric data efficiently, the growing rate of our database (2 TB per week) has put us in a challenging situation.At first, we were handling stability issues. To focus on one of them without having to deal with storage problems, we added more SSD nodes to our FoundationDB cluster.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Once this situation was handled, we had to deal with computing resources needs, find a good balance and how to gain storage capabilities without losing data.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In the end, we found a good way to achieve this: offloading those metrics in our object storage (HDD) service (Cellar) and once done, delete them in the hot (NVMe SSD) storage.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Offloading data can be done through various ways</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>First and naive way would be to select data points and send them into buckets in our own format. Our query system can handle millions of reads per second, but we are talking about billions of data points here. Even with dedicated&nbsp; servers, it would have led to performance issues coming from our storage layer. In addition, we would have disk usage similar to&nbsp; data in the hot storage.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A second way would have been to reduce the resolution of metrics, instead of having data points with seconds or minutes precision, we could re-process with their average value per hour or per day. This solution would leave us with more questions than solutions: “How to handle metrics extreme values ? An application running only a few seconds or minutes and not a day? What about our internal applications, do we re-process metrics on a case-by-case basis?” It would have been too much effort put in a flawed system.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The last and final way would have been to use Warp10 HFiles proprietary extension. It can be added on internal machines of our c2 cluster, and used to generate compact and data-efficient files, with encryption capabilities. This solution could lead us to a compression ratio that can take TB of data into a few GB, this is due to metrics that are mostly the same (e.g a CPU usage percentage has a finite number of values).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In February, we’ve chosen this approach. Still, we should implement this system, with automatic processing, so that our data team doesn't have to deal with this tedious task every month.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Building the automated process</h2>
<!-- /wp:heading -->

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

<!-- wp:paragraph -->
<p>Before diving into how we made this possible, a small introduction into HFiles is necessary to better understand why we did it this way. Then, we’ll dive into a workflow orchestrator we are using offload automatically. And finally, the figures from our first batch.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Introduction to Warp10 HFiles</h3>
<!-- /wp:heading -->

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

<!-- wp:paragraph -->
<p>HFile is part of the Warp10 HFiles extension. Its process is fairly simple. At first, it will fetch all `s matching a criteria, and for each of them, try to gather all the data points in a specified time range, while continuously compressing the data. This can take a lot of time, within our experiments, some generations could take days to be done (yes, really). But with proper optimisation, days could become hours. Those generations are synchronous, meaning we need to keep an open HTTP connection with the machine running the generation in order to succeed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We mostly adjusted three parameters in order to optimize the processing time:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Data points time range: it allows to only fetch data points between two dates</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Concurrency: running a single HFile generation is time consuming, so running multiple generations in parallel can save a lot of time</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Number of series: for each series, it will try to fetch its data points (even if it’s zero in the specified time range). Thus, optimizing the number of series can save a lot of requests into our storage layer, and then save time</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p><strong>What do "series" mean?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A series, called <a href="https://warp10.io/content/03_Documentation/04_WarpScript#geo-time-series">GTS</a> (“Geo Time Series”) in Warp10, is composed of a metric name and one or multiple labels which gives context. For instance, a GTS to know the CPU usage of an application would be cpu.usage_guest{app_id='app_87e33fea-9dde-4a99-b347-674de382ff7b'}. In our c2 cluster , we got over 150 million of them.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Scheduling the offloading</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Those generations required a tool that met the following constraints:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Scheduling capabilities: to prevent having to trigger the action manually each month</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Retries and fail over: in case of failure of a HFile generation, it should be able to retry, or if a scheduling node fails, to run it again on another node</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Alerting, when retries aren’t enough, we must be aware of the failure</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Handle long tasks: as our generations can take several hours</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>We went through several workflow orchestration solutions, but our final bet went to <a href="https://github.com/kestra-io/kestra">Kestra</a>. It’s an open source tool that answers the above constraints. Deployed as a Clever Cloud application, it helped us to create workflows that minimise generation time by using our optimised parameters for HFile generation. </p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":11977,"sizeSlug":"full","linkDestination":"none","style":{"color":{"duotone":"unset"}}} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2024/03/image-1.png" alt="" class="wp-image-11977" /></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>At the end of February, we finished our HFile generation workflow (see above), and ran it for the first time on November metrics, without deletion. This test-run, once successful, gave us enough confidence in <a href="https://github.com/kestra-io/kestra">Kestra</a>. We ran the deletion manually afterwards.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>However, starting in March, the whole HFile generation and data deletion from hot storage has been automated. Although our need for this scheduler is limited to this use case, we intend to apply it for different scenarios in the future.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">November's metrics offload</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As said earlier, we ran our first month of offloading successfully, based on November data (we want to continuously have at least 3 months of metrics available from hot storage). This first month was special, as c2 entered into production at the end of October, and all Clever Cloud customers applications had to be re-deployed using it. It means that this month has a higher number of series and data points than any other.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Thus, last November, we offloaded over 22 billions data points from 33 millions series. These needed approximately 20 TB of data from hot storage. Once compressed, it fits in only…20 GB. An important thing to note here is that the data in the hot storage is encrypted, meaning the size is several times the actual data point or series size.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In conclusion, managing metric data efficiently, especially at a growth rate of 2 TB per week, presented challenges that required careful planning. By leveraging Warp10 HFiles' data compression capabilities and building an automated offloading system to Cellar object storage, we successfully optimised our storage resources.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://stagingv6.cleverapps.io/contact/">Contact us</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/04/1-2.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/2024/04/1-2.png 1600w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2-300x133.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2-1024x454.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2-768x341.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2-1536x682.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/04/1-2-1368x607.png 1368w" sizes="auto, (max-width: 1600px) 100vw, 1600px" /></p><!-- wp:paragraph -->
<p>To ensure a Clever Cloud application has enough resources allocated in our infrastructure, we use metrics to know when to scale up/down.Those metrics, along with those from our internal systems, are stored into a time series database which is growing at a pace of 2 TB per week. As we want to keep them for any further analysis, we had to set up a solution to automatically offload this data every month into our <a href="https://stagingv6.cleverapps.io/product/cellar-object-storage/">Cellar</a> object storage.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Our metric infrastructure</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With thousands of customer applications, and hundreds of internal applications, we needed a time series database capable of ingesting hundreds of thousands data points per second.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>That’s why our customer-facing cluster,<strong>warp10-c2</strong>, in production since October 2023, is using <a href="https://warp10.io/">Warp10</a>. It effortlessly satisfies our performance requirements thanks to the underlying storage layer, <a href="https://www.foundationdb.org/">FoundationDB</a>. In its distributed version, it can handle ingestion spikes of over 500,000 data points per second while processing reads of over 5,000,000 data points per second.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Continuously growing cluster</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Even though we could handle metric data efficiently, the growing rate of our database (2 TB per week) has put us in a challenging situation.At first, we were handling stability issues. To focus on one of them without having to deal with storage problems, we added more SSD nodes to our FoundationDB cluster.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Once this situation was handled, we had to deal with computing resources needs, find a good balance and how to gain storage capabilities without losing data.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In the end, we found a good way to achieve this: offloading those metrics in our object storage (HDD) service (Cellar) and once done, delete them in the hot (NVMe SSD) storage.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Offloading data can be done through various ways</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>First and naive way would be to select data points and send them into buckets in our own format. Our query system can handle millions of reads per second, but we are talking about billions of data points here. Even with dedicated&nbsp; servers, it would have led to performance issues coming from our storage layer. In addition, we would have disk usage similar to&nbsp; data in the hot storage.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A second way would have been to reduce the resolution of metrics, instead of having data points with seconds or minutes precision, we could re-process with their average value per hour or per day. This solution would leave us with more questions than solutions: “How to handle metrics extreme values ? An application running only a few seconds or minutes and not a day? What about our internal applications, do we re-process metrics on a case-by-case basis?” It would have been too much effort put in a flawed system.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The last and final way would have been to use Warp10 HFiles proprietary extension. It can be added on internal machines of our c2 cluster, and used to generate compact and data-efficient files, with encryption capabilities. This solution could lead us to a compression ratio that can take TB of data into a few GB, this is due to metrics that are mostly the same (e.g a CPU usage percentage has a finite number of values).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In February, we’ve chosen this approach. Still, we should implement this system, with automatic processing, so that our data team doesn't have to deal with this tedious task every month.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Building the automated process</h2>
<!-- /wp:heading -->

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

<!-- wp:paragraph -->
<p>Before diving into how we made this possible, a small introduction into HFiles is necessary to better understand why we did it this way. Then, we’ll dive into a workflow orchestrator we are using offload automatically. And finally, the figures from our first batch.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Introduction to Warp10 HFiles</h3>
<!-- /wp:heading -->

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

<!-- wp:paragraph -->
<p>HFile is part of the Warp10 HFiles extension. Its process is fairly simple. At first, it will fetch all `s matching a criteria, and for each of them, try to gather all the data points in a specified time range, while continuously compressing the data. This can take a lot of time, within our experiments, some generations could take days to be done (yes, really). But with proper optimisation, days could become hours. Those generations are synchronous, meaning we need to keep an open HTTP connection with the machine running the generation in order to succeed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We mostly adjusted three parameters in order to optimize the processing time:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Data points time range: it allows to only fetch data points between two dates</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Concurrency: running a single HFile generation is time consuming, so running multiple generations in parallel can save a lot of time</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Number of series: for each series, it will try to fetch its data points (even if it’s zero in the specified time range). Thus, optimizing the number of series can save a lot of requests into our storage layer, and then save time</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p><strong>What do "series" mean?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A series, called <a href="https://warp10.io/content/03_Documentation/04_WarpScript#geo-time-series">GTS</a> (“Geo Time Series”) in Warp10, is composed of a metric name and one or multiple labels which gives context. For instance, a GTS to know the CPU usage of an application would be cpu.usage_guest{app_id='app_87e33fea-9dde-4a99-b347-674de382ff7b'}. In our c2 cluster , we got over 150 million of them.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Scheduling the offloading</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Those generations required a tool that met the following constraints:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Scheduling capabilities: to prevent having to trigger the action manually each month</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Retries and fail over: in case of failure of a HFile generation, it should be able to retry, or if a scheduling node fails, to run it again on another node</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Alerting, when retries aren’t enough, we must be aware of the failure</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Handle long tasks: as our generations can take several hours</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>We went through several workflow orchestration solutions, but our final bet went to <a href="https://github.com/kestra-io/kestra">Kestra</a>. It’s an open source tool that answers the above constraints. Deployed as a Clever Cloud application, it helped us to create workflows that minimise generation time by using our optimised parameters for HFile generation. </p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":11977,"sizeSlug":"full","linkDestination":"none","style":{"color":{"duotone":"unset"}}} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2024/03/image-1.png" alt="" class="wp-image-11977" /></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>At the end of February, we finished our HFile generation workflow (see above), and ran it for the first time on November metrics, without deletion. This test-run, once successful, gave us enough confidence in <a href="https://github.com/kestra-io/kestra">Kestra</a>. We ran the deletion manually afterwards.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>However, starting in March, the whole HFile generation and data deletion from hot storage has been automated. Although our need for this scheduler is limited to this use case, we intend to apply it for different scenarios in the future.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">November's metrics offload</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As said earlier, we ran our first month of offloading successfully, based on November data (we want to continuously have at least 3 months of metrics available from hot storage). This first month was special, as c2 entered into production at the end of October, and all Clever Cloud customers applications had to be re-deployed using it. It means that this month has a higher number of series and data points than any other.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Thus, last November, we offloaded over 22 billions data points from 33 millions series. These needed approximately 20 TB of data from hot storage. Once compressed, it fits in only…20 GB. An important thing to note here is that the data in the hot storage is encrypted, meaning the size is several times the actual data point or series size.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In conclusion, managing metric data efficiently, especially at a growth rate of 2 TB per week, presented challenges that required careful planning. By leveraging Warp10 HFiles' data compression capabilities and building an automated offloading system to Cellar object storage, we successfully optimised our storage resources.</p>
<!-- /wp:paragraph -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://stagingv6.cleverapps.io/contact/">Contact us</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Deploy llama, mistral, openchat or your own model on Clever Cloud</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2023/11/27/deploy-llama-mistral-openchat-or-your-own-model-on-clever-cloud/</link>
		
		<dc:creator><![CDATA[David Legrand]]></dc:creator>
		<pubDate>Mon, 27 Nov 2023 09:16:24 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[AI]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=11185</guid>

					<description><![CDATA[<p><img width="900" height="355" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/11/deployiaonccpng.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="bannier which illustrate how to deploy AI on Clever Cloud" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/11/deployiaonccpng.png 900w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/11/deployiaonccpng-300x118.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/11/deployiaonccpng-768x303.png 768w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p><!-- wp:paragraph -->
<p><strong>If AI has been in the news recently, it's mainly through large language models (LLMs), which require substantial computing power for training or inference. Thus, it's common to see developers using them via turnkey APIs, as we did in <a href="https://stagingv6.cleverapps.io/blog/features/2023/10/11/deploy-a-custom-chatgpt-based-on-php/">a previous article</a>. But this is changing thanks to more open and efficient models and tools, which you can easily deploy on Clever Cloud.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Indeed, while our platform was designed for a variety of uses, we always paid particular attention to its flexibility and the freedom it gave our customers. This means they can easily exploit it to address new markets, with minimum effort spent on adaptation.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To confirm this, we recently tried to deploy open source AI models such as those derived from LLaMA and Mistral. Their particularity is that they exist in lightweight versions, which don't necessarily require a GPU to run. As a result, they can be hosted as simple Clever Cloud applications, as long as they have been allocated enough memory.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Let's ollama (with a web UI) !</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>To do it, we've chosen to use <a href="https://github.com/jmorganca/ollama" target="_blank" rel="noreferrer noopener">ollama</a>, an MIT-licensed project that lets you download models from <a href="https://ollama.ai/library" target="_blank" rel="noreferrer noopener">a registry</a>, or even <a href="https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md" target="_blank" rel="noreferrer noopener">your own</a>. It works as a server that communicates via an API, and is very easy to host on our infrastructures.</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. You can create the application and follow the next steps using our web interface,&nbsp;<a href="https://console.clever-cloud.com/">the Console</a>, but also through our open source CLI:&nbsp;<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:paragraph -->
<p>We’ll assume that your machine is running&nbsp;<a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git" target="_blank" rel="noreferrer noopener">git</a>&nbsp;and a recent version of&nbsp;<a href="https://nodejs.org/en/learn/getting-started/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&nbsp;<code>sudo</code>&nbsp;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>Next, we create a Clever Cloud application using Node.js. It will install ollama to download and run our models, adding a web interface (<a href="https://github.com/ivanfioravanti/chatbot-ollama" target="_blank" rel="noreferrer noopener">chatbot-ollama</a>, also under MIT license) that will allow us to query the server from any browser, run from a computer or a simple smartphone.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"wide","id":11237,"sizeSlug":"full","linkDestination":"media"} -->
<figure class="wp-block-image alignwide size-full"><a href="https://cdn.clever-cloud.com/uploads/2023/11/sans-titre-scaled.webp" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/11/sans-titre-scaled.webp" alt="Chatbot Ollama" class="wp-image-11237" title="Chatbot Ollama"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>This solution also offers local storage of chats in the browser. It therefore requires no database, but offers an import/export function. You can also choose between different models, set some of their parameters, configure system instructions, various prompts, and so on.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">mkdir myollama && cd myollama
git init
curl -L https://github.com/ivanfioravanti/chatbot-ollama/archive/refs/heads/main.tar.gz | tar -xz --strip-components=1

clever create -t node myollama && clever scale --flavor L
clever env set CC_POST_BUILD_HOOK "npx next telemetry disable && npm run build"
clever env set CC_PRE_BUILD_HOOK "./ollama_setup.sh"
clever env set CC_PRE_RUN_HOOK "./ollama_start.sh"

echo "orca-mini" > models.list
echo "mistral" >> models.list
echo "codellama" >> models.list</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>The code above creates the application. We add a file containing the list of models we wish to fetch during startup. We've chosen an L instance, the minimum size for loading such models into memory. We also declare several environment variables for running scripts to install ollama, start the server and disable telemetry for the Next.js framework used to build the web interface after the dependencies have been installed.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Now add some scripts</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Our application is almost ready. We still have to create two executable files:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">touch ollama_setup.sh && chmod +x ollama_setup.sh
touch ollama_start.sh && chmod +x ollama_start.sh</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p><code>ollama_setup.sh</code> download the ollama binary and the models from our list. Open it with your favorite editor and insert the following content:</p>
<!-- /wp:paragraph -->

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

# We define the folder (in $PATH), where the ollama binary will be placed
BIN_DIR=${HOME}/.local/bin
mkdir -p ${BIN_DIR} 

ollama_start() {
    echo "Downloading and launching ollama..."
    curl -Ls https://ollama.ai/download/ollama-linux-amd64 -o ${BIN_DIR}/ollama
    chmod +x ${BIN_DIR}/ollama
    ollama serve &> /dev/null &
    echo -e "Finished: \033[32m✔\033[0m\n"
}

get_models() {
    MODELS_FILE="models.list"
    MODELS_DEFAULT="orca-mini"

    # We check if the models file exists
    if [ ! -f ${MODELS_FILE} ]; then
        echo "File ${MODELS_FILE} not found, ${MODELS_DEFAULT} used by default."
        echo ${MODELS_DEFAULT} > ${MODELS_FILE}
    fi

    # Loop through each line and pull model
    while IFS= read -r line; do
        echo "Pulling ${line} model..."
        ollama pull "${line}" > /dev/null 2>&1
        echo -e "Finished: \033[32m✔\033[0m\n"

    done < ${MODELS_FILE}
}

# We start ollama, and wait for it to respond
ollama_start
if [ $? -ne 0 ]; then
    echo -e "\nError during ollama setup."
    exit 1
fi

count=0
MAX_TIME=10

while ! pgrep -x "ollama" > /dev/null; do
    if [ ${count} -lt ${MAX_TIME} ]; then
        sleep 1
        count=$((count+1))
    else
        echo "Application 'ollama' did not launch within 10 seconds."
        exit 1
    fi
done

get_models
if [ $? -ne 0 ]; then
    echo -e "\nError during models downloading."
    exit 1
fi
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This code may seem a little long, but that's mainly because we've made it modular, logging only successful steps and any errors.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><code>ollama_start.sh</code> detects whether the ollama server is already present before starting the web interface. If it isn't, we launch it in the background (we'll see why below).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Open it with your favorite editor and insert the following content:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">if ! pgrep -f "ollama" > /dev/null; then
    # If 'ollama' is not running, start it in the background
    ollama serve &
    echo "Application 'ollama' started."
else
    # If 'ollama' is already running
    echo "'ollama' application is already running."
fi
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once these two files have been created, we can deploy the application:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">git add . && git commit -m "Init application"
clever deploy
clever domain</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You'll then see the domain to access it (which you can customize).</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Cache and quick (re)start</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Using Clever Cloud not only means deploying such an application easily, with logs and monitoring, and being able to instantly change its horizontal and/or vertical scaling. It also means being able to turn it into an image ready for a fast redeployment.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In fact, every application we host is stored as an archive just before dependencies are installed. This means it can be stopped and restarted in this form, so we don't have to re-download the models every time. To do this, simply specify the folders to be added to the archive:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever env set CC_OVERRIDE_BUILDCACHE "/:../.ollama/:../.local/bin/"
clever restart --without-cache --follow</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>The application will restart, but this time it will take the built web interface, ollama and models from its cache, as the <code>CC_PRE_BUILD_HOOK</code> and <code>CC_PRE_BUILD_HOOK</code> steps are not executed. This is one of the reasons why we need to make sure that we start the ollama server with <code>CC_PRE_RUN_HOOK</code>, but check that this hasn't already been done in a deployment where it is used to download models before running them.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Once this step is complete, you can stop the application and restart it whenever you like - it'll be much faster from now on. And you'll only be charged for the time you use it, by the second. If you wish to modify the list of models to use, do so in the dedicated file. A git push will be enough to rebuild the new cache.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash"># Stop/Restart the application
clever stop
clever restart

# After a modification in models.list, git push to recreate the cache
git add models.list && git commit -m "New models" 
clever deploy</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You'll find the files you need for this project in this <a href="https://github.com/CleverCloud/ollama-chat-deploy" target="_blank" rel="noreferrer noopener">GitHub repository</a>, with the environment variables ready to import (<code>clever env import &lt; .env</code>). </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>And if you want to push things further, deploy other models and tools for your applications that require more power and/or GPUs, <a href="https://stagingv6.cleverapps.io/fr/contact/">let us know!</a></p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="900" height="355" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/11/deployiaonccpng.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="bannier which illustrate how to deploy AI on Clever Cloud" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/11/deployiaonccpng.png 900w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/11/deployiaonccpng-300x118.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/11/deployiaonccpng-768x303.png 768w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p><!-- wp:paragraph -->
<p><strong>If AI has been in the news recently, it's mainly through large language models (LLMs), which require substantial computing power for training or inference. Thus, it's common to see developers using them via turnkey APIs, as we did in <a href="https://stagingv6.cleverapps.io/blog/features/2023/10/11/deploy-a-custom-chatgpt-based-on-php/">a previous article</a>. But this is changing thanks to more open and efficient models and tools, which you can easily deploy on Clever Cloud.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Indeed, while our platform was designed for a variety of uses, we always paid particular attention to its flexibility and the freedom it gave our customers. This means they can easily exploit it to address new markets, with minimum effort spent on adaptation.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To confirm this, we recently tried to deploy open source AI models such as those derived from LLaMA and Mistral. Their particularity is that they exist in lightweight versions, which don't necessarily require a GPU to run. As a result, they can be hosted as simple Clever Cloud applications, as long as they have been allocated enough memory.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Let's ollama (with a web UI) !</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>To do it, we've chosen to use <a href="https://github.com/jmorganca/ollama" target="_blank" rel="noreferrer noopener">ollama</a>, an MIT-licensed project that lets you download models from <a href="https://ollama.ai/library" target="_blank" rel="noreferrer noopener">a registry</a>, or even <a href="https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md" target="_blank" rel="noreferrer noopener">your own</a>. It works as a server that communicates via an API, and is very easy to host on our infrastructures.</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. You can create the application and follow the next steps using our web interface,&nbsp;<a href="https://console.clever-cloud.com/">the Console</a>, but also through our open source CLI:&nbsp;<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:paragraph -->
<p>We’ll assume that your machine is running&nbsp;<a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git" target="_blank" rel="noreferrer noopener">git</a>&nbsp;and a recent version of&nbsp;<a href="https://nodejs.org/en/learn/getting-started/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&nbsp;<code>sudo</code>&nbsp;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>Next, we create a Clever Cloud application using Node.js. It will install ollama to download and run our models, adding a web interface (<a href="https://github.com/ivanfioravanti/chatbot-ollama" target="_blank" rel="noreferrer noopener">chatbot-ollama</a>, also under MIT license) that will allow us to query the server from any browser, run from a computer or a simple smartphone.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"wide","id":11237,"sizeSlug":"full","linkDestination":"media"} -->
<figure class="wp-block-image alignwide size-full"><a href="https://cdn.clever-cloud.com/uploads/2023/11/sans-titre-scaled.webp" target="_blank" rel="noreferrer noopener"><img src="https://cdn.clever-cloud.com/uploads/2023/11/sans-titre-scaled.webp" alt="Chatbot Ollama" class="wp-image-11237" title="Chatbot Ollama"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>This solution also offers local storage of chats in the browser. It therefore requires no database, but offers an import/export function. You can also choose between different models, set some of their parameters, configure system instructions, various prompts, and so on.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">mkdir myollama && cd myollama
git init
curl -L https://github.com/ivanfioravanti/chatbot-ollama/archive/refs/heads/main.tar.gz | tar -xz --strip-components=1

clever create -t node myollama && clever scale --flavor L
clever env set CC_POST_BUILD_HOOK "npx next telemetry disable && npm run build"
clever env set CC_PRE_BUILD_HOOK "./ollama_setup.sh"
clever env set CC_PRE_RUN_HOOK "./ollama_start.sh"

echo "orca-mini" > models.list
echo "mistral" >> models.list
echo "codellama" >> models.list</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>The code above creates the application. We add a file containing the list of models we wish to fetch during startup. We've chosen an L instance, the minimum size for loading such models into memory. We also declare several environment variables for running scripts to install ollama, start the server and disable telemetry for the Next.js framework used to build the web interface after the dependencies have been installed.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Now add some scripts</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Our application is almost ready. We still have to create two executable files:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">touch ollama_setup.sh && chmod +x ollama_setup.sh
touch ollama_start.sh && chmod +x ollama_start.sh</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p><code>ollama_setup.sh</code> download the ollama binary and the models from our list. Open it with your favorite editor and insert the following content:</p>
<!-- /wp:paragraph -->

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

# We define the folder (in $PATH), where the ollama binary will be placed
BIN_DIR=${HOME}/.local/bin
mkdir -p ${BIN_DIR} 

ollama_start() {
    echo "Downloading and launching ollama..."
    curl -Ls https://ollama.ai/download/ollama-linux-amd64 -o ${BIN_DIR}/ollama
    chmod +x ${BIN_DIR}/ollama
    ollama serve &> /dev/null &
    echo -e "Finished: \033[32m✔\033[0m\n"
}

get_models() {
    MODELS_FILE="models.list"
    MODELS_DEFAULT="orca-mini"

    # We check if the models file exists
    if [ ! -f ${MODELS_FILE} ]; then
        echo "File ${MODELS_FILE} not found, ${MODELS_DEFAULT} used by default."
        echo ${MODELS_DEFAULT} > ${MODELS_FILE}
    fi

    # Loop through each line and pull model
    while IFS= read -r line; do
        echo "Pulling ${line} model..."
        ollama pull "${line}" > /dev/null 2>&1
        echo -e "Finished: \033[32m✔\033[0m\n"

    done < ${MODELS_FILE}
}

# We start ollama, and wait for it to respond
ollama_start
if [ $? -ne 0 ]; then
    echo -e "\nError during ollama setup."
    exit 1
fi

count=0
MAX_TIME=10

while ! pgrep -x "ollama" > /dev/null; do
    if [ ${count} -lt ${MAX_TIME} ]; then
        sleep 1
        count=$((count+1))
    else
        echo "Application 'ollama' did not launch within 10 seconds."
        exit 1
    fi
done

get_models
if [ $? -ne 0 ]; then
    echo -e "\nError during models downloading."
    exit 1
fi
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This code may seem a little long, but that's mainly because we've made it modular, logging only successful steps and any errors.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><code>ollama_start.sh</code> detects whether the ollama server is already present before starting the web interface. If it isn't, we launch it in the background (we'll see why below).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Open it with your favorite editor and insert the following content:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">if ! pgrep -f "ollama" > /dev/null; then
    # If 'ollama' is not running, start it in the background
    ollama serve &
    echo "Application 'ollama' started."
else
    # If 'ollama' is already running
    echo "'ollama' application is already running."
fi
</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once these two files have been created, we can deploy the application:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">git add . && git commit -m "Init application"
clever deploy
clever domain</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You'll then see the domain to access it (which you can customize).</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Cache and quick (re)start</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Using Clever Cloud not only means deploying such an application easily, with logs and monitoring, and being able to instantly change its horizontal and/or vertical scaling. It also means being able to turn it into an image ready for a fast redeployment.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In fact, every application we host is stored as an archive just before dependencies are installed. This means it can be stopped and restarted in this form, so we don't have to re-download the models every time. To do this, simply specify the folders to be added to the archive:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash">clever env set CC_OVERRIDE_BUILDCACHE "/:../.ollama/:../.local/bin/"
clever restart --without-cache --follow</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>The application will restart, but this time it will take the built web interface, ollama and models from its cache, as the <code>CC_PRE_BUILD_HOOK</code> and <code>CC_PRE_BUILD_HOOK</code> steps are not executed. This is one of the reasons why we need to make sure that we start the ollama server with <code>CC_PRE_RUN_HOOK</code>, but check that this hasn't already been done in a deployment where it is used to download models before running them.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Once this step is complete, you can stop the application and restart it whenever you like - it'll be much faster from now on. And you'll only be charged for the time you use it, by the second. If you wish to modify the list of models to use, do so in the dedicated file. A git push will be enough to rebuild the new cache.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="language-bash"># Stop/Restart the application
clever stop
clever restart

# After a modification in models.list, git push to recreate the cache
git add models.list && git commit -m "New models" 
clever deploy</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You'll find the files you need for this project in this <a href="https://github.com/CleverCloud/ollama-chat-deploy" target="_blank" rel="noreferrer noopener">GitHub repository</a>, with the environment variables ready to import (<code>clever env import &lt; .env</code>). </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>And if you want to push things further, deploy other models and tools for your applications that require more power and/or GPUs, <a href="https://stagingv6.cleverapps.io/fr/contact/">let us know!</a></p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Open sourcing Sōzu connectors</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2023/09/25/reverse-proxy-open-sourcing-sozu-connectors/</link>
		
		<dc:creator><![CDATA[Emmanuel Bosquet]]></dc:creator>
		<pubDate>Mon, 25 Sep 2023 15:19:04 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[reverse proxy]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=10297</guid>

					<description><![CDATA[<p><img width="573" height="266" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/09/clever-cloud-devoile-ses-connecteurs-sozu-open-source-3.svg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="bannier Sozu" decoding="async" loading="lazy" /></p><!-- wp:media-text {"align":"wide","mediaPosition":"right","mediaId":8027,"mediaLink":"https://stagingv6.cleverapps.io/?attachment_id=8027","mediaType":"image","mediaWidth":15} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 15%"><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p>Clever Cloud is today the main developer of <a href="https://www.sozu.io/">Sōzu</a>, a Reverse Proxy that was developped at Clever Cloud, in <a href="https://stagingv6.cleverapps.io/blog/engineering/2016/11/02/falling-for-rust/">Rust</a>, to meet the needs of our infrastructure for performance and hot reloading. Sōzu is used throughout Clever Cloud, paired with HAProxy, to route traffic to our customer's applications.</p>
<!-- /wp:paragraph --></div><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2023/07/canvas-1-358x447.png" alt="" class="wp-image-8027 size-full"/></figure></div>
<!-- /wp:media-text -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading"><strong>What we used to do: </strong></h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Up until now, our Reverse Proxy Sōzu used to be managed by Clever Cloud by a closed source program that ran on the same machine and assumed two big responsibilities:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Firstly, listen to a RabbitMQ topic and redirect requests to Sōzu (via its UNIX socket)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Secondly, watch over a PKI directory (Public Key Infrastructure) to redirect TLS certificates to Sōzu (via its UNIX socket)</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading"><strong>Turning open source</strong></h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>While working on a new Prometheus connector for Sōzu, we realized we could open source it. With this realization came the idea of porting the logic of the former Sōzu manager (described above) from its closed source state into new open source repositories.<br>What we ultimately aim to develop is an entirely <strong>open-source</strong> <strong>ecosystem around our Reverse Proxy Sōzu</strong>.<br>This blog post details what these new open source components are, and summarizes what they do.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Our open-source ecosystem around <strong>Sōzu</strong></h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3,"fontSize":"large"} -->
<h3 class="wp-block-heading has-large-font-size"><a href="https://github.com/CleverCloud/sozu-prometheus-connector" target="_blank" rel="noreferrer noopener">Sōzu Prometheus connector</a></h3>
<!-- /wp:heading -->

<!-- wp:media-text {"align":"wide","mediaPosition":"right","mediaId":8023,"mediaLink":"https://stagingv6.cleverapps.io/?attachment_id=8023","mediaType":"image","mediaWidth":15} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 15%"><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p><a href="https://prometheus.io/docs/introduction/overview/" target="_blank" rel="noreferrer noopener">Prometheus</a> is a monitoring and alerting software suite.<br>This simple connector operates alongside Sōzu. It waits for HTTP requests on the <code>/metrics</code> route, queries Sōzu for its metrics, formats the metrics to be Prometheus-compatible, and sends them in the HTTP&nbsp;response.<br>This means that <strong>Prometheus metrics are readily available on the IP address of a Sōzu machine.</strong></p>
<!-- /wp:paragraph --></div><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2023/07/1200px-Prometheus_software_logo.svg_-1024x1015-1-451x447.png" alt="" class="wp-image-8023 size-full"/></figure></div>
<!-- /wp:media-text -->

<!-- wp:heading {"level":3,"fontSize":"large"} -->
<h3 class="wp-block-heading has-large-font-size"><a href="https://github.com/CleverCloud/sozu-pulsar-connector" target="_blank" rel="noreferrer noopener">Sōzu Pulsar connector</a></h3>
<!-- /wp:heading -->

<!-- wp:media-text {"align":"wide","mediaPosition":"right","mediaId":8025,"mediaLink":"https://stagingv6.cleverapps.io/?attachment_id=8025","mediaType":"image","mediaWidth":15} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 15%"><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p><a href="https://github.com/CleverCloud/sozu-pulsar-connector" target="_blank" rel="noreferrer noopener">Apache Pulsar</a> is a highly scalable messaging platform. We use it extensively at Clever Cloud because of its distributed aspect and cutting-edge throughput performance.<br>The Sōzu Pulsar connector subscribes to a Pulsar topic and transmits messages to Sōzu. Sōzu uses these messages to perform hot reloading on the proxy, which is a key feature of our Reverse Proxy.<br>What it means for us and anyone using the Sōzu ecosystem: this connector enables <strong>updating traffic redirection in real time.</strong></p>
<!-- /wp:paragraph --></div><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2023/07/1_7F-rMchWXbujnBT7QUN4zA-1.jpeg" alt="" class="wp-image-8025 size-full"/></figure></div>
<!-- /wp:media-text -->

<!-- wp:heading {"level":3,"fontSize":"large"} -->
<h3 class="wp-block-heading has-large-font-size"><a href="https://github.com/CleverCloud/sozu-pki-connector" target="_blank" rel="noreferrer noopener">Sōzu PKI connector</a></h3>
<!-- /wp:heading -->

<!-- wp:media-text {"align":"wide","mediaPosition":"right","mediaId":8026,"mediaLink":"https://stagingv6.cleverapps.io/?attachment_id=8026","mediaType":"image","mediaWidth":15} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 15%"><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p>PKI stands for Public Key Infrastructure, an omnipresent security framework on the Internet, typically used for securing connections with HTTPS (among other things). In the PKI framework, Sōzu functions as a <strong>TLS endpoint</strong>: it decrypts HTTPS traffic into HTTP traffic.<br>The Sōzu PKI connector runs alongside Sōzu, watches over a given directory in the file system, reads TLS certificates that were put there by either human or machine, and transmits them to Sōzu.<br>Then , what this ultimately means is: <strong>write a TLS certificate on the machine, Sōzu will have it.</strong> </p>
<!-- /wp:paragraph --></div><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2023/07/TLS_icon-e1586274007843.png" alt="" class="wp-image-8026 size-full"/></figure></div>
<!-- /wp:media-text -->

<!-- wp:paragraph {"fontSize":"large"} -->
<p class="has-large-font-size"><a href="https://github.com/CleverCloud/sozu-client">Sōzu client</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is a code library used by all above connectors. It pools connections to Sōzu's UNIX socket and functions entirely asynchronously. All in all, it makes <strong>writing new connectors easier</strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>What's next</strong><br>The best thing we wish is for the open-source community to join us in using and improving Sōzu as it goes. Our end-game is to build a web UI to manage a Sōzu instance in the navigator.</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p><br></p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="573" height="266" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/09/clever-cloud-devoile-ses-connecteurs-sozu-open-source-3.svg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="bannier Sozu" decoding="async" loading="lazy" /></p><!-- wp:media-text {"align":"wide","mediaPosition":"right","mediaId":8027,"mediaLink":"https://stagingv6.cleverapps.io/?attachment_id=8027","mediaType":"image","mediaWidth":15} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 15%"><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p>Clever Cloud is today the main developer of <a href="https://www.sozu.io/">Sōzu</a>, a Reverse Proxy that was developped at Clever Cloud, in <a href="https://stagingv6.cleverapps.io/blog/engineering/2016/11/02/falling-for-rust/">Rust</a>, to meet the needs of our infrastructure for performance and hot reloading. Sōzu is used throughout Clever Cloud, paired with HAProxy, to route traffic to our customer's applications.</p>
<!-- /wp:paragraph --></div><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2023/07/canvas-1-358x447.png" alt="" class="wp-image-8027 size-full"/></figure></div>
<!-- /wp:media-text -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading"><strong>What we used to do: </strong></h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Up until now, our Reverse Proxy Sōzu used to be managed by Clever Cloud by a closed source program that ran on the same machine and assumed two big responsibilities:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Firstly, listen to a RabbitMQ topic and redirect requests to Sōzu (via its UNIX socket)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Secondly, watch over a PKI directory (Public Key Infrastructure) to redirect TLS certificates to Sōzu (via its UNIX socket)</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading"><strong>Turning open source</strong></h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>While working on a new Prometheus connector for Sōzu, we realized we could open source it. With this realization came the idea of porting the logic of the former Sōzu manager (described above) from its closed source state into new open source repositories.<br>What we ultimately aim to develop is an entirely <strong>open-source</strong> <strong>ecosystem around our Reverse Proxy Sōzu</strong>.<br>This blog post details what these new open source components are, and summarizes what they do.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Our open-source ecosystem around <strong>Sōzu</strong></h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3,"fontSize":"large"} -->
<h3 class="wp-block-heading has-large-font-size"><a href="https://github.com/CleverCloud/sozu-prometheus-connector" target="_blank" rel="noreferrer noopener">Sōzu Prometheus connector</a></h3>
<!-- /wp:heading -->

<!-- wp:media-text {"align":"wide","mediaPosition":"right","mediaId":8023,"mediaLink":"https://stagingv6.cleverapps.io/?attachment_id=8023","mediaType":"image","mediaWidth":15} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 15%"><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p><a href="https://prometheus.io/docs/introduction/overview/" target="_blank" rel="noreferrer noopener">Prometheus</a> is a monitoring and alerting software suite.<br>This simple connector operates alongside Sōzu. It waits for HTTP requests on the <code>/metrics</code> route, queries Sōzu for its metrics, formats the metrics to be Prometheus-compatible, and sends them in the HTTP&nbsp;response.<br>This means that <strong>Prometheus metrics are readily available on the IP address of a Sōzu machine.</strong></p>
<!-- /wp:paragraph --></div><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2023/07/1200px-Prometheus_software_logo.svg_-1024x1015-1-451x447.png" alt="" class="wp-image-8023 size-full"/></figure></div>
<!-- /wp:media-text -->

<!-- wp:heading {"level":3,"fontSize":"large"} -->
<h3 class="wp-block-heading has-large-font-size"><a href="https://github.com/CleverCloud/sozu-pulsar-connector" target="_blank" rel="noreferrer noopener">Sōzu Pulsar connector</a></h3>
<!-- /wp:heading -->

<!-- wp:media-text {"align":"wide","mediaPosition":"right","mediaId":8025,"mediaLink":"https://stagingv6.cleverapps.io/?attachment_id=8025","mediaType":"image","mediaWidth":15} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 15%"><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p><a href="https://github.com/CleverCloud/sozu-pulsar-connector" target="_blank" rel="noreferrer noopener">Apache Pulsar</a> is a highly scalable messaging platform. We use it extensively at Clever Cloud because of its distributed aspect and cutting-edge throughput performance.<br>The Sōzu Pulsar connector subscribes to a Pulsar topic and transmits messages to Sōzu. Sōzu uses these messages to perform hot reloading on the proxy, which is a key feature of our Reverse Proxy.<br>What it means for us and anyone using the Sōzu ecosystem: this connector enables <strong>updating traffic redirection in real time.</strong></p>
<!-- /wp:paragraph --></div><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2023/07/1_7F-rMchWXbujnBT7QUN4zA-1.jpeg" alt="" class="wp-image-8025 size-full"/></figure></div>
<!-- /wp:media-text -->

<!-- wp:heading {"level":3,"fontSize":"large"} -->
<h3 class="wp-block-heading has-large-font-size"><a href="https://github.com/CleverCloud/sozu-pki-connector" target="_blank" rel="noreferrer noopener">Sōzu PKI connector</a></h3>
<!-- /wp:heading -->

<!-- wp:media-text {"align":"wide","mediaPosition":"right","mediaId":8026,"mediaLink":"https://stagingv6.cleverapps.io/?attachment_id=8026","mediaType":"image","mediaWidth":15} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 15%"><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p>PKI stands for Public Key Infrastructure, an omnipresent security framework on the Internet, typically used for securing connections with HTTPS (among other things). In the PKI framework, Sōzu functions as a <strong>TLS endpoint</strong>: it decrypts HTTPS traffic into HTTP traffic.<br>The Sōzu PKI connector runs alongside Sōzu, watches over a given directory in the file system, reads TLS certificates that were put there by either human or machine, and transmits them to Sōzu.<br>Then , what this ultimately means is: <strong>write a TLS certificate on the machine, Sōzu will have it.</strong> </p>
<!-- /wp:paragraph --></div><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2023/07/TLS_icon-e1586274007843.png" alt="" class="wp-image-8026 size-full"/></figure></div>
<!-- /wp:media-text -->

<!-- wp:paragraph {"fontSize":"large"} -->
<p class="has-large-font-size"><a href="https://github.com/CleverCloud/sozu-client">Sōzu client</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is a code library used by all above connectors. It pools connections to Sōzu's UNIX socket and functions entirely asynchronously. All in all, it makes <strong>writing new connectors easier</strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>What's next</strong><br>The best thing we wish is for the open-source community to join us in using and improving Sōzu as it goes. Our end-game is to build a web UI to manage a Sōzu instance in the navigator.</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p><br></p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How does Matomo work on Clever Cloud ?</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2023/08/21/how-does-matomo-work-on-clever-cloud/</link>
		
		<dc:creator><![CDATA[Julia March]]></dc:creator>
		<pubDate>Mon, 21 Aug 2023 08:37:50 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[matomo]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[self-hosted]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=8062</guid>

					<description><![CDATA[<p><img width="2800" height="1080" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="How matomo works on Clever Cloud" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5.png 2800w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-1536x592.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-2048x790.png 2048w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-1368x528.png 1368w" sizes="auto, (max-width: 2800px) 100vw, 2800px" /></p><!-- wp:paragraph -->
<p>In <a href="https://stagingv6.cleverapps.io/blog/features/2022/05/16/how-and-why-to-install-matomo-to-replace-google-analytics/" target="_blank" rel="noopener">a previous post</a>, we explained why you should switch from Google Analytics to Matomo for your audience measurement. Some of our customers have decided to take this step, and Clever Cloud has helped them get to grips with the solution. Based on this experience, find out in this article how to maximize the use of our Matomo addon on Clever Cloud.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Selecting the optimal instance size</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As soon as the Matomo addon is created, Clever Cloud deploys three optimized instances (a PHP runtime, a MySQL addon and a Redis addon). Initially, they are sized to the minimum server requirements in order to evolve according to your needs, thus ensuring cost optimization. If you need to make adjustments (for example, if you start to experience errors or slowdowns when launching some processes), our integrated Grafana is your best ally for monitoring your metrics and adjusting your resources accordingly.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Easy access to your metrics</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Thanks to the intuitive dashboard for each application, you're provided with a clear view of it all. We've <a href="https://stagingv6.cleverapps.io/blog/features/2023/03/16/a-metric-tile-to-simplify-application-monitoring/" target="_blank" rel="noopener">recently integrated a metrics tile</a> into this dashboard, allowing you to track RAM and CPU consumption in real time from the console.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":8069,"sizeSlug":"medium","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-medium"><img src="https://cdn.clever-cloud.com/uploads/2023/08/capture-decran-2023-08-17-a-16-33-06.png" alt="Tile metrics from app Overview panel indicating CPU and RAM usage." class="wp-image-8069"/></figure>
<!-- /wp:image -->

<!-- wp:spacer {"height":"34px"} -->
<div style="height:34px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:paragraph -->
<p>For a more in-depth analysis, a simple click on the Grafana logo from the tile gives you access to all your application's metrics. </p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":8036,"width":493,"height":274,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large is-resized"><img src="https://cdn.clever-cloud.com/uploads/2023/07/capture-decran-2023-07-31-a-15-27-32.png" alt="Metrics dashboard on Grafana for Matomo PHP application" class="wp-image-8036" style="width:493px;height:274px" width="493" height="274"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>In addition, Matomo's PHP instance logs are always there to provide you with additional information. </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">All about auto-scalability</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Self-scalability on Clever Cloud is a major advantage, giving you peace of mind and flexible billing. With Matomo, this feature guarantees a smooth experience even in times of high demand. Keep in mind certain specifics, such as the occasional need for certain extensions, and you'll you make the most of this feature.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Perks from enabling auto-scalability on the PHP instance</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With auto-scalability, you can use Matomo smoothly and adaptively, even during peak periods! Benefit from powerful on-demand resources, while paying only for the consumption/second. Once you've completed your intensive tasks, your instance returns to an optimal size, guaranteeing efficiency and savings. So there's no need to reserve a large infrastructure to meet occasional needs.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">When to disable auto-scalability?</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Clever Cloud provides a service that can be adapted to your needs, with the option of limiting or completely disabling instance auto-scalability. In some cases, it may be advisable to deactivate it from time to time.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As Matomo is a managed service, some configuration options are unalterable to guarantee optimal operation and performance. As part of Matomo's continuous improvement, we have integrated the Google Analytics data import extension in response to common customer requests. This extension, generally used for a one-off migration from Google Analytics to Matomo, is deactivated by default.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you activate the extension and start importing data, and your application scales, your instance reboots and redeploys the application... with the default configurations. Restarting will therefore disable this extension and kill the import process at the same time. If you decide to use an extension that appears as disabled by default in our Matomo, we recommend the following procedure:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Disable auto-scalability for your Matomo PHP instance</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Increase the instance size until the process is complete</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Restart instance</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Once the instance has been redeployed, activate the extension in Matomo</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Now you're ready to use the extension, which will remain active until the next server restart. </p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>Matomo, with its MySQL addon, is designed to grow with you. While the database is created with sufficient capacity at start-up, Matomo will quickly exploit its potential. To avoid surprises, why not set up Grafana alerts to monitor memory levels?</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":8034,"width":575,"height":281,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large is-resized"><img src="https://cdn.clever-cloud.com/uploads/2023/07/grafana-mysql-1.png" alt="Database metrics on Grafana" class="wp-image-8034" style="width:575px;height:281px" width="575" height="281"/><figcaption class="wp-element-caption">Your database metrics are also available in Grafana, in the Addon panel.</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Creating alerts</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Among its many features, Grafana lets you create alerts on the metrics of your choice. You'll find <a href="https://stagingv6.cleverapps.io/blog/features/2021/12/03/slack-alerts-for-grafana/" target="_blank" rel="noopener">a tutorial here</a> to show you how to create your alerts from Grafana to Slack, which you can also apply to other contact points like Discord, Teams, etc.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We recommend that you leave around 20% disk space available, as the MySQL instance will need disk to migrate.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Migrating the database</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Although scalability has its peculiarities for databases, Clever Cloud provides a smooth and intuitive manual solution. When you receive the alert, a simple connection to the Console on your MySQL addon dashboard will enable you to launch our one-click migration tool. This operation can take from a few seconds to a few minutes, depending on the size of your database.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>💡 <strong>Tip:</strong> Include a direct link to the migration tab in your Grafana alert message. This will give you instant access to the migration tool, making the process even easier.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Leveraging Matomo and Clever Cloud</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Although a managed service is pre-configured, you have Matomo administrator status and can use it as such. Here are just a few examples of what you can do with Matomo and Clever Cloud.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Adding new Matomo users</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>All our managed services use Clever Cloud SSO, enabling you to access deployed addons from your platform credentials. Perhaps you'd like to add users to Matomo without giving them access to the platform.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Matomo lets you <a href="https://matomo.org/faq/general/user-roles-in-matomo/" target="_blank" rel="noopener">add users with different levels of permissions</a> to the application. You can invite them by email directly from the Matomo interface. Users invited by this method will not have access to Matomo's system settings or extensions, unlike Clever Cloud users.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Elevating permission levels</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you have added a user from the Matomo interface, but now wish to add them to your Clever Cloud organization with the same email address, access to Matomo will be denied for security reasons, since this user already exists in the database.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To avoid duplication, simply delete the Matomo user from your database.</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Launch your MySQL addon's PHPMyAdmin interface</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Click on your database name (not schema)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Search by keyword <code>user</code> and choose the table <code>matomo_user</code></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Delete the user you wish to add to the Clever Cloud organization</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:image {"id":8038,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2023/07/phpmyadmin-1.png" alt="PHPMyAdmin Structure tab showing matomo_user table" class="wp-image-8038"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Now you can <a href="https://stagingv6.cleverapps.io/doc/account/organizations/" target="_blank" rel="noopener">invite the user to your organization with his email address</a>, giving him administration rights on the instance.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Measure the audience of any application</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>On Clever Cloud, you can separate your collaborative environments by creating organizations to which you invite members. Organizations remain isolated, ensuring that no member has uninvited access to an organization's applications and addons.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Matomo makes it possible to track apps to which a simple script has been added to the head. So, even if an application is deployed within a different organization, Matomo offers a unified and complete view of its audience tracking as soon as the application contains this script.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":8070,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2023/08/capture-decran-2023-08-17-a-16-35-05.png" alt="Matomo tracking code from its interface" class="wp-image-8070"/></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Optimizing role separation</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You can set up a dedicated organization for the Matomo administrator of your company or association. From this organization, the administrator can monitor the audience of applications hosted in other organizations, even if these are inaccessible to him/her.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To implement this configuration, the administrator simply provides the appropriate script to be integrated into the head tag of each application. Once integrated, the tracking data will be visible in Matomo. This process ensures that developers have no access to Matomo, while restricting the Matomo administrator's access to applications.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">📢 New: Migrate Google Analytics data to Matomo</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As we mentioned, you can now use the extension to migrate your Google Analytics data to Matomo. It might be challenging to determine the right database sizing , due to Google Analytics' opacity regarding its metrics.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>With this in mind, we suggest you keep an eye on your database metrics and opt for a gradual increase in storage capacity. To facilitate this procedure, Matomo provides <a href="https://matomo.org/faq/general/running-the-google-analytics-import/" target="_blank" rel="noopener">a detailed guide to migration</a>.</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>Clever Cloud not only facilitates the deployment of on-demand applications and services in the form of add-ons. In addition, we include an integrated suite for all our customers, offering in-depth monitoring of application and database activity, as well as automatic and adaptive scaling capabilities.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Whether you've opted for Matomo or one of our other add-ons, we're always listening to our customers' needs, so we can continually improve the services we offer. We look forward to hearing from you!</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/08/banner-matomo-5.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="How matomo works on Clever Cloud" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5.png 2800w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-1536x592.png 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-2048x790.png 2048w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/08/banner-matomo-5-1368x528.png 1368w" sizes="auto, (max-width: 2800px) 100vw, 2800px" /></p><!-- wp:paragraph -->
<p>In <a href="https://stagingv6.cleverapps.io/blog/features/2022/05/16/how-and-why-to-install-matomo-to-replace-google-analytics/" target="_blank" rel="noopener">a previous post</a>, we explained why you should switch from Google Analytics to Matomo for your audience measurement. Some of our customers have decided to take this step, and Clever Cloud has helped them get to grips with the solution. Based on this experience, find out in this article how to maximize the use of our Matomo addon on Clever Cloud.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Selecting the optimal instance size</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As soon as the Matomo addon is created, Clever Cloud deploys three optimized instances (a PHP runtime, a MySQL addon and a Redis addon). Initially, they are sized to the minimum server requirements in order to evolve according to your needs, thus ensuring cost optimization. If you need to make adjustments (for example, if you start to experience errors or slowdowns when launching some processes), our integrated Grafana is your best ally for monitoring your metrics and adjusting your resources accordingly.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Easy access to your metrics</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Thanks to the intuitive dashboard for each application, you're provided with a clear view of it all. We've <a href="https://stagingv6.cleverapps.io/blog/features/2023/03/16/a-metric-tile-to-simplify-application-monitoring/" target="_blank" rel="noopener">recently integrated a metrics tile</a> into this dashboard, allowing you to track RAM and CPU consumption in real time from the console.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":8069,"sizeSlug":"medium","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-medium"><img src="https://cdn.clever-cloud.com/uploads/2023/08/capture-decran-2023-08-17-a-16-33-06.png" alt="Tile metrics from app Overview panel indicating CPU and RAM usage." class="wp-image-8069"/></figure>
<!-- /wp:image -->

<!-- wp:spacer {"height":"34px"} -->
<div style="height:34px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:paragraph -->
<p>For a more in-depth analysis, a simple click on the Grafana logo from the tile gives you access to all your application's metrics. </p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":8036,"width":493,"height":274,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large is-resized"><img src="https://cdn.clever-cloud.com/uploads/2023/07/capture-decran-2023-07-31-a-15-27-32.png" alt="Metrics dashboard on Grafana for Matomo PHP application" class="wp-image-8036" style="width:493px;height:274px" width="493" height="274"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>In addition, Matomo's PHP instance logs are always there to provide you with additional information. </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">All about auto-scalability</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Self-scalability on Clever Cloud is a major advantage, giving you peace of mind and flexible billing. With Matomo, this feature guarantees a smooth experience even in times of high demand. Keep in mind certain specifics, such as the occasional need for certain extensions, and you'll you make the most of this feature.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Perks from enabling auto-scalability on the PHP instance</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With auto-scalability, you can use Matomo smoothly and adaptively, even during peak periods! Benefit from powerful on-demand resources, while paying only for the consumption/second. Once you've completed your intensive tasks, your instance returns to an optimal size, guaranteeing efficiency and savings. So there's no need to reserve a large infrastructure to meet occasional needs.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">When to disable auto-scalability?</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Clever Cloud provides a service that can be adapted to your needs, with the option of limiting or completely disabling instance auto-scalability. In some cases, it may be advisable to deactivate it from time to time.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As Matomo is a managed service, some configuration options are unalterable to guarantee optimal operation and performance. As part of Matomo's continuous improvement, we have integrated the Google Analytics data import extension in response to common customer requests. This extension, generally used for a one-off migration from Google Analytics to Matomo, is deactivated by default.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you activate the extension and start importing data, and your application scales, your instance reboots and redeploys the application... with the default configurations. Restarting will therefore disable this extension and kill the import process at the same time. If you decide to use an extension that appears as disabled by default in our Matomo, we recommend the following procedure:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Disable auto-scalability for your Matomo PHP instance</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Increase the instance size until the process is complete</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Restart instance</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Once the instance has been redeployed, activate the extension in Matomo</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Now you're ready to use the extension, which will remain active until the next server restart. </p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>Matomo, with its MySQL addon, is designed to grow with you. While the database is created with sufficient capacity at start-up, Matomo will quickly exploit its potential. To avoid surprises, why not set up Grafana alerts to monitor memory levels?</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":8034,"width":575,"height":281,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large is-resized"><img src="https://cdn.clever-cloud.com/uploads/2023/07/grafana-mysql-1.png" alt="Database metrics on Grafana" class="wp-image-8034" style="width:575px;height:281px" width="575" height="281"/><figcaption class="wp-element-caption">Your database metrics are also available in Grafana, in the Addon panel.</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Creating alerts</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Among its many features, Grafana lets you create alerts on the metrics of your choice. You'll find <a href="https://stagingv6.cleverapps.io/blog/features/2021/12/03/slack-alerts-for-grafana/" target="_blank" rel="noopener">a tutorial here</a> to show you how to create your alerts from Grafana to Slack, which you can also apply to other contact points like Discord, Teams, etc.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We recommend that you leave around 20% disk space available, as the MySQL instance will need disk to migrate.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Migrating the database</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Although scalability has its peculiarities for databases, Clever Cloud provides a smooth and intuitive manual solution. When you receive the alert, a simple connection to the Console on your MySQL addon dashboard will enable you to launch our one-click migration tool. This operation can take from a few seconds to a few minutes, depending on the size of your database.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>💡 <strong>Tip:</strong> Include a direct link to the migration tab in your Grafana alert message. This will give you instant access to the migration tool, making the process even easier.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Leveraging Matomo and Clever Cloud</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Although a managed service is pre-configured, you have Matomo administrator status and can use it as such. Here are just a few examples of what you can do with Matomo and Clever Cloud.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Adding new Matomo users</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>All our managed services use Clever Cloud SSO, enabling you to access deployed addons from your platform credentials. Perhaps you'd like to add users to Matomo without giving them access to the platform.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Matomo lets you <a href="https://matomo.org/faq/general/user-roles-in-matomo/" target="_blank" rel="noopener">add users with different levels of permissions</a> to the application. You can invite them by email directly from the Matomo interface. Users invited by this method will not have access to Matomo's system settings or extensions, unlike Clever Cloud users.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Elevating permission levels</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you have added a user from the Matomo interface, but now wish to add them to your Clever Cloud organization with the same email address, access to Matomo will be denied for security reasons, since this user already exists in the database.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To avoid duplication, simply delete the Matomo user from your database.</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Launch your MySQL addon's PHPMyAdmin interface</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Click on your database name (not schema)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Search by keyword <code>user</code> and choose the table <code>matomo_user</code></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Delete the user you wish to add to the Clever Cloud organization</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:image {"id":8038,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2023/07/phpmyadmin-1.png" alt="PHPMyAdmin Structure tab showing matomo_user table" class="wp-image-8038"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Now you can <a href="https://stagingv6.cleverapps.io/doc/account/organizations/" target="_blank" rel="noopener">invite the user to your organization with his email address</a>, giving him administration rights on the instance.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">Measure the audience of any application</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>On Clever Cloud, you can separate your collaborative environments by creating organizations to which you invite members. Organizations remain isolated, ensuring that no member has uninvited access to an organization's applications and addons.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Matomo makes it possible to track apps to which a simple script has been added to the head. So, even if an application is deployed within a different organization, Matomo offers a unified and complete view of its audience tracking as soon as the application contains this script.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":8070,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cdn.clever-cloud.com/uploads/2023/08/capture-decran-2023-08-17-a-16-35-05.png" alt="Matomo tracking code from its interface" class="wp-image-8070"/></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Optimizing role separation</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You can set up a dedicated organization for the Matomo administrator of your company or association. From this organization, the administrator can monitor the audience of applications hosted in other organizations, even if these are inaccessible to him/her.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To implement this configuration, the administrator simply provides the appropriate script to be integrated into the head tag of each application. Once integrated, the tracking data will be visible in Matomo. This process ensures that developers have no access to Matomo, while restricting the Matomo administrator's access to applications.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">📢 New: Migrate Google Analytics data to Matomo</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As we mentioned, you can now use the extension to migrate your Google Analytics data to Matomo. It might be challenging to determine the right database sizing , due to Google Analytics' opacity regarding its metrics.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>With this in mind, we suggest you keep an eye on your database metrics and opt for a gradual increase in storage capacity. To facilitate this procedure, Matomo provides <a href="https://matomo.org/faq/general/running-the-google-analytics-import/" target="_blank" rel="noopener">a detailed guide to migration</a>.</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>Clever Cloud not only facilitates the deployment of on-demand applications and services in the form of add-ons. In addition, we include an integrated suite for all our customers, offering in-depth monitoring of application and database activity, as well as automatic and adaptive scaling capabilities.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Whether you've opted for Matomo or one of our other add-ons, we're always listening to our customers' needs, so we can continually improve the services we offer. We look forward to hearing from you!</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Deploy a Scala / Akka application with PostgreSQL integration</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2022/06/09/deploy-a-scala-akka-application-with-postgresql-integration/</link>
		
		<dc:creator><![CDATA[Geoffrey GUILBON]]></dc:creator>
		<pubDate>Thu, 09 Jun 2022 12:44:32 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[Scala]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=6509</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="akka" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:media-text {"mediaId":6749,"mediaType":"image","mediaWidth":30} -->
<div class="wp-block-media-text alignwide is-stacked-on-mobile" style="grid-template-columns:30% auto"><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2022/06/akkatoolkitlogo-2-318x131.png" alt="" class="wp-image-6749 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p>When I started working at Clever Cloud, I spent some time messing around with the platform and its tooling. This blog post will present you how I managed to:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>create a simple Scala/Akka HTTP template application with PostgreSQL persistence</li><li>link the application to a managed PostgreSQL</li><li>deploy it</li><li>try it!</li></ul>
<!-- /wp:list --></div></div>
<!-- /wp:media-text -->

<!-- wp:heading -->
<h2>Create a Scala/Akka HTTP template 🔨</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3>Get the sources</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><a href="https://github.com/CleverCloud/scala-akka-http-postgres-example">Clone</a> the project generated from Akka Github <a href="https://github.com/akka/akka-http-quickstart-scala.g8" target="_blank" rel="noreferrer noopener">quick start template</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This service provides the ability to manage a simple in-memory user registry exposing 4 routes:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>List all users</li><li>Get a specific user</li><li>Create a user</li><li>Delete a user</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>A thorough description of available the cURL commands may be found <a href="https://developer.lightbend.com/guides/akka-http-quickstart-scala/#cURL-commands" target="_blank" rel="noreferrer noopener">here</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Add extra features</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>A few functionalities have been added on top of the original example:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>store the registry into a PostgreSQL database (instead of in memory)</li><li>read database parameters from <a href="https://stagingv6.cleverapps.io/blog/fonctionnalites/2022/03/22/improving-our-environment-variables-editor/">environment variables</a></li><li>add a hardcoded basic authentication</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>All parameters may be specified in the <a href="https://github.com/CleverCloud/scala-akka-http-postgres-example/blob/master/src/main/resources/application.conf">application.conf</a> file:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>basic auth</li><li>database parameters</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Parameters are fetched from environment variables, or the specified default value if none is found</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">app {
  basic-auth {
    user = "foo"
    user = ${?BASIC_AUTH_USER}
    password = "bar"
    password = ${?BASIC_AUTH_PASSWORD}
  }
  routes {
    # If ask takes more time than this to complete the request is failed
    ask-timeout = 5s
  }

  db {
    host = "localhost"
    host = ${?POSTGRESQL_ADDON_HOST}
    port = "5432"
    port = ${?POSTGRESQL_ADDON_PORT}
    database = "postgres"
    database = ${?POSTGRESQL_ADDON_DB}
    user = "login"
    user = ${?POSTGRESQL_ADDON_USER}
    pass = "pass"
    pass = ${?POSTGRESQL_ADDON_PASSWORD}
  }
}</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2>Run the application using Clever Cloud CLI 🚀</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3>Create a Clever Cloud application</h3>
<!-- /wp:heading -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever create --type sbt myakka --region par --org testorg</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This command creates a new application</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>of type sbt for Scala</li><li>named <em>myakka</em></li><li>in <em>Paris</em> region</li><li>inside my test organisation <em>testorg</em></li></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3>Enable a dedicated build instance for faster build (optional pro tip)</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>By default a newly created application will run an XS instance which are quite small for building Scala applications fast. One way to build faster is to use a dedicated build Instance: In the Clever Cloud console, got to your application -&gt; options, and check the box <code>[] Enable dedicated build instance</code> This way you can keep your XS instance for running the application, but you can choose an XL for the build time. Or with the command line tool:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever scale -a myakka --build-flavor XL</code></pre>
<!-- /wp:html -->

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

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever addon -l myakka create postgresql-addon myakkadb</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This command orders a PostgreSQL add-on instance and link it to <code><em>myakka</em></code>, injecting the right environment variables into the application instance to contact the database.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Database creation and migration is performed using <a href="https://flywaydb.org/">flywaydb</a> tool. Those script may be found in the <a href="https://github.com/CleverCloud/scala-akka-http-postgres-example/tree/master/src/main/resources/db/migration">migration/db</a> directory of the application resources.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Migration will be automatically called once you specify the proper build hook in the environment variables</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><kbd>CC_POST_BUILD_HOOK</kbd> with value <kbd><kbd>sbt flywayMigrate</kbd></kbd></p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever env -a myakka set <kbd>CC_POST_BUILD_HOOK</kbd> "sbt flywayMigrate"</code></pre>
<!-- /wp:html -->

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

<!-- wp:paragraph -->
<p>Basic authentication login and password can be specified as environment variables using the <kbd>clever env</kbd> command. If none is found, basic authentication will default to <em>application.conf</em> file values</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever env -a myakka set BASIC_AUTH_USER &lt;YOUR_AUTH_USER&gt;
clever env -a myakka set BASIC_AUTH_PASSWORD &lt;YOUR_AUTH_PASSWORD&gt;</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Link your local repo with your Clever Cloud application instance</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Retrieve your application id with</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>Then link the local repository to the application (creating a <em>.clever.json</em> file)</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever link app_&lt;UUID&gt;</code></pre>
<!-- /wp:html -->

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

<!-- wp:paragraph -->
<p>You are now ready to deploy and run your code, just run</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>You are now able to follow the deployment process until it completes successfully</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Your application is running now!</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>It's time to experiment with it using <kbd>curl</kbd> or your favorite GUI</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4>Add a user</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Adapt this command in order to insert a new user into the registry:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">curl --request POST \
  --url https://app-&lt;UUID&gt;.cleverapps.io/users \
  --header 'Content-type: application/json' \
  -u '&lt;YOUR_AUTH_USER&gt;:&lt;YOUR_AUTH_PASSWORD&gt;' \
  --data '{
  "name": "Serge",
  "age": 42,
  "countryOfResidence": "Greenland"
}'

{
	"description": "User Serge created."
}</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":4} -->
<h4>Get all users</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Check that the user has been properly created, by getting the list of users:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">curl --request GET \
  --url https://app-&lt;UUID&gt;.cleverapps.io/users \
  -u '&lt;YOUR_AUTH_USER&gt;:&lt;YOUR_AUTH_PASSWORD&gt;'

{"users":[{"age":42,"countryOfResidence":"Greenland","name":"Serge"}]}</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>It works, Success! 🎉</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></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/akka.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="akka" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/06/akka-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:media-text {"mediaId":6749,"mediaType":"image","mediaWidth":30} -->
<div class="wp-block-media-text alignwide is-stacked-on-mobile" style="grid-template-columns:30% auto"><figure class="wp-block-media-text__media"><img src="https://cdn.clever-cloud.com/uploads/2022/06/akkatoolkitlogo-2-318x131.png" alt="" class="wp-image-6749 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p>When I started working at Clever Cloud, I spent some time messing around with the platform and its tooling. This blog post will present you how I managed to:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>create a simple Scala/Akka HTTP template application with PostgreSQL persistence</li><li>link the application to a managed PostgreSQL</li><li>deploy it</li><li>try it!</li></ul>
<!-- /wp:list --></div></div>
<!-- /wp:media-text -->

<!-- wp:heading -->
<h2>Create a Scala/Akka HTTP template 🔨</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3>Get the sources</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><a href="https://github.com/CleverCloud/scala-akka-http-postgres-example">Clone</a> the project generated from Akka Github <a href="https://github.com/akka/akka-http-quickstart-scala.g8" target="_blank" rel="noreferrer noopener">quick start template</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This service provides the ability to manage a simple in-memory user registry exposing 4 routes:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>List all users</li><li>Get a specific user</li><li>Create a user</li><li>Delete a user</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>A thorough description of available the cURL commands may be found <a href="https://developer.lightbend.com/guides/akka-http-quickstart-scala/#cURL-commands" target="_blank" rel="noreferrer noopener">here</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Add extra features</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>A few functionalities have been added on top of the original example:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>store the registry into a PostgreSQL database (instead of in memory)</li><li>read database parameters from <a href="https://stagingv6.cleverapps.io/blog/fonctionnalites/2022/03/22/improving-our-environment-variables-editor/">environment variables</a></li><li>add a hardcoded basic authentication</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>All parameters may be specified in the <a href="https://github.com/CleverCloud/scala-akka-http-postgres-example/blob/master/src/main/resources/application.conf">application.conf</a> file:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>basic auth</li><li>database parameters</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Parameters are fetched from environment variables, or the specified default value if none is found</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">app {
  basic-auth {
    user = "foo"
    user = ${?BASIC_AUTH_USER}
    password = "bar"
    password = ${?BASIC_AUTH_PASSWORD}
  }
  routes {
    # If ask takes more time than this to complete the request is failed
    ask-timeout = 5s
  }

  db {
    host = "localhost"
    host = ${?POSTGRESQL_ADDON_HOST}
    port = "5432"
    port = ${?POSTGRESQL_ADDON_PORT}
    database = "postgres"
    database = ${?POSTGRESQL_ADDON_DB}
    user = "login"
    user = ${?POSTGRESQL_ADDON_USER}
    pass = "pass"
    pass = ${?POSTGRESQL_ADDON_PASSWORD}
  }
}</code></pre>
<!-- /wp:html -->

<!-- wp:heading -->
<h2>Run the application using Clever Cloud CLI 🚀</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3>Create a Clever Cloud application</h3>
<!-- /wp:heading -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever create --type sbt myakka --region par --org testorg</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This command creates a new application</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>of type sbt for Scala</li><li>named <em>myakka</em></li><li>in <em>Paris</em> region</li><li>inside my test organisation <em>testorg</em></li></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3>Enable a dedicated build instance for faster build (optional pro tip)</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>By default a newly created application will run an XS instance which are quite small for building Scala applications fast. One way to build faster is to use a dedicated build Instance: In the Clever Cloud console, got to your application -&gt; options, and check the box <code>[] Enable dedicated build instance</code> This way you can keep your XS instance for running the application, but you can choose an XL for the build time. Or with the command line tool:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever scale -a myakka --build-flavor XL</code></pre>
<!-- /wp:html -->

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

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever addon -l myakka create postgresql-addon myakkadb</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>This command orders a PostgreSQL add-on instance and link it to <code><em>myakka</em></code>, injecting the right environment variables into the application instance to contact the database.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Database creation and migration is performed using <a href="https://flywaydb.org/">flywaydb</a> tool. Those script may be found in the <a href="https://github.com/CleverCloud/scala-akka-http-postgres-example/tree/master/src/main/resources/db/migration">migration/db</a> directory of the application resources.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Migration will be automatically called once you specify the proper build hook in the environment variables</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><kbd>CC_POST_BUILD_HOOK</kbd> with value <kbd><kbd>sbt flywayMigrate</kbd></kbd></p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever env -a myakka set <kbd>CC_POST_BUILD_HOOK</kbd> "sbt flywayMigrate"</code></pre>
<!-- /wp:html -->

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

<!-- wp:paragraph -->
<p>Basic authentication login and password can be specified as environment variables using the <kbd>clever env</kbd> command. If none is found, basic authentication will default to <em>application.conf</em> file values</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever env -a myakka set BASIC_AUTH_USER &lt;YOUR_AUTH_USER&gt;
clever env -a myakka set BASIC_AUTH_PASSWORD &lt;YOUR_AUTH_PASSWORD&gt;</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Link your local repo with your Clever Cloud application instance</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Retrieve your application id with</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>Then link the local repository to the application (creating a <em>.clever.json</em> file)</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">clever link app_&lt;UUID&gt;</code></pre>
<!-- /wp:html -->

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

<!-- wp:paragraph -->
<p>You are now ready to deploy and run your code, just run</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>You are now able to follow the deployment process until it completes successfully</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Your application is running now!</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>It's time to experiment with it using <kbd>curl</kbd> or your favorite GUI</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4>Add a user</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Adapt this command in order to insert a new user into the registry:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">curl --request POST \
  --url https://app-&lt;UUID&gt;.cleverapps.io/users \
  --header 'Content-type: application/json' \
  -u '&lt;YOUR_AUTH_USER&gt;:&lt;YOUR_AUTH_PASSWORD&gt;' \
  --data '{
  "name": "Serge",
  "age": 42,
  "countryOfResidence": "Greenland"
}'

{
	"description": "User Serge created."
}</code></pre>
<!-- /wp:html -->

<!-- wp:heading {"level":4} -->
<h4>Get all users</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Check that the user has been properly created, by getting the list of users:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-bash">curl --request GET \
  --url https://app-&lt;UUID&gt;.cleverapps.io/users \
  -u '&lt;YOUR_AUTH_USER&gt;:&lt;YOUR_AUTH_PASSWORD&gt;'

{"users":[{"age":42,"countryOfResidence":"Greenland","name":"Serge"}]}</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>It works, Success! 🎉</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Removal of TLS 1.0 and 1.1 from our load balancers on June 30</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2022/05/03/removal-of-tls-1-0-and-1-1-from-our-load-balancers-on-june-30/</link>
		
		<dc:creator><![CDATA[Florentin Dubois]]></dc:creator>
		<pubDate>Tue, 03 May 2022 08:23:46 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=6280</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="tls" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph -->
<p>When you access a website or an online application, you most often do so in a "secure" way. This is for example the well-known green padlock that symbolizes HTTPS connections in your browser, which has become a standard these years thanks to initiatives like <a href="https://stagingv6.cleverapps.io/blog/features/2019/01/15/automatic-lets-encrypt-certificates/" target="_blank" rel="noreferrer noopener">Let's Encrypt</a>.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This means that the data transferred to the server is encrypted, and that even if they are intercepted, they cannot be read by a third party. This protection has been provided by the TLS (<a href="https://en.wikipedia.org/wiki/Transport_Layer_Security" target="_blank" rel="noreferrer noopener">Transport Layer Security</a>) protocol for almost 20 years, whether it’s a personal site, an online shop or an access to your bank's services.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Over time, this critical technical brick on the Internet has evolved to strengthen the level of security it offers. In August 2018, <a href="https://www.ietf.org/blog/tls13/" target="_blank" rel="noreferrer noopener">its version 1.3</a> (the latest) was released. Meanwhile, versions 1.0 and 1.1 were considered to no longer offer a sufficient level of protection. They <a href="https://datatracker.ietf.org/doc/html/rfc8996" target="_blank" rel="noreferrer noopener">have been deprecated</a> by the IETF (Internet Engineering Task Force) since March 2021 and have therefore been gradually removed from recent browsers such as Firefox, Chrome and its derivatives or Safari.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6281,"sizeSlug":"full","linkDestination":"none"} -->
<div class="wp-block-image"><figure class="aligncenter size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/05/sans-titre.webp" alt="Clever Cloud Sōzu TLS Version" class="wp-image-6281"/><figcaption>More than 90% of our traffic is TLS 1.3 </figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we have seen our customers adopt TLS 1.2 and 1.3 gradually. On our load balancers, based on our in-house and open source reverse proxy <a href="https://www.sozu.io/" target="_blank" rel="noreferrer noopener">Sōzu</a>, the latest version accounts for over 90% of the requests processed each day. TLS 1.2 for just under 9%. TLS 1.0 and 1.1 for only a few tens of thousands of requests per day, less than 0.1% of our traffic.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While we have maintained these versions for compatibility reasons, this will no longer be the case as of June 30. We will of course inform the customers affected by this choice, and encourage them to switch to more recent versions, which will have advantages for them in terms of security, performance and SEO. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Several reminders will be sent between now and the final shutdown of TLS 1.0 and 1.1. If you have any questions on this subject, please contact our support team through <a href="https://console.clever-cloud.com/" target="_blank" rel="noreferrer noopener">the Console</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/05/banniere-tls.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="tls" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph -->
<p>When you access a website or an online application, you most often do so in a "secure" way. This is for example the well-known green padlock that symbolizes HTTPS connections in your browser, which has become a standard these years thanks to initiatives like <a href="https://stagingv6.cleverapps.io/blog/features/2019/01/15/automatic-lets-encrypt-certificates/" target="_blank" rel="noreferrer noopener">Let's Encrypt</a>.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This means that the data transferred to the server is encrypted, and that even if they are intercepted, they cannot be read by a third party. This protection has been provided by the TLS (<a href="https://en.wikipedia.org/wiki/Transport_Layer_Security" target="_blank" rel="noreferrer noopener">Transport Layer Security</a>) protocol for almost 20 years, whether it’s a personal site, an online shop or an access to your bank's services.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Over time, this critical technical brick on the Internet has evolved to strengthen the level of security it offers. In August 2018, <a href="https://www.ietf.org/blog/tls13/" target="_blank" rel="noreferrer noopener">its version 1.3</a> (the latest) was released. Meanwhile, versions 1.0 and 1.1 were considered to no longer offer a sufficient level of protection. They <a href="https://datatracker.ietf.org/doc/html/rfc8996" target="_blank" rel="noreferrer noopener">have been deprecated</a> by the IETF (Internet Engineering Task Force) since March 2021 and have therefore been gradually removed from recent browsers such as Firefox, Chrome and its derivatives or Safari.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6281,"sizeSlug":"full","linkDestination":"none"} -->
<div class="wp-block-image"><figure class="aligncenter size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/05/sans-titre.webp" alt="Clever Cloud Sōzu TLS Version" class="wp-image-6281"/><figcaption>More than 90% of our traffic is TLS 1.3 </figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we have seen our customers adopt TLS 1.2 and 1.3 gradually. On our load balancers, based on our in-house and open source reverse proxy <a href="https://www.sozu.io/" target="_blank" rel="noreferrer noopener">Sōzu</a>, the latest version accounts for over 90% of the requests processed each day. TLS 1.2 for just under 9%. TLS 1.0 and 1.1 for only a few tens of thousands of requests per day, less than 0.1% of our traffic.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While we have maintained these versions for compatibility reasons, this will no longer be the case as of June 30. We will of course inform the customers affected by this choice, and encourage them to switch to more recent versions, which will have advantages for them in terms of security, performance and SEO. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Several reminders will be sent between now and the final shutdown of TLS 1.0 and 1.1. If you have any questions on this subject, please contact our support team through <a href="https://console.clever-cloud.com/" target="_blank" rel="noreferrer noopener">the Console</a>.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Introducing the Clever Cloud Rust SDK</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2022/04/28/introducing-the-clever-cloud-rust-sdk/</link>
		
		<dc:creator><![CDATA[Florentin Dubois]]></dc:creator>
		<pubDate>Thu, 28 Apr 2022 08:44:32 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=6125</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="sdk Rust" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph {"dropCap":true} -->
<p class="has-drop-cap">Hello 🖖, fellow humans and robots! Our engineering team is proud to announce a brand new Rust software development kit (sdk), also known as "<a href="https://crates.io/crates/clevercloud-sdk">clevercloud-sdk</a>" on <a href="https://crates.io">crates.io</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Some of you may have noticed that there are new repositories on our GitHub organization. Those repositories are named "<a href="https://github.com/CleverCloud/clevercloud-sdk-rust">clevercloud-sdk-rust</a>" and "<a href="https://github.com/CleverCloud/oauth10a-rust">oauth10a-rust</a>".  Their goal is to provide a convenient way to interact with the Clever Cloud's API with interesting features that we will highlights in this blog post.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Built to be asynchronous</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The software development kit and the oauth 1.0a client are mainly built on top of two crates that are well-known in the community. Those are <a href="https://github.com/hyperium/hyper">hyper</a>, and the asynchronous runtime that power it, named <a href="https://tokio.rs/">tokio</a>. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The main idea behind using the hyper crate and by extension the tokio asynchronous runtime is to leverage the current ecosystem that gravitates around these crates and efforts to integrate a new kernel API called <a href="https://kernel.dk/io_uring.pdf">io_uring</a>. Once this new kernel API will be integrated into the tokio runtime, this will lead to significant performance, enhancement according to the tokio's <a href="https://tokio.rs/blog/2021-07-tokio-uring">announcement blog post</a>. We can’t wait for this enhancement that will give us a way to iterate faster! 🚀</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Observability in mind</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>These crates are developed with the idea to be fully observable. It has been achieved through others well-known crates as <a href="https://crates.io/crates/log">log</a> and <a href="https://crates.io/crates/tracing">tracing</a>, or using community initiatives like the <a href="https://crates.io/crates/prometheus">prometheus</a> crate. Integrations of those crates are taking part of the compiler <a href="https://doc.rust-lang.org/cargo/reference/features.html">feature flags system</a> provided by the <a href="https://doc.rust-lang.org/book/ch01-03-hello-cargo.html">cargo project</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Standard logging facade</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>First, you need to know that the standard logging facade is enabled by default. It will output useful information of internals behaviors of above crates, using the standard logger if it is defined. It will help you to understand how calls to the Clever Cloud's API are achieved with some debug information, if you need so.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>if you want to disable it, you have to disable the default sets of enabled features. This could be achieved using the following syntax for the <code>clevercloud-sdk</code> crate in your <code>Cargo.toml</code> file.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-toml">clevercloud-sdk = { version = "^0.10.0", default-features = false }</code></pre>
<!-- /wp:html -->

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

<!-- wp:paragraph {"className":"laguage-toml"} -->
<p class="laguage-toml">At Clever Cloud, we think that metrics are important. They help to understand systems by correlating things that doesn't seem to be related in the first place. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"className":"laguage-toml"} -->
<p class="laguage-toml">This is why we have launched <a href="https://stagingv6.cleverapps.io/blog/features/2018/01/16/realtime-metrics/">Clever Cloud Metrics</a> rather soon, some years ago. We recently added more features to it by providing more ways to query Clever Cloud Metrics, thanks to <a href="https://github.com/ovh/erlenmeyer">Erlenmeyer</a> which is a time series query language proxy. You can find more details of how you could use it through this <a href="https://stagingv6.cleverapps.io/blog/engineering/2021/10/12/enabling-promql-queries-with-erlenmeyer/">blog post</a>. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"className":"laguage-toml"} -->
<p class="laguage-toml">Lastly, we have announced the <a href="https://stagingv6.cleverapps.io/blog/features/2021/10/19/announcing-time-series-on-clever-cloud-with-tardis/">Tardis</a> product which empowers you to send us your metrics and we take care of the rest as we always do and more recently we have integrated pre-built Grafana's dashboards to help you to visualize your applications and add-ons state, you can learn more about it <a href="https://stagingv6.cleverapps.io/blog/features/2021/10/28/a-grafana-to-plot-applications-metrics/">here</a>. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Coming back to our crates. You can enable metrics collection using the prometheus crate, by enabling the <em>metrics</em> flags at crate-level in your <code>Cargo.toml</code> file. It could be achieved using the following syntax.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-toml">clevercloud-sdk = { version = "^0.10.0", features = ["metrics"] }</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once this feature is enabled, there isn't much more to do. You will need to expose metrics through an HTTP server or send them using the prometheus push gateway. This part is described in the prometheus crate's <a href="https://docs.rs/prometheus">documentation</a> or in its <a href="https://github.com/tikv/rust-prometheus/tree/master/examples">examples</a>.</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>Last but not least, a pillar of observability is tracing. According to the OpenTelemetry <a href="https://opentelemetry.io/">initiative</a> and <a href="https://opentelemetry.io/docs/concepts/data-sources/#traces">documentation</a>, tracing is explained as such:</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Traces track the progression of a single request, called a <strong>trace</strong>, as it is handled by services that make up an application. The request may be initiated by a user or an application. Distributed tracing is a form of tracing that traverses process, network and security boundaries. Each unit of work in a trace is called a <strong>span</strong>; a trace is a tree of spans. Spans are objects that represent the work being done by individual services or components involved in a request as it flows through a system. A span contains a <em>span context</em>, which is a set of globally unique identifiers that represent the unique request that each span is a part of. A span provides Request, Error and Duration (RED) metrics that can be used to debug availability as well as performance issues...</p><cite>OpenTelemetry documentation</cite></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>If you want to take a closer look to tracing, even if it is not in Rust, you can take a look at the <a href="https://github.com/open-telemetry/">OpenTelemetry GitHub organization</a>. There are plenty of libraries, SDKs and documentation to help you to build your tracing solution or integrate with an already existing one. Besides, if you are using the rust language and maybe the tokio runtime, you can have a look at those blog posts which explain <a href="https://tokio.rs/blog/2019-08-tracing">how tracing works</a> in the above asynchronous runtime and how to visualize them using the <a href="https://tokio.rs/blog/2021-09-console-dev-diary-1">console</a> or using the <a href="https://github.com/tokio-rs/tracing/tree/master/tracing-opentelemetry">OpenTelemetry connector</a> which allow to send traces to more sinks, the list is available on the rust OpenTelemetry GitHub <a href="https://github.com/open-telemetry/opentelemetry-rust">repository</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>So how do we concretely enable the tracing feature using the clevercloud-sdk ? As mentioned above all features are driven using a feature flag, so to get tracing capabilities, you need to enable the <em>trace</em> flag.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-toml">clevercloud-sdk = { version = "^0.10.0", features = ["trace"] }</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once the feature flag has been enabled, you will need to collect and send traces using the above connector and sinks. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>How does it look?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Let us look at a concrete example to illustrate what the clevercloud-sdk looks like. But before going through the usage of the clevercloud-sdk, I will introduce you to the dependencies and requirements you will need. The first thing you need to achieve is to declare crates in the <code>Cargo.toml</code> file. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-toml">[dependencies]
tokio = { version = "^1.17.0", features = ["full"] }
clevercloud-sdk = { version = "^0.10.0", features = ["metrics", "tokio", "trace", "jsonschemas"] }</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>We are now able to write a proper piece of software using the clevercloud-sdk. Here is an example of how to use the SDK:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-rust">...
use clevercloud_sdk::{
    oauth10a::{
        proxy::{self, ProxyConnectorBuilder},
        Credentials,
    },
    v2::myself,
    Client,
};
...

// See the full code at:
// - https://github.com/CleverCloud/clevercloud-sdk-rust/blob/main/examples/cleverctl
// - https://github.com/CleverCloud/clevercloud-sdk-rust/blob/main/examples/cleverctl/src/cmd/myself.rs
pub async fn get(config: Arc&lt;Configuration&gt;, output: &amp;Output) -&gt; Result&lt;(), Error&gt; {
    let credentials: Credentials = config.credentials.to_owned().into();
    let connector = ProxyConnectorBuilder::try_from_env().map_err(Error::ProxyConnector)?;
    let client = Client::builder()
        .with_credentials(credentials)
        .build(connector);

    let user = myself::get(&amp;client).await.map_err(Error::Get)?;

    println!(
        "{}",
        output
            .format(&amp;user)
            .map_err(|err| Error::FormatOutput(Box::new(err)))?
    );

    Ok(())
}</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Another example of the sdk which interact with add-ons:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-rust">...
use clevercloud_sdk::{
    oauth10a::{
        proxy::{self, ProxyConnectorBuilder},
        Credentials,
    },
    v2::addon,
    Client,
};
...

// See the full code at:
// - https://github.com/CleverCloud/clevercloud-sdk-rust/blob/main/examples/cleverctl
// - https://github.com/CleverCloud/clevercloud-sdk-rust/blob/main/examples/cleverctl/src/cmd/addon/mod.rs 
pub async fn list(
    config: Arc&lt;Configuration&gt;,
    output: &amp;Output,
    organisation_id: &amp;str,
) -&gt; Result&lt;(), Error&gt; {
    let credentials: Credentials = config.credentials.to_owned().into();
    let connector = ProxyConnectorBuilder::try_from_env().map_err(Error::ProxyConnector)?;
    let client = Client::builder()
        .with_credentials(credentials)
        .build(connector);

    let addons = addon::list(&amp;client, organisation_id)
        .await
        .map_err(|err| Error::List(organisation_id.to_owned(), err))?;

    println!(
        "{}",
        output
            .format(&amp;addons)
            .map_err(|err| Error::FormatOutput(Box::new(err)))?
    );
    Ok(())
}</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You can find the entire source code of the command line interface example in the clevercloud-sdk project into the examples repository or you can follow this <a href="https://github.com/CleverCloud/clevercloud-sdk-rust/blob/main/examples/cli">link</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>What's next?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Let's have a look at the incoming features that are to be integrated into these crates.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Biscuit and oauth2 bearer token</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we are working on a new authentication and authorization token called Biscuit. More details about it in the <a href="https://stagingv6.cleverapps.io/blog/engineering/2021/04/12/introduction-to-biscuit/">introduction blog post</a>. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This new authentication and authorization token will work with the OAuth 2.0 standard. One job of the SDK and the client under the hood is to ease the transition from OAuth 1.0a to OAuth 2.0 using Biscuit. </p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>The Software Development Kit will grow to support the entire API. The next feature is the integration of the event bus in order to subscribe to events that happen on Clever Cloud's platform. You will be able to get notifications about a deployment of an application and so on... </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Besides, those crates are used to build another software that you have discovered in another <a href="https://stagingv6.cleverapps.io/blog/features/2022/03/16/clever-operator/">blog post</a>. It introduce a <a href="https://kubernetes.io/">Kubernetes</a> operator that you may use on <a href="https://www.redhat.com/en/technologies/cloud-computing/openshift">OpenShift</a>, that exposes Clever Cloud's add-ons as <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/">Custom Resources</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/04/banniere-sdk-rust.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="sdk Rust" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/04/banniere-sdk-rust-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph {"dropCap":true} -->
<p class="has-drop-cap">Hello 🖖, fellow humans and robots! Our engineering team is proud to announce a brand new Rust software development kit (sdk), also known as "<a href="https://crates.io/crates/clevercloud-sdk">clevercloud-sdk</a>" on <a href="https://crates.io">crates.io</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Some of you may have noticed that there are new repositories on our GitHub organization. Those repositories are named "<a href="https://github.com/CleverCloud/clevercloud-sdk-rust">clevercloud-sdk-rust</a>" and "<a href="https://github.com/CleverCloud/oauth10a-rust">oauth10a-rust</a>".  Their goal is to provide a convenient way to interact with the Clever Cloud's API with interesting features that we will highlights in this blog post.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Built to be asynchronous</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The software development kit and the oauth 1.0a client are mainly built on top of two crates that are well-known in the community. Those are <a href="https://github.com/hyperium/hyper">hyper</a>, and the asynchronous runtime that power it, named <a href="https://tokio.rs/">tokio</a>. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The main idea behind using the hyper crate and by extension the tokio asynchronous runtime is to leverage the current ecosystem that gravitates around these crates and efforts to integrate a new kernel API called <a href="https://kernel.dk/io_uring.pdf">io_uring</a>. Once this new kernel API will be integrated into the tokio runtime, this will lead to significant performance, enhancement according to the tokio's <a href="https://tokio.rs/blog/2021-07-tokio-uring">announcement blog post</a>. We can’t wait for this enhancement that will give us a way to iterate faster! 🚀</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Observability in mind</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>These crates are developed with the idea to be fully observable. It has been achieved through others well-known crates as <a href="https://crates.io/crates/log">log</a> and <a href="https://crates.io/crates/tracing">tracing</a>, or using community initiatives like the <a href="https://crates.io/crates/prometheus">prometheus</a> crate. Integrations of those crates are taking part of the compiler <a href="https://doc.rust-lang.org/cargo/reference/features.html">feature flags system</a> provided by the <a href="https://doc.rust-lang.org/book/ch01-03-hello-cargo.html">cargo project</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Standard logging facade</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>First, you need to know that the standard logging facade is enabled by default. It will output useful information of internals behaviors of above crates, using the standard logger if it is defined. It will help you to understand how calls to the Clever Cloud's API are achieved with some debug information, if you need so.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>if you want to disable it, you have to disable the default sets of enabled features. This could be achieved using the following syntax for the <code>clevercloud-sdk</code> crate in your <code>Cargo.toml</code> file.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-toml">clevercloud-sdk = { version = "^0.10.0", default-features = false }</code></pre>
<!-- /wp:html -->

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

<!-- wp:paragraph {"className":"laguage-toml"} -->
<p class="laguage-toml">At Clever Cloud, we think that metrics are important. They help to understand systems by correlating things that doesn't seem to be related in the first place. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"className":"laguage-toml"} -->
<p class="laguage-toml">This is why we have launched <a href="https://stagingv6.cleverapps.io/blog/features/2018/01/16/realtime-metrics/">Clever Cloud Metrics</a> rather soon, some years ago. We recently added more features to it by providing more ways to query Clever Cloud Metrics, thanks to <a href="https://github.com/ovh/erlenmeyer">Erlenmeyer</a> which is a time series query language proxy. You can find more details of how you could use it through this <a href="https://stagingv6.cleverapps.io/blog/engineering/2021/10/12/enabling-promql-queries-with-erlenmeyer/">blog post</a>. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"className":"laguage-toml"} -->
<p class="laguage-toml">Lastly, we have announced the <a href="https://stagingv6.cleverapps.io/blog/features/2021/10/19/announcing-time-series-on-clever-cloud-with-tardis/">Tardis</a> product which empowers you to send us your metrics and we take care of the rest as we always do and more recently we have integrated pre-built Grafana's dashboards to help you to visualize your applications and add-ons state, you can learn more about it <a href="https://stagingv6.cleverapps.io/blog/features/2021/10/28/a-grafana-to-plot-applications-metrics/">here</a>. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Coming back to our crates. You can enable metrics collection using the prometheus crate, by enabling the <em>metrics</em> flags at crate-level in your <code>Cargo.toml</code> file. It could be achieved using the following syntax.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-toml">clevercloud-sdk = { version = "^0.10.0", features = ["metrics"] }</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once this feature is enabled, there isn't much more to do. You will need to expose metrics through an HTTP server or send them using the prometheus push gateway. This part is described in the prometheus crate's <a href="https://docs.rs/prometheus">documentation</a> or in its <a href="https://github.com/tikv/rust-prometheus/tree/master/examples">examples</a>.</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>Last but not least, a pillar of observability is tracing. According to the OpenTelemetry <a href="https://opentelemetry.io/">initiative</a> and <a href="https://opentelemetry.io/docs/concepts/data-sources/#traces">documentation</a>, tracing is explained as such:</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Traces track the progression of a single request, called a <strong>trace</strong>, as it is handled by services that make up an application. The request may be initiated by a user or an application. Distributed tracing is a form of tracing that traverses process, network and security boundaries. Each unit of work in a trace is called a <strong>span</strong>; a trace is a tree of spans. Spans are objects that represent the work being done by individual services or components involved in a request as it flows through a system. A span contains a <em>span context</em>, which is a set of globally unique identifiers that represent the unique request that each span is a part of. A span provides Request, Error and Duration (RED) metrics that can be used to debug availability as well as performance issues...</p><cite>OpenTelemetry documentation</cite></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>If you want to take a closer look to tracing, even if it is not in Rust, you can take a look at the <a href="https://github.com/open-telemetry/">OpenTelemetry GitHub organization</a>. There are plenty of libraries, SDKs and documentation to help you to build your tracing solution or integrate with an already existing one. Besides, if you are using the rust language and maybe the tokio runtime, you can have a look at those blog posts which explain <a href="https://tokio.rs/blog/2019-08-tracing">how tracing works</a> in the above asynchronous runtime and how to visualize them using the <a href="https://tokio.rs/blog/2021-09-console-dev-diary-1">console</a> or using the <a href="https://github.com/tokio-rs/tracing/tree/master/tracing-opentelemetry">OpenTelemetry connector</a> which allow to send traces to more sinks, the list is available on the rust OpenTelemetry GitHub <a href="https://github.com/open-telemetry/opentelemetry-rust">repository</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>So how do we concretely enable the tracing feature using the clevercloud-sdk ? As mentioned above all features are driven using a feature flag, so to get tracing capabilities, you need to enable the <em>trace</em> flag.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-toml">clevercloud-sdk = { version = "^0.10.0", features = ["trace"] }</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Once the feature flag has been enabled, you will need to collect and send traces using the above connector and sinks. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>How does it look?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Let us look at a concrete example to illustrate what the clevercloud-sdk looks like. But before going through the usage of the clevercloud-sdk, I will introduce you to the dependencies and requirements you will need. The first thing you need to achieve is to declare crates in the <code>Cargo.toml</code> file. </p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-toml">[dependencies]
tokio = { version = "^1.17.0", features = ["full"] }
clevercloud-sdk = { version = "^0.10.0", features = ["metrics", "tokio", "trace", "jsonschemas"] }</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>We are now able to write a proper piece of software using the clevercloud-sdk. Here is an example of how to use the SDK:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-rust">...
use clevercloud_sdk::{
    oauth10a::{
        proxy::{self, ProxyConnectorBuilder},
        Credentials,
    },
    v2::myself,
    Client,
};
...

// See the full code at:
// - https://github.com/CleverCloud/clevercloud-sdk-rust/blob/main/examples/cleverctl
// - https://github.com/CleverCloud/clevercloud-sdk-rust/blob/main/examples/cleverctl/src/cmd/myself.rs
pub async fn get(config: Arc&lt;Configuration&gt;, output: &amp;Output) -&gt; Result&lt;(), Error&gt; {
    let credentials: Credentials = config.credentials.to_owned().into();
    let connector = ProxyConnectorBuilder::try_from_env().map_err(Error::ProxyConnector)?;
    let client = Client::builder()
        .with_credentials(credentials)
        .build(connector);

    let user = myself::get(&amp;client).await.map_err(Error::Get)?;

    println!(
        "{}",
        output
            .format(&amp;user)
            .map_err(|err| Error::FormatOutput(Box::new(err)))?
    );

    Ok(())
}</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Another example of the sdk which interact with add-ons:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre class="wp-block-code"><code class="lang-rust">...
use clevercloud_sdk::{
    oauth10a::{
        proxy::{self, ProxyConnectorBuilder},
        Credentials,
    },
    v2::addon,
    Client,
};
...

// See the full code at:
// - https://github.com/CleverCloud/clevercloud-sdk-rust/blob/main/examples/cleverctl
// - https://github.com/CleverCloud/clevercloud-sdk-rust/blob/main/examples/cleverctl/src/cmd/addon/mod.rs 
pub async fn list(
    config: Arc&lt;Configuration&gt;,
    output: &amp;Output,
    organisation_id: &amp;str,
) -&gt; Result&lt;(), Error&gt; {
    let credentials: Credentials = config.credentials.to_owned().into();
    let connector = ProxyConnectorBuilder::try_from_env().map_err(Error::ProxyConnector)?;
    let client = Client::builder()
        .with_credentials(credentials)
        .build(connector);

    let addons = addon::list(&amp;client, organisation_id)
        .await
        .map_err(|err| Error::List(organisation_id.to_owned(), err))?;

    println!(
        "{}",
        output
            .format(&amp;addons)
            .map_err(|err| Error::FormatOutput(Box::new(err)))?
    );
    Ok(())
}</code></pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You can find the entire source code of the command line interface example in the clevercloud-sdk project into the examples repository or you can follow this <a href="https://github.com/CleverCloud/clevercloud-sdk-rust/blob/main/examples/cli">link</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>What's next?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Let's have a look at the incoming features that are to be integrated into these crates.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Biscuit and oauth2 bearer token</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we are working on a new authentication and authorization token called Biscuit. More details about it in the <a href="https://stagingv6.cleverapps.io/blog/engineering/2021/04/12/introduction-to-biscuit/">introduction blog post</a>. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This new authentication and authorization token will work with the OAuth 2.0 standard. One job of the SDK and the client under the hood is to ease the transition from OAuth 1.0a to OAuth 2.0 using Biscuit. </p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>The Software Development Kit will grow to support the entire API. The next feature is the integration of the event bus in order to subscribe to events that happen on Clever Cloud's platform. You will be able to get notifications about a deployment of an application and so on... </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Besides, those crates are used to build another software that you have discovered in another <a href="https://stagingv6.cleverapps.io/blog/features/2022/03/16/clever-operator/">blog post</a>. It introduce a <a href="https://kubernetes.io/">Kubernetes</a> operator that you may use on <a href="https://www.redhat.com/en/technologies/cloud-computing/openshift">OpenShift</a>, that exposes Clever Cloud's add-ons as <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/">Custom Resources</a>. </p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
