Huawei Cloud Yaoyun Server L instance evaluation | Rapid deployment of Halo personal blog based on Docker environment

Table of contents

1. Basic introduction

1.1 Introduction to Yunyao Cloud Server L Instance

1.2 Practical introduction

2. Purchase and basic use of Yunyao Cloud Server

2.1 Server purchase process

2.2 Initialization connection process

2.3 System environment check

3. Running Halo in Docker

3.1 Basic introduction to Halo

3.2 Docker installation

3.3 Create containers using Docker images

4. Install and initialize Halo

4.1 Configure security group rules

4.2 halo initialization

4.3 Publish blog test 

5. Practical summary


1. Basic introduction

1.1 Introduction to Yunyao Cloud Server L Instance

 Yunyao Cloud Server L instance is a new generation of out-of-the-box lightweight application cloud server built for small and medium-sized enterprises and developers. Yunyao Cloud Server L instance provides a rich and carefully selected application image, enabling one-click deployment of applications, helping customers to build e-commerce websites, web applications, applets, learning environments, various development tests, etc. in the cloud conveniently and efficiently. It has a low threshold for use and is more suitable for the following groups of people:

  • Beginner users of cloud computing services
  • Individual developers and small and medium-sized enterprises deploying simple applications on the server

Purchase address: Yunyao Cloud Server L instance purchase address

​​

Yunyao Cloud Server L instance has computing, storage, image installation, backup and other capabilities.

  • Intelligent and non-stuck : Yaoguang AI intelligent scheduling and new generation network technology, soft and hard power drive performance doubling, achieving a smoother and more stable cloud migration experience
  • Excellent price and easy use : technology upgrades optimize cloud costs, benefiting more start-ups and developers
  • Getting started is easier : novice-friendly, ready-to-use, easy to deploy, allowing you to start your business one step faster
  • Management is particularly worry-free : One-stop management of operation and maintenance, monitoring, and resource distribution makes operation and maintenance more worry-free and efficient, allowing IT to focus more on business

1.2 Practical introduction

This evaluation is based on the practical operation of quickly deploying a personal Halo blog in a Docker environment. Halo currently does not support cloud virtual hosts on the market. This time, Huawei Cloud Cloud Server is used.

The basic environment required to build the Halo blog server is as follows:

Hardware environment configuration

​CPU No special requirements. Currently, Halo's Docker image also supports multiple platforms.
Memory For a better experience, it is recommended to configure at least 1G 
RAM There are no special requirements. In theory, Halo does not require very high disk capacity if you do not upload a large number of attachments to the server.
disk Halo currently must be used when the external network is open, otherwise it will cause page abnormalities.

Software Environment

Halo can theoretically run on any platform that supports Docker and Java.

2. Purchase and basic use of Yunyao Cloud Server

2.1 Server purchase process

Log in to Huawei Cloud, jump to the purchase address mentioned above, and select the server configuration required for this practical operation. Here I used the Liunx visual pagoda panel, and the instance specification is the most basic 2 cores | 2G.

​​

Click to buy to jump to the next step

​​

Click to pay to make the payment. Recently, Yunyao Cloud Server L instance has experience evaluation coupons. I used the coupons here. Just click to pay online. ​​

After the payment is completed, click to return to the Huawei Cloud Yunyao service console to view the purchased server.

​​

 As you can see in the picture below, we have successfully purchased it. Click on remote login to initialize the configuration.

​​

2.2 Initialization connection process

Huawei Cloud Console Connection Method

 Since I didn’t set a password before, I’ll reset it here.

​​

 After restarting, just log in. Our server is now ready. ​​

Xshell connection method

If you are used to using Xshell for operations, it is also supported. The xshell connection process is as follows:

Create a new connection and enter the corresponding public network IP

​​

 Enter username: Log in as root user

​​Enter the password you set

​​

Then we can connect to our cloud server

​​

2.3 System environment check

  •  cat /etc/os-releaseCommand: used to display system version and release information.

root@hcss-ecs-a5d1:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root@hcss-ecs-a5d1:~# 
  • df -h command: used to display the disk space usage of the file system. 
root@hcss-ecs-a5d1:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           179M  1.1M  178M   1% /run
/dev/vda1        40G  4.5G   33G  13% /
tmpfs           892M   16K  892M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           179M  4.0K  179M   1% /run/user/0

3. Running Halo in Docker

3.1 Basic introduction to Halo

Halo is a powerful and easy-to-use open source website building tool with a rich set of templates and plug-ins to help you build the ideal website in your mind. Its main advantages are:

  • Pluggable architecture Halo adopts a pluggable architecture, which reduces the coupling between functional modules and improves flexibility. It supports users to install and uninstall plug-ins as needed, making the operation easy. At the same time, a plug-in development interface is provided to ensure high scalability and maintainability.
  • Feature-rich theme mechanism, Halo provides a complete theme template mechanism for building the front-end interface. This means that users can choose from different types of theme templates to customize the look of their site according to their preferences.
  • Halo's rich text editor provides convenient and rich functions, including adding elements such as titles, paragraphs, quotes, lists, code blocks, etc., and supports setting style attributes, uploading pictures, inserting videos, etc. These tools make your article creation more convenient and vivid.

Official address: Halo website building - a powerful and easy-to-use open source website building tool

3.2 Docker installation

Docker is an open source application container engine based on the Go language and open source following the Apache 2.0 protocol. Docker allows developers to package their applications and dependencies into a lightweight, portable container, and then publish it to any popular Linux machine, which can also be virtualized. 

Use the official installation script to automatically install. The installation command is as follows:

 curl -fsSL https://test.docker.com -o test-docker.sh
 sudo sh test-docker.sh

After entering the command, wait for the automatic installation to complete. 

View current Docker version

3.3 Create containers using Docker images

Available Docker images for Halo 2.9:

 Note: Currently Halo 2 has not updated Docker's latest label image, mainly because Halo 2 is not compatible with version 1.x to prevent users from misoperation.

Create container running instructions:

docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 halohub/halo:2.9 

Note: This command uses the built-in H2 Database by default.

  • -it : Enable input function and connect to pseudo terminal
  • -d : Run the container in the background
  • --name : Specify a name for the container
  • -p : Port mapping, in the format of 主机(宿主)端口:容器端口, can be application.yamlconfigured in.
  • -v : working directory mapping. The form is: -v 宿主机路径:/root/.halo2, the latter cannot be modified.

 Enter the command and wait for the download to complete

4. Install and initialize Halo

4.1 Configure security group rules

We have deployed the website on the cloud server and hope that users can access our blog website through HTTP (port 8090). We need to add an inbound rule.

direction

Protocol/Application

port

source address

In direction

TCP

8090

0.0.0.0/0

4.2 halo initialization

Access with a browser http://ip:端口号/consoleto enter the Halo management page. When starting for the first time, you will enter the initialization page.

Then fill in the basic personal information for our blog

After filling in the basic information, click Initialize, and then you will enter the login interface, fill in the account and password you set, and click Login.

After logging in, you will enter the control panel of our personal blog. At this point we have completed the construction of our personal blog.

4.3 Publish blog test 

 Select the Article Directory option and click New

 Just edit some content and click Settings

Set the title of our article and click Save 

 Finally click publish

Use the browser to access the public network IP+8090 port to view

perfect! ! ! If you have reached this step and it proves that you have mastered this practical operation and built a blog of your own, applaud yourself. 

5. Practical summary

The whole process of rapid deployment of Halo personal blog based on Docker environment on Yunyao Cloud Server on Huawei Cloud was smooth. I personally tested that no abnormality occurred. At the same time, Huawei Cloud Yunyao Cloud Server L instance has excellent performance, stability and reliability, which is suitable for those who are new to the cloud. Server novices or small company project deployments, such as the deployment of this project, can use Huawei Cloud Yaoyun Server L instance. Huawei Cloud Yaoyun Server L instance is a trustworthy and worthy of choice cloud server!

Guess you like

Origin blog.csdn.net/m0_62436868/article/details/132911982