 Hi, everybody. Welcome back to another technical demo around the Quarkus application. My name is Daniel Oh. I'm working for WTED as a technical marketing major. In this video, I'm going to showcase how to create a function project with the Quarkus based on Opposite serverless list function capability. With Opposite serverless version 4.6, include Opposite serverless 1.11 operator, which allows you to have a powerful command line interface to create a function. As you can see, you can have a developer experience to use a K&M serverless command line, also known as K&M CLI. And you can actually do a K&M func, one of a problem in K&M serverless command line to create your function application. And your function application will be built based on the build path, and you can deploy K&M CLI. And also you have multiple project template, but in this case, you're going to more focus on Quarkus project to create your function application. Let's get into demo. Okay, here is my sample application in Opposite container platform. As you can see, there is no research at this moment, no pod, no research at this moment. Let's try to create a new function project using K&M func CLI. So K&M func create the function name, Quarkus dash func, and I'm going to use runtime Quarkus. The simple command line is automatically generated new Quarkus project based on Maven architecture. So let's open ID2, take a look at more detail, what kind of application is generated. When you open the func yet mobile, it's automatically generated using CLI. And then you can find the function name, but there's no order wire, the namespace and an image image digest, but we're going to do that during the next command line. Don't worry about that. And one thing you can actually select the build or image for JPM or native, whatever you need, depending on your workload. And when you open the generate resource file, and you can find that the one simple application, but we are using the funky annotation, the one of the feature of the Quarkus, it aims to provide the portable Java API for Java developer to write a function, and you can deploy multiple fast platform like Amazon, Google, Microsoft, and Knave on a container platform. The simple input output messaging is a JSON format when you involve this function. So let's try to change it directly in your project and try to deploy application using KN func command line. It's simple. So we're going to define and specify the registry, container registry, like external registry, like a Docker hub, query.io, I'm going to use query.io and the namespace with the dash n, and the V option is a barbers. You can find all logs during the build and deploy. So the deploy command line actually include the build application as well. So I'm going to use the build path to build this application function to deploy the container platform at this moment. So as you can see, once you complete the build and we're going to push this application container to external registry, I specify in the query.io. Now when you go back to your mobile, you can find the image, image digest automatically update to based on the CLI command line. Go back to the container platform, as you can see the Quarkus application already started and we did JVM mode and we just need to 4.2 seconds to start up this application. This is the endpoint of the function. So let's try to access the endpoint using the HTTP Pi utility. So we're going to pass down one JSON format parameter like a message and name, like my name is Daniel. And then we're going to call the endpoint to trigger the HTTP protocol. And then you can see that Daniel wrote the written message as we can expect it in our source code. And in the meantime, we're going to add the label because we're going to deploy one more Quarkus application with the data compilation. So in order to distinguish between two different Quarkus applications, we're going to add the label with the Quarkus. Luckily, our container platform provides a very nice awesome Quarkus icon on your pod. As you can see the Quarkus icon shows up on your pod. And this application will be scaled down to zero automatically along with the default compilation or K&M server. So default compilation is 30 seconds. So next to 20 or 30 seconds, it will be scaled down to zero. In the meantime, let's take a look at what kind of K&M or CLI are more available to create your function project. So the K&M function create, you could define and specify the specific runtime like a Node.js, Quarkus, and Go. And you can also trigger your function with HTTP and Cloud event, more specifically event programming. And you can actually separate and build your application, the bot will deploy using K&M from build command line. You can specify image name and registry name and also the specific pass your function project. And the deploy also I already used that. And then you can actually use the DCC and you can interact with the mode. And in the meantime, the function is scaled down to zero along with the serverless capability. OK, it's already scaled down to zero. So let's try to involve this application one more time, which is a different variable like an open shift serverless function with Quarkus. It's a different parameter. And then when you trigger the application, it's automatically your function is scaled up just like serverless behavior. And then you've got the right result in your command line. Pretty awesome. So let's try to deploy Quarkus application as a native compilation and change the name, like a function name, dash native, and the image name, the different from dash native. And also we're going to use the native builder. So change that native. And I'm going to use the same thing by default. And then go back to command line and let's try to redeploy this application using KNM command line, KNM from deploy and just done. Because we already upgrade, update our YAML file. As you can see, we're going to use native builder imaging and running image based on native compilation. And then it will still using build pack to build this application and compile this Java application. First of all, we're going to create a phager. And then we're going to one more time packaging this application for native executable file. It takes a little bit longer than previous just enable package application. We got to just build success. And now we're going to push this containerized application to external myquay.io registry. And now we're going to wait for a new function on the container platform. Let's go back to the container developer console. As you can see, now we have a new core because the application based on native compilation. And also we just need to 13 milliseconds to start. So previously, we needed to 4.9 seconds, but same application to huge fast and supersonic fast, super fast rather than the other purpose application. All right, the last step, we're going to access the endpoint with the new URL using the HTTP Pi, just like with it up previously, so echo the message name and the new parameter like a Quarkus native with open shared serverless functions. Yeah, that's cool. And then new URL, we're going to pass down that thing. OK, and then once you click on that, and just wait, and just wait for this application will be scaled down to zero. Just to make sure it will be scaled up automatically just like a serverless behavior. So it takes a little bit more time. OK, just scaled down to zero. Let's fire up the new endpoint. And as you can see, our Quarkusa application scale up automatically, but pretty much faster than previous the JVM Quarkusa application. And we got a return code. And now you can actually find how many functions is deployed using Knave Functions. We can actually deploy one of the functions. If you don't need that thing any longer and then it's automatically all related to serverless resources on a particular container platform, it takes a little bit time, a little bit a few seconds to finish deleting. And then we go back here and just try to make sure to find the function list. And now we have one function list here. Thank you for watching. If you have more interesting around the Quarkusa application development or a serverless on a particular container platform, please don't hesitate to reach out directly to Red Hat Associated. We are more than happy to address your question. Thank you for watching. Have a rest of the day.