Huawei Cloud Yaoyun Server L instance evaluation | StackEdit Chinese version online Markdown note-taking tool

1. Introduction to Yunyao Cloud Server L Instance

1.1 Introduction to cloud server

As the era of cloud computing further deepens, more and more small and medium-sized enterprises and developers need an easy-to-use, high-power and efficient cloud computing infrastructure product to support their business operations and innovative development. Based on this demand, Huawei Cloud has launched a new product of Huawei Cloud server instances. Huawei Cloud servers have the four advantages of being smart and non-stuck, affordable and easy to use, easier to get started, and worry-free management, helping you get to the cloud quickly!
Insert image description here
From the end of August to mid-October, if you participate in the evaluation activity of Huawei Cloud Server, you can get a coupon of 54.99 yuan. You can purchase the Huawei Cloud Yaoyun Server L instance and lightweight server for only 0.03yuan per month.

Insert image description here

1.2 Application scenarios

Yunyao Cloud Server L instances are suitable for supporting lightweight, low-load and moderately visited application scenarios such as small websites, web applications, blogs, forums, and cloud development environments.

  • E-commerce store management: quickly build an independent foreign trade station and store management environment to provide stable and high-quality services to customers at home and abroad.
  • Website building: Provides commonly used website building application templates to quickly build websites that meet business needs, such as corporate official websites, information, blogs, forums, e-commerce, etc.
  • Mini program backend: Suitable for building WeChat mini programs and public account backend services to reduce maintenance costs and allow users to focus on business development.
  • Small games: Help customers build PC stand-alone games, casual games, etc., quickly go online and have stable performance.
  • Development and testing: Suitable for building ready-to-use remote development and testing projects in the cloud, running scheduled tasks, automatic tasks, etc.
  • Cloud learning: Help students and developers do some experiments, papers, etc. in the cloud.
  • Build blogs/forums: It is convenient for individual developers to build blogs and forums, and it is cost-effective.

1.3 Support mirroring

mirror Introduction
system image Only the initial operating system is included, and no application data or environment configuration is included. After using a system image to create a cloud server, the server will have a pure operating system environment. You can install applications by yourself based on the business needs of the instance.
Application image Contains the application and related initialization data, the operating environment and operating system required by the application. After you create a cloud server using an application image, you can directly use the preset application or customize the application configuration according to actual business needs. Reduces the steps of application uploading and installation.

Insert image description here

If you want to know more, please refer to the official documentation

2. Yunyao Cloud Server L instance configuration

2.1 Reset password

After the purchase is completed, a text message will be sent through your cloud server information, focusing on the public IP address and user name. First we need to open your server console, complete the password
Insert image description here
reset, check Automatically restart, and click OK.
Insert image description here

2.2 Server connection

  • Method 1 : Log in using the VNC method provided by the console

  • Method 2 : Use Putty, Xshell and other tools to log in to the Linux elastic cloud server.
    a) Download and install the login tool, such as Putty.
    b) Enter the elastic public IP.
    c) Enter the username: root, password, and click "OK".

  • Method three : Use the Linux/Mac OS system host to log in to the Linux elastic cloud server.
    a) Execute the connection command.
    ssh elastic public IP
    , for example: ssh 123.xxx.xxx.456
    b) Enter the user name: root, password, and log in to the server.

I personally use MobaXtermthis software, add SSH connection, output 公网IP, user name and port (default 22), and connect.

Insert image description here

2.3 Security group configuration

A security group is a logical grouping that provides access policies for cloud servers in the same VPC. Users can define various access rules in the security group. When the cloud server joins the security group, it will be protected by these access rules.

The system creates a default security group for each network card by default. The rules of the default security group are to allow all data packets in the outbound direction and restrict access in the inbound direction. You can use the default security group or create a custom security group if needed.
Insert image description here
You mainly need to fill in the priority (fill in 1 by default) and protocol port information (generally select the port that your project needs to expose), and click OK for other defaults. Security group configuration is mainly to expose ports to the external network for access.
Insert image description here
If you are still unclear, you can refer to the document: Security Group Configuration Example

3. Deploy the Chinese version of StackEdit

3.1 Introduction to StackEdit

The Chinese version of StackEdit is not only a Markdown online editing tool, but also an online note-taking tool that supports Gitee, GitHub, Gitea and other warehouses to save Markdown notes. It also supports drag/paste to upload images, supports file search, and supports switching to cool dark. Easy-to-use features such as themes are very suitable for friends who like to write notes in Markdown.

  • Official website: https://stackedit.cn/

Special feature

  • Live editing, HTML preview and automatic scrolling to the editing location
  • Notes support Git repository storage such as Gitee, GitHub, and Gitea.
  • It supports direct uploading of images, and also supports paste or drag and drop upload from various external image beds (GitHub, Gitea, SM.MS, custom image beds).
  • Supports historical version management, so you don’t have to worry about not being able to roll back after editing overwrites.
  • Supports extensions such as KaTeX mathematical expressions, Mermaid UML diagrams, and musical notation.
  • Markdown Extra supports syntax highlighting of Prettify/Highlight.js

3.2 Environment setup

This server environment is an ubuntu system image, and you need to install the docker environment yourself.

Server category system image Intranet IP address Docker version Operating system version
Yunyao cloud server L instance Ubuntu 192.168.0.168 20.10.24 Ubuntu 22.04.1 LTS

Install docker using snapcommand

root@hcss-ecs-f632:~# snap install docker
docker 20.10.24 from Canonical✓ installed

Or other installation methods (recommended)
$ curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

Test dockerwhether the installation is successful

root@hcss-ecs-f632:~# docker -v
Docker version 20.10.24, build 297e128

Check dockerservice status

root@hcss-ecs-f632:~# systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-09-14 14:25:21 CST; 2 days ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 30672 (dockerd)
      Tasks: 73
     Memory: 137.0M
        CPU: 2min 37.906s
     CGroup: /system.slice/docker.service

Check docker composeversion

root@hcss-ecs-f632:~# docker compose version
Docker Compose version v2.17.2

3.3 StackEdit deployment

  • Download image

Pull the StackEdit image from docker hub. This image is the Chinese version of StackEdit. Address: https://hub.docker.com/r/mafgwo/stackedit

root@hcss-ecs-f632:~# docker pull mafgwo/stackedit:5.15.17-1
5.15.17-1: Pulling from mafgwo/stackedit
a4d8138d0f6b: Pull complete
dbdc36973392: Pull complete
f59d6d019dd5: Pull complete
aaef3e026258: Pull complete
6e454d3b6c28: Pull complete
c717a7c205aa: Pull complete
69b68470ed80: Pull complete
05a0d45743c9: Pull complete
d0523573a78c: Pull complete
aaa7fb6a0c05: Pull complete
4014eb25fd56: Pull complete
e2fffdec16ff: Pull complete
18eebf116bef: Pull complete
985f8f003263: Pull complete
23129b2e8670: Pull complete
0492a922d077: Pull complete
fef3abdcd55c: Pull complete
6559bf0c908b: Pull complete
6562b54e0fe4: Pull complete
90363f900bd6: Pull complete
Digest: sha256:a03b30d349fd0644bf4548bbb3782f82cd35a9afa0f74c3acb611e987816a54d
Status: Downloaded newer image for mafgwo/stackedit:5.15.17-1
docker.io/mafgwo/stackedit:5.15.17-1
  • Configure security group

On the security group management page of Huawei Cloud Yaoyun Server L instance, add inbound rules. Next, when we start the service, we need to listen to port 9090, so we add the security group as the TCP:9090protocol port.
Insert image description here

  • Start service

You can use the following command to start the service

docker run -d -p 9090:9090/tcp mafgwo/stackedit

Or docker-composestart it through the method, first create the filedocker-compose.yml

version: "3.7"
services:
  stackedit:
    image: mafgwo/stackedit:5.15.17-1
    container_name: stackedit
    environment:
      - LISTENING_PORT=9090
      - ROOT_URL=/
      - USER_BUCKET_NAME=root
    ports:
      - 9090:9090/tcp
    network_mode: bridge
    restart: always

About environmentenvironment variables

environment variables default describe
LISTENING_PORT 8000 Internal server listening port
ROOT_URL / The root URL to use, useful when used with reverse proxies
USER_BUCKET_NAME stackedit-users User bucket name

If you save the above code snippet in a file called docker-compose.yml, you can simply run from the same folder to docker compose up -dautomatically pull the stackedit image and create and start a container. upIndicates starting the service and -dexecuting it in the background.

docker-compose up -d
  • Check container status

Check the StackEdit container status to ensure that the container starts normally

root@hcss-ecs-f632:~/edit# docker ps
CONTAINER ID   IMAGE                        COMMAND                  CREATED          STATUS                    PORTS                                                 NAMES
f2a12009f295   mafgwo/stackedit:5.15.17-1   "docker-entrypoint.s…"   13 hours ago     Up 13 hours               0.0.0.0:9090->9090/tcp, :::9090->9090/tcp             stackedit
  • address

Intranet: http://localhost:9090
External network: http://Public IP:9090

3.4 StackEdit usage

  • Visit the StackEdit homepage
    Please add image description
  • Click to start writing and enter the editing interface

Please add image description

  • Real-time preview, file bar on the left, settings bar on the right, supports many functions, can be configured with synchronization backup, import/export functions, can be used as a personal note-taking tool, more functions are waiting to be experienced and explored!
    Insert image description here

4. Summary

As a lightweight cloud server, Huawei Cloud Server L instance is ready to use and easy to operate and maintain. We can deploy many interesting open source projects, and many images on DockerHub are also very convenient to deploy.

Guess you like

Origin blog.csdn.net/weixin_44008788/article/details/132889233