How to use Quarkus

Following our release of GraalVM support, I can show you how to use Quarkus on Clever Cloud. Quarkus is a Java framework conceived with GraalVM and cloud/container support in mind. If you want to be a first class citizen in the GraalVM ecosystem, you are expected to produce native binaries. And in a nutshell, it means you will experience issues in Reflection usage because you use AOT compiling instead of JIT.

But thanks to the amazing work of the Quarkus team, this won’t be an issue. They tried to avoid reflection as mush as possible, sometimes contributing code to projects upstream, and made it very easy to use it with AOT compiling when it’s absolutely necessary.

You’ll find more details about the importance of Quarkus on Emmanuel Bernard’s blog post Why Quarkus. Now let’s find a sample to deploy and see how it works. We took the hello world available here: https://github.com/CleverCloud/quarkus-demo

It’s a maven project so to create this on Clever Cloud you use our CLI and run clever create --type maven quarkus-example. Now we need to setup the right environment variables to configure our project:

clever env set CC_JAVA_VERSION graalvm-ce # Select GraalVM as Java version
clever env set CC_MAVEN_PROFILES native # define wich maven profile to use in the default build. Here native mwans it will generate a GraalVM native image.
clever env set CC_RUN_COMMAND target/quarkus-quickstart-1.0-runner # The path to the native image we will run.

We are building a native image and this reauires a decent amount of memory. This means we’ll have to use a dedicated build instance. Open the web console and select the application (or type clever console do to this automatically), click on the Information tab and tick the Enable dedicated build instance box.

Again if you are using our CLI you can type clever deploy and that is it. You now have a Quarkus native image running on Clever Cloud. If this brings you joy please take some time to thank all the Quarkus team for their awesome work! We have been using JEE from the very beginning for many internal things and are super grateful <3.

Blog

À lire également

Create your own MCP client/server: as easy as 1-2-3 with Otoroshi

While Otoroshi with LLM already allows you to simplify the management of your various AI providers, access to models and integration with your teams, we have added simplified management of MCP clients and servers.
Company

Clever Cloud obtains HDS (Health Data Hosting) certification

Clever Cloud achieves HDS Certification, enabling it to host health data in France. Clever Cloud, Europe's leading provider of Platform as a Service cloud solutions, today announced that it has been awarded the Hébergeur de Données de Santé (HDS) certification, in its updated version effective May 16, 2024, for all 6 activities in the standard. This certification reinforces Clever Cloud's position as a trusted partner for companies and organizations in the healthcare sector.
Press

Clever Tools: a year of enhancements for your deployments, on the road to v4

A command line interface (CLI) is at the core of developer experience. At Clever Cloud, we have been providing Clever Tools for almost 10 years.
Engineering Features