<?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>cloud native Archives | Clever Cloud</title>
	<atom:link href="https://www.clever.cloud/blog/tag/cloud-native/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.clever.cloud/blog/tag/cloud-native/</link>
	<description>From Code to Product</description>
	<lastBuildDate>Mon, 15 Apr 2019 19:15:00 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://cdn.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>cloud native Archives | Clever Cloud</title>
	<link>https://www.clever.cloud/blog/tag/cloud-native/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to use Quarkus</title>
		<link>https://www.clever.cloud/blog/features/2019/04/15/how-to-use-quarkus/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Mon, 15 Apr 2019 19:15:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[cloud native]]></category>
		<category><![CDATA[graalvm]]></category>
		<category><![CDATA[quarkus]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2019/04/15/how-to-use-quarkus/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="quarkus 1" decoding="async" fetchpriority="high" srcset="https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p>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.

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

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 <a href="http://in.relation.to/2019/03/08/why-quarkus/">Why Quarkus</a>. Now let's find a sample to deploy and see how it works. We took the hello world available here: <a href="https://github.com/CleverCloud/quarkus-demo">https://github.com/CleverCloud/quarkus-demo</a>

It's a maven project so to create this on Clever Cloud you use our CLI and run <code>clever create --type maven quarkus-example</code>. Now we need to setup the right environment variables to configure our project:
<pre><code class="language-bash">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.
</code></pre>
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 <code>clever console</code> do to this automatically), click on the Information tab and tick the <code>Enable dedicated build instance</code> box.

Again if you are using our CLI you can type <code>clever deploy</code> 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 &lt;3.]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="quarkus 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/quarkus-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p>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.

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

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 <a href="http://in.relation.to/2019/03/08/why-quarkus/">Why Quarkus</a>. Now let's find a sample to deploy and see how it works. We took the hello world available here: <a href="https://github.com/CleverCloud/quarkus-demo">https://github.com/CleverCloud/quarkus-demo</a>

It's a maven project so to create this on Clever Cloud you use our CLI and run <code>clever create --type maven quarkus-example</code>. Now we need to setup the right environment variables to configure our project:
<pre><code class="language-bash">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.
</code></pre>
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 <code>clever console</code> do to this automatically), click on the Information tab and tick the <code>Enable dedicated build instance</code> box.

Again if you are using our CLI you can type <code>clever deploy</code> 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 &lt;3.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>GraalVM is here!</title>
		<link>https://www.clever.cloud/blog/features/2019/04/15/release-graalvm/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Mon, 15 Apr 2019 18:45:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[cloud native]]></category>
		<category><![CDATA[graalvm]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[openjdk]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2019/04/15/release-graalvm/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="graalvm 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>Good news everone, we are all super happy to tell you our JVM image has been updated substantialy. We now support OpenJDK 12 and GraalVM CE!</p>
<span id="more-2956"></span>

<p>If you follow what&#39;s going on in the JVM space you have seen there is more and more choices available when it comes to running JVM-based applications. And we now support GraalVM CE. If you have no idea what it is, the best, simple explaination can be found on Julien Ponge&#39;s medium: <a href="https://medium.com/@jponge/the-graalvm-frenzy-f54257f5932c">https://medium.com/@jponge/the-graalvm-frenzy-f54257f5932c</a></p>
<p>And as he explains that way better than I, I will jump into the how to run a GraalVM application on Clever Cloud.</p>
<p>We first need to find an appropriate Hello world project. Being a Ratpack fan I looked on Github and found this: <a href="https://github.com/wololock/ratpack-graalvm-demo">https://github.com/wololock/ratpack-graalvm-demo</a></p>
<p>This is a gradle project with a script to build a native image, basically a binary with everything needed to run the application. No need for a JVM. So this is what we are going to build.</p>
<p>First to create the application, if you have clever-tools you can run: <code>clever create --type gradle --plan M graalPack</code> Now we need to setup the right environment variables.</p>
<pre><code class="language-bash">clever env set CC_JAVA_VERSION graalvm-ce  # Select GraalVN CE as Java Version
clever env set GRADLE_DEPLOY_GOAL shadowJar # Specify the gradle goal, here we want to build a full jar.
clever env set CC_PRE_RUN_HOOK ./build-native-image.sh # run the native image build
clever env set CC_RUN_COMMAND ./ratpack-graalvm-demo # specify the path of the native executable
</code></pre>
<p>I have modified a couple of things to make sure it would work smoothly on Clever Cloud. First thing, always define a rootProject name because gradle will pick the containing folder, which in our case the random application id, and generate the jar name with it. So you can&#39;t really use it in a script. Here&#39;s one liner to do it: <code>echo &#39;rootProject.name = &quot;ratpack-graalvm-demo&quot;&#39; &gt; settings.gradle</code></p>
<p>The script already run <code>gradlew shadowJar</code>. I have removed it since this step is already made by Clever Cloud. Of course you could run it locally and only push the executable. This would also work.</p>
<p>Don&#39;t forget to add these changes to your git repository: <code>git add settings.gradle build-native-image.sh &amp;&amp; git commit -m&quot;cleverify&quot;</code></p>
<p>We are building a native image and this can be a super greedy process in terms of memory. To make sure we have some headroom we are going to use a bigger scaler. Run <code>clever scale --flavor L</code> to get the proper size. This might depend on the build you are running. Static analysis is not cheap. Later this week we&#39;ll show you how to proceed differently with a new CI project :) But for now we&#39;ll stick to a bigger scaler.</p>
<p>Now all you have to do is run <code>clever deploy</code> and you will have your native image running on Clever Cloud. Benefits are mostly a reduced memory footprint and better performances at cold start. You can find more informations about this on the following blog post <a href="https://e.printstacktrace.blog/ratpack-graalvm-how-to-start/">Ratpack on GraalVM - how to start?</a>.</p>
<p>In the next days you can expect support for cool GraalVM features like the support for <a href="https://github.com/oracle/truffleruby">TruffelRuby</a> or <a href="https://github.com/oracle/fastr">FastR</a>). Let us know if you have any questions in the comments below!</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="graalvm 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>Good news everone, we are all super happy to tell you our JVM image has been updated substantialy. We now support OpenJDK 12 and GraalVM CE!</p>
<span id="more-2956"></span>

<p>If you follow what&#39;s going on in the JVM space you have seen there is more and more choices available when it comes to running JVM-based applications. And we now support GraalVM CE. If you have no idea what it is, the best, simple explaination can be found on Julien Ponge&#39;s medium: <a href="https://medium.com/@jponge/the-graalvm-frenzy-f54257f5932c">https://medium.com/@jponge/the-graalvm-frenzy-f54257f5932c</a></p>
<p>And as he explains that way better than I, I will jump into the how to run a GraalVM application on Clever Cloud.</p>
<p>We first need to find an appropriate Hello world project. Being a Ratpack fan I looked on Github and found this: <a href="https://github.com/wololock/ratpack-graalvm-demo">https://github.com/wololock/ratpack-graalvm-demo</a></p>
<p>This is a gradle project with a script to build a native image, basically a binary with everything needed to run the application. No need for a JVM. So this is what we are going to build.</p>
<p>First to create the application, if you have clever-tools you can run: <code>clever create --type gradle --plan M graalPack</code> Now we need to setup the right environment variables.</p>
<pre><code class="language-bash">clever env set CC_JAVA_VERSION graalvm-ce  # Select GraalVN CE as Java Version
clever env set GRADLE_DEPLOY_GOAL shadowJar # Specify the gradle goal, here we want to build a full jar.
clever env set CC_PRE_RUN_HOOK ./build-native-image.sh # run the native image build
clever env set CC_RUN_COMMAND ./ratpack-graalvm-demo # specify the path of the native executable
</code></pre>
<p>I have modified a couple of things to make sure it would work smoothly on Clever Cloud. First thing, always define a rootProject name because gradle will pick the containing folder, which in our case the random application id, and generate the jar name with it. So you can&#39;t really use it in a script. Here&#39;s one liner to do it: <code>echo &#39;rootProject.name = &quot;ratpack-graalvm-demo&quot;&#39; &gt; settings.gradle</code></p>
<p>The script already run <code>gradlew shadowJar</code>. I have removed it since this step is already made by Clever Cloud. Of course you could run it locally and only push the executable. This would also work.</p>
<p>Don&#39;t forget to add these changes to your git repository: <code>git add settings.gradle build-native-image.sh &amp;&amp; git commit -m&quot;cleverify&quot;</code></p>
<p>We are building a native image and this can be a super greedy process in terms of memory. To make sure we have some headroom we are going to use a bigger scaler. Run <code>clever scale --flavor L</code> to get the proper size. This might depend on the build you are running. Static analysis is not cheap. Later this week we&#39;ll show you how to proceed differently with a new CI project :) But for now we&#39;ll stick to a bigger scaler.</p>
<p>Now all you have to do is run <code>clever deploy</code> and you will have your native image running on Clever Cloud. Benefits are mostly a reduced memory footprint and better performances at cold start. You can find more informations about this on the following blog post <a href="https://e.printstacktrace.blog/ratpack-graalvm-how-to-start/">Ratpack on GraalVM - how to start?</a>.</p>
<p>In the next days you can expect support for cool GraalVM features like the support for <a href="https://github.com/oracle/truffleruby">TruffelRuby</a> or <a href="https://github.com/oracle/fastr">FastR</a>). Let us know if you have any questions in the comments below!</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
