☁️ Effortless Data Analysis with Superset on Huawei Cloud Flexus L: A One-Click Cloud Solution

Burak Bakır
Huawei Developers
Published in
7 min readSep 27, 2024
Superset. Image 1

Introduction 📄

In this demo, I will take you through each step of leveraging Huawei Cloud’s Flexus L service, starting from purchasing the instance to setting up Superset, a ready-to-use application image. We will connect Superset to a demo database hosted on Huawei Cloud’s RDS and calculate the average length of movies in the dataset. This detailed walkthrough demonstrates the seamless integration of Superset with Flexus L, offering quick and efficient database analysis, all in a few simple steps.

Apache Superset is an open-source data visualization and business intelligence tool designed for exploring and analyzing data in a user-friendly interface. It allows users to create interactive dashboards, generate reports, and visualize data through various charts and graphs.

Superset supports a wide range of databases, enabling users to connect to different data sources easily. Its intuitive drag-and-drop interface makes it accessible for both technical and non-technical users, allowing organizations to derive insights from their data quickly and effectively.

Huawei Cloud Flexus L is a next-generation lightweight cloud server, ideal for developers and small to medium-sized businesses (SMEs). It offers a wide selection of pre-configured application images, making it perfect for light workloads like website setup, testing, development, corporate applications, and media-related tasks.

Flexus L is cost-effective, easy to use, and secure, providing an accessible solution for various cloud computing needs.

Flow of the Article 📑

In this article, we will explore the following topics:

  • Demo | Buying Flexus L
  • Demo | Configurations / Login to Application
  • Demo | Application Usage
  • Conclusion
  • Survey
  • References

Demo 💻

1. Buying Flexus L

  1. To buy Flexus, we must first search for it on the console and click on Huawei Cloud Flexus.
Console. Image 2.1

2. Here you can see other types of Flexus. We will use Flexus L in this demo.

Console. Image 2.2

3. First we need to select the region. Here you see the regions where Flexus Service is available. You can continue by selecting the one closest to your location. We continue with the Superset option as Image. As you can see, there are many images available here, where all installations are offered ready to install with a click.

Application Images. Image 2.3

4. Here you have instances that you can use according to the image you choose. You can also name your Flexus.

Instance Specifications. Image 2.4

5. You can make extra configurations for the Flexus you will receive. These are configurations that will not be used for this demo but should be taken into account under normal conditions.

Other Configurations. Image 2.5

6. Here you can choose how many months you want to buy the Flexus, whether you want to renew or not and the price you will pay and then click “Buy Now”. A summary screen will follow, so don’t worry. 🙂

Purchasing Options. Image 2.6

7. You can see the summary of your selected configurations here and finalise your purchase by clicking ‘Submit’.

Summary Page. Image 2.7

2. Configurations / Login to Application

  1. Since the purchase process has been completed, we can start the configurations by clicking the cloud instance on the left side from the Flexus interface we purchased and then clicking on our server.
Flexus Overview. Image 3.1

2. We need to allow the necessary ports from the Security Group interface. Port 3306 is used for MySQL database access, port 9001 is for external access to the application dashboard, and port 9000 is for external access to the application O&M dashboard. Please follow the steps in the images below.

Security Groups. Image 3.2
Adding Rule Window. Image 3.3

3. We need to reset the password to do remote login to our instance.

Flexus Overview. Image 3.4
Reset Password Window. Image 3.5

4. Click remote login from the top right and enter our instance with username (root) and password (the password you just set). Then we get the login information of Superset and other applications with the following commands.

Flexus Overview. Image 3.6
Instance CLI. Image 3.7
wget -N https://websoft9.github.io/stackhub/scripts/nginx_huaweicloud.sh && bash nginx_huaweicloud.sh

sudo cat /credentials/password.txt

5. You can see your Public IP below in the Flexus interface. You can quickly access your application by clicking ‘Access’ next to it.

Flexus Overview. Image 3.8

6. In the window that opens, we enter the Superset using the login information we obtained in step 4.

Superset Login Page. Image 3.9

3. Application Usage

  1. First we need to connect the database. Superset already contains a sample database, we can use this database to practice and learn the application. However, a different sample database was used in this demo. I am running this MySQL database through Huawei Cloud’s RDS service. To connect your database, please follow the steps from the images below.
Superset UI. Image 4.1
Database Connection Window. Image 4.3
Database Connection Window. Image 4.4

2. After establishing the database connection, we need to add a dataset, for this you can follow the images below.

Datasets Overview. Image 4.5
Dataset Adding Window. Image 4.6

3. You can search and find your datasets by filtering your datasets from the Datasets interface. Then, click on the ‘film’ dataset we have added.

Datasets Overview. Image 4.7

4. We can use Superset by entering the desired settings through the interface you have seen. In this example, the duration of 1000 films in our film table is in minutes and we want to find the average of these films. To do this, we select the ‘length’ attribute and select the ‘AVG’ metric. Then, click on the “Create Chart” button.

“film” Dataset Chart Page. Image 4.8

5. Depending on your dataset and the process you are doing, the time of this process will vary, but in our example it took more than 1 second. And as you can see on the screen, the average duration of the films is 115.27 minutes.

“film” Dataset Chart Page. Image 4.9

6. Then we can add this chart to our dashboard by clicking ‘Save’. Afterwards, it allows us to access these charts from the dashboard. So we don’t need to create it from the beginning every time.

Saving Chart Window. Image 4.10

7. From the Dashboard interface, we can first click on our dashboard where we added the chart and see our charts in it.

Dashboards Overview. Image 4.11
Dashboards Overview. Image 4.12

Conclusion

In this demo, we showed how Huawei Cloud Flexus L makes data analysis easy by working seamlessly with Superset. From purchasing the instance to connecting a demo database and calculating the average length of movies, the steps highlighted how simple it is to set up and use these cloud solutions. Flexus L provides an affordable and user-friendly environment, enabling quick application deployment. By using these tools, users can perform effective data analyses with minimal effort, leading to better decision-making and improved efficiency.

Survey

Flexus. Image 5

You can get up to 60 days of free trial access by scanning the first QR code above and filling out the form. We would be pleased to receive feedback from you by participating in our survey.

Additionally, you can scan the second QR code above to learn more about the Flexus product details.

You can also access the links to the QR codes in the image above through the links provided below.

· Fill out the survey form to get up to 60 days of free trial

· Learn more about Huawei Cloud Flexus

--

--