2022 National Vocational College Skills Competition Higher Vocational Group Cloud Computing Competition Test Paper [Competition Name] Cloud Computing Competition Game 3 - Public Cloud

2022 National Vocational College Skills Competition Higher Vocational Group CloudComputing Competition Exam Paper

[Schedule Name] Cloud Computing Competition Game 3 - Public Cloud

Table of contents

2022 National Vocational College Skills Competition Higher Vocational Group Cloud Computing Competition Exam Paper

[Schedule Name] Cloud Computing Competition Game 3-Public Cloud

[Task 1] Public cloud service establishment [10 points]

[Task 2] Public cloud service operation and maintenance [10 points]

[Task 3] Public cloud operation and maintenance development [10 points]

If you need the competition software package environment, you can send a private message to the blogger! ! !

[Task  1 ] Public cloud service establishment [10 points ]

[Applicable Platform] Huawei Cloud

[Topic  1 ] Private network management [0.5 points ]

To complete the creation of a virtual private cloud in the public cloud, the specific requirements are as follows:

( 1 ) Create an operation in an area of ​​Shanghai;

( 2 ) Create an internal network named  intnetX  : The IP address is  172.16.0.0/16 ;

( 3 ) Create a subnet named  intnetX-server : IP address is  172.16.1.0/24;

( 4 ) Create a subnet named  intnetX-mysql : IP address is  172.16.2.0/24;

After completing the creation, submit the current  AK ( SecretId ),  SK ( SecretKey ) and  intnetX  network  ID  to the answer

question box.

1. Check that the vpc   name is intnetX and it will score   0.1 points correctly.  

2. Check whether the subnet name is intnetX-server   and the subnet segment is correct. 0.2   points will be awarded.

3. Check that the subnet name is intnetX-mysql   and the subnet segment is correct and 0.2   points are awarded.

[Topic  2 ] Cloud instance management [0.5 points ]

Log in to Huawei Cloud Platform and create two cloud instances. The specific requirements are as follows:

( 1 ) Billing mode: on-demand billing;

( 2 ) Region: Shanghai 1;

( 3 ) CPU architecture: x86 computing;

( 4 ) Specifications: c7.xlarge.2 ;

( 5 ) Mirror: CentOS 7.5 64 -bit;

( 6 ) System disk: High  IO 50G hard drive;

( 7 ) Public network bandwidth: billed according to bandwidth, 5Mbps ;

( 8 ) Instance name: ChinaSkill-node-  1  , ChinaSkill -node-2 ;

( 9 ) Login method: Use password to log in, password customization.

After creation, submit the current  AK ( SecretId ),  SK ( SecretKey ) and ChinaSkill-node-  1  implementation

Enter the example  ID  into the answer box.

1. Check whether the type used by the cloud instance is correct. 0.2   points will be awarded.

2. Check whether the cloud disk used by the cloud instance is correct. 0.3   points will be calculated.

[Topic  3 ] Database management [0.5 points ]

使用 intnetX-mysql 网络创建两 chinaskill-sql- 1  chinaskill-sql-2 云服务器, 使用提供 的压缩文件 rocketchat-cloud.tar.gz 中的软件包源,  chinaskill-sql- 1  chinaskill-sql-2 中部  MongoDB 数据库服务。配置完成后提交连接 chinaskill-sql- 1 节点的用户名、密码和公网

IP 地址到答题框。

1.查看数据库安装正确计 0.5

【题目 4】主从数据库[1 ]

chinaskill-sql- 1  chinaskill-sql-2  云服务器中配置 MongoDB  主从数据库,配置 MongoDB 集群名称为 rs 并完成集群设置。完成后提交连接 chinaskill-sql- 1 节点的用户名、

密码和公网 IP 地址到答题框。

1.查看 mongo 数据库 rs 集群状态正确计 1

【题目 5node 环境管理[0.5 ]

使用提供的压缩文件rocketchat-cloud.tar.gz 中软件包源,在 ChinaSkill-node- 1 部署nodejs 根据  提供  rocket.chat        nodejs       配置      连接

ChinaSkill-node- 1 节点的用户名、密码和公网 IP 地址到答题框。

1.查看 node 版本为 v12.16.1 正确计 0.5

【题目 6】安全组管理[0.5 ]

创建一个安全组,具体要求如下:

1)名称:intnetX-security

2)允许策略:只放行源地址为 172.16.1.0/24 访问 27017 端口;

3)允许策略:只放行源地址为 172.16.1.0/24 使用 ping 命令访问;

4)关联实例:将 intnetX-security 安全组关联至所创建的数据库中;

创建完成后,提交当前的 AKSecretId)、 SKSecretKey)和安全组 ID 到答题框。

1.查看安全组是否被创建计 0.1  

2.查看安全组 tcp  策略是否按要求创建计 0.2  

3.查看安全组 icmp  策略是否按要求创建计 0.2  

[Topic  7 ] RocketChat on the cloud [ 0.5 points ]

Use the RocketChat   software package in the compressed file rocketchat -cloud.tar.gz provided by the http   server to deploy RocketChat 's web service in ChinaSkill-node -1 . Use chinaskill-sql- 1 's MongoDB as the backend database, and set the RocketChat service access port to 3000 . After completing the cloud migration of the Rocketcat system, the                       

ChinaSkill-node-  1 node's username, password and public  IP address to the answer box.

1. Check that  RocketChat service is normal and score  0.2 points

2. Check whether the front-end page returns normally and it will be worth  0.3 points .

[Topic  8 ] NAT  gateway [0.5 points ]

Create a public network  NAT  gateway with the following configuration:

( 1 ) The name is: kcloud-nat ;

( 2 ) Virtual private cloud:  intnetX ;

( 3 ) Subnet: intnetX-server ;

( 4 ) Rule: internal subnet address accesses the external network;

( 5 ) Set  Chinaskill-node-  1  cloud server  port 3000 to be converted to external service port 3000 . 

After creation, submit the current  AK ( SecretId ), SK ( SecretKey ) and  NAT  gateway  ID  to the answer box.

1. Check whether there is a NAT policy for accessing the external network in the virtual private cloud.  0.5 points are awarded. 

[Topic  9 ] Cloud backup [0.5 points ]

Create a cloud server backup repository named server_backup with a capacity of 100G . Change ChinaSkill-node-  1

The cloud server creates the image file  chinaskill-im age . After completion, change the current  AK ( SecretId ), SK ( SecretKey )

and repository  ID  into the answer box.

1. Check whether the cloud server backup is correct and score 0.5   points .

[Topic  10 ] Load balancer [0.5 points ]

Create a load balancer  chinaskill-elb and add  ChinaSkill-node  -1 and  ChinaSkill-node-2 to the load  balancing backend. Set an available public network service  IP and the service port is  3000 . Configure a listener to listen on port  3000 .  Conduct web access testing on floating public  IPs . After completion, submit the current AK ( SecretId ), SK ( SecretKey )   

 and the ID  of the load balancer into the answer box.

1.查看负载均衡器参数是否正确计 0.5  

【题目 11】弹性伸缩管理[0.5 ]

新建一个启动配置, 具体要求如下:

1)启动配置名称:template-exam

2)计费模式:按量计费;

3)地域:上海一;

4)镜像:chinaskill-image

5)登录方式:使用密码登录, 密码自定义。

创建一个伸缩组,具体要求如下:

1)名称:as-exam

2)最小伸缩数: 1;起始实例数: 1;最大伸缩数:5

3)启动配置:template-exam

4)使用负载均衡:chinaskill-elb

5)移出策略:移出最旧的实例。

为伸缩组 as-exam 新建告警触发策略,具体要求如下:

1)如果实例的内存利用率在 5 分钟内的最大值小于 40%,且连续发生 3 次。则实例

数减少 1 台。冷却 60 秒;

2)如果实例的内存利用率在 5 分钟内的最大值大于 80%,且连续发生 3 次。则实例

数增加 1 台。冷却 60 秒;

3)如果实例的 CPU 利用率在 5 分钟内的最大值小于 40%且连续发生 3 次。则实例

数减少 1 台。冷却 60 秒;

4)如果实例的 CPU 利用率在 5 分钟内的平均值大于等于 80%,且连续发生 3 次。则

实例数增加 1 台。冷却 60 秒。

创建完成后提交当前的 AKSecretId)、SKSecretKey)和伸缩组的实例 ID 到答题框。

1.查看弹性伸缩参数是否正确计 0.5  

【题目 12】公有云安全:入侵检测系统[2 ]

在公有云上的主机时刻面临被攻击的危险,除了可以购买云安全服务,还可以自行部署 安全服务。在华为云上创建一个 X86  架构的云主机,镜像使用 CentOS7.9。使用提供的 makechk.tar.gz 包安装 chkrootkit 入侵检测工具,安装完毕后使用 chkrootkit 工具扫描系统, 并将扫描结果保存到/var/log/chkrootkit/chkrootkit.log,根据扫描的结果,修复漏洞。操作完

成后, 提交该云主机的用户名、密码和公网 IP 到答题框。

1.查看扫描结果正常计 1

2.查看扫描结果告警计 1

【题目 13】公有云安全: 日志分析服务[2 ]

安全在公有云服务中占很大的比重,而日志分析服务可以很有效的分析日志规避部分风 险。请在华为云上创建一个 X86 架构的云主机, 镜像使用 CentOS7.9。自行配置 YUM 源安  Docker 服务,然后使用提供的 sepb_elk_latest.tar 镜像安装 ELK 服务, 安装完成后,进行 添加数据操作,  ELK 监控目标节点所需安装的 RPM 安装包下载到本地云主机的/root  

录下。完成后提交 ELK 云主机的用户名、密码和公网 IP 到答题框。

1.查看 elk 服务正常计 1 

2.查看 RPM 安装包正确计 1

【任务 2】公有云服务运维[10 ]

【适用平台】华为云

【题目 1】云容器引擎[0.5 ]

创建一个 x86 架构集群, 具体要求如下:

1)集群名称:kcloud

2)集群版本:v1.21

3)地域:上海一;

4)集群管理规模:50 节点;

5)控制节点数: 3

6)节点使用子网:intnetX-server

7Pod 实例上限:64

8)容器网段:10.10.0.0/16

节点配置信息要求如下:

1)节点名称:kcloud-server

2)节点规格:c6s.xlarge.2

3)节点:EulerOS 2.9

创建完成后提交当前的 AKSecretId)、 SKSecretKey)和集群的 ID 到答题框。

1.查看云容器是否被正确创建 cce.0.kcloud.v1.21.10.10.0.0/16  0.5  

【题目 2】云容器管理[0.5 ]

使用插件管理在 kcloud  容器集群中安装 dashboard  可视化监控界面。完成后,提交

dashboard 访问地址到答题框。

1.查看 dashboard  首页,有 Kubernetes Dashboard  返回计 0.5  

【题目 3】使用 kubectl 操作集群[0.5 ]

 kcloud 集群中安装 kubectl 命令,使用 kubectl 命令管理 kcloud 集群。完成后提交连

 kcloud 集群节点的用户名、密码和公 IP 地址到答题框。

1.使用 kubectl  命令查询集群是否正确计 0.5

【题目 4】安装 helm[0.5 ]

Use the provided  helm software package (the software package is  helm-v3.3.0-linux-amd64.tar.gz under  the http service )  to install the helm service in the  kcloud cluster  . After completion, submit the username, password and public IP to connect to the kcloud cluster node.     

Address to the answer box.

1. Check whether  helm is installed correctly and check  whether the helm version is v3.3.0. 0.5 points will be awarded .  

[Topic  5 ] Cloud hard disk storage volume [0.5 points ]

Purchase a cloud disk storage volume. The specific configuration is as follows:

( 1 ) The name is: ckloud-disk ;

( 2 ) Cluster: kcloud ;

( 3 ) Capacity: 30G ;

( 4 ) Type: High  I/O ;

After completion, submit the user name, password  and public IP address for connecting to the kcloud cluster node to the answer box. 

1. Check whether the storage volume ckloud-disk information in the cluster is correct.  0.5 points will be awarded. 

[Topic  6 ] Multi-container  Pod  Management [0.5 points ]

 Write the YAML file mu-pod.yaml in the kcloud cluster node /root   directory . The specific requirements are as follows:  

( 1 ) Pod name: mu-pod ;

( 2 ) Namespace: default ;

( 3 ) Pod contains two containers:

  Container  1 name: containers01 ; Image: nginx ; Container port: 80 ;

  Container  2 name: containers02 ; Image: tomcat ; Container port: 8080 ;

( 4 ) Pull strategy: IfNotPresent .

After completion, use the  YAML file to create  a Pod , and submit  the username, password, and IP of the master node to the answer box. 

1. Checking the  pod status information correctly will score  0.2 points .

2. Check  the pod details and  the correct container information will score 0.3 points . 

[Topic  7 ] Namespace management [0. 5 points ]

 Write the YAML file my-namespace.yaml in the kcloud cluster node /root   directory . The specific requirements are as follows:  

( 1 ) Namespace name: test .

After completion, use this  YAML file to create  a Namespace and submit  the username , password and IP of the master node to 

Answer box.

1. Check the  correct namespace and score  0.5 points 

【题目 8Secrets 管理--Opaque[0.5 ]

 master 节点/root  目录下编写 YAML 文件 secret.yaml,具体要求如下:

1Secret 名称: mysecret

2)命名空间:default

3)类型:Opaque

4username: YWRtaW4=password: MWYyZDFlMmU2N2Rm

完成后使用该 YAML 文件创建 Secret,并提交 master 节点的用户名、密码和 IP 到答题

框。

1.查看 mysecret 设置正确计 0.5 

【题目 9】使用 helm 模板[0.5 ]

使用赛项提供的 mychart-0.1.0.tgz 模板包(在 http 服务下),修改模板代码使外部可通 过节点地址进行访问。在模板市场中上传我的模板 mychart,在 kcloud 集群中安装名为 nginx

的模板实例。完成后提交连接 kcloud 集群节点的用户名、密码和公网 IP 地址到答题框。

1.查看 mychart 访问模式正确计 0.5

【题目 10helm 应用部署 mariadb  搭建[0.5 ]

根据提供的 chart  mariadb-7.3.14.tgz 部署 mariadb 服务, 修改 mariadb 使用 NodePort 模式对其进行访问, 设置外部访问端口为 32334,并设置 mariadb 数据库 root 用户密码为

chinaskill。完成后提交连接 kcloud 集群节点的用户名、密码和公网 IP 地址到答题框。

1.查看数据库访问端口验证数据库正确计 0.5

【题目 11helm 应用部署 mariadb  应用[1 ]

 k8s 集群中创建 mariadb 命名空间, 根据提供的 chart  mariadb-7.3.14.tgz 修改其配 置,使用 NodePort 模式对其进行访问,创建数据库 chinaskill,创建对其拥有远程访问权限 的用户 chinaskillroot,密码为 chinaskillpassword。通过 helm 使用修改后的 chart 包部署在 mariadb 命名空间中, 服务名为 mariadb。完成后提交连接 kcloud 集群节点的用户名、密码

和公网 IP 地址到答题框。

1.查看数据库访问端口验证数据库正确计 1

【题目 12wordpress 应用部署[1 ]

根据提供的 chart  wordpress- 13.0.23.tgz 部署 wordpress 服务,根据 chart 包中内容创建 wordpress 所需要的 pv,并修改其访问模式为 NodePort。使用修改后的 chart 包创建 wordpress

服务。完成后提交连接 kcloud 集群节点的用户名、密码和公网 IP 地址到答题框。

1.查看 wordpress 前端页面是否正确计 1

【题目 13chartmuseum 仓库部署[1 ]

 k8s 集群中创建 chartmuseum 命名空间,编写 yaml 文件在 chartmuseum 命名空间中 使用 chartmuseum:latest  镜像创建本地私有 chart  仓库,设置其仓库存储目录为宿主机的 /data/charts  目录。编写 service.yaml 文件,为 chart 私有仓库创建 Service 访问策略, 定义其 为 ClusterIP 访问模式。编写完成后启动 chartmuseum 服务。提交连接 kcloud 集群节点的用

户名、密码和公网 IP 地址到答题框。

1.检测 chartmuseum 服务反馈是否正确计 1

【题目 14】私有仓库管理[2 ]

master  节点添加搭建的本地私有 chart  仓库源, name   chartmuseum,并上传 wordpress- 13.0.23.tgz 包至 chartmuseum 私有仓库中。可以使用本地仓库 chart 源部署应用。

完成后提交连接 kcloud 集群节点的用户名、密码和公网 IP 地址到答题框。

1.检测 chartmuseum 仓库源中存在 wordpress- 13.0.23  2

【任务 3】公有云运维开发[10 ]

【适用平台】华为云

【题目 1Python 运维开发:华为云 Python  运行环境准备[1 ]

通过华为云控制台,选择北京四区域,创建一台 x86  架构,“按需计费 ”的 2 核,4G 系统盘 50G 的云实例, 实例名为 chinaskill2022,选择镜像为 CentOS 7.9 64bit(40GB),分配 独立的公网 IP,带宽选择按使用流量计费 5M。登录此云服务器,安装 Python3.68 运行环境, 并安装华为云旧版 SDK、新版(v3.0) Python SDK 中弹性云服务、虚拟私有云、镜像服务、

容器云引擎的 python 库。

完成后提交“chinaskill2022 开发运行环境云主机 ”的用户名、密码和 IP  地址到答题框。

1.检查云主机开发环境, 正确计 1 分。

【题目 2Python 运维开发:实现容器集群创建[1 ]

基于在 Huawei Cloud API 的云容器引擎 CCE Python 模块, 使用以下信息,在/root  目录

下手动编写 cce_cluser.yaml 文件。

     /root/         cce_cluster_manager.py            cce_cluser.yaml,创建“按需计费 ”的 CCE 容器引擎集群(Cluster),创建后根据名称查询

该集群(Cluster)的详细信息, 通过控制台以json 格式输出该集群的信息。

创建 CCE 集群的信息如下:

CCE 名称 chinaskillscce2022

按需计费; 集群版本:v1.21

集群规模: 节点数 50

网络模式: VPC 网络;

其他必要信息不限。

完成后提交“chinaskill2022 开发运行环境云主机 ”的用户名、密码和 IP  地址到答题框。

1.指定配置信息,执行 cce_cluster_manager.py 脚本, 集群创建成功,计 1 分。

【题目 3Python 运维开发: ECS 云主机管理的命令行工具开发[4 ]

使用已建好的运维开发环境,在/root/目录下创建 ecs_manager.py 脚本,完成 ECS 云主

机管理,ecs_manager.py 程序支持命令行参数执行。

提示说明: 华为云主机支持安装所需 Python 库。提交前答案前,需安装所开发程序所

依赖的 Python 库。

1)程序支持根据命令行参数, 创建 1 个云主机。

位置参数“create”,表示创建;

参数“-i  --input”,格式为json 格式文本的云主机的名称、镜像名称 2 个信息。其他

参数同上述开发环境云主机一致。

创建待成功,再返回查询该云主机的信息,结果以json 格式输出到控制台。

参考执行实例如下:

python3 ecs_manager.py create --input ' {  "name": " chinaskill001", "imagename": "CentOS

7.9 64bit"} '

2)支持查询给定具体名称的 ECS 云主机查询。

位置参数“get”,表示查询 ECS

参数“-n  --name”支持指定名称 ECS 查询, 类型为 string

参数“-o  --output”支持查询该 ECS 信息输出到文件, 格式为json 格式。

参考执行实例如下:

python3 ecs_manager.py get --name chinaskill001-o chinaskill001.json

3)程序支持查询目前区域账号下所有的 ECS 云主机。

位置参数“getall”, 表示查询所有 ECS 云主机;

参数“-o  --output”支持输出到文件,格式为 yaml 格式。

参考执行实例如下:

python3 ecs_manager.py getall -o huawei_all_ecs.yaml

4)支持删除指定的名称的云主机。

位置参数“delete”,表示删除一个 ECS 云主机;返回 response,通过控制台输出。

参数“-n --name”支持指定名称查询, 类型为 string

参考执行实例如下:

python3 ecs_manager.py delete --name chinaskill001

完成后提交“chinaskill2022 开发运行环境云主机 ”的用户名、密码和 IP  地址到答题框。

1.执行 ecs_manager.py 脚本,指定 create 和配置参数,成功创建 1 台云主机,  1 分; 2.执行 ecs_manager.py 脚本,指定 get 和配置参数, 成功查询具体名称云主机,  1 分; 3.执行 ecs_manager.py 脚本,指定 getall 和配置参数,成功查询目前区域账号下所有的

云主机,计 1 分;

4.执行 ecs_manager.py 脚本,指定 delete 和配置参数, 成功删除指定的云主机,  1 分。

【题目 4Python 运维开发: ECS 主机管理与监控的 Restful APIs    HTTP 服务封装[4 ]

云服务器的/root/目录下编写 huawei_ecs_server.py  文件编写 Python 程序实现华为 ECS 云主机管理与云主机操作系统性能远程监控。 所有的资源申请区域为“华北-北京四”, 所

有服务封装成 Restful APIs 方式, host  127.0.0.1 ,端口 8888 ,供外部检测。

提示说明: 华为云主机支持安装所需 Python 库。提交前答案前,需安装程序所依赖的

Python 库。

具体要求:

1POST /ecs/server  创建云主机,需要等待成功该云主机后,返回查询该云主机信息。

Request 传输的数据为 application/jsonjson 包含 2 个必备信息, 名称、镜像名称。

json 数据格式案例如下:

{  "name": " cloud001", "imagename": "CentOS 7.9 64bit"}

其他必备参数与开发环境云主机一致。

Response  Body json 格式,返回所创建成功的主机详细信息。

2GET /ecs/server/{name}查询云主机; Response  Body  yaml 格式。

3GET /ecs/server/{name}/os 查询所指定 ID 云主机的操作系统信息;Response json

格式返回。返回格式要求如下:

os_release:操作系统的版本系统;

cpu_util:CPU 使用率%;

mem_util:内存使用率%;

disk_util:磁盘使用率%

4DELETE /ecs/server/{name}删除云主机; Response  Body json 格式。

编码完成后,自己手动执行提供 Web HTTP 服务的 huawei_ecs_server.py 程序。

完成后提交“chinaskill2022 开发运行环境云主机 ”的用户名、密码和 IP  地址到答题框。

1.执行 huawei_ecs_server.py 脚本,端口成功启动,  0.5 分;

2.发起指定参数的 POST 创建 ECS 请求,成功创建云主机, 计 1 分;

3.发起指定参数的 GET 查询 ECS 请求,成功查询云主机, 计 1 分;

4.发起指定参数的 GET 查询 ECS OS 请求, 成功查询云主机的操作系统信息,计 1 分;

5.发起指定参数的 DELET 删除 ECS 请求, 成功删除指定云主机,计 0.5 分。

需要竞赛软件包环境可私信博主!!!

Guess you like

Origin blog.csdn.net/qq_50377269/article/details/135247836