Huawei Cloud Yaoyun Server L instance evaluation | Deploying the powerful office suite ONLYOFFICE

1. Introduction to Yunyao Cloud Server L Instance

1.1 Introduction to cloud server

"Cloud-Native" is a modern software development and deployment methodology that aims to make full use of the elasticity, scalability and automation features of cloud computing infrastructure to build a more flexible, maintainable and reliable system. Extensible applications. The core philosophy of cloud native application design is to tightly integrate the application with its dependencies and infrastructure to realize the full potential of the cloud environment. As the era of cloud computing further deepens, based on this demand, Huawei Cloud Huanxin launches new 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, and you can use Huawei Cloud Yaoyun Server L instance lightweight server 2 cores | 2G | 3Mbps for free for one month, providing super Multiple system images and application images facilitate development and deployment.

Insert image description here

1.2 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

1.3 Advantageous technologies

Smart and no lag

  • Supported by Huawei Cloud Qingtian architecture, software and hardware collaboration combined with AI algorithm intelligent scheduling provide you with high-quality performance.
  • Huawei Cloud has a global storage and computing network with data transmission latency shorter than the blink of an eye, meeting the high requirements of low network latency scenarios such as games and audio and video.

Excellent price, use as you like

  • Ultra-high cost performance, ultra-low threshold, open to use as you like.
  • Multiple instance specifications to balance performance and cost.
  • Technology upgrades optimize cloud costs and benefit more start-ups and developers.

Getting started is easier

  • Multiple image and resource combinations can be ordered with one click.
  • A variety of high-quality images have been carefully selected and rigorously tested by Huawei Cloud officials. They cover seven major scenarios and have preset templates, which are quick to build, safe and trustworthy.
  • Automated orchestration, one-click activation of resources, and business online in minutes.
  • Smooth learning curve, wizard-based application construction, and easy application activation.

Management is more worry-free

  • Visual management of topology, resources, and mirrors, and transparent management of business architecture.
  • Intimate service status reminders, one-click resource renewal and withdrawal, and simplified management.
  • Real-time monitoring of resource load, security, and usage ensures that services are always online.
  • A wide range of optional security services are available, including extensive backup, host security and other services, providing the highest level of security protection.

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 ONLYOFFICE

3.1 Introduction to ONLYOFFICE

ONLYOFFICE is a powerful office suite designed to meet the office needs of business and individual users. ONLYOFFICE Document Server is an online office suite that includes viewers and editors for text, spreadsheets, and presentations. It is fully compatible with Office Open XML formats: .docx, .xlsx, .pptx, and supports real-time collaborative editing.

main feature

  1. Document processing: ONLYOFFICE provides text document processing (similar to Microsoft Word), spreadsheet processing (similar to Microsoft Excel) and presentation processing (similar to Microsoft PowerPoint) functions. Users can create, edit and share a variety of office documents.

  2. Collaboration Tools: ONLYOFFICE is focused on collaboration. Multiple users can edit the same document at the same time and collaborate in real time. It provides features like comments, track changes, discussions, @mentions, and more to promote teamwork.

  3. Cloud and local deployment: ONLYOFFICE can be used in the cloud or deployed on local servers to meet the needs of different users. This provides businesses with control over data security and privacy.

  4. Extensive format support: ONLYOFFICE supports a variety of file formats, including Microsoft Office formats (DOCX, XLSX, PPTX), OpenDocument formats, PDF, HTML, etc.

  5. Plug-ins and Extensions: ONLYOFFICE can be customized and extended through plug-ins and extensions to suit different workflows and needs. It has a powerful API that allows integration into other applications.

  6. Cross-platform compatibility: ONLYOFFICE can run on different operating systems, including Windows, Linux, and macOS, and it has a responsive design that adapts to a variety of device sizes.

  7. Powerful data security: ONLYOFFICE provides many security features, including access control, single sign-on (SSO), data encryption, anti-virus scanning, etc. to ensure data security.

  8. Open Source Community Edition: In addition to the commercial edition, ONLYOFFICE also offers a free open source community edition, allowing individual users and small teams to enjoy its features.

Overall, ONLYOFFICE is a comprehensive office suite suitable for a variety of office needs and has strong collaboration and customization capabilities. It has been widely adopted in many organizations and businesses, especially where powerful office tools and collaboration capabilities are required.

  • Official website: https://www.onlyoffice.com/zh/

3.2 Docker 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

Automatically install docker using script commands

root@hcss-ecs-f632:~# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
# Executing docker install script, commit: e5543d473431b782227f8908005543bb4389b8de
+ sudo -E sh -c 'apt-get update -qq >/dev/null'
[sudo] password for server: 

1
+ sudo -E sh -c 'DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null'
+ sudo -E sh -c 'install -m 0755 -d /etc/apt/keyrings'
+ sudo -E sh -c 'curl -fsSL "https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg'
gpg: WARNING: unsafe ownership on homedir '/home/server/.gnupg'
+ sudo -E sh -c 'chmod a+r /etc/apt/keyrings/docker.gpg'
+ sudo -E sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic stable" > /etc/apt/sources.list.d/docker.list'
+ sudo -E sh -c 'apt-get update -qq >/dev/null'
+ sudo -E sh -c 'DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null'
+ sudo -E sh -c 'docker version'
Client: Docker Engine - Community
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:52:13 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       659604f
  Built:            Thu May 25 21:52:13 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

================================================================================

Test dockerwhether the installation is successful

root@hcss-ecs-f632:~# docker -v
Docker version 24.0.2, build cb74dfc

start updocker

root@hcss-ecs-f632:~# systemctl start docker

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: e
   Active: active (running) since Sun 2023-09-17 16:03:18 CST; 4min 36s ago
     Docs: https://docs.docker.com
 Main PID: 15955 (dockerd)
    Tasks: 14
   CGroup: /system.slice/docker.service

Check docker composeversion

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

3.3 ONLYOFFICE deployment

  • Download image

Pull the ONLYOFFICE image from docker hub, address: https://hub.docker.com/r/onlyoffice/documentserver

root@hcss-ecs-f632:~# sudo docker pull onlyoffice/documentserver
Using default tag: latest
latest: Pulling from onlyoffice/documentserver
3153aa388d02: Pull complete 
c4cc205575b9: Pull complete 
13c5c2555ba5: Pull complete 
3e1bd368c8f5: Pull complete 
9f0c92994889: Pull complete 
67058e3db1c3: Pull complete 
Digest: sha256:afd9fd2d0c44177c90fc4231889326597168be2e2f17dd8d7da4119cf885ea31
Status: Downloaded newer image for onlyoffice/documentserver:latest
docker.io/onlyoffice/documentserver:latest
  • 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 monitor port 7070, so we add the security group as the TCP:7070protocol port.
Insert image description here

  • Start service

Start by docker-composeway, first create the filedocker-compose.yml

version: "3.7"
services:
  onlyoffice:
    image: onlyoffice/documentserver
    container_name: onlyoffice
    environment:
      - LISTENING_PORT=80
      - ROOT_URL=/
      - USER_BUCKET_NAME=root
    ports:
      - 7070:80/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 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 documentserverthe 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 status of the onlyoffice container to ensure that the container starts normally

root@hcss-ecs-f632:~/edit# docker ps
CONTAINER ID   IMAGE                        COMMAND                  CREATED        STATUS                  PORTS                                                 NAMES
580f1142ae03   onlyoffice/documentserver    "/app/ds/run-documen…"   23 hours ago   Up 23 hours             443/tcp, 0.0.0.0:7070->80/tcp, :::7070->80/tcp        onlyoffice
  • address

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

  • Access results

Insert image description here
If this page appears, the deployment of ONLYOFFICE documentserver is successful. But what we deployed is only the ONLYOFFICE documentserver service, and there is no interface to operate it, that is, document editing, previewing and other functions cannot be performed. If you want to use it with full functionality, you can use the built-in demonstration interface. The instructions are as follows:

Insert image description here
Execute this command to automatically run the demo interface:

root@hcss-ecs-f632:~/edit# sudo docker exec 580f1142ae03 sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf

Then click again Go To Test Exampleto enter the demonstration interface and operate the complete functions.

3.4 ONLYOFFICE use

  • Access the ONLYOFFICE demo interface
    Insert image description here

  • Create Word document

Please add image description

  • Create Excel document

Insert image description here

  • Create PPT document

Insert image description here

  • Create a form template

Insert image description here

  • Upload file editing

Insert image description here

  • Secondary development

If you subsequently develop based on the official demo interface, you can enter dockerthe command line of the container.

root@hcss-ecs-f632:~# docker exec -it 580f1142ae03 bash
root@580f1142ae03:/#

For example, the file format conversion function officially provides a powerful file conversion function. The same API helps to convert most types of Office documents: text, tables, slides, forms, PDFs, e-books, etc.

ONLYOFFICE - Cloud Office Applications

ONLYOFFICE API Documentation - Convert and Download Files

ONLYOFFICE API Documentation - Conversion Interface

The official also provides an online text file converter to facilitate user experience. You can explore more ONLYOFFICE functions by yourself. For details, of course, please refer to the official documentation!

4. Summary

As a lightweight cloud server, Huawei Cloud Server L instance is ready to use and easy to operate and maintain. The current CPU usage and memory usage are not high, and the performance is very good. We can deploy many interesting open source projects, and the deployment of many images on DockerHub is also very convenient.

Guess you like

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