Sei sulla pagina 1di 158

Recommendations

 Huawei Learning Website


 http://learning.huawei.com/en

 Huawei e-Learning
 http://support.huawei.com/learning/NavigationAction!createNavi?navId=MW
000001_term1000025144&lang=en n
t io
Huawei Certification ica
tif

r
Ce
 http://support.huawei.com/learning/NavigationAction!createNavi?navId=_31
&lang=en &
ng
Find Training i ni
ra

T

ei
http://support.huawei.com/learning/NavigationAction!createNavi?navId=_trai
ningsearch&lang=en a w
Hu
More Information n
it o
i c a
r tif
 Huawei learning APP Ce
&
g
n in
r ai
i T
e
a w
H u

版权所有© 2018 华为技术有限公司


Huawei Cloud Service Certification Training

HCIA-Cloud Service
n
t io
Lab Guide for Cloud service ica
r tif
C e
Engineers &
i ng
n
r ai
T
ei
a w
Hu
ISSUE:1.0
n
it o
i ca
f
rti
Ce
&
ing
n
r ai
i T
e
aw
H u

HUAWEI TECHNOLOGIES CO., LTD.

1
Copyright © Huawei Technologies Co., Ltd. 2017. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without prior written
consent of Huawei Technologies Co., Ltd.

Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective holders.
n
t io
ica
Notice

tif
The purchased products, services and features are stipulated by the contract made between Huawei and the

e r
customer. All or part of the products, services and features described in this document may not be within the
C
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information, and

&
recommendations in this document are provided "AS IS" without warranties, guarantees or representations of any

g
kind, either express or implied.
The information in this document is subject to change without notice. Every effortn has been
istatements, made in the
i n
recommendations in this document do not constitute a warranty of any kind,aexpress or implied.
preparation of this document to ensure accuracy of the contents, but all information, and

T r
ei
a w
Hu
n
it o
i ca
r tif
Ce
&
Huawei Technologies Co., Ltd.
ing Industrial Base
inBantian, Longgang
Address: Huawei

a
i Tr Shenzhen 518129
e
w
People's Republic of China

u a
Website: http://e.huawei.com
H

Huawei Prorietary and Confidential


Copyright © Huawei Technologies Co,Ltd
Huawei Cloud Service Certification Training Lab Guide Page 1

Huawei Certification Program


Relying on the strong technical strength and professional training system, Huawei provides
a practical and professional three-level certificate system in the three directions of cloud
architects, cloud administrators and cloud developers to meet various customer requirements
on different Cloud Service technologies.
HCIA-Cloud Service is an ICT convergence certification, intended for engineers who use
Huawei cloud service products and technologies, Huawei internal engineers, Huawei channel
engineers, college students, and ICT professionals. HCIA-Cloud Service training covers the basic
n
knowledge and hands-on skills of prevailing public cloud services across IaaS, PaaS, and SaaS.
t io
ica
The curriculum includes but is not limited to the following parts: Concept and Value of Cloud
Service, Architecture and Ecosystem of Huawei Cloud, Operation/Management/Application of
tif
Huawei Cloud Computing Service, Storage Service, Network Service, Security Service, Cloud Eye
e r
Service, RDS Service, CCE Service and Workspace. C
&
An HCIA-Cloud Service certificate proves that the holder has a comprehensive g
in
in
understanding of prevailing cloud service products and technologies in the marketplace and
is capable of independently using various Huawei Cloud service products.
r a
i T
e
Companies hiring HCIA-Cloud Service V1.0 certified engineers can demonstrate their

a w
commitment to public cloud technology and showcase their ability to design, architecture and

Hu
implement Huawei cloud solutions.

n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
a w
H u
Huawei Cloud Service Certification Training Lab Guide Page 2

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
rt if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 3

About This Document

Overview
This document is intended for certification candidates to prepare the HCIA-Cloud Service exam

n
and for trainees to learn cloud service basics, as well as the operation, management,

io
and maintenance of Huawei's cloud service products.
t
f ica
r ti
Description
Ce
&
This lab guide consists of fourteen lab exercises, covering basic operation and management of eight
g
in
mainstream HUAWEI cloud products. Upon completion of these lab exercises, trainees can grasp

in
basic technical skills of major public cloud services across IaaS, PaaS and SaaS.

r a
Lab 1: This System Management lab introduces the operation of HUAWEI ClOUD website and
console.
i T

e
Lab 2 and 3: These two cloud computing labs include the basic operation of Elastic Cloud
Server and Auto Scaling.
a w
Lab 4 to 7: Four storage service labs includeu
H and Scalable File Service. You will learn how
 the basic operation of Elastic Volume Service,
Volumn Backup Service, Object Storage Service
n
to create, attach/detach and delete different storage systems.
Lab 8 and 9: Two network serviceio

and Elastic Load Balance. Youawillt learn the operation of VPC and how to load-balance
labs include the basic operation of Virtual Private Cloud

fi c
backend ECS.
t i
r service lab introduces the basic operation of Huaweicloud Anti-
e
Lab 10: This cloud security

DDos.
C

&
Lab 11: this lab introduces the basic operation for Cloud Eye Service.
g
creationin
 Lab 12: this lab introduces the basic operation of Relational Database Service, including
n
i13: this lab introduces the basic operation for Cloud Container Engine, including
and connection of RDS instance.

r
Laba
i Tservice.
operations of docker, how to create CCE cluster and node, how to deploy and publish nginx
e
aw  Lab 14: this lab introduces the basic operation for Workspace, which helps you quickly

Hu
deploy the desktop.

Background Knowledge Pre-requisites


 basic network knowledge
 basic storage and server knowledge
 basic knowledge of Windows/Linux
Huawei Cloud Service Certification Training Lab Guide Page 4

Lab Environment Overview


All lab exercises in this guide are based on production HUAWEI cloud platform, and you can conduct
them via the official website: https://www.huaweicloud.com/en-us/. Unlike traditional IT labs, there
is no-need to buy any physical equipment in advance, instead, you login to
huaweicloud.com website and do all exercises pay-as-you-go. We also provide a deep-discounted
HCIA lab package for trainees. For more lab information, please enquire your local HALP (Huawei
authorized Learning Partner).
When you have any questions during the learning process, you can also go to HUAWEI cloud help
center https://support.huaweicloud.com/en-us/ or dial HUAWEI cloud customer service hotline
4000-955-988 for professional technical support. n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 5

Contents

About This Document ................................................................................................. 3


Overview .................................................................................................................................................................... 3
Description ................................................................................................................................................................. 3
Background Knowledge Pre-requisites ....................................................................................................................... 3
Lab Environment Overview ......................................................................................................................................... 4
o n
i
t 8
1 System Management Lab Guide ...............................................................................
ic a
i f
1.1 Introduction .......................................................................................................................................................... 8

e rt
1.2 Access the Console ............................................................................................................................................... 8
C
1.3 Consult the Console............................................................................................................................................ 11
&
g
1.4 Question ............................................................................................................................................................. 12
2 Elastic Cloud Server (ECS) Lab Guide .......................................................................
n in 13

a i
r
2.1 Introduction ........................................................................................................................................................ 13

i T
2.2 Create Linux Elastic Cloud Server ........................................................................................................................ 14
e
w
2.3 Log into Elastic Cloud Server............................................................................................................................... 18

u a
2.4 Adjust the Scale of Elastic Cloud Server .............................................................................................................. 20
H
2.5 Monitor Elastic Cloud Server............................................................................................................................... 22

o n
3 Auto Scaling (AS) Lab Guide ................................................................................... 25

a ti
3.1 Introduction ........................................................................................................................................................ 25

if ic
3.2 Create Auto Scaling ............................................................................................................................................ 26
3.3 Manually Modify, Add and Delete Autot Scaling ................................................................................................. 31
e r
C
3.4 Question ............................................................................................................................................................. 34
4 Elastic Volume Service& (EVS) Lab Guide ................................................................... 35

ing
4.1 Introduction ........................................................................................................................................................ 35

a in
4.2 Purchase EVS ...................................................................................................................................................... 36

T r (Windows) ............................................................................................................................ 38
4.3 Initialize Data Disk
4.4 Initializee i
Data Disk (Linux) ................................................................................................................................... 43

awEVS (Windows) ....................................................................................................................................... 47


4.5 Expand
u
H
4.6 Expand EVS (Linux) ............................................................................................................................................. 55
5 Volume Backup Service (VBS) Lab Guide ................................................................. 65
5.1 Introduction ........................................................................................................................................................ 65
5.2 Basic Operations of VBS...................................................................................................................................... 66
5.3 Manage Backup Policy ........................................................................................................................................ 71
6 Object Storage Service (OBS) Lab Guide .................................................................. 75
6.1 Introduction ........................................................................................................................................................ 75
6.2 OBS Browser environment preparation............................................................................................................... 76
6.3 The Use of OBS Browser ..................................................................................................................................... 78
Huawei Cloud Service Certification Training Lab Guide Page 6

6.4 OBS Versioning ................................................................................................................................................... 82


7 Scalable File Service (SFS) Lab Guide....................................................................... 85
7.1 Introduction ........................................................................................................................................................ 85
7.2 Basic Operations of SFS ...................................................................................................................................... 86
7.3 Mount a File System to ECS ................................................................................................................................ 91
8 Virtual Private Cloud (VPC) Lab Guide ..................................................................... 96
8.1 Introduction ........................................................................................................................................................ 96
8.2 Create VPC and Associated Sub-elements .......................................................................................................... 97

n
it o
8.3 Bind EIP to ECS to Access to Internet................................................................................................................ 101

a 109
8.4 Control Communication Using Security Group ................................................................................................. 106

i c
tif
9 Elastic Load Balance (ELB) Lab Guide ....................................................................

e r
9.1 Introduction ...................................................................................................................................................... 109
C
9.2 Create ELB Service ............................................................................................................................................ 110
&
9.3 Configure HTTP Service on Backend ECS .......................................................................................................... 114

i ng
9.4 Result Verification ............................................................................................................................................. 115
10 Cloud Security Service Lab Guide ........................................................................
a in 117
T r
i
10.1 Introduction .................................................................................................................................................... 117
e
w
10.2 Enable DDoS Protection .................................................................................................................................. 117

u a
10.3 Activate Anti-DDoS Alarm Notification ........................................................................................................... 119

H
11 Cloud Eye Service Lab Guide ............................................................................... 122
n
11.1 Introduction .................................................................................................................................................... 122
it o
11.2 Instance Alarm Monitoring .............................................................................................................................
a
122

f i c
11.3 Export Monitor Data ....................................................................................................................................... 124
12 Relational Database Service (RDS)
r ti Lab Guide ...................................................... 126
Ce
12.1 Introduction .................................................................................................................................................... 126
12.2 Purchase RDS MySQL Instance & ........................................................................................................................ 127
n g
i
12.3 Install MySQL Client ........................................................................................................................................ 128
12.4 Connect RDS MySQL
a in Instance ........................................................................................................................ 129
13 Cloud Container
T r Engine (CCE) Lab Guide ............................................................. 132
i
e .................................................................................................................................................... 132
13.1 Introduction

awthe Environment .................................................................................................................................. 133


13.2 Set up
u
H
13.3 Create VM Cluster........................................................................................................................................... 133
13.4 Basic Docker Operations ................................................................................................................................. 136
13.5 Upload Image ................................................................................................................................................. 139
13.6 Application Deployment ................................................................................................................................. 143
13.7 Application Management ............................................................................................................................... 146
14 Workspace Lab Guide ......................................................................................... 148
14.1 introduction .................................................................................................................................................... 148
14.2 Launch Workspace Service.............................................................................................................................. 149
14.3 Create Desktop ............................................................................................................................................... 151
Huawei Cloud Service Certification Training Lab Guide Page 7

14.4 Log into Desktop ............................................................................................................................................ 153


14.5 Daily Management.......................................................................................................................................... 154

n
t io
f ica
r ti
C e
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
a w
H u
Huawei Cloud Service Certification Training Lab Guide Page 8

1 System Management Lab Guide

1.1 Introduction n
t io
1.1.1 About This Lab icaif
Introduction the functions of console, including website login, access to ECS and e r t
EVS management
page. C
&
g
1.1.2 Objectives
n in
i
Upon completion of this task, you will be able to:
T ra
ei
 How to log-onto HUAWEI CLOUD website.
How to manage the console.
w

a
Hu
 How to view ECS/EVS management page.

1.1.3 List of Lab Tasks


o n
t i
Number
i ca
Application scenario Task Sub-task
1
r t if the
After checking Log into the Access Huawei Enterprise

Ce website of
information on the console Cloud website
official
&Huawei Enterprise Website registration

n g Cloud, access console


i Access console interface
in
and save ECS/EVS as

r a frequently used services. Save ECS/EVS services


2T
e i View ECS/EVS details. View ECS/EVS Access console interface

w
management
a page. View ECS management page

Hu View EVS management page

1.2 Access the Console

1.2.1 Operation Procedures


Step 1 Access HUAWEI CLOUD website: www.huaweicloud.com.
Huawei Cloud Service Certification Training Lab Guide Page 9

Step 2 Click “Register” on the top-right of the page, as indicated below:

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
Step 3 On the registration page, enter phone number, SMS verification code, set a
password and confirm.
e i
Step 4 Read and confirm the terms of agreement.
a w
Step 5 Click “Register”. H u
Step 6 After the registration is done,n
o
click “console” on the top-right of the page.

Step 7 On the login page, fill inathe


i
t user information and click “login”.
c
fi HUAWEI CLOUD console, please choose the corresponding login
t i
method according to actualr user type.
There are two types of user for

 Ceenter user name and password.


Individual user please
&
g
 Enterprise multi-tenants please enter user name, email, password and verification code.

Step 8 Clickin“log in”. Access console.


a in List” on the top of the console’s home page.
Tr
Click “Service

e i
a w
Hu Step 9 Click “Favorites” on the top of the console’s home page.

Step 10 In the expanded List, choose services to be added to “Favorites”.


Huawei Cloud Service Certification Training Lab Guide Page 10

n
t io
f ica
r ti
Ce
&
g
in
ain
1.2.2 Result Verification
T r
ei
Click “My Favorites” inside the console to check the favorite services.

a w
Hu
n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 11

1.3 Consult the Console

1.3.1 Operation Procedures


Step 1 Access HUAWEI CLOUD website: www.huaweicloud.com.
Step 2 Click “console” on the top-right of the page.
Step 3 Log into the console.
n
Step 4 Click “log in”. Access console.
it o
i c a
tif
Step 5 Go to “Computing > ECS” on the console’s home page. Access ECS management

r
page

Ce
&
ng
i ni
T ra
ei
a w
Hu
n
it o
i ca
r tif on the console’s home page. Access EVS management
Step 6 Go to “Storage > EVS”

Ce
page.

&
g
n in
r ai
i T
e
a w
Hu

1.3.2 Result Verification


You can view the list of ECS and EVS in your account.
Huawei Cloud Service Certification Training Lab Guide Page 12

n
t io
f ica
r ti
Ce
&
g
in
ain
1.4 Question T r
i
What daily operations can be conducted on the ECS/ECSemanagement page?
a w
Hu
n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 13

2 Elastic Cloud Server (ECS) Lab Guide

2.1 Introduction n
t io
2.1.1 About This Lab f ica
r ti
This chapter introduces the basic operations of Elastic Cloud Server.
Ce
&
2.1.2 Objectives g
in
Upon completion of this task, you will be able to:
ain
 Create a Elastic Cloud Server
T r
 Log into Elastic Cloud Server
ei
 Adjust the scale of Elastic Cloud Server
a w
Hu
 Monitor Elastic Cloud Server

2.1.3 Prerequisites
o n
i
t account.
ca
fi
 Have registered HUAWEI CLOUD
 Have created VPC.
r t i
e
2.1.4 List of Lab TasksC
&
Number g
in Task Sub-task Application scenario

a in Create an Elastic Create a Linux Elastic


r
1 Create a Elastic Cloud Server for
T Cloud Server Cloud Server Linux on Huawei Enterprise Cloud

ei
w
Log into the Elastic Use VNC, Putty, mstsc to log into

u a Cloud Server created Elastic Cloud Server remotely,

H
according to the purchased
Operating System.
2 Adjust the scale Change vCPU and When the scale of ECS can no
of Elastic Cloud memory longer satisfy business needs, the
Server scale of ECS can be changed.
3 Monitor Elastic Set alarm rules Through setting ECS alarm rules,
Cloud Server user can customize monitor targets
and alarm policy, understand the
real-time status of ECS in order to
be alarmed.
Huawei Cloud Service Certification Training Lab Guide Page 14

2.2 Create Linux Elastic Cloud Server

2.2.1 Operation Scenario


If the user needs to deploy relative services on the server, creating an ECS is less expensive than
creating a physical server. ECS Infrastructure based on public cloud platform can also be obtained
in a few minutes, and these infrastructure are elastic and can be scale-out or in. Next on how to
purchase Elastic Cloud Server.

n
io
2.2.2 Operation Procedures
t
Step 1 Access HUAWEI CLOUD website: www.huaweicloud.com.
f ica
r ti
Step 2 Click “Sign in” on the top-right of the page.
Ce
Step 3 Go back to public cloud website, click “Elastic Cloud server (ECS)” under
&
“Products” on the bottom of the page. Click “Buy now”.
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
t if
Step 4 Parameter configurations of the ECS
r
Parameter
C e Example figures

&
g
Billing Mode On-demand
Region in
in
northchina
AZ a
Tr of Cloud server
AZ2

e iType General

aw
u
vCPU 2 cores

H Memory 2GB
Image type Public image
Image CentOS 7.2 64bit
Disk System disk: ultra-high I/O, 40GB
Virtual private cloud Choose existing ones, for example myvps
Security group Choose existing ones, for example Sys-default
Huawei Cloud Service Certification Training Lab Guide Page 15

Parameter Example figures


NIC Choose existing ones, for example subnet-myvpc
Elastic IP Automatically assign
Scale Static BGP
Billing model According to bandwidth
Bandwidth 5M

n
Login method Password
Password Huawei@12
t io
f ica
ti
Advance configuration -
Time purchased One month
e r
C
Quantity purchased 1
&
g
in
 Fill in the “basic information” of the Elastic Cloud Server to be created

in
When buying ECS, user cannot choose CPU and memory resources that are sold out.
a
T r
ei
a w
Hu
n
it o
i ca
rt if
C e
&
ing
n
r ai
i T
e
aw
H u

 Fill in the information on “network”.


Huawei Cloud Service Certification Training Lab Guide Page 16

n
t io
f ica
r ti
C e
&
g
in
ain
T r
ei
Before filling in network information, user should have created virtual private cloud and security group, have

a w
chosen existing virtual private cloud, security group and NIC. For more information on virtual private cloud,

Hu
please refer to <Virtual private cloud user guide>.

 Fill in the login information.


n
it o
Public cloud provides two authentication methods of ECS.

i ca
if
 Enter code: Huawei@12

r t
C e
&
ing
n
r ai
i T
e
aw
H u For Linux, the code is root user code; for Windows, the code is Administrator’s inital code.

 Advance Settings
 NA

 Set the name and purchase quantity of Elastic Cloud Server


Huawei Cloud Service Certification Training Lab Guide Page 17

 Confirm the configuration information of the ECS.

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Step 5 Click “Buy now”. Hu
o n
i
 On the confirmation page, you can view resource details and send order.
Check the box “I have read andtagreed to the< Huawei Image Disclaimer>”, click “Submit

i ca
tif
Application”.

r
Ce
&
g
n in
r ai
T
ei
aw
H u
Step 6 Go back to Cloud service console and view Elastic Cloud Server that has been
created.
Huawei Cloud Service Certification Training Lab Guide Page 18

2.3 Log into Elastic Cloud Server


Three different methods are provided to log into the Elastic Cloud Server: VNC, putty, and MSTSC.

2.3.1 Log into an ECS Using VNC


This section introduces the method of logging-into Elastic Cloud Server by using VNC.

Step 1 Log into the console.


Step 2 Choose “Computing > Elastic Cloud Server”.
o n
Step 3 On the top-right of the list of Elastic Cloud Server, enter the name of ECS, IPti
i c a
tif
address or ID, and click to search.
r
Ce
&
n g
Step 4 Under “Operation” of the ECS ecs-myserver that has been
i ni found, click “Remote
login”.
r a
T
Step 5 (Optional) If “Press CTRL+ALT+DELETE to logi on” is displayed on the console,
e Remote login page to login.
w
please click “Send CtrlAltDel” bottom on the

u a
H
Step 6 Enter login information io
n
a t
fi c
Password: Huawei@12 ti
 User name: root

e r
C
&
g
n in
r ai
i T
e
a w
Hu

2.3.2 Log into an ECS Using Putty


If the elastic server purchased is bound to EIP, then the more common login method is to use putty
(or similar SSH client) through external network. This is easy and supports key login.
Huawei Cloud Service Certification Training Lab Guide Page 19

Step 1 Install putty. Obtain putty from Baidu software center and use it after a simple
installation.

Step 2 Copy Elastic IP (EIP) from ECS console.

Step 3 Open putty and paste EIP following the picture below.

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
rt if
e
Step 4 Enter Linux user root login information to login.
C
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 20

2.3.3 Log into an ECS Using MSTSC


If the operating system of the purchased server is Windows, then another common login method
is to use MSTSC through EIP to log into Windows server.

Step 1 Enter “mstsc” inside the start menu, enter the EIP host address and then click
“connect”.

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
w
Step 2 Enter username and password in the new pop-up window. Click “submit”.
a
Hu
Step 3 Click “Yes” to log into Windows.

o n
i
t Cloud Server
2.4 Adjust the Scale of Elastic ca
t ifi
e rMemory
2.4.1 Change vCPU and C
&
2.4.1.1 Operation Scenario g
inECS purchased can no longer satisfy business needs, refer to this section and modify
If the scalenof
r
the scaleaiof ECS.
YouTcan update vCPU, memory, disk and bandwidth of ECS, and add NIC to ECS or change the
i group that NIC belongs to.
esecurity
u awNotice
2.4.1.2
H  For annual/monthly paid ECS, the new price cannot be lower than the original price.
 When changing the scale of ECS, user cannot choose CPU and memory resources that are
sold out.
 When ECS scale (CPU or memory) goes down, ECS functions will be affected.

2.4.1.3 Process
Step 1 Log-into the console.
Step 2 Choose “Computing > Elastic Cloud Server”.
Huawei Cloud Service Certification Training Lab Guide Page 21

Step 3 In the list of ECS, query the status of ECS that is to be changed.
Step 4 (Optional) If the status of ECS is not off, click “More > Stop” under “Operation”.

n
t io
i c a
Step 5 When the status of ECS is off, click “Modify Specifications” under “Operation”.

r tif
Ce
&
ng
i ni
T ra
ei
a wthe target vCPU and memory.
Hu
Step 6 On the page of scale modification, choose

n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e 7 Click “OK”.
a wStep

Hu
Step 8 On the page of “Modify Specifications”, confirm that the target vCPU and
memory are correct, read and check the box to agree service agreement, then
click “Submit Application”.
Huawei Cloud Service Certification Training Lab Guide Page 22

2.5 Monitor Elastic Cloud Server

2.5.1 Set Elastic Cloud Server Alarm Rules


2.5.1.1 Operation Scenario
Through setting ECS alarm rules, user can customize monitor targets and alarm policy, understand
the real-time status of ECS in order to be alarmed.

n
The parameters of ECS alarm rules include alarm rule name, monitor object, monitor parameters,

io
alarm threshold, monitor period and whether to send notification, etc. This section introduces the
t
ica
method of setting ECS alarm rules.

2.5.1.2 Process
tif
e r
Step 1 Log-into the console. C
&
Step 2 Choose “Management and deployment > Cloud Eye”.
n g
i ni Rule”.
Step 3 On the navigation tree on the left, choose “Alarm > Alarm
Step 4 On the page of “Alarm Rule”, click “Create Alarmra
i T Rule” or choose existing alarm
rules to modify, and set ECS alarm rules.
e
a w
Hu
n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
a w
Hu
Step 5 Click “Create”.
Huawei Cloud Service Certification Training Lab Guide Page 23

n
t io
f ica
r ti
Ce
&
g
2.5.2 Verify the status of Elastic Cloud Server
in
ain
2.5.2.1 Operation scenario
T r
ei
Public cloud platform provides cloud monitoring service and can conduct daily surveillance on the
a w
status of ECS. You can view ECS monitor parameters directly on the console.

HuECS has just been created, please wait 5 to 10


As retrieving and transforming data can take time, the cloud monitor service page show the status
of ECS in the previous 5 to 10 minutes. If your
minutes before checking monitor data.
o n
2.5.2.2 Background Information at i
f
For ECS that are off, faulty or ihas
icits status deleted, their monitor parameters cannot be viewed on
the cloud monitor. When ECS
e rt is restarted or restored, these parameters can be viewed normally.
Cfor 24h are by default considered non-existent by the cloud monitor service
ECS that are off or faulty
and will be deleted& from the monitor list. They will no longer be monitored, but the related alarm
rules need to begcleared manually by the user.

2.5.2.3 Processin
in
T ra
ei 1 Log-into the console.
Step

u awStep 2 Choose “Computing > Elastic Cloud Server”.


H Step 3 On the top-right of the list of Elastic Cloud Server, enter the name of ECS, IP
address or ID, and click to search.

Step 4 Click the name of ECS to view details.


Step 5 On the detail page of ECS, choose “Monitor” to view monitor data.
Step 6 On the monitor region of ECS, click time period bottom or “Customized time
period” to set ECS monitor period.
The system offers monitor of a fixed time period or customized time period.
Huawei Cloud Service Certification Training Lab Guide Page 24

 Fixed time period includes 6 options ranging from 1h, 3h, 12h, 24h, 1 week to 1 months,
provided as user monitor period.
 For customized time period, user can choose a starting and an ending point of time within
one week as user monitor period.
Choose the following values to view monitor information:
 Last 3 hours
 CPU Usage

n
t io
f ica
r ti
C e
&
g
in
ain
T r
e i
For more information on ECS monitor rules, please referw
u a to <Cloud monitor service user guide>.

H
n
it o
i ca
r tif
Ce
&
g
n in
r ai
T
ei
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 25

3 Auto Scaling (AS) Lab Guide

3.1 Introduction n
t io
3.1.1 About This Lab ica
if
r t
Ce
This chapter introduces the functions of AS on operational level, covering different configuration
steps of AS.
&
g
3.1.2 Objectives
n in
i
Upon completion of this task, you will be able to:
T ra
ei
 How to create scaling group.
How to create scaling configuration.
w

a
Hu
 How to create scaling policy.
 How to implement scaling group.

n
3.1.3 Networking and Service tDescription io
i ca
t ifFigure 3-1 Architecture of AS

e r
C
&
g
n in
r ai
i T
e
a w
H u
Huawei Cloud Service Certification Training Lab Guide Page 26

3.1.4 Prerequisites
 Have registered HUAWEI CLOUD account.
 The account has availablility zone, VPC, subnet and security group.
 This account has basic parameters (parameters of vCPU, memory, image and disk) of cloud
server.

3.1.5 List of Lab Tasks


Application scenario Task Sub-task
n
t io
ica
Fast creation of Auto Scaling, Guide of creating Create scaling group

tif
and allows it to automatically Auto Scaling
Create scaling configuration
r
add ECS when needs grow and
Create scaling policy e
automatically reduce ECS when
needs decrease. C
&
Add scaling policy
g
Modify Auto Scaling Manually modify,
in to scaling group
Move instance
n
ai scaling configuration
configuration and scaling group add and delete
according to need, manually Auto Scaling
r
Modify
T scaling group
bind existing cloud server
instance, and delete instance i
e Delete Auto Scaling group
Modify
and scaling group according to
a w
need.
H u
n
it o
3.2 Create Auto Scaling ica
r tif
C
3.2.1 Configuration Roadmap e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 27

3.2.2 Operation Procedures


Step 1 Create scaling group
 AS group name: as-group
 Instance configuration:
 Minimum instance number: 1
 Expected instance number: 2
 Maximum instance number: 10
 Cooling duration (second): 900
o n
t i
a
AZ: This parameter needs to be configured according to different environment, for example:

AZ1
i f ic
rt
VPC: This parameter needs to be configured according to different environment, for

example: myvpc (192.168.0.0/16)
C e
&
 Subnet: This parameter needs to be configured according to different environment, for

gdifferent environment,
example: subnet-myvpc(192.168.0.0/24)
Security group: This parameter needs to be configured accordingnto

n i
for example: Sys-default
ai
 Load balancing: don not use
T r
 Health check method: ECS health check
e i
 Health check interval: 5 minutes
a w
Hu
 Instance removal policy: Oldest instance created based on the oldest configuration

n
it o
i ca
r tif
Ce
&
g
n in
r ai
T
ei
aw
H u

 Click “Next”

Step 2 Create scaling configuration


Huawei Cloud Service Certification Training Lab Guide Page 28

 Create AS configuration
 Name of configuration: as-config
 Configuration template: use new template
 Type of Cloud server: general use
 vCPU: 1 core
 Memory: 1GB
 Image type: public image
 Image: CentOS 7.2-64bit(40G)

n
 Disk: system disk normal IO
 Elastic IP: NA
t io
ica
 Login method: key pair

tif
Key pair: choose existing key par, for example KeyPair-33fb, if not, click “View key pair” to
create.
e r

C
Check “I acknowledge that I have obtained private key pair file xxx, and that without this file
I will not be able to log into ECS.”
&
g
in
 Click “Next”

ain
T r
ei
a w
Hu
n
it o
i ca
rt if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 29

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
aw
H u
Step 3 Create scaling policy
Add AS policy
 Policy name: as-policy
 Policy type: Scheduled
 Triggered time: Defined according to current time
 Action to perform: add 1 instance
 Cooling time (second): 900
 Click “OK”
Huawei Cloud Service Certification Training Lab Guide Page 30

n
t io
f ica
Step 4 Confirm scale
r ti
 Click “Apply Now” Ce
 Click “Confirm Application” &
g
in
in
Step 5 Check scaling instance
On the Auto Scaling service home page, choose “AS group”
r a
i T
e activity and the status of scaling
 Click scaling group created “as-group”

a w
Click “AS policy” to view the action performed by scaling

u
policy

H in the current scaling
Click “Instance” to view the number of instances

n
it o
i ca
r tif
Ce
&
g
n in
i alarm scaling policy
Step 6 aAdd
r
TChoose “AS policy” in scaling group “as-group”
i
e Click “Add AS policy”

a w 

Hu
 Policy name: as-policy
 Policy type: alarm policy
 Alarm triggered: Alarm
 Alarm name: as-alarm
 Trigger condition: CPU Usage, maximum > 20%
 Monitoring interval: 5 minutes
 Consecutive occurrences: 1
 Action to perform: add 1 instance
 Cooling time (second): 900
Huawei Cloud Service Certification Training Lab Guide Page 31

 Click “OK”

n
t io
f ica
r ti
Ce
&
g
in
ain
3.2.2.2 Result verification
T r
ei
On the “Scaling instance” page, instances in current scaling group as-group that triggered alarm
can be viewed.
a w
Hu
n
it o
i ca
r t if
C e
&
n g
3.3 Manually n iModify, Add and Delete Auto Scaling
a i
i Tr
e
3.3.1 Operation Procedures
u awStep 1 Move instance to scaling group
H  Go to Auto Scaling group “as-group” page. Click “Instance”
 Click “Add”
Choose existing cloud server instance in the dialogueue box, for example “ecs-myserver”
Huawei Cloud Service Certification Training Lab Guide Page 32

n
t io
f ica
r ti
Step 2 Modify scaling configuration
Ce
&
 Follow configurations below to create new Auto Scaling configuration “as-config-1”

g
in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if

C e
Go to original Auto Scaling group “as-group”, click “Modify”

&
ing
n
r ai
i T
e
aw
H u
 Choose new Auto Scaling configuration “as-config-1”, click “OK”
Huawei Cloud Service Certification Training Lab Guide Page 33

Step 3 Modify scaling group


n
t io
ica
 Click “Modify” on the last column of “Basic information”
In the dialogueue box of “Modify scaling group”, modify “Min. instance” to 0.
tif

 Click “OK”
e r
C
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
rt if
e
C policy
Step 4 Stop Auto Scaling
&
g
n in
r ai
i T
e
a w
Hu

Step 5 Perform “Move out of scaling group and delete” on all the instances
Huawei Cloud Service Certification Training Lab Guide Page 34

Step 6 Delete Auto Scaling group

n
t io
f ica
r ti
C e
&
Auto Scaling group can be deleted only after deleting all the instances in it.n
g
i ni
T ra
ei
3.4 Question
a w
1. Can on scaling group use more than one scaling
H u policy at one time?
n
2. Can instances added according to scaling policy be automatically deleted when they are no used?

it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
a w
H u
Huawei Cloud Service Certification Training Lab Guide Page 35

4 Elastic Volume Service (EVS) Lab Guide

4.1 Introduction n
t io
4.1.1 About This Lab f ica
r ti
This chapter introduces basic functions of Elastic Volume Service.
Ce
&
4.1.2 Objectives g
in
Upon completion of this task, you will be able to:
ain
 Purchase EVS.
T r
 Attach EVS.
ei
 Initialize EVS (for Windows and Linux).
a w
Hu
 Expand EVS (for Windows and Linux).

4.1.3 Prerequisites
o n
i
tCloud account.
ca
fi
 Have already registered Huawei

t i
4.1.4 List of Lab Tasks er
C
Number Task& Sub-task Application scenario
1
ingPurchase EVS Purchase EVS Purchase EVS on Huawei

a in Enterprise Cloud

i Tr Attach EVS Attach EVS purchased to ECS


e2
a w Initialize data Initialize Windows ECS data Log into initialized Windows ECS

u
disk disk data disk
H Initialize Linux ECS data Log into initialized Linux ECS data
disk disk
3 Expand EVS Expand Windows ECS Expand EVS and log into expanded
system disk and data disk initialized EVS on Windows ECS
Expand Linux ECS system Expand EVS and log into expanded
disk and data disk initialized EVS on Linux ECS
Huawei Cloud Service Certification Training Lab Guide Page 36

4.2 Purchase EVS

4.2.1 Purchase Notice


System disk can be automatically added when creating cloud server, so there is no need to purchase
it separately.
Data disk can be purchased when creating cloud server and be attached to cloud server by the
system automatically. You can also purchase EVS separately and attach it to cloud server after
purchasing cloud server.
n
t io
ica
4.2.2 Operation Procedures
tif
Step 1 Log into HUAWEI CLOUD website.
e r
Step 2 In the HUAWEI CLOUD home page, click “Elastic Volume Service (EVS)” under C
“Products” on the bottom of the page. Turn to EVS home page. &
g
Step 3 Click “Buy Now”. in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
g
n in EVS basic information following the instructions, as demonstrated
i
Step 4 Configure
ahere.
T r
e i Parameter Parameters instructions Example figures

aw Billing mode You can pay for EVS disks in two ways:
Hu
Pay-per-use
Yearly/Monthly
Pay-per-use
Region Specifies the region of the tenant. northchina
Availability Specifies the availability zone (AZ) where the AZ1
zone EVS disk is to be created.
Source You can create new EVS disks or create EVS Do not specify
disks using the data source.
Disk type Normal IO Normal IO
Huawei Cloud Service Certification Training Lab Guide Page 37

Parameter Parameters instructions Example figures


High IO
Ultra-high IO
Capacity (GB) Specifies the disk size. Choose 10GB for
The parameter value is as follows: data disk.
System disk: 1 GB to 1024 GB
Data disk: 10 GB to 32768 GB
Disk name If you create disks in a batch, this parameter “Volume-0001”
n
io
value is used as the prefix of disk names, and
t
ica
one disk name will be composed of the
parameter value and a four-digit number.

ti f
Quantity Specifies the number of disks to be created. 1
e r
The default value is set to 1, which means C
only one disk is created. Currently, you can
&
create up to 100 disks at a time.
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
aw
H u

Step 5 Click “Next”.


Step 6 Confirm EVS information, click “Submit ApplicationClick “Submit Application”.
Step 7 Go back to EVS home page.
Step 8 After EVS is created and its status changed to “Available”, click “Attach” under
“Operation” of EVS.
Huawei Cloud Service Certification Training Lab Guide Page 38

Step 9 In the dialogueue box, choose the ECS to which the disk will attach, choose the
attach point in the drop-down menu, click “Confirm”.

o n
i
t is
a
“Attach point” is corresponding letter of the disk on cloud server. No repetition of attach point
ic
allowed for EVS on the same cloud server.
i f
e rt
Step 10 Go back to the list of disk. If the status of disk is “in use”, it is successfully
attached. C
&
ng
i ni
T ra
ei
4.3 Initialize Data Disk (Windows) aw
Hu
4.3.1 Operation scenario
o n
i
t R2 Enterprise” as an example.
c a
This text takes “Windows Server 2008

t ifi needs to be initialized on the cloud server to function normally.


For the following scenario, disk

e r creating cloud server, it should be initialized after the creation of
If data disk is added when
C
cloud server is complete.
 & to cloud server, it needs to be initialized.
When disk is bound

ing
4.3.2 Operation
a in Prerequisties
r created a Windows ECS and logged into ECS.
THave
i

e Data disk has been attached and the disk or the expanded part has not yet been initialized.
w

u a
H Operation Procedures
4.3.3
Step 1 Log into created ECS, on the desktop of ECS, choose “Start”, right-click
“Computer” and choose “Management”. “Computer management” window is
displayed.

Step 2 On the left navigation tree, choose “Storage > Disk management”.
Step 3 Disk list is displayed on the right window, an “Initialize disk” dialogueue box
appears, indicating the need to choose a disk to initialize. Choose “MBR (main
boot record)” and click “OK”.
Huawei Cloud Service Certification Training Lab Guide Page 39

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
i
Step 4 Right-click the region not yet distributed on the disk, choose “New simple
e
w
volume”.
a
Hu
n
it o
i ca
rt if
C e
&
ing
n
r ai
i T
e
aw
H u

Step 5 “New Simple Volume Wizard” dialogueue box appears, follow the instructions
and click “Next”.
Huawei Cloud Service Certification Training Lab Guide Page 40

n
t io
f ica
r ti
Ce
&
g
in
ain
Step 6 Set the scale of volume according to need, the T r value is the maximum
ei
default
allowed. Click “Next”.

a w
Hu
n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
a w
Hu

Step 7 Assign driver letter and click “Next”.


Huawei Cloud Service Certification Training Lab Guide Page 41

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
i
Step 8 Format new volume according to configuration, click “Next” to complete
e
w
creation.
a
Hu
n
it o
i ca
rt if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 42

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
Step 9 Click “finish” to complete the wizard. Wait e
i
initialization. When the status of volumew
a moment for the system to complete

u a is “Healthy”, it is successfully initialized.

H
n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
a w
Hu
Huawei Cloud Service Certification Training Lab Guide Page 43

4.4 Initialize Data Disk (Linux)

4.4.1 Operation Scenario


This text takes “CentOS 7.0 64 bit” as an example.
For the following scenario, disk needs to be initialized on the cloud server to function normally.
 After the cloud server is created, data disk on this server needs to be initialized.
 When disk is bound to cloud server, it needs to be initialized.
n
4.4.2 Operation Prerequisites t io
f ica
ti
 Have created Linux ECS and Logged into cloud server with “root” account.

e r
Data disk has been attached to cloud server and the disk or the expanded part has not yet
been initialized. C
&
g
4.4.3 Create Partitions and Mount a Disk
in
a in
rwill be created using fdisk, and
The following example shows you how a new primary partition can be created on a new data
T
ei will be formatted using the ext4
disk that has been attached to a server. The primary partition

w mounting upon system start.


MBR is the default partition style. Furthermore, the partition
file system, mounted on /mnt/sdc, and configuredaautomatic

Step 1 Run these command and query information Hu about the added data disk:
o n
fdisk -l
i
c at“/dev/xvdb”
The return message is as follows, showing
“/dev/xvda” is the system disk,iand
that the cloud server currently has two disks,

if is the newly added data disk.

e rt
C
&
g
n in
r ai
i T
e
a w
Hu
Step 2 Run the following commands and go into fdisk mode, start to partition the newly
added data disk.
fdisk Newly added data disk
Take newly attached data disk “/dev/xvdb” as an example:
fdisk /dev/xvdb
The return message is as follows:
Huawei Cloud Service Certification Training Lab Guide Page 44

Step 3 Enter “n”, press “Enter” and start to create new partition.
Enter “n” means adding a new partition.
n
The return message is as follows, showing that there are two types of disk partitions:
t io
ica
 Choosing p creates a primary partition.
 Choosing e creates an extended partition.
tif
e r
Command (m for help): n
C
Partition type:
&
p primary (0 primary, 0 extended, 4 free)
g
e extended
in
ain
r
Step 4 Take creating a primary partition as an example, enter “p” and press “Enter” to
T
create a primary partition.
i
The return message is as follows, “Partition number” e
a wmeans serial number of primary partition,
which can be 1-4.
H u
Partition number (1-4, default n
Select (default p): p

it o
1):

Step 5 Enter the serial number a


f i c of the primary partition and press “Enter”. Primary
partition number “1”
t i is used in this example.
r “First sector” means initial magnetic cylinder region, which can
The return message is asefollows,
C The default value is 2048.
be from 2048 to 209715199.
& (1-4, default 1): 1
g
in (2048-209715199, default 2048):
Partition number

n
ai
First sector

Step 6r Select the default start cylinder number “2048” and press “Enter”.
i T
eThe return message is as follows, “Last sector” means the end of magnetic cylinder region, which
w
a can be from 2048 to 209715199. The default value is 209715199.
Hu First sector (2048-20971519, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199):

Step 7 Select the default end cylinder number “20971519” and press “Enter”.
The return message is as follows, meaning that the a primary partition has been created for a 100-
GB data disk.

Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199):


Using default value 209715199
Huawei Cloud Service Certification Training Lab Guide Page 45

Partition 1 of type Linux and of size 100 GiB is set


Command (m for help):

Step 8 Enter “p” and click “Enter” to view detail information on the newly created
partition.
Detail information of newly created partition “/dev/xvdb1” is as follows.

n
t io
f ica
r ti
Ce
Step 9 Enter “w” and press “Enter” to write the result to partition table. &
g
The return message is as follows, meaning the partition is created.
in
ain
Command (m for help): w
T r
i
The partition table has been altered!

e
Calling ioctl() to re-read partition table.
a w
Syncing disks.
H u
n
Step 10 Run the following command and backup the new partition table to data disk.
partprobe it o
i ca and set file system of newly created partition to the
if
Step 11 Run the following command
format required bytsystem.
r
e /dev/xvdb1
mkfs -t format of fileCsystem
& as an example:
Take file system “ext4”
mkfs -t ext4 g
in /dev/xvdb1
The returnnmessage is as follows:
r ai
i T
e Filesystem label=
[root@ecs-myserver ~]# mkfs -t ext4 /dev/xvdb1

w
mke2fs 1.42.9 (28-Dec-2013)

a
Hu
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621184 blocks
131059 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2174746624
000 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
Huawei Cloud Service Certification Training Lab Guide Page 46

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,


4098000, 7962624, 11239424, 20480000, 238878872
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

The formatting takes a period of time. Observe the system running status, and do not exit.

Step 12 Run the following command and create a mount point.


mkdir Mount path
n
Take creating new load path “/mnt/sdc” as an example:
t io
ica
mkdir /mnt/sdc

tif
r
Step 13 Run the following command to mount the new partition on the mount point
created in step 12.
C e
&
mount /dev/xvdb1 Mount point
Take mounting newly created partition to “/mnt/sdc” as an example:
g
mount /dev/xvdb1 /mnt/sdc
n in
Step 14 Run these command and view the mount result. r a i
i T
df -TH e
The return message as follows shows that the newlyw
u a created partition “/dev/xvdb1” is mounted to

H
“/mnt/sdc”.

n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
4.4.4 Set Automatic Disk Mounting at System Start
eTo automatically mount a disk when a server starts, you should not specify its partition, for example
w
a /dev/xvdb1, in /etc/fstab. Because the sequence of cloud devices, and therefore their names may

H u change during the server stop and start. You are advised to use the universally unique identifier
(UUID) in /etc/fstab to automatically mount a disk at system start.

UUID (universally unique identifier) is the unique serial number provided by Linux system to storage devices.

Step 1 Run the following command and query UUID of disk partition.
blkid disk partition
Take query UUID of partition “/dev/xvdb1” as an example:
blkid /dev/xvdb1
The return message is as follows, showing the UUID of “/dev/xvdb1”,
Huawei Cloud Service Certification Training Lab Guide Page 47

[root@ecs-myserver ~]# blkid /dev/xvdb1


/dev/xvdb1: UUID="1851e23f-1c57-40ab-86bb-5fc5fc606ffa" TYPE="ext4"

Step 2 Run the following command, use “vi” editor to open “fstab” documents.
vi /etc/fstab

Step 3 Enter “i” to go to editing mode.


Step 4 Move cursor to the end of file, press“Enter” and add the following content.

n
UUID=1851e23f-1c57-40ab-86bb-5fc5fc606ffa /mnt/sdc ext4 defaults 0 2

Step 5 Press “ESC” and enter “:wq”, then press “Enter”. t io


f ica
ti
Save configuration and quit the editor.

e r
C
&
4.5 Expand EVS (Windows) g
in
ain
4.5.1 Operation Scenario
T r
ei
This text takes “Windows Server 2008 R2 Enterprise” as an example.

a w
Hu
When disk space is insufficient, there are two ways to solve the problem. This section introduces
the method of disk expansion.
 Expand original disk space.
n
it o
Apply for new disk space and attach it to cloud server.

i ca
4.5.2 Restrictions
r t if

C e
Data disk and system disk can both be expanded.

&
 Only when a disk is “Available”, meaning it is not attached to a cloud server, can it be

g
expanded. Disk in use cannot be expanded.

n in
4.5.3 Operatioina i Procedures
i Tr expansion operation. The methods for expanding data disk and system disk are different:
Execute
e
a
4.5.3.1 w
Data Disk Expansion:
u
H Step 1 Log into the console.
Step 2 Choose “Storage > EVS”.
Step 3 Under the EVS list, click “Detach” under “Operation” for the designated disk.

Step 4 Under the EVS list, click “More > Expand” under “Operation” for the designated
disk.
Huawei Cloud Service Certification Training Lab Guide Page 48

Step 5 Set the capacity that would be added to the disk according to system instruction.
 Added capacity: 50G.

n
t io
f ica
r ti
Step 6 Click “Next”. Ce
&
Step 7 Click “Submit”.
g
in
Step 8 Go back to EVS list, click
ain
to view the new capacity. When the capacity is the
defined value, the expansion is successful.
T r
Step 9 Click “Attach” under “Operation” of the disk. ei
a w
Hu
Attach disk to cloud server.

n
it o
i ca
r t if
C e
&
ing
n
ai
r the successful expansion, the newly attached disk needs to be initialized before being used by cloud
i TAfter
e server. Next on how to initialize disk.

u aw
H Step 10 Back to concole, choose “Computing > ECS”.

Step 11 Find the line of this cloud server, click “Remote login” under “Operation” to log
into cloud server.

Step 12 On the “Server management” page, choose the disk to be expanded. The
capacity before expansion is displayed.
Huawei Cloud Service Certification Training Lab Guide Page 49

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
w
Step 13 Right-click the disk and choose “Extend volume”.

u a
H
n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
a w
Hu

Step 14 In the dialogueue box “Expand Volume Wizard” that appears, choose “Next”.
Huawei Cloud Service Certification Training Lab Guide Page 50

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
i
e enter the capacity that needs to
w
Step 15 In the dialogueue box “Expand Volume Wizard”,
a (MB) (E):”, then click “Next”.
u
be added in the line of “Choose capacity
H
n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
a w
Hu

Step 16 Click “finish” to complete the wizard. After the expansion, the disk capacity will
be larger than before.
Huawei Cloud Service Certification Training Lab Guide Page 51

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
4.5.3.2 System Disk Expansion:
a w
Step 1 Log into the console. Hu
n
Step 2 Choose “Computing > ECS”.
it o
i ca
Step 3 In the line of cloud server to which the EVS to be expanded belongs, click
tif “Operation”.
“More > Stop” under
r
Ce
&
g
n in
i
T ra
e i
aw
H u
Step 4 Under the EVS list, click “Detach” under “Operation” for the designated disk.

Step 5 Under the EVS list, click “More > Expand” under “Operation” for the designated
disk.

Step 6 Set the capacity of new disk according to system instruction.


Huawei Cloud Service Certification Training Lab Guide Page 52

 Added capacity: 20G.

n
t io
f ica
r ti
Ce
Step 7 Click “Next”. &
g
Step 8 Click “Submit”.
n in
a i
defined value, the expansion is successful. i T
Step 9 Go back to EVS list, click r When the capacity is the
to view the new capacity.

Step 10 Click “Attach” under “Operation” of the w


e
u a disk.

H
n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
a w
Hu
After the successful expansion, the newly attached disk needs to be initialized before being used by cloud
server. Next on how to initialize disk.

Step 11 Back to console, choose “Computing > ECS”.


Step 12 Find the line of this cloud server, click “More > Start” under “Operation”. Start
Cloud server

Step 13 Click “Remote login” under “Operation” of cloud server.


Step 14 On the “Server management” page, choose the disk to be expanded. The
capacity before expansion is displayed.
Huawei Cloud Service Certification Training Lab Guide Page 53

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
Step 15 Right-click the disk and choose “Extend volume”.
ei
a w
Hu
n
it o
i ca
rt if
C e
&
ing
n
r ai
i T
e
aw
H u

Step 16 In the dialogueue box “Expand Volume wizard” that appears, choose “Next”.
Huawei Cloud Service Certification Training Lab Guide Page 54

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
Step 17 In the dialogueue box “Expand Volume Wizard”, enter the capacity that needs to
be added in the line of “Choose capacity w
u a (MB) (E):”, then click “Next”.

H
n
it o
i ca
r tif
Ce
&
g
n in
i
Tra
e i
aw
H u

Step 18 Click “Done” to finish. After the expansion, the disk capacity will be larger than
before.
Huawei Cloud Service Certification Training Lab Guide Page 55

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
4.6 Expand EVS (Linux)
a w
4.6.1 Operation Scenario
Hu
n
it o
a
A primary partition has been created for a 10-GB data disk.

i c
if
When disk space is insufficient, there are two ways to solve the problem. This section introduces

r
the method of disk expansion.
t

C e
Expand original disk space.

&
 Apply for new disk space and attach it to cloud server.

g
4.6.2 Restrictions
n in
r ai disk and system disk can both be expanded.
TOnly when a disk is “Available”, meaning it is not attached to a cloud server, can it be
 Data
i
e expanded. Disk in use cannot be expanded.

a w
H u
4.6.3 Operation Procedures
For example, when there is a disk attached to Linux ECS, in the partition “/dev/xvdb1”, file system
format as “ext4”, mounted to “/mnt/sdc” and needs to be expanded.
Execute expansion operation. The methods for expanding data disk and system disk are different:

4.6.3.1 Data Disk Expansion:


Step 1 Log into the console.
Step 2 Choose “Computing > ECS”.
Huawei Cloud Service Certification Training Lab Guide Page 56

Step 3 In the line of cloud server to which the EVS to be expanded belongs, click
“Remote login”.
Logged into cloud server with “root” account.

Step 4 Run the following command to unload disk.


umount /mnt/sdc

Step 5 In the line of cloud server to which the EVS to be expanded belongs, click
“More > Stop” under “Operation”.

Step 6 Click “EVS” on the left navigation tree.


n
t io
ica
Go to EVS mangement page.

Step 7 In the line EVS to be expanded, click “Detach” under “Operation”.


tif
e r
C
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
if
Step 8 Under the EVS list, click “More > Expand” under “Operation” for the designated
disk.
e rt
C that would be added to the disk according to system instruction.
Step 9 Set the capacity
& 10G.
g
Added capacity:

n in
r ai
i T
e
a w
Hu

Step 10 Click “Next”.


Huawei Cloud Service Certification Training Lab Guide Page 57

Step 11 Click “Submit”.

Step 12 Go back to EVS list, click to view the new capacity. When the capacity is the
defined value, the expansion is successful.

Step 13 Click “Attach” under “Operation” of the designated disk.

n
t io
f ica
r ti
C e
&
g
in
After the successful expansion, the newly attached disk needs to be initialized before being used by cloud

in
server.

r a
i T
Step 14 Back to console, choose “Computing > ECS”.
e
a w
Hu
Step 15 Find the line of this cloud server, click “More > Start” under “Operation”. Start
Cloud server

n
Step 16 Click “Remote login” under “Operation” of cloud server.
o
i
Logged into cloud server with “root”taccount.
i ca
r tf
Step 17 On the cloud serveriremote login page, run the following command to view disk

Ce
partition information.
fdisk -l
The return message&
g is as follows, showing that the cloud server currently has two disks, “/dev/xvda”

n in
is the system disk, “/dev/xvdb” is the data disk.

r ai
i T
e
a w
Hu

Now, “/dev/xvdb” is expanded successfully.


Huawei Cloud Service Certification Training Lab Guide Page 58

After the expansion, how to use the expanded disk (including how to partition, under which menu it is
attached) depends on the demand of the user. This text is only a reference. Please plan your usage according
to actual need.

Step 18 Run the following command, enter “d” and delete the original zone
“/dev/xvdb1”.
fdisk /dev/xvdb
The return message is as follows:

n
io
[root@ecs-myserver ~]# fdisk /dev/xvdb

t
Welcome to fdisk (util-linux 2.23.2).

f ica
ti
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
e r
Command (m for help): d C
Selected partition 1 &
g
in
Partition 1 is deleted

ain
r
Command (m for help):

i T
e
Step 19 Enter “n”, click “Enter” and start to create partition.
Enter “n” means adding a new partition.
a w
Hu
The return message is as follows, showing that there are two partition types of disk:
“p” means primary partition.
n

 “e” means extended partition.


it o
i ca
if
Command (m for help): n
Partition type:
r t
e extended C e
p primary (0 primary, 0 extended, 4 free)

&
g
Step 20 Take creating a principal zone as an example, enter “p” and click “Enter” to

n in a primary partition.
create

a i message is as follows, “Partition number” means number of primary partition, which


r
The return
canT
i
be 1-4.
e Select (default p): p
aw
H u Partition number (1-4, default 1):

Step 21 Take partition number “1” as an example. Enter “1” for primary partition number
and click “Enter”.
The return message is as follows, “First sector” means initial magnetic cylinder region, which can
be from 2048 to 230686719. The default value is 2048.

Partition number (1-4, default 1): 1


First sector (2048-230686719, default 2048):

Step 22 Take 2048 for initial magnetic cylinder number as an example, click “Enter”.
Huawei Cloud Service Certification Training Lab Guide Page 59

The return message is as follows, “Last sector” means the end of magnetic cylinder region, which
can be from 2048 to 230686719. The default value is 230686719.

First sector (2048-230686719, default 2048):


Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-230686719, default 230686719):

Step 23 Take 230686719 for end magnetic cylinder number as an example, click “Enter”.
The return message is as follows, meaning the partition is completed.

n
Last sector, +sectors or +size{K,M,G} (2048-230686719, default 230686719):
Using default value 230686719
t io
ica
Partition 1 of type Linux and of size 10 GiB is set

f
Command (m for help):

r ti
Step 24 Enter “p” and click “Enter” to view detail information on the newly created
partition. Ce
&
g
Detail information of newly created partition “/dev/xvdb1” is as follows.

in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if
Step 25 Enter “w” and click “Enter” to write the result to partition list.

e
The return message is as follows, meaning the partitioin is created.
C
&
Command (m for help): w

n g
The partition table has been altered!

n iioctl()
a i disks. to re-read partition table.
Tr
Calling
Syncing

ei
aw Step 26 Run the following command to check and adjust the scale of “/dev/xvdb1”.

H u e2fsck -f /dev/xvdb1
The return message is as follows:

[root@ecs-myserver ~]# e2fsck -f /dev/xvdb1


e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/xvdb1: 11/6553600 files (0.0% non-contiguous), 459544/26214144 blocks
resize2fs /dev/xvdb1
Huawei Cloud Service Certification Training Lab Guide Page 60

The return message is as follows:


[root@ecs-myserver ~]# resize2fs /dev/xvdb1
resize2fs 1.42.9 (28-Dec-2013)
Resizing the filesystem on /dev/xvdb1 to 26214144 (4k) blocks.
The filesystem on /dev/xvdb1 is now 26214144 blocks long.

4.6.3.2 System Disk Expansion:


Step 1 Log into the console.

n
Step 2 Choose “Computing > ECS”.
Step 3 In the line of cloud server to which the EVS to be expanded belongs, click
t io
ica
“More > Stop” under “Operation”.

tif
Step 4 Click “EVS” on the left navigation tree.
e r
Go to EVS management page. C
&
Step 5 In the line EVS to be expanded, click “Detach” under “Operation”.
g
in
ain
T r
i
Step 6 Under the EVS list, click “More > Expand” under “Operation” for the designated
e
w
disk.
a
Hu
Step 7 Set the capacity that would be added to the disk according to system instruction.
 Added capacity: 10G.
n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
aw
H u
Step 8 Click “Next”.
Step 9 Click “Submit”.

Step 10 Go back to EVS list, click to view the new capacity. When the capacity is the
defined value, the expansion is successful.

Step 11 Click “Attach” under “Operation” of the designated disk.


Huawei Cloud Service Certification Training Lab Guide Page 61

n
it o
i c aby cloud
tif
After the successful expansion, the newly attached disk needs to be initialized before being used
server.
r
Ce
Step 12 Back to console, choose “Computing > ECS”. &
g
n “Operation”.Start
ni
Step 13 Find the line of this cloud server, click “More > Start” under
Cloud server
a i
T r
Step 14 Click “Remote login” under “Operation” of cloud
e i server.
Logged into cloud server with “root” account.
a w
Step 15 Run these commands and view the disk.
Hu
fdisk -l
n
it o represents system disk.
The return message is as follows, “/dev/xvda”

i ca
r tif
Ce
&
g
n in
r ai
i T
e
a w
Hu
If the “system disk” is to be expanded, then the “partition” to be expanded should be configured to automatic
mount during start-up, otherwise the expanded data will not be displayed.

The following steps show how to set the expanded capacity of system disk as a new partitioin and
to mount it under “/opt”.

Step 16 Run the following command, go to fdisk mode. Take “/dev/xvda” as an example.
fdisk /dev/xvda
Huawei Cloud Service Certification Training Lab Guide Page 62

The return message is as follows:

Step 17 Enter “n”, click “Enter” and start to create partition.


In this example, 2 partitions already exist on the system disk, so the system automatically adds a

n
3rd partition.
The return message is as follows:
t io
f ica
r ti
Ce
&
g
in
ain
Step 18 Enter the starting magnetic cylinder number of the new partition. For default
value, click “Enter”.
T r
ei
Starting magnetic cylinder number must be greater than the ending magnetic cylinder number of
the original partition.
a w
Step 19 Enter the ending magnetic cylinder number
H u of the new partition, then click
“Enter”.
n
it o cylinder number is used.
In this example, default ending magnetic
The return message is as follows: a
if ic
e rt
C
&
g
Step 20 Enter
n in“p” and click “Enter” to view newly created partition.
r ai message is as follows:
T
The return

e i
a w
Hu

Step 21 Enter “w” then click “Enter”.


The return message is as follows:
Huawei Cloud Service Certification Training Lab Guide Page 63

Step 22 Run the following command and backup the new partition list to disk.
partprobe

n
io
Step 23 Run the following command to set file system format for the newly created
partition.
t
f ica
ti
mkfs -t ext4 /dev/xvda3

e r
Take file format “ext4” as an example, the return message is as follows. Format takes time. Please
observe system functioning and do not quit.
C
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
Step 24 Run the following command to mount the newly created partition to the menu
&
that requires more space. Take “/opt” as an example.

g
in
mount /dev/xvda3 /opt

in
If a
r
i Twill be hidden. Therefore, you are advised to mount the new partition on an empty directory or a newly
the new partition is mounted on a directory that is not empty, the subdirectories and files in the directory

e
w
created directory. If the new partition must be mounted on a directory that is not empty, move the

u a subdirectories and files in this directory to another directory temporarily. After the partition is successfully

H
mounted, move the subdirectories and files back.

Step 25 Run these commands and view the mount result.


df -TH
The final return message is as follows:
Huawei Cloud Service Certification Training Lab Guide Page 64

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
rt if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 65

5 Volume Backup Service (VBS) Lab Guide

5.1 Introduction n
t io
5.1.1 About This Lab
ifica
r t
Ce
This chapter introduces basic functions of Volume Backup Service, and the operations related to
backup policy.
&
g
5.1.2 Objectives
n in
i
Upon completion of this task, you will be able to:
T ra
ei
 How to create backup.
How to delete backup.
w

a
Hu
 How to restore backup and create EVS.
 Master operations related to backup policy.

n
5.1.3 Prerequisites it o
i ca account.

Have created VPC. rt


if
Have registered HUAWEI CLOUD

Ce

5.1.4 List of Lab Tasks &


g
Number inTask
in Sub-task Application scenario
1 ra
T Create Create backup Create EVS on Huawei Enterprise Cloud,

ei
backup and create backup files.

u aw Delete backup Delete a single backup or backup in batch.

H Restore data using


backup
Restore EVS data using backup, or create
new EVS using backup
2 Manage Create backup policy Create backup policy
backup
policy Edit backup policy Edit backup policy
Bind EVS Bind EVS
Execute backup policy Execute backup policy
Delete backup policy Delete backup policy
Huawei Cloud Service Certification Training Lab Guide Page 66

5.2 Basic Operations of VBS

5.2.1 Create Backup


Step 1 Create EVS
Create EVS, refer to http://support.hwclouds.com/pg-evs/zh-cn_topic_0017934424.html for detail
steps. The parameters of this test are as below, other parameters are by default.
Parameter Value
n
t io
ica
Billing type On demand

tif
r
Step 2 Create backup: there are two entries for creating backup, on VBS and EVS page
respectively.
Ce
&
Method 1: Create backup from VBS page.
g
in
in
1) Go to VBS page.

r a
2) Click .
i T
3) Choose the EVS previously created.
e
a w
Hu
n
it o
i ca
4)
t if
Choose backup configuration.
r
C e
&
ing
n
r ai
i T
e
aw
H u

5) Click “Next”.
6) Check the box “I have read...” on the new page, click “Submit”.
7) On the VBS page, submitted backup task will appear in the mission centre at the top
of the page.
Huawei Cloud Service Certification Training Lab Guide Page 67

8) After about 1 minute, refresh the VBS page, backup information created will appear
on the list.

n
t io
f ica
ti
9) Wait a moment, refresh the VBS page, backup status changed to “Available”, which
means that backup is completed.
e r
C
&
g
in
ain
The waiting time depends on the quantity of data that is being backed up. 50G takes around 35 minutes.

T r
Method 2: Create backup from EVS page.
ei
1) Access EVS page.
a w
Hu backup” on the far right of the EVS previously
2) In the EVS list, click “More” -> “Create
created.
n
it o
i ca
r tif
C e
&
3) On the new page that appears, click “Apply Now”.
4) Forgthe rest of the steps, refer to step 5-8 of creating backup from VBS page.

n in
i
5.2.2 DeleteraBackup
i T
e a Single Backup
w
5.2.2.1 Delete
a
u
H Step 1 Go to VBS page.
Step 2 In the backup list, click “Delete” to the far right of the backup to be deleted.

Step 3 Click “OK” in the window that appears.


Huawei Cloud Service Certification Training Lab Guide Page 68

Step 4 The status of backup changed to “Being deleted”. After a moment, refresh the
page. If the backup is no longer in the list, it is deleted successfully.
n
t io
f ica
r ti
The time of this operation depends on the quantity of data that is being deleted.
Ce
&
g
5.2.2.2 Delete Backup in Batch
in
ain
Step 1 Go to VBS page.
T r
i
e of this page.
Step 2 On the left of backup list, choose the backup to be deleted or check the box on
a w
the top-left corner to choose all the backups

H u
n
it o
i ca
r tif
Ce the top-left corner of the list. Click “OK” in the window that
Step 3 Click “Delete” on
&
appears.

g
n in
r ai
i T
e
a w
Hu

Step 4 The status of the selected backups changed to “Being deleted”. After a moment,
refresh the page. If the backups are no longer in the list, they are deleted
successfully.
Huawei Cloud Service Certification Training Lab Guide Page 69

The time of this operation depends on the quantity of data that is being deleted.

5.2.3 Restore Backup


n
5.2.3.1 Restore Data Using Backup
t io
f ica
ti
Step 1 Go to VBS page.
Step 2 In the backup list, click “Restore data” to the far right of the backup to be
e r
restored. C
&
g
in
ain
r
Step 3 Click “OK” in the window that appears.

i T
e
a w
Hu
n
it o
i ca
r t if
C e
&
Step 4 Refresh VBS page, the status of backup is changed to “Being restored”.

ing
n
r ai
i T
Step 5 Go to EVS page, the status of EVS related to the backup is changed to “Being
e restored”.

aw
H u
Step 6 After a moment, go to VBS and EVS page, the status of both the backup and the
EVS is “Available”. The data is restored successfully.

The time of this operation depends on the quantity of data that is being restored.
Huawei Cloud Service Certification Training Lab Guide Page 70

5.2.3.2 Create EVS Using Backup


Step 1 Go to VBS page.
Step 2 In the backup list, click “Create disk” to the far right of the backup to be
restored.

n
t io
f ica
Step 3 On the new page that appears, choose “Pay-per-use” for “Billing Mode”, click
r ti
“Next”.
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
rt if
C e
Step 4 Click “Submit” on the new page.

&
Step 5 Go to EVS page, the newly created EVS is in the list. Refresh the page after a
ng
moment, and the status of EVS is changed to “Being restored”.

n i
r ai
i T
e
w
ua
Step 6 Go to VBS page, the status of backup in the list is changed to “Being restored”.

Step 7 After a moment, go to VBS and EVS page, the status of both the EVS and the
backup is “Available”. EVS is successfully created using backup.
Huawei Cloud Service Certification Training Lab Guide Page 71

The time of this operation depends on the quantity of data that is being restored.

5.3 Manage Backup Policy


n
5.3.1 Create Backup Policy t io
f ica
Step 1 Go to VBS page, click “Policies” to access backup policy page. Click “Create
r ti
backup policy”.
Ce
&
g
in
ain
T r
ei
a w
Step 2 Configure backup policy parameters as
Hu below, click “OK”.
n
 Name: “policy-db9b”
 Activate policy: “on”
it o

i ca exact hour from the current time)
Backup Time: “10:00” (the nearest
Backup period: “By day”,if“every 2 days”
rt “1 month”

Retention Rule: “By e


C
 time”,

&
g
n in
r ai
i T
e
a w
Hu

Step 3 In the list of backup policy appears the newly created policy.
Huawei Cloud Service Certification Training Lab Guide Page 72

5.3.2 Edit Backup Policy


Step 1 Go to backup policy page, choose the policy to edit, click “Edit”.

n
t io
f ica
Step 2 Edit the following backup policy in the window that appears, then click “OK”.
r ti
 Backup time: “Every day”, “11:00” (the nearest exact hour from the current time) Ce
 Activate policy: “on” &
g
in
Retention Rule: “By quantity”, “2”, check “retain the first backup in this month”

ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
ng
Step 3 Parameters of policy defined as mentioned in the last step.
n i
r ai
i T
e
w
uaBind EVS to ECS
5.3.3
H
Step 1 Go to backup policy page, choose the EVS policy to be bound, click “Associated
Disk”.

Step 2 On the left of the list in the window that appears, choose the EVS to be bound to
policy. Click “I have read and agree to the Huawei Volume Backup Service
Agreement”, then click “OK”.
Huawei Cloud Service Certification Training Lab Guide Page 73

n
t io
f ica
r ti
Step 3 The list of “Associated Disks” shows the information of EVS previously chosen.Ce
&
g
in
ain
T r
ei
a w
5.3.4 Execut Backup Policy Hu
o n
i
Step 1 Go to backup policy page,tchoose the EVS policy to execute, click “More”, then
i ca
tif
click “Execute”.

r
Ce
&
g
Step 2 Clickn“OK” in the window that appears.
ini
T ra
ei
aw
Hu

Step 3 Click “Backup Jobs” below, the newly created backup task appears in the list.
Huawei Cloud Service Certification Training Lab Guide Page 74

Step 4 Go back to VBS page, the information of newly created backup appears in the
list.

n
t io
f ica
r ti
Step 5 Go to backup policy page, click the policy to view the task.
Ce
&
Step 6 Click “Backup Jobs” below, the backup task of this policy appears in the list.
g
in
ain
T r
ei
a w
H u
n
Step 7 If failed backup task exists, click “Restart backup” to the far right of the task to
execute manual backup.
it o
a
5.3.5 Delete Backup Policyific
e rt
Step 1 Go to backupC policy page, choose the policy to edit, click “More”, click“Delete”.
&
g
n in
ai
StepT2r Click “OK” in the window that appears.
ei
u aw
H

Deleted policy will not appear on the page.


Huawei Cloud Service Certification Training Lab Guide Page 75

6 Object Storage Service (OBS) Lab Guide

6.1 Introduction n
t io
6.1.1 About This Lab
if ica
r t
Ce
This chapter introduces the functions of OBS on operational level, covering different configuration
steps of OBS.
&
g
6.1.2 Objectives
n in
i
Upon completion of this task, you will be able to:
T ra
ei and folder; upload, download, delete
 Master installation of OBS Browser.

a w
Master basic functions of OBS Browser (create bucket

Hu
file or folder, delete bucket, etc.).
 Master multi-version control of OBS.

n
6.1.3 Service Description it o
i ca on objects, providing massive data storage capacity for clients
if manner. This service includes create, edit, delete bucket, upload,
OBS is a volume storage service based

r t
in a secure, reliable and low-cost

Ce
download and delete objects, etc.

6.1.4 Prerequisites &


ing HUAWEI CLOUD account.
in
 Have registered
a
Tr Lab Tasks
6.1.5 Listi of
e
w
a Number Task Sub-task
H u Application scenario
1 Use OBS Create bucket One company has the need
Browser to store a large quantity of
Create new folder work files, but does not hope
to acquire storage devices
Upload file or folder
that take up space. Thus, this
Download file or folder enterprise acquires OBS
service to store and manage
Delete file or folder daily work files.
Delete bucket
Huawei Cloud Service Certification Training Lab Guide Page 76

2 OBS Activate multi-version control Save multi-version of one


multi- object facilitates easy search
version Upload two image objects of and restoration of different
control the same name versions and rapid restoration
Activate full control access for of data in case of accident or
application error.
object

6.2 OBS Browser environment preparation


n
t io
6.2.1 Operation Procedures
f ica
r ti
Step 1 Log into Console. Click “Storage > Object Storage Service”.
Ce
Step 2 Click “Download Browser” on the top of OBS Console to download OBS Browser
&
software package locally.
g
in
in
Obtain OBS Browser software package.

r a
i T
e
a w
Step 3 Click “Obtain the AK and SK” on the u
H
top of OBS Console to create access key (AK
and SK).
n
it o
i ca
r t if
Ce
Step 4 On “My credentials” page, click “Add new access key” under “Access keys”.

&
g
n in
r ai
i T
e
a w
Hu

Every user can create a maximum of two valid access key.


Huawei Cloud Service Certification Training Lab Guide Page 77

Step 5 Enter information according to instructions and save the newly created access
key.

n
it o
Step 6 Once the SMS/Email verification is finished, a CSV file, including the accessakey
i f ic
rt
will be generated automatically.

Step 7 “Access Key Id” and ”Secret Access Key” could be consulted in “credentials.csv”.
C e
Step 8 Double-click OBS Browser installation file, and unzip locally & to Install OBS

ng
Browser

Step 9 After installation, double-click “obs.exe” file to run iOBS


i
n service.
a
rrun OBS Browser.
T
ei click “Add new account”.
Step 10 Log into OBS Browser. Double-click “obs.exe” to
Step 11 In the “Account management” dialogueue
a w box,

Step 12 In the “Add new account” dialogueueubox, enter account information, then click
“Confirm”. H
Step 13 The information that needsio
n
t to be filled out includes the following:

Account name:obs_bucketca
ifi

r t
The account name usedeon OBS Browser to differentiate accounts in the system. It doesn’t need to be the
C
&
same as the OBS account on Huawei Enterprise Cloud. The account name should not exceed 50 characters.

g
Storagein

in type: “OBS”
a
rWhen
T
ei designate the “server address” for this storage. It can be an IP address or a domain name, with the format
compatible Amazon S3 storage is also connected, choose “Compatible S3 storage”. You also need to

aw server IP address or domain name: server port number (HTTPS protocol port number is “443”, HTTP protocol
Hu
port number is “80”). The default server of the system is HTTPS server. If HTTP server is needed, please click
on the top-right corner of the page, uncheck the box “Activate HTTPS security transmission protocol” in
the window “System setting” that appears.

 AK/SK: stored in “credentials.csv”.


Huawei Cloud Service Certification Training Lab Guide Page 78

n
t io
f ica
r ti
Step 14 Click “OK” to log into this account to view all its bucket and object resources. Ce
&
g
in
6.3 The Use of OBS Browser ain
T r
ei
6.3.1 Operation Procedures
a w
6.3.1.1 Create Bucket Hu
n
it o
Step 1 Click “Add bucket” on the left side of the page.
i ca
if
Step 2 Enter “Bucket name” in the dialogueue box “Add bucket” that appears, then
rt
choose “Region” and click “OK”.
e

C
Region: North China
 Bucket name:&obs-bucket

ing
a in
Tr
ei
aw
H u

Naming space of bucket is shared by all users in the system.


Huawei Cloud Service Certification Training Lab Guide Page 79

Step 3 In the message window that appears, click “OK” to close the window.
Step 4 If the newly created bucket “obs-bucket” can be found in the bucket list, it is
created successfully.

6.3.1.2 Create New Folder


o n
t i
Step 1 Click target bucket “obs-bucket” to access object management interface, then
ic a
click “Create new folder”.
i f
Step 2 Enter the folder name in the dialogueue box, then click “OK”. e rt
C
 Folder name: “obs-file”
&
ng
i ni
T ra
ei
a w
Hu
Step 3 If the newly created folder cannbe found in the object list, it is created
t io
a
successfully.

i c
r tif
Ce
&
g
6.3.1.3 Upload File
n inor Folder
r ai uses multi-part upload to upload files. With multi-part upload, OBS Browser supports
the T
OBS Browser

e i upload of single file no larger than 5TB.


a wStep 1 Click the bucket that will be uploading a file or folder.
Hu Step 2 Click “Upload” and choose “Upload file” or “Upload folder”.
Huawei Cloud Service Certification Training Lab Guide Page 80

In order to have a better experience, when using “Upload file” to upload objects, please choose a maximum of
100 files. If there are more files than 100 to upload, it is recommended to put them in a folder, then use “Upload
folder” to perform task.

Step 3 In the dialogueue box that appears, choose the file or folder to upload, then click
“Open”.

Step 4 Upload one image file to folder “obs-file”

n
t io
The client supports the upload of one folder or multiple files at one time. When uploading multiple files, press

ica
“Ctrl” or “Shift” to choose multiple files, or press “Ctrl+A” to choose all the files. Operation habits are the
same as that on Windows OS.
ti f
Click
e r
on the top-right corner of the page to access task management interface. It shows the upload
C
progress of files or folders, and you can stop, run or cancel tasks according to your need.
&
g
in
in
Step 5 Uploaded image file can be viewed in the list.

r a
i T
e
a w
Hu
n
6.3.1.4 Download File or Folder it o
i ca
click “Download”.
r t if
Step 1 Choose the bucket to configure, then choose the file or folder to download and

C e
&
ing
n
r ai
i T
e OBS supports the download of multiple files and folders. Press “Ctrl” or “Shift” to choose multiple files or

aw folders, or press “Ctrl+A” to choose all the files or folders. Operation habits are the same as that on

H u Windows OS.

Step 2 Choose the path to save file or folder in the dialogueue box, then click “OK”.

Click on the top-right corner of the page to access task management interface. It shows the download
progress of files or folders, and you can stop, run or cancel tasks according to your need.
Huawei Cloud Service Certification Training Lab Guide Page 81

6.3.1.5 Delete File or Folder


Step 1 Choose the bucket to configure, then choose the file or folder to delete, click
“…” and then click “Delete”.

n
io
OBS supports the delete of multiple files and folders. Press “Ctrl” or “Shift” to choose multiple files or folders,
t
ica
or press “Ctrl+A” to choose all the files or folders. Operation habits are the same as that on Windows OS.

Step 2 Click “OK” in the confirm message box.


ti f
e r
C
&
g
in
ain
T r
ei
a w
Hu
n
it o
a
Click on the top-right corner of the page to access task management interface. It shows the delete

i c
progress of files or folders, and you can stop, run or cancel tasks according to your need.

r t if
6.3.1.6 Delete bucket C e
&
g
Condition

inbe deleted is empty.
Bucket to
Onlyin
a
 the owner of bucket can delete the bucket.
r deleting the bucket, make sure that all objects in the bucket are deleted, and there is
TBefore
ei

no unfinished multi-part upload task.

awStep 1
u
Log into OBS Browser

H Step 2 Choose the bucket to be deleted, then click “Delete”.


Huawei Cloud Service Certification Training Lab Guide Page 82

n
Step 3 Click “OK” in the confirmation box to delete the bucket.
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
Step 4 If the bucket can no longer be found in the bucket list, it is deleted successfully.

n
it o
6.4 OBS Versioning
i ca
rt if
Ce
6.4.1 Operation Procedures
&
g
Step 1 Log into OBS Console (in the browser), find the created bucket in the bucket list.

n in “Versioning” in “Bucket Attribute”, then click “Enable”.


ai
Step 2 Choose

T r
e i
a w
Hu
Huawei Cloud Service Certification Training Lab Guide Page 83

Step 3 Click target bucket “obs-buckets” to access object management interface, then
upload two image objects with the same name.
Upload two image objects of the same name

Step 4 Enter the folder name in the dialogueue box, then click “OK”.

n
t io
f ica
r ti
Ce
&
g
in
ain
displayed in the list, with different version serial rnumber.
Step 5 After activating version control, two image objects of the same name are

i T
e
a w
H u
n
it o
i ca
r
Step 6 Modify access of image t if object in ACL. Select authorized user “Anonymous user”,
then click “Full e
C
control”.

&
g
n in
r ai
i T
e
a w
Hu
Step 7 Click image link to view image, and open image object.
Huawei Cloud Service Certification Training Lab Guide Page 84

6.4.2 Result Verification


View two image of the same name with different versions through link.

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 85

7 Scalable File Service (SFS) Lab Guide

7.1 Introduction n
t io
f ica
ti
7.1.1 About This Lab
e r
This chapter introduces basic functions of Scalable File Service.
C
&
7.1.2 Objectives g
in
Upon completion of this task, you will be able to:
ain
T r
i
 Master the process to create file system.
Master the process to mount file system to linux ECS. e
w

a
7.1.3 Prerequisites Hu
o n
i
 Have already registered Huawei Cloud account.

a
A Linux ECS has been created andt bound with EIP.
c

t ifi
7.1.4 List of Lab Tasks r
Ce
Number Task& Sub-task
g operations of SFS
nBasic
1
i Create file system

a in
T r Delete file system

ei Resize file system

u aw 2 Mounting a shared file Mount shared file system to the Linux ECS host

H
system to ECS
Umount shared file system in the ECS host
Huawei Cloud Service Certification Training Lab Guide Page 86

7.2 Basic Operations of SFS

7.2.1 Create File System


For creating shared file system, the parameters of this task are as below, other parameters are by
default
Parameter Value
Virtual private Ensure that an ECS has been created and has been assigned to the
n
io
cloud same VPC as the file system.
t
Step 1 Log into HUAWEI CLOUD website.
f ica
r ti
e
Step 2 In the HUAWEI CLOUD home page, click “Scalable File Service (SFS)” under
“Products” on the bottom of the page.
C
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
rt if
C e
&
ng
Step 3 Click “Access Console”. Turn to SFS home page.

n i
r ai
i T
e
aw
H u

Step 4 Click , Create file system from SFS page


Huawei Cloud Service Certification Training Lab Guide Page 87

Step 5 Enter file system name, VPC that it is located on and demanded capacity on the
page that appears

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
Step 6 Tick “I have read…” and click “OK”.

i ca
t f here” to execute manually.
Step 7 Go back to SFS page to check the final result after the count-down is over, or
click “Refresh now, iclick
r
Ce
&
g
n in
i
T ra
e i
aw
H u
Step 8 If file systems need to be created in batch, choose the quantity in “Create File
System” page. And then click “OK”.
Huawei Cloud Service Certification Training Lab Guide Page 88

n
t io
f ica
r ti
Ce
&
Step 9 Multiple file systems has been created successfully.
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
t if
er
7.2.2 Delete File System
C
&
g
Step 1 Go to SFS page

n infile system list, click “Delete” on the far-right of the file system to be
i
Step 2 In the
r adeleted.
i T
e
a w
Hu Step 3 Enter “Delete” in the box and click “OK” in the window that appears.
Huawei Cloud Service Certification Training Lab Guide Page 89

n
t io
f ica
r ti
Ce
&
g
Step 4 The status of file system changed to “Deleting”. After a moment, refresh the
in
page. If the file system is no longer in the list, it is deleted successfully.

ain
the shared file system to be deleted or check therbox on the top-left corner to
Step 5 Delete file systems in batch: in the SFS page, on the left of file system list, choose

i T
choose all the file systems of this page.
e
Step 6 Click “Delete” on the top-left corner ofathew list.
Hu
n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
w
a Step 7 Enter “Delete” in the box and click “OK” in the window that appears.
Hu
Huawei Cloud Service Certification Training Lab Guide Page 90

n
t io
f ica
r ti
Ce
&
g
Step 8 The status of file system previously selected changednto in“deleting”. After a
moment, refresh the page. If the file system is no a
i
T r longer in the list, it is deleted
ei
successfully.

a w
7.2.3 Resize File System Hu
n
Step 1 Go to SFS page it o
c a “Resize” under the Operation of the file system to be
Step 2 In the file system list, iclick
resized.
r tif
Ce
&
g
n in the “New Capacity” to 10 (GB), and click “OK”
ai
Step 3 Adjust

T r
e i
a w
H u

Step 4 In the “Confirm” dialogue box, click “OK”.


Huawei Cloud Service Certification Training Lab Guide Page 91

n
io
Step 5 The capacity of the choosed file system has been adjusted to the 10 (GB).
t
f ica
r ti
Ce
&
g
7.3 Mount a File System to ECS in
ain
r
After creating a file system, you need to mount the file system to ECSs so that ECSs can share the
T
i
file system.
e
7.3.1 Operation Prerequisites a w
 Hu the shared path of the file system.
You have created a file system and have obtained

o
An ECS with the OS “CentOS 7.2 64bit”n has been created and bound with EIP.

a
The ECS to which a file system istimounted belong to the same VPC as the file system.
if ic
7.3.2 Operation Procedures
e rt
C
&
Step 1 Log into the HUAWEI CLOUD Console

ingthe created
Step 2 In the Elastic Cloud Server page of Cloud Server Console, click “Remote Login” to

in
log into ECS.

T ra
ei
u awStep 3 Log into the ECS as “root” user.
H
Huawei Cloud Service Certification Training Lab Guide Page 92

n
t io
f ica
r ti
C e
&
g
in
Step 4 Check if the system has NFS software package (which normally comes with the

in
system) and run the following command:

r a
rpm -qa|grep nfs
i T
e package is successfully
Step 5 If the return message is as follows, NFS software
w
a to different OS.
u
installed. Return message may vary according

libnfsidmap-0.25-11.x86_64 H
n
it o
nfs-utils-1.3.0-0.9.x86_64

i ca
Step 6 If it is not installed, run different commands according to different OS.

r
For CentOS, Red Hat or Oracle tifEnterprise Linux, run the following command:
sudo yum -y install Ce nfs-utils
&DNS: A DNS server is used to resolve domain names of file systems.
Step 7 Configure
The iDNS
g
n server IP address is 100.125.17.29 in East China, and 100.125.1.250 in
n
i regions.
a
Tr
other

i
e By default, the IP address of the DNS server used to resolve domain names of file systems is automatically
a w
Hu
configured on ECSs when creating ECSs. No manual configuration is needed except when the resolution fails
due to a change in the DNS server IP address. The above DNS server IP address is for reference only ,and you
can find the correct address in the below address:
http://support.huaweicloud.com/en-us/usermanual-sfs/en-us_topic_0054116434.html

Step 8 Configure DNS server IP address on the ECS.


 Run vi /etc/resolv.conf command to edit “/etc/resolv.conf” file.
 Add one line before two public IP addresses to write DNS server’s IP address.
 Enter “#” before two public IP addresses, to comment on public IP addresses.
Huawei Cloud Service Certification Training Lab Guide Page 93

 Click “Esc” then enter :wq, save and quit.


 Run the following command to see if IP address has been written successfully.

n
it o
cat /etc/resolv.conf

Step 9 Run the following command to check whether an IP address can be resolved
i c a
from the file system domain name.
r tif
nslookup file system domain name
Ce
&
g
Obtain the file system domain name from the file system shared path. Ifncommand “nslookup” is still not
i ni
ra
installed successfully, run the command “yum –y install bind-utils”

T
If the return message is as follows, IP address is successfully
ei resolved:
a w
Hu
n
it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
a w
Hu
Step 10 Run the follow command to create local menu for attachment.
mkdir /local path

Step 11 Run the following command to attach the created shared file system to
designated menu.

mount -t nfs -o vers=3,timeo=600,nolock shared path /local path

You can find the shared path in SFS page as below:


Huawei Cloud Service Certification Training Lab Guide Page 94

n
t io
i c a
tif
Step 12 Run the following command to check file system that is already attached.
r
Ce
mount -l

&
ng
i ni
T ra
ei
a w
Hu
n
it o
i ca
r tif
Ce
&
g
n in
i
Step 13raCreate a file “new” under directory “local_path”, and use “vim” to edit the file.
i T
e
a w
Hu Step 14 Edit the file “new” and save it.
Huawei Cloud Service Certification Training Lab Guide Page 95

Step 15 Run the following command to view the file content.

cat /local_path/new

Step 16 Run the following command on the ECS that appears to umount the mounted
shared file system.

n
umount /local_path

t io
ica
Step 17 Run mount -l to check file system that is already umounted.

tif
e r
C
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 96

8 Virtual Private Cloud (VPC) Lab Guide

8.1 Introduction n
t io
8.1.1 About This Lab ica
if
r t
access to Internet through EIP. By modifying security group, users can control C
e introduces ECS
This chapter introduces the creation operation of VPC and associated elements, and
the communication
of two ECS under the same VPC. &
ng
8.1.2 Objectives i ni
T ra
ei elements.
Upon completion of this task, you will be able to:
Master VPC operations and the functions of associated
w

a
Master the traffic direction of ECS accessingu
 Master operations to bind EIP to ECS and its configuration.

H external network.

n
Master operations and functions of security group.

it o
8.1.3 Prerequisites
i ca
Have registered HUAWEI CLOUD
r tif account
C e
8.1.4 Topology and&Service Description
ing
a in
i Tr
e
a w
H u

Figure 1-1 ECS access to the Internet through EIP


Huawei Cloud Service Certification Training Lab Guide Page 97

8.1.5 List of Lab Tasks


Number Task Sub-task
1 Create VPC Add subnet
Add security group
Add security group rules
Modify bandwidth rules

n
io
2 Bind EIP to ECS to access to Add a new NIC
t
ica
Internet
Apply EIP and bind EIP to ECS

tif
r
External network ping ECS, ECS ping
external network
Ce
3 Modify security group rules
&
Modify security group rules so that the ECS
g
in the internal network cannot
in
communicate with each other

ain
r
Add security group rules so that the ECS in

i T
the external network can communicate
e
a w
H u
8.2 Create VPC and Associated Sub-elements
n
it o
8.2.1 Operation Procedures ca
t ifi
Step 1 Log into HUAWEIrCLOUD console:
C e
&
Step 2 Click “Virtual Private Cloud” to log into the “Network Console” Dashboard.

n g
Resourcein
i
Step 3 Click “Create VPC” and enter the below information.

a Details:
r CN south 1
i

TRegion:
e Name: myvpc
aw CIDR Block: 192.168.0.0/16

u

H
Huawei Cloud Service Certification Training Lab Guide Page 98

n
t io
f ica
r ti
Subnet Settings:
Ce
AZ: AZ1
&

g
in
 Subnet Name: subnet-myvpc

in
 Subnet segment: 192.168.0.0/24
 Gateway: 192.168.0.1
r a
 DNS Server Address by default
i T
e
a w
Hu
n
it o
i ca
rt if
C e
&
ing
n
r ai
i T
e
aw
H u
Step 4 Check the “Current Configuration” and click “submit”.
Step 5 In the Dashboard, click “VPCs” to access the console of VPC created.
Huawei Cloud Service Certification Training Lab Guide Page 99

n
t io
f ica
Step 6 Click the created “myvpc” to open the detailed information page.
r ti
Ce
&
g
in
ain
Step 7 In the detailed information page, click “Create Subnet” to add a new subnet.
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
g
Step 8 Enter
n inthe new subnet information as below and click “OK”.
i
aAZ1

r
AZ:
TName: subnet-myvpc-1
i
e CIDR: 192.168.1.0/24

a w 

Hu
 Gateway: 192.168.1.1
Huawei Cloud Service Certification Training Lab Guide Page 100

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
Step 9 The networking topology can be found under tab “Topology”.

a w
Hu
n
it o
i ca
rt if
C e
&
ing
n
r ai
T
Step 10 Turn to “Security Group” page and click “Create Security Group”.
i
e
aw
H u

Step 11 Enter the below information and click “OK”.


 Name: sg-myvpc
Huawei Cloud Service Certification Training Lab Guide Page 101

n
t io
f ica
ti
Step 12 Add rule to security group and click “OK”.
 Protocol: TCP e r
C
&
 Direction: Inbound
 Port/Range: 22
g
in
in
 Source: security group “sg-myvpc”

r a
i T
e
a w
Hu
n
it o
i ca
rt if
C e
&
ing
n
ai
i Tr
8.3 Bind e EIP to ECS to Access to Internet
a w
u
H Operation Prerequisites
8.3.1
Prepare a linux ECS as below specification:
ECS name ECS parameters ECS OS VPC Security EIP Banwidth
Group
ecs- c1.large | 2 vCPU | CentOS 7.2 myvpc sg-myvpc Auto- 1Mbit/s
myserver 2GB 64bit assign
Huawei Cloud Service Certification Training Lab Guide Page 102

8.3.2 Operation Procedures


Step 1 Log into the Cloud Server Console, open the ECS created

Step 2 Click the name of the ECS in the ECS list and log into the detailed information
page.

n
io
Step 3 Click “NICs->Add NIC”.
t
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
Step 4 Enter the below information to add a new NIC
i ca
if
 Security group: choose an existing security group, for example Sys-default

r t
e
 Subnet: choose an existing subnet, for example subnet-myvpc(192.168.0.0/24)
C
&
ing
n
r ai
i T
e
aw
H u

Step 5 Click “EIPs->View EIP”, turn to Network Console.


Huawei Cloud Service Certification Training Lab Guide Page 103

Step 6 In the “Elastic IP” page, click “Buy EIP”.

n
t io
f ica
r ti
Ce
&
g
in
ain
Step 7 Enter the information as below to apply new EIP
T r
 EIP Type: Static BGP
ei
 Billing Mode: Pay-per-use
a w
 Bandwidth: Allocate new
H u
 Bandwidth name: bandwidth-8db6
Bandwidth Type: Exclusive n
io

Billed By: Bandwidth t


i ca

Quantity: 1 rt
if
Bandwidth: 1Mbit/s

Ce

&
g
n in
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 104

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
rt if
Step 8 Click “Next”.
C e
&
Step 9 Confirm specification and click “Submit”.
g
n EIP is displayed in the page of “Elastic IP”, click “Bind” in the row of the
Step 10 The inew
n
i EIP.
a
new

i Tr
e
a w
Hu
Step 11 Bind IP
 Select ECS: ecs-myserver
 Select NIC: choose the created NIC, for example IP 192.168.0.8
Huawei Cloud Service Certification Training Lab Guide Page 105

n
t io
f ica
r ti
C e
&
g
in it can be observed
npage,
Step 12 Click “OK”, turn back to the ECS detailed information
that 2 EIPs have been bound to ECS ecs-myserverra
i
i T
e
a w
H u
n
it o
i ca
r t if
8.3.3 Result Verificatione
C
&
Check network communication: Log into ECS remotely, ping external network address in the ECS.

ing
ping www.huaweicloud.com

a in
i Tr
e
a w
H u
Huawei Cloud Service Certification Training Lab Guide Page 106

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
8.4 Control CommunicationioUsing Security Group
a t
fi c
8.4.1 Operation Prerequsites r t i
 C e
A VPC has been created
Two linux ECSs&bound with EIP have been created in the same VPC
g

This taskntakes OS “CentOS 7.2 64bit” as an example.


ni

i
T
8.4.2 Operationra Procedures
e i
a wStep 1 Prepare two cloud hosts under the same VPC and bind elastic IP
Hu

Step 2 Log into the ECS “ecs-myserver-1” and ping the internal IP address of ECS “ecs-
myserver”
 For example: ping 192.168.0.149
Huawei Cloud Service Certification Training Lab Guide Page 107

Step 3 Turn to the “Security Group” page, open the”Sys-default” security group and
delete the below security group rule: “Inbound” for direction, “IPv4” for type,
“Any” for protocol, “Any” for Port Range/ICMP type, “0.0.0.0/0” for Remote End

n
t io
f ica
r ti
Ce
&
g
Step 4 It can be observed that the communication is impossible between the two cloud
hosts
in
ain
T r
ei
a w
Step 5 Add security group rules Hu
n
 Direction: inbound
it o
 Protocol:ICMP
i ca
 Type: Any
r t if

C e
Source: IP address 0.0.0.0/0

&
ing
n
r ai
i T
e
aw
H u

Step 6 Click “OK”, there is a new rule displayed in the list.


Huawei Cloud Service Certification Training Lab Guide Page 108

8.4.3 Result Verification


Check network communication: Log into the ECS “ecs-myserver-1” and ping the IP address of ECS
“ecs-myserver”.
 Internal communication for ECS, ping private IP address: ping 192.168.0.149

n
t io
f ica
r ti
Ce
&
g
in
 External communication for ECS, ping EIP address: ping 49.4.5.197

ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 109

9 Elastic Load Balance (ELB) Lab Guide

9.1 Introduction n
t io
ica
tif
9.1.1 About This Lab
r
e to bind at least
two back end members, to activate http service on the VM of the members C
This chapter requires to create an ELB service under Huawei Cloud environment,

&
and to achieve load

g
balance (curl access) of access to VM’s http web page through ELB.
n
9.1.2 Objectives i ni
T ra
ei
Upon completion of this task, you will be able to:
Master the building of ELB.
w

a
Hu
 Master configuration of ELB system.

9.1.3 Topology and Service Description n


it o
i ca
r tif
Ce
&
g
n in
r ai
i T
e
a w
H u

9.1.4 Prerequisites
 Have registered on HUAWEI CLOUD account.
 Have created VPC.
 Have created one ELB, two backend ECS.
Huawei Cloud Service Certification Training Lab Guide Page 110

9.1.5 Lab Design


Number Device Property
1 Elastic Load Balancer Type: public network
(ELB) Service address: 10.154.73.74
Load balance protocol / port: HTTP:8881
Cloud server protocol / port: HTTP:8889
2 Back end Cloud server Specification: 2 vCPU | 4GB Linux CentOS
n
VM1 Private IP address: 192.168.32.20
t io
ica
Elastic IP: 10.154.75.139 (optional)

tif
r
3 Back end Cloud server Specification: 2 vCPU | 4GB Linux CentOS
VM2 Private IP address: 192.168.32.16
Ce
&
Elastic IP: 10.154.75.142 (optional)

g
in
4 Client This machine

ain
9.1.6 List of Lab Tasks T r
i
Note e
Number Task Sub-task
a w
Hu
1 Create ELB Create Elastic Provides a low-cost, effective and
service Load Balance transparent way to expand the
n bandwidth of network devices and
it o servers, to increase throughput, to

i ca improve network data processing ability,

if
network agility and availability.

e rtAdd listener In charge of ELB protocol and port


C configuration; cloud server protocol and
& port configuration; monitor policy

ng
configuration.

n i
ai
Add backend ECS Add designated back end cloud server
r under the monitor.

i 2T
e Configure Configure security Add security group rule

aw backend group

u
ECS HTTP
H service Run http service Touch empty files to distinguish two
VMs

9.2 Create ELB Service

9.2.1 Create Load Balancer


Step 1 Log into the console.
Huawei Cloud Service Certification Training Lab Guide Page 111

Step 2 Click “Network > Elastic Load Balance”.


Step 3 Click “Create Load Balancer” on the “ELB” page.
Step 4 Configure parameters according to instructions as below:
 Name: elb-bdyo
 Type: Public network
 VPC: myvpc
 EIP Type: Static BGP

n
 Billing Mode: Bandwidth
 Bandwidth: 1 Mbit/s
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
r tif and tick “I have read…”, click “Submit”.
Step 5 Confirm specifications

Ce is displayed in the ELB list.


Step 6 New Load Balancer
&
g
n in
r ai
i T
e
a w
Hu
9.2.2 Add Listener
Step 1 Log into the console.
Step 2 Click “Network > Elastic Load Balance”.
Step 3 Click the name of Load Balancer to which the listener will be added on the “ELB”
page.
Huawei Cloud Service Certification Training Lab Guide Page 112

Step 4 Click “Add Listener” in the region of “Listener” on the Load Balancer page.

n
t io
f ica
r ti
Ce
Step 5 Configure parameters according to instructions on the “Add Listener” page.
&
g
in
 Name:listener-test

in
 Load Balancing Protocol/Port: TCP 8881
 ECS Protocol/Port: TCP 8889
r a
Load Balancing Mode: Round robin
i T
e

 Sticky Session: Deactivate


a w
Hu
 Check Mode: HTTP 8889

n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
aw
H u

Deactivate Sticky Session in order to test ELB result.


Huawei Cloud Service Certification Training Lab Guide Page 113

9.2.3 Add Backend ECS


Step 1 Click “Add Backend ECS” in the line of created listener “lisenter-test” on the Load
Balancer page.

n
t io
ica
Step 2 Choose the ECS which will be linked to the load balancer, then click “OK”.

tif
e r
C
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
We can see the “Health Check Status” is “Abnormal”, after we added the Backend ECSs. The
e reason is that there is no business running on the ECS. After we configure the HTTP service, the

aw status will change to “normal”.

H u
Huawei Cloud Service Certification Training Lab Guide Page 114

9.3 Configure HTTP Service on Backend ECS


Step 1 Log into the Security Group of Network Console, click the security group name of
the backend ECS.

n
t io
ica
if
r t
Ce
Step 2 Add TCP port 8889 to the security group with two backend servers on the
console.
&
 Direction: Inbound
g
Protocol: TCP
n in
i

Port Range: 8889


ra

T
ei
 Source: IP address 0.0.0.0/0

a w
Hu
n
it o
i ca
tif ECSs separately, run http service on port 8889.
Step 3 Log into the two rbackend
Ce to run http service:
&
Use the following command

g
n -m SimpleHTTPServer %s > /dev/null 2>&1 &
i
nohup python

%s is a inport number 8889


r 127.0.0.1:8889 to verify
the
Tcurl
e i
Use

a w
Hu
Huawei Cloud Service Certification Training Lab Guide Page 115

n
t io
f ica
r ti
C e
&
Step 4 Use touch command to create an empty file on each ofin
g
n
the two servers.
i
ra running on which ECS.
Different files are created on two ECS to distinguish the HTTP service
T
ei
a w
Hu
n
it o
i ca
r tif
Step 5 Turn back to C e page and find the “Health Check Status” is “normal”.
ELB
&
g
n in
r ai
i T
e
a w
9.4 Result Verification
H u Enter ELB port link (http://49.4.5.5:8881/) in browser to see if the following result is obtained.
Huawei Cloud Service Certification Training Lab Guide Page 116

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
When refreshing the browser, it can be observed that the pages come from two servers in turns,

Hu
thus achieving load balance effect.

n
it o
i ca
r t if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 117

10 Cloud Security Service Lab Guide

10.1 Introduction n
t io
10.1.1 About this lab
if ica
r t
Ce
This chapter introduces the basic operations of Anti-DDoS traffic cleaning (Anti-DDoS.

&
10.1.2 Objectives
ng
Upon completion of this task, you will be able to:
i ni
 Enable DDoS protection.
T ra
ei
 Activate Anti-DDoS alarm notification.

a w
10.1.3 Prerequisites
H u
n
 Have registered HUAWEI CLOUD account.
 Applied two an ECS with EIP.
it o
i ca
10.1.4 List of Lab Tasks if
e rt
Number Task C Sub-task Application scenario
& DDoS
g
1 Enable Configure maximum Protect ECS against DDoS

in protection flow attack

a in Activate Anti-DDoS Configure phone


r
2 When ECS is under DDoS

i T alarm notification number that receives attack, the designated

e
alarm notification phone number receives

a w text message alarm

Hu
10.2 Enable DDoS Protection

10.2.1 Operation Scenario


After enable DDoS protection for a certain IP address, it is protected against DDoS attack.
This chapter takes the example of enable DDoS protection of ECS1.
Huawei Cloud Service Certification Training Lab Guide Page 118

10.2.2 Operation Procedures


Step 1 Log into the console.
Step 2 Choose “Security > Anti-DDoS” to access Anti-DDoS service console.
Step 3 On the “Anti-DDoS > Instance list” page, click “Enable Defense” in the line of
instance IP address for which protection will be activated.

n
t io
f ica
r ti
Ce
&
g
in
in
Step 4 Click “OK” in the dialogueue box.
r a
i T
e
a w
Hu
n
it o
i ca
rt if
e
C Settings” under “Operation”.
Step 5 Click “Advanced
&
g
n in
r ai
StepT6 Configure parameters according to instructions in the dialogueue box.
ei Change the “Maximum Service Traffic” to “70 Mbit/s”.
aw

Hu
Huawei Cloud Service Certification Training Lab Guide Page 119

n
t io
f ica
r ti
Ce
When actual flow triggers traffic cleaning, Anti-DDoS will only intercept attacking flow; when actual flow
doesn’t trigger traffic cleaning, flow will not be intercepted even though it is an attacking flow.
&
Step 7 Click “OK” to save configuration and activate protection.
g
in
ain
r
iT
10.3 Activate Anti-DDoS Alarm Notification
e
aw
10.3.1 Operation scenario Hu
n
it o
After activating Anti-DDoS alarm notification, user will be notified when he or she is under DDoS
attack (text message or email). Otherwise, regardless of the quantity of DDoS attack flow, you can

i ca
only log onto de console to check and will not receive alarm.

t if
er
10.3.2 Operation Procedures
C
&
Step 1 Log into the console.
g
n in “Security > Anti-DDoS” to access Anti-DDoS service console.
Step 2 Choose
i
Step 3raChoose alarm frequency in “Alarm frequency setting”.
i T
e
a w
Hu

Step 4 Enable “Alarm Notification” and click “View Toplic”.


Huawei Cloud Service Certification Training Lab Guide Page 120

Step 5 Click “Create Topic”, enter the “Topic Name”.


n
t io
f ica
r ti
Ce
&
g
in
ain
T r
Step 6 Click “Add Subscription” under “More”.
ei
a w
Hu
n
it o
i ca
rt if
Step 7 Set information as shown below. Input the email address in the “Endpoint”
C e
&
ing
n
r ai
i T
e
aw
H u

Step 8 Click “OK”. And you will receive an email, click the link in the email to complete
subscription.
Huawei Cloud Service Certification Training Lab Guide Page 121

n
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
Hu
n
it o
i ca
rt if
C e
&
ing
n
r ai
i T
e
aw
H u
Huawei Cloud Service Certification Training Lab Guide Page 122

11 Cloud Eye Service Lab Guide

11.1 Introduction n
t io
11.1.1 About This Lab ica
if
r t
Ce
Monitor CPU parameters of Elastic Cloud Server and generate alarm. Export monitor data of ECS
CPU parameters.
&
g
11.1.2 Objectives
n in
i
Upon completion of this task, you will be able to:
T ra
 Create CPU utilization rate alarm rule.
i
Create alarm notification group, alarm is sent in theeform of text message.
w

Export monitor data to be used in further Excelaanalysis.


Hu

11.1.3 Prerequisites
o n
i
Purchases an ECS host instance withtthe name of ECS-ces_test. The scale of the instance is 1 vCPU,
1GB of memory, choose publiciimagec a -CentOS-7.2 64bit (40GB) and attach a common IO 40GB
r tif Private Cloud and the default security group.
disk. Choose the default Virtual

Ce
&
11.2 Instance nAlarm g Monitoring
i
a in
i Tr
11.2.1 Operation Procedures
e
a wStep 1 Log into the concole.
u
H Step 2 Click “Management and deployment > Cloud Eye”.
Step 3 Choose ECS-ces_test instance on the “Cloud Eye > ECS Monitoring” page.
Huawei Cloud Service Certification Training Lab Guide Page 123

Step 4 Click “More > Create Alarm Rule” and configure parameters according to
instructions.
 Choose “Manually Create”.
 Choose “CPU usage” for “Metric”.
 Choose “Raw data”“≤”“10%”for “threshold”.
 Choose “1” for “Occurrences”.
 Choose “Yes” for “Send notification”.

n
t io
f ica
r ti
Ce
&
ng

i ni
Click “Create Topic >Topic Name”, then enter group name “Mytest”.

T ra
ei
a w
Hu
o n
i
t then go back to ECS Monitoring page, choose “Mytest”

ic a
If the group is successfully created,

f
for “Topic Name”.

rt i
C e
& alarm” and “Cleared alarm” for “Trigger Condition”. Click “Next”.
g
in
 Choose “Generated

in
Enter “alarm-ECS_ces-test” for alarm rule name.

T ra
e i
aw
Hu

 Click “Create”.
Huawei Cloud Service Certification Training Lab Guide Page 124

Step 5 On SMN console, add subscription for “Mytest”.

n
Step 6 Set the Email address in “Add Subscription” dialogue.
t io
f ica
r ti
Ce
&
g
in
ain
T r
ei
a w
u
Hsent
Step 7 A confirmation link message will be to the email. Click this link to activate
n
it o
subscription.

i ca
r tif
Ce
&
g
n in
r ai
i T
e
a wStep 8 A moment after the alarm is created, an alarm message from HUAWEI CLOUD

Hu
will be sent to you email.

11.3 Export Monitor Data

11.3.1 Operation Procedures


Step 1 Log into the console.
Step 2 Click “Management and deployment > Cloud Eye”.
Huawei Cloud Service Certification Training Lab Guide Page 125

Step 3 Click “View Monitroing Graph, you can view the different monigroing graph with
different parameters.

n
t io
f ica
r ti
C e
&
Step 4 Click “Export Monitor Data” in “ECS Monitoring” or “Cloud Service Monitoring”
g
page.

Step 5 Configure parameters according to instructions on thei“Export n monitor data”


i n
page.
r a
T
eiUsage” and “Disks Read Rate” for
Step 6 Choose “Elastic Cloud Server” for “Service”, “ECS” for “Dimension”, “ECS-

w
ces_test” for “Monitored Instance” and “CPU
“Metric”.
u a
You can set multiple metric at the same time. H

n
it o
i ca
r tif
Ce
&
g
n in“Export”.
ai
Step 7 Click

T r
i
e in the
aw
If number of rows and columns of monitor data exceed the threshold of excel, it is recommended to open it
text format.

H u
11.3.2 Result Verification
Open the exported file, all monitored data are listed.
Huawei Cloud Service Certification Training Lab Guide Page 126

12 Relational Database Service (RDS) Lab Guide

12.1 Introduction n
t io
12.1.1 About This Lab f ica
r ti
This chapter introduces the operations of connecting RDS MySQL to ECS.
Ce
12.1.2 Objectives &
g
in
in
Upon completion of this task, you will be able to:
 Master the creation of RDS MySQL.
r a
i T
e
 Master the MySQL client installation.
 Master method of connection RDS MySQL instance.
a w
H u
12.1.3 Prerequisites
o n
i
Have register HUAWEI CLOUD account.

a t
c
 Have created VPC.

t ifi is bound an elastic IP address.
Have created an ECS to which

e r
12.1.4 List of Lab Tasks C
&
n g
i
Number Task Sub-task Application scenario
1
a in Purchase RDS N/A Database administrator Jason

T r MySQL. needs to build a database for his

ei
company to answer to its

w
business demands, thus needs to

u a purchase a RDS MySQL instance.

H 2 Install MySQL
client.
N/A Administrator Jason has installed
MySQL client on the ECS created
to connect RDS MySQL instance.
3 Connect RDS Connect RDS MySQL Manager Jason connects RDS
MySQL instance to ECS MySQL instance and creates
instance. database test and table.
Create and query
table
Huawei Cloud Service Certification Training Lab Guide Page 127

12.2 Purchase RDS MySQL Instance


Step 1 Log into the console.
Step 2 Click “Database > Relational Database”. Access Relational Database information
page.

Step 3 Click “Buy DB Instance” on the “Overview” page.

n
t io
f ica
r ti
Step 4 On the purchase page, configure the parameters as the following tables show. Ce
&
Table 12-1 Billing
g
in
in
Parameter Value

r a
Billing Mode On-demand
i T
e
a w
Hu
Table 12-2 Basic Information
Parameter Value
n
Region
it o
For example: CN south 1

i caFor example: cn-south-1a


if
AZ
DB Engine
e rt MySQL
DB Engine Version C 5.7
&
HA Type
n g Single

ini
a
Tr Table 12-3 Instance Specifications
eiParameter
aw
Value

Hu
Instance Class General-purpose:1 vCPU|4 GB
Storage Type Common I/O
Storage Space 100GB

Table 12-4 Network


Parameter Value
VPC myvpc
Huawei Cloud Service Certification Training Lab Guide Page 128

Parameter Value
Subnet subnet-myvpc
Security Group Sys-default

Table 12-5 Database configuration


Parameter Value

n
Administrator password Huawei@12

t io
ica
Confirm password Huawei@12

tif
Step 5 Check the “Currenet Configuration” and click “Create Now”. e r
C
&
g
in
ain
T r
ei
Step 6 Confim specifications and click “Submit”.
a w
Step 7 After the RDS instance is created successfully, Hu user can view and manage its

n
instance on the “RDS instance management” page.

it o creation is “Creating”, which takes about 15 minutes.


1. The status of RDS instance during
2. After creation, its status isa“Available”.
if ic
e rt
C
&
g
n in
i
12.3 InstallraMySQL Client
T
i install the MySQL client, a linux ECS with OS “Ubuntu 14.04 server 64bit(40GB)” should be
eBefore
a w prepared.
Hu Step 1 Obtain installation package.
Find the link for the corresponding version on the download page. Take MySQL-client-5.6.31-
1.el6.x86_64.rpm as an example, its link is:http://dev.mysql.com/downloads/file/?id=463159.
Download installation package after opening this page.
Huawei Cloud Service Certification Training Lab Guide Page 129

n
t io
f ica
Download installation package directly through the link in the red box. The address is:
r ti
http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-client-5.6.31-1.el6.x86_64.rpm.
C e
&
Step 2 Upload installation package to ECS.
g
in
ain
T r
If ECS OS is ubuntu, run the following command to install MySQL client directly:
sudo apt-get install -y mysql-client-core-5.6
ei
a w
Hu
When creating ECS, an OS should be selected, for example Redhat6.6. Then bind EIP (Elastic IP) to it. Use remote
connexion tool to upload installation package to ECS, then use PuTTY to connect to ECS.

o n
t i
Step 3 After uploading, run the following
ica command to install MySQL client.

if
rt
sudo rpm -ivh MySQL-client-5.6.31-1.el6.x86_64.rpm

e
C up during installation, add replacefiles parameter as indicated below, then retry.
&--replacefiles MySQL-client-5.6.31-1.el6.x86_64.rpm
If reports of conflict come

g
rpm -ivh

n in
r ai
i
12.4 ConnectT RDS MySQL Instance
e
u aw After install the MySQL client on the created ECS, we can connect RDS MySQL isntance. The

H
following configuration steps include setting security group rule, connecting RDS instance to ECS
and creating a database table.

Step 1 Log into the Securtiy Group of Network Console, and add security group rule as
below.
 Direction: Inbound
 Protocol: TCP
 Port Range: 8635
 Source: IP address 0.0.0.0/0
Huawei Cloud Service Certification Training Lab Guide Page 130

Step 2 Log into the ECS, run the following command to connect RDS database instance.

mysql -h <host_name> -P 8635 -u <User> -p<password>

 -h is the host IP, meaning the host’s “connection address” in the instance list of this cluster
on “RDS instance management” page.
-p is the port with the default value 8635. Refer to the host’s “connection address” in the
n

iois
instance list of this cluster on “RDS instance management” page.

a t
-u is user name, meaning the account of RDS database (administrator account by default
i c
tif
root).
 -p is password, meaning the password of database account.
r
Ce
&
n g
ini
T ra
ei
a w
Hu
n
Below is the example of using root userit oto connect to database instance:
i c a8635 -u root -pHuawei@12
tif
mysql -h 198.168.0.225 -P

r
Step 3 The below picture
Ce shows you log into the MySQL successfully.
&
g
n in
r ai
i T
e
a w
Hu

Step 4 Run the following command to create database “test”.

CREATE DATABASE test;

Step 5 Run the following command to log into database.


USE test
Huawei Cloud Service Certification Training Lab Guide Page 131

Step 6 Run the following command to create table “person”.

CREATE TABLE person (


number INT(11),
name VARCHAR(255),
birthday DATE
);

Step 7 Run the following command to query table.

mysql> show tables;


n
tio
+----------------+
| Tables_in_test |
+----------------+
i ca
| person |

rt if
e
+----------------+

C
1 row in set (0.00 sec)

&
g
in
a in
T r
e i
a w
Hu
n
it o
f ica
r ti
Ce
&
i ng
ain
r
e iT
aw
Hu
Huawei Cloud Service Certification Training Lab Guide Page 132

13 Cloud Container Engine (CCE) Lab Guide

13.1 Introduction n
a tio
i c
if
13.1.1 About This Lab
e rt
This chapter introduces basic operations of Docker including creating docker image, uploading
C
image to CCE image repository and deploying application in the CCE platform. And you will have a
comprehensive understanding of the operations on the CCE platform.
&
g
in
13.1.2 Objectives
a in
T r
i
Upon completion of this task, you will be able to:
 Master Docker installation. e
Master Docker image creation. a w
u

 Master Docker basic operations.


H
n
 Master the method to upload image to CCE image repository.

it o
Master the creation of container cluster.

i c a
Master the application deployment.
Master the method to setifauto scaling policy for CCE cluster.
rt

e
13.1.3 Prerequisites C
&HUAWEI CLOUD account.
g
in VPC.
 Have registered

n
ai created a linux ECS.
 Have created

T r
Have

e i
13.1.4wConfiguration Roadmap
a
Hu 3(Optional).
1.Set up the 2. CreateCCE 4(Optional).
environment cluster Create a Docker Upload image
image

6. Create a 5(Optional).
8. Auto Scaling 7. Access the containerized Connet private
for CCE cluster application application image repository
Huawei Cloud Service Certification Training Lab Guide Page 133

13.2 Set up the Environment

13.2.1 Operation Scenario


To ensure system security, use the key authentication mode to authorize users who attempts to log
in to a node. Create a key pair for identity authentication when adding a node. If you already have
a key pair, skip this operation.

13.2.2 Operation Procedures


n
Step 1 Log in to the HUAWEI CLOUD management console.
atio
i c
Step 2 Choose “Computing > Elastic Cloud Server”.
rt if
Step 3 In the navigation pane, choose Key Pair. Click “Create Key Pair”.
C e
&
g
Step 4 Enter the key pair name, and click OK.
in
a in
T r
e i
a w
Hu
n
it o
Step 5 In the dialogue box that is displayed, click OK.
i c a
Step 6 You can view and save
f once. Keep it secure to ensure successful login.
tionly
the key pair as prompted. To ensure security, a key pair
can be downloaded
r
Ce
&
g
n Cluster
13.3 Create VM i
a in
i Tr
13.3.1 Operation Scenario
eA cluster is a collection of computing resources, including a group of node resources. A container
u aw runs on a node. Before creating a containerized application, you must have an available cluster.
H
13.3.2 Operation Procedures
Step 1 Log in to the CCE console. In the navigation pane, choose “Resource
Management > VM Cluster”, and click “Create Kubernetes Cluster”.
Huawei Cloud Service Certification Training Lab Guide Page 134

Step 2 Set parameters as below to configure cluster.


Payment Type
n
tio
 Billing Mode: Pay-per-use
Cluster Settings
i ca
if
 Cluster Name: test
 Cluster Management Scale: 50 nodes
e rt
 High Availability: No C
 VPC: select a exsisting VPC, for example: myvpc &
g
in
 Subnet: select a exsisting Subnet, for example: subnet myvpc
 Network Model: VPC network
a in
T r
e i
a w
Hu
n
it o
f ica
r ti
C e
&
i ng
ain
r
e iT
aw
Hu
Step 3 After the configuration is complete, click “Next” to add a node.
Step 4 Select whether to create a node.
 Yes: Create the first node for the cluster.
Huawei Cloud Service Certification Training Lab Guide Page 135

n
atio
i c
rt if
 Set the specifications. C e
&
g
in
a in
T r
e i
a w
Hu
n
it o
f ica
r ti
C e
&
i ng
in
T ra
e

i Set network parameters, choose “Buy Now” for “Elastic IP Address”.

aw
Hu
Huawei Cloud Service Certification Training Lab Guide Page 136

 Set disk parameters by default.

n
atio
i c
rt if
 Choosed the created “Key Pair”.
C e
&
g
in
a in
T r
e i
w
a click “Next”. Review the order
u
Step 5 After you complete the parameter settings,
H later, you can view the cluster and node
details, and click “Submit”.6-10 minutes

n
have been created.

it o
i c a
r tif
Ce
&
g
nin
r ai
i T
e
a w
Hu
13.4 Basic Docker Operations

13.4.1 Operation Scenario


This section describes how to use Dockerfile to create a Docker image for a simple web
application.Prepare an ECS with the following specifications.
After you create a containerized application using an official Nginx image, the default Nginx
welcome page is displayed when you access the Nginx image. The following describes how to
customize the welcome page of an Nginx image, to change the welcome message to Hello,CCE!.
Huawei Cloud Service Certification Training Lab Guide Page 137

13.4.2 List of Lab Tasks


Number Task Sub-task Application scenario
1 Install Docker Buy Elastic Cloud Buy an ECS on Huawei Enterprise
Server Cloud on which a Docker can be
installed.
Install Docker Install Docker.
2 Create Create mynginx Use nginx image as basic image to
Docker image image create a Docker image named
n
mynginx.
atio
i c
if
3 Start and Start Docker Use mynginx image to start Docker

rt
stop Docker container container.
container
Stop Docker Stop Docker container.
C e
&
g
in
13.4.3 Install Docker (optional)
a in
T r
e i
Docker 1.11.2 is automatically installed for all nodes created or added on CCE. If you have already
create node, you can skip this operation and create docker image in the created node directly.
a w
Step 1 Prepare a linux ECS with below specification
u
 Specification: Specification: Common typeH1 vCPU 1GB

o n
i
 Image: Public image Ubuntu 14.04 64bit

a
Elastic IP: According to bandwidth, t 1Mbit/s
i f ic
e rt
Step 2 Log into the ECS, C run the following command to install Docker.
&
n g
curl -sSL https://get.docker.com/ | sh

n i
i
ra are various ways to install Docker, the command above is the easiest one. For other methods, refer to
There
T
ei
https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository

aw
Hu Create Docker Image
13.4.4
Step 1 Use root user to log into ECS, create a local folder in an empty menu and name it
Dockerfile

mkdir mynginx
cd mynginx
vi Dockerfile

Enter the following content to Dockerfile folder


Huawei Cloud Service Certification Training Lab Guide Page 138

FROM nginx
RUN echo '<h1> Hello, CCE!</h1>' > /usr/share/nginx/html/index.html

The FROM statement indicates that this Dockerfile file uses an Nginx image.
The RUN statement indicates that the echo command is executed to display "Hello,CCE!" on the monitor.

Step 2 Run the following command to download basic image nginx from Dockerhub.

n
docker pull nginx

atio
i c
rt if
C e
&
g
in
Step 3 Run the following command to create mynginx image.

a in
r
docker build -t mynginx:v1 .

i T
e
a w
Hu
n
it o
f ica
r ti
Use Dockerfile to created image named mynginx and laballed v1.

C e
Step 4 Run docker images to query mynginx image.
&
ng
docker images

i
ain
r
e iT
aw
u
H
13.4.5 Run and Stop Docker Container
Step 1 Use root user to log into ECS, run the following command to run Docker.
docker run -d -P mynginx:v1

This command runs a Docker container, run mynginx:v1.

Step 2 Run the following command to view the containers in use.


Huawei Cloud Service Certification Training Lab Guide Page 139

docker ps –l

It can be observed that the container has been in use for 1 minute and it can be accessed by the
port 0.0.0.0:32768. Use curl command to access container.

curl http://0.0.0.0:32768/

n
atio
i c
if
The return message is the content written in Create Docker image of13.4.4 Step 1

Step 3 Run the following command to stop container.


e rt
C
&
docker stop f31a265adbe1

g
in
a in
f31a265adbe1 is the container ID
T r
e i
Step 4 Run docker ps –l, it can be observed that the container has stopped.
a w
Hu
n
it o
ica
tif
13.4.6 Question
r
e method of connecting to the applications in the container besides port
mapping. This system C
Container linking is another

&can view the designated information of the source container. Refer to


creates a tunnel between the source and the receiving container, and the

g
receiving container

in for more informations


https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/#communicati

i n
on-across-links

r a
If an application is to be constructed with multiple containers, is it easier to use this command to
link?TAre there easier ways to manage these containers?
ei
aw
H u
13.5 Upload Image

13.5.1 Operation Scenario


After docker image has been created, we need upload the image to the CCE repository.
Huawei Cloud Service Certification Training Lab Guide Page 140

13.5.2 List of Lab Tasks


Number Task Sub-task Application scenario
1 Upload Create image Before connecting the image repository,
image repository image repository needs to be created.
Connect private Before uploading the image, image
image repository repository needs to be connected.
Upload image Upload image to CCE repository
n
13.5.3 Operation Procedures atio
i c
rt if
e
Step 1 On the navigation bar on the left of CCE page, click “Image repository”.
Step 2 On the right of the page, click “Create Organization”. C
&
g
in
a in
T r
e i
a w
Hu
n
it o
f ica
r ti
C e
&
i ng
ain
r
e iT
w
a Step 3
Hu
Click “OK”, you can view the organization you created in the list.

Step 4 Log in to the ECS running Docker as the root user.


Step 5 Run the following command to configure docker parameters.
 If the system is Ubuntu, the command is:
Huawei Cloud Service Certification Training Lab Guide Page 141

vi /etc/default/docker

 If the system is SUSE,the command is:

vi /etc/sysconfig/docker

Step 6 In Docker_OPTS, add below information.


DOCKER_OPTS="--insecure-registry registry.cn-south-1.huaweicloud.com"

n
atio
i c
rt if
C e
&
g
in
a in
T r
e i
a w
Hu
n
it o
f ica
r ti
e
The address entering here could be different in different region, please find the correct address in “Upload

C
Through Client” from “My Images”.

&
g
in
Step 7 Save the file and exit.
n
i the following command to restart docker.
a
Step 8 Excute

i Tr docker restart
e
service

w
a Step 9 In “My Images” page, click “Upload Through Client” to obtain the permission to
Hu log in to Docker.
Huawei Cloud Service Certification Training Lab Guide Page 142

You can obtain a Long-term Valid Docker Login Command by AK/SK methond, more information,
please see “https://support.huaweicloud.com/en-us/usermanual-swr/swr_01_1000.html”.

Step 10 Copy the Docker login command to the node for execution.

n
atio
i c
rt if
Step 11 Log into the ECS and paste the command above.
C e
&
g
in
a in
T r
i
Step 12 Use docker “tag” command to add tag to the image to be uploaded.
e
docker tag [{Image Name}:{Version Name}] w
a Name}:{Version Name}
registry.cn-south-
1.huaweicloud.com/{Organization Name}/{Image
H u
n
Example: docker tag mynginx:v1 registry.cn-south-1.huaweicloud.com/myspace/ mynginx:v1

io
tdifferent in different region, please find the correct address in “Upload
c a
fi
The address entering here could be

t i
Through Client” from “My Images”.
r command to upload image.
Step 13 Use docker “push”
C e
&Name}
ng
docker push registry.cn-south-1.huaweicloud.com/{Organization Name}/{Image

i
Name}:{Version

n push registry.cn-south-1.huaweicloud.com/myspace/mynginx:v1
Example:idocker
a
i Tr
e Through
aw
The address entering here could be different in different region, please find the correct address in “Upload
Client” from “My Images”.

Hu The return message after successful upload is as follows:


Huawei Cloud Service Certification Training Lab Guide Page 143

13.5.4 Result Verification


Log into CCE console to see if the image is uploaded successfully to the image repository.

n
atio
i c
rt if
13.5.5 Question C e
&
g
in
Is it necessary to upload image?

a in
T r
13.6 Application Deployment e i
a w
13.6.1 Operation Scenario Hu
n
it o
With CCE, you can deploy and manage various types of containers, and perform the following

ica
operations on stateful and stateless containerized applications: deployment, configuration,
monitoring, expansion, upgrading, uninstallation, service discovery, and load balancing.

r t if
Ce
13.6.2 Operation Procedures
& Management” page of CCE console, click “Create Application”
g
Step 1 In “Application
i n
under “Stateless Application”.

a in
i Tr
e
a w
H u

Step 2 Set the parameters as below.


 Application Name: mynginx
 Container Cluster: test
 Instance Quantity: 1
Huawei Cloud Service Certification Training Lab Guide Page 144

n
tio
Step 3 Click “Next”.
Step 4 Select the uploaded docker image “mynginx”, and click “OK”.
i ca
rt if
C e
&
g
in
a in
T r
e i
a w
Hu
n
Step 5 Click “Next”, add access mode as below and click “OK”.
o
Internal Access Domain Name: t i
a mysite


i f
Access Mode: Internal accessic

e rt IP address
Access Type: Node Private
 Container Port: 80C

&
Access Port: Automatically Generated

i ng
Protocol: TCP

a in
r
e iT
aw
Hu
Huawei Cloud Service Certification Training Lab Guide Page 145

Step 6 Click “Next” and set the “Advanced settings” by default.


Step 7 Click “Create”. After successfully created the application, it can be seen in the
list.

Step 8 Click the application name “mynginx” to view the detailed information. Find the
“Access Port” and the IP address on which application running.

n
atio
i c
rt if
C e
&
Step 9 According to the private IP address, find the EIP of the corresponding node.
g
in
a in
T r
e i
13.6.3 Result Verification a w
Hu
Enter the IP address “http://Node EIP: Access Port” (for example: http://139.159.235.145:31954)
n
to access the application, the website created in the container will be displayed.
it o
f ica
r ti
C e
&
i ng
ain
r
e iT
aw
Hu
Huawei Cloud Service Certification Training Lab Guide Page 146

13.7 Application Management

13.7.1 Operation Scenario


You can set automatic scaling policies based on service requirements so that application instances
can be automatically added during peak hours and resources can be reclaimed during off-peak
hours, helping you easily handle service peaks and save resources and labor costs.

13.7.2 List of Lab Tasks


n
Number Task Sub-task Application scenario
atio
i c
1 Manual Manual scaling After the application is created, expand
rt if
scaling mynginx to 3 instances.
C e
&
2 Auto Configure After the application is created, set elastic

g
scaling auto-scaling scaling policy according to the actual resource

in
policy utilization rate of application so that it is

in
reasonable.

r a
i T
13.7.3 Manual Scaling e
w
amanually scale the number of instances on
Step 1 Click the created mynginx application,
H
“Scale” page to 3, then click “Save”.
u
n
it o
i c a
r tif
Ce
&
g
ninthe number of instances on “Instance” page. If it is 3, the scaling is
Step 2 View
i
asuccessful.
T r
e i
a w
Hu
Huawei Cloud Service Certification Training Lab Guide Page 147

13.7.4 Auto Scaling


Step 1 Click the created mynginx application, click “Add Scaling Policy” on “Scale” page
to set the policy.
 Policy Name: reduce
 Policy Type: Alarm Policy
 Trigger Condition: CPU Usage Average < 50%
 Duration: 60s
 Consecutive Occurrence Times: 1
n
 Action: Reduce 1
atio
i c
rt if
C e
&
g
in
a in
T r
e i
a w
Hu
n
it o
f ica
r ti
C e
&
Step 2 Click “OK” to finish setting.
g
Step 3 Viewnthe number of instances on “Instance” page. If it is 2, the scaling is
i ni
ra
successful.

T
ei
aw
Hu
Huawei Cloud Service Certification Training Lab Guide Page 148

14 Workspace Lab Guide

14.1 introduction n
atio
i c
14.1.1 About This Lab
rt if
level. C e
This chapter introduces the process of creating Windows desktop on Workspace on operational

&
g
14.1.2 Objectives in
a in
Upon completion of this task, you will be able to:
T r
 Master how to launch Workspace service.
e i
Master how to create Windows desktop.
w

a
Hu
 Master how to log into the desktop.
 Master daily operations of desktop.

n
14.1.3 Prerequisites it o
i c a account.

Have created VPC. rt


if
Have registered HUAWEI CLOUD

Ce

14.1.4 List of Lab Tasks &


n g
Number i Task
i n Sub-task Application scenario
1 ra
T Launch Create VPC and To answer to company’s business

ei
Workspace subnet demands, administrator Jason needs

aw
service to launch Workspace service and
Create AD zone
u
create desktop for employees. During

H this process, new VPC, subnet and


AD zone need to be created.
2 Create N/A Administrator Jason creates new
Desktop desktop for company’s employees
and designate the role of
administrator.
3 Use software Install software User Mary receives the email to
client to log client create new desktop, follows the
into desktop instruction to download and install
Log into desktop software client, log into the desktop
Huawei Cloud Service Certification Training Lab Guide Page 149

Number Task Sub-task Application scenario


and uses it.
4 Daily N/A Administrator Jason checks the
management desktop function status regularly,
operations of restart or shut down abnormal
desktop desktop.

14.2 Launch Workspace Service n


atio
i c
if
Step 1 Log into Workspace management console.
Step 2 Click “Apply for Workspace” on “Overview” page.
e rt
C
&
g
in
a in
T r
e i
a w
Hu
n
Step 3 Set parameters for workspace. it o
AZ: AZ1
f ica
ti


e r
Service Subnet: subnet-myvpc

C
Management Subnet: 10.0.0.0/20

&
Configure AD: Create an AD domain

ng
Domain Name: huawei.cloud
i


in
Domain Administrator Account: vdsadmin

T ra Administrator Password: Huawei@12
Domain

e

i Confirm Password: Huawei@12
w
ua
 Choose internet access mode

H
Huawei Cloud Service Certification Training Lab Guide Page 150

n
atio
i c
rt if
C e
&
g
in
a in
T r
Step 4 Click “Apply Now” to submit the configuration.
e i
Step 5 You can find “Service Status” is “Applying a w
u
Progress xx%”. Click to refresh
drop-down list.
H
n
Step 6 The application process takes about 40 minutes. After the application succeed,
it o Address” to access Workspace internet page.
you can click “Internet Access

i c a
r tif
Ce
&
g
nin
r ai
i T
e
a w
Hu
Huawei Cloud Service Certification Training Lab Guide Page 151

14.3 Create Desktop


Step 1 Log into Workspace management console.
Step 2 Click “Create Desktop” on “Overview” or “Desktop” page.

n
atio
c
Step 3 Set the parameters for Desktop.
if i
rt
 Charging Mode: Metered
 Region: AZ1
C e
&
 Specifications: General--2 vCPUs 2GB
 Image Type: Public Image--Windows Server 2008 R2
g
in
in
 Storage: System Disk--Common I/O--80 GB
 Service Subnet: subnet-myvpc
r a
i T
e
a w
Hu
n
it o
f ica
r ti
Ce
&
i ng
ain
r
e iT
aw
Hu
Huawei Cloud Service Certification Training Lab Guide Page 152

 Import Method: Manual input


Desktop information
 Username: admin
 Emial: xxxxx@xxxxx.com
 User Group: Administrators
 Send notification email: Yes

n
atio
i c
rt if
C e
&
g
in
a in
Step 4 Confirm specifications and click “Submit”.
T r
Step 5 After desktop is created, you can view it in the list.
e i
a w
Hu
n
it o
Step 6 Set the password though the link in the email you received. Click “Save”.

f ica
r ti
Ce
&
i ng
ain
r
e iT
aw
Hu
Step 7 Open the workspace internet page. You can login the desktop through Web.
Huawei Cloud Service Certification Training Lab Guide Page 153

n
atio
i c
rt if
C e
14.4 Log into Desktop &
n g
ini
Step 1 Download and install software client based on the information below.

Table 14-1 Software package


T ra
ei
w
Software package name Access method
a
Hu
AccessClient.msi https://obs.myhwclouds.com/obs-workspace-
share/AccessClient.msi

o n is installed successfully, double-click


i
“CloudClient” icon on the tdesktop to run software client.
Step 2 After the AccessClient software

i c a
r
Step 3 Click “Add” on “Address
tif frommanagement” page, enter self-defined “Server name”

Ce
and “Server address” the notification email in the “Edit server information”
window.
& to save configuration as below.
g
Step 4 Click “Confirm”

nin
r ai
i T
e
a w
Hu

Step 5 Click “Login” to access desktop login interface.


Huawei Cloud Service Certification Training Lab Guide Page 154

Step 6 On the desktop login interface, enter your user name and password, then click
“Login” to go to desktop list.

Step 7 In the desktop list interface, click to log into desktop as indicated below.

n
atio
i c
rt if
C e
&
g
14.5 Daily Management
in
a in
Step 1 Log into Workspace management console.
T r
e i
Step 2 Click “Desktop” on the left navigation. Access “Desktop management” page.
w
Step 3 On the top-right corner of desktop list,achoose the desktop, enter research key
word then click . Hu
Step 4 Choose desktop, click “Start / n
it o Shut-down / Restart” on the top-left corner of
ca
desktop list or in “Operation”.

Step 5 Confirm message. ifi


e rt
C
&
g
nin
r ai
i T
e
a w
Hu
Recommendations
 Huawei Learning Website
 http://learning.huawei.com/en

 Huawei e-Learning
 http://support.huawei.com/learning/NavigationAction!createNavi?navId=MW
000001_term1000025144&lang=en n
t io
Huawei Certification ica
tif

r
Ce
 http://support.huawei.com/learning/NavigationAction!createNavi?navId=_31
&lang=en &
ng
Find Training ini
ra

T

ei
http://support.huawei.com/learning/NavigationAction!createNavi?navId=_trai
ningsearch&lang=en a w
Hu
More Information n
it o
i c a
r tif
 Huawei learning APP Ce
&
g
n in
r ai
i T
e
a w
H u

版权所有© 2018 华为技术有限公司

Potrebbero piacerti anche