☁️ Using Flexus Instances in CodeArts

Ertugrul Basar
Huawei Developers
Published in
6 min read1 hour ago
CodeArts & Flexus

🔦Introduction

Hi everyone🙌! In today’s article, I’ll show you how you can use Flexus instances in your CodeArts projects. In CodeArts Deploy, resources are used to execute deployment tasks. ECS or CCE resources are typically employed for this purpose. Since Flexus is a lightweight cloud server designed for developers, you can use this service to deploy your applications. Before we start the demonstration part, I want to talk about Flexus and CodeArts services.

⚡️Flexus

Flexus is a cloud computing service specifically designed for small and medium-sized businesses. It offers a simplified way to deploy and manage cloud applications, providing cost-effective solutions with easy-to-use tools. As a part of Huawei Cloud, Flexus aims to make cloud technology accessible to a wider audience. In Flexus, you have 2 options:

Flexus L: Flexus L Instance is a pre-configured cloud server specifically designed for small and medium-sized enterprises (SMEs). It offers a simplified user experience with pre-installed software and optimized configurations. Think of it as a ready-to-use cloud server package. Essentially, Flexus L provides a hassle-free cloud computing solution for businesses that want to quickly get started without the complexities of configuring a server from scratch.

Flexus X: Flexus X Instance is a flexible cloud server service designed for small and medium-sized enterprises (SMEs) and developers. It offers similar functionalities to Elastic Cloud Servers (ECS) but with greater flexibility in terms of specifications and functions. Unlike Flexus L instances which are sold and managed as packages, Flexus X instances provide more customization options to suit different workloads and budgets. Essentially, Flexus X is a more adaptable and tailored cloud server solution compared to Flexus L.

You can find a screenshot of a comparison between Flexus L, Flexus X, and ECS.

Flexus L vs Flexus X vs ECS

⚡️CodeArts

CodeArts is a one-stop DevSecOps platform that provides out-of-the-box cloud services for requirement delivery, code commit, check, build, verification, deployment, and release throughout the entire software lifecycle. It consists of the following services: Req (Project Management), Repo (Code Hosting), Check (Code Quality), Build (Code Build), Artifact (Build Hosting), Deploy (Build Deployment), Pipeline (Continuous Delivery), TestPlan (Deployment Test).

💻Demo

Step 1 - Creating a Flexus X Instance

Since it provides us pay-per-use option, in this demonstration we will use the Flexus X instance. After you have access to the Flexus X page, click on ‘Buy FlexusX’

Flexus Dashboard-1

Then, we need to make some configurations on the instance we are going to buy. Let’s start with the basic configuration. Here we will choose pay-per-use as the billing mode and choose South-Guangzhou as the region. My advice would be to select the closest region to you.

Basic Configuration

Next, we need to select the instance specifications. This is an important part, as it will determine the performance of your instance. Since this is a simple demonstration, we will continue with 2vCPU and 2 GiB. If you want a more performant instance, you can turn on the Performance Mode option as well.

Instance Specifications

Then, we can select the image we are going to use. Flexus X instances do not provide any built-in images but you can still use private images Huawei Cloud provides. Also, if you select Huawei Cloud EulerOS as the OS, you can use the Application Acceleration option. This option provides even more performance while using the corresponding applications.

Image

Next, we also need to configure the network. First, we will select the VPC and corresponding subnet. Then, we need to assign a security group and here you need to allow the traffic for the SSH port you are going to use. Also, in order access to this server from the internet and connect it to the CodeArts platform, we need to bind an EIP to the instance. Configure it as per your demands.

Network
EIP

The last thing we need to configure here is the instance name and login preferences. After you name the instance, you can select the login mode. You can determine a password (which we will continue selecting), select a key pair and use it, or just set the password later.

Name and Login

After all of the configurations we made, we can now confirm the instance and buy it after we look at the general overview of it as depicted in the screenshot below. After the instance status changes to running, we can use it.

Confirm Specifications
Flexus Dashboard-2

Step 2 - Creating a Host Cluster and Adding Flexus Instance in CodeArts

After we get access to the CodeArts project we want to use our instance, we need to go to Settings > General > Basic Resources. Next, click on ‘Create Host Cluster’.

CodeArts Basic Resources

Then, we will determine some basic information about the cluster. We will fill in information such as name, OS, and host connection mode. Then, click on ‘Save’.

Creating a Host Cluster

Next, we can add the host. Click on ‘Add Host’ and then click on ‘Import’ to add the instance to the cluster.

Adding a Host-1
Adding a Host-2

Next, we need to fill in some information again to add the instance to the cluster. Here, after selecting the authorization type, we can fill out the remaining information and click on ‘OK’

Adding a Host-3

Then, wait for CodeArts to its verification of the instance. After you see ‘successful’ as the verification result, you can use this instance in this project.

Adding a Host-4

Step 3 - Deploying Applications Using the Flexus X Instance

After you connect your instance to the CodeArts platform, you can use it on a variety of application scenarios. You can refer to the articles below for more information.

👉Conclusion

In conclusion, this article demonstrated how to effectively utilize Flexus instances within the CodeArts ecosystem. By creating a Flexus X instance, configuring network settings, and integrating it into a CodeArts host cluster, you can unlock the potential of this powerful combination. This approach offers a flexible and scalable solution for various application scenarios.

💁References

--

--