鲲鹏技术认证-兼容性测试(CentOS)

前言

测试文档

https://www.hikunpeng.com/document/detail/zh/techcert/certtest/testexct/kunpengcomtestool_06_0001.html

生态伙伴中心

https://www.hikunpeng.com/partnercenter/#/verification

测试步骤

安装依赖

1
yum -y install nmap ipmitool dmidecode pciutils util-linux util-linux net-tools sysstat bc

下载测试软件

https://mirrors.huaweicloud.com/kunpeng/archive/compatibility_testing/

命令

1
wget https://mirrors.huaweicloud.com/kunpeng/archive/compatibility_testing/compatibility_testing.zip

解压

1
2
unzip compatibility_testing.zip
cd ~/compatibility_testing/Chinese

修改配置

1
vi compatibility_testing.conf

配置如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 待测试应用软件进程名称,多个应用名称以逗号隔开。
application_names=gateway-0.0.1-SNAPSHOT.jar
# 待测试应用软件启动命令,多个应用的启动命令以逗号隔开。
start_app_commands=service 8301.sh start
# 待测试应用软件停止命令,多个应用的停止命令以逗号隔开。
stop_app_commands=service 8301.sh stop
# 被测试应用软件的压力测试工具启动命令。
start_performance_scripts=
# Kubernetes集群填写“Y”。其他环境可置空。
kubernetes_env=

# 以下为多节点集群部署填写,单机(单节点)部署不需要填写。
# 集群环境的IP地址列表,多个IP地址以逗号隔开,不包括当前脚本所在服务器IP地址,请勿填写本机IP地址。
cluster_ip_lists=

执行测试

执行前要把测试的服务先停止

1
sh compatibility_testing.sh

采集的结果会在测试的同级目录生成。

采集结束,日志打包完成,压缩包log_20241111164718.tar.gz存放在/root/compatibility_testing/Chinese。

压测工具

流量访问压测工具 - ab

ab 是 Apache 自带的一个小型工具,用于测试 HTTP 服务器的性能。

使用场景:流量访问压测工具常用于评估 Web 服务器的性能,检测系统在并发访问下的表现。

ab工具安装:

1
2
sudo yum install httpd-tools   #Centos系统
sudo apt-get install apache2-utils #ubuntu系统

测试网站的并发连接数

1
ab -n 20 -c 5 https://www.baidu.com/

这将创建5个并发连接,每个连接执行20个请求。

测试网站的请求速度

1
ab -n 1000 -c 100 https://www.baidu.com/

这将创建100个并发连接,总共执行1000个请求.这时可以通过监控观察cpu和内存,用来初步评估平台的并发承载能力。

鲲鹏DevKit

https://www.hikunpeng.com/document/detail/zh/kunpengdevps/userguide/usermanual/KunpengDevKit_0004.html

其中的应用迁移工具能生成迁移报告。

安装

插件安装

在Visual Studio Code扩展菜单中搜索Kunpeng DevKit,单击“安装”。

服务器上测试软件安装

https://www.hikunpeng.com/developer/devkit/download

image-20241112104716392

下载

1
wget "https://kunpeng-repo.obs.cn-north-4.myhuaweicloud.com/Kunpeng DevKit/Kunpeng DevKit 24.0.RC3/DevKit-All-24.0.RC3-Linux-Kunpeng.tar.gz"

安装依赖包

1
yum install -y file passwd which hostname procps iproute make acl gcc-c++ gcc glibc openssl sudo sqlite wget lsof unzip gzip expect libcap rpm-build e2fsprogs crontabs pcre pcre-devel zlib zlib-devel openssl-devel

解压

1
tar --no-same-owner -zxvf DevKit-All-24.0.RC3-Linux-Kunpeng.tar.gz

进入解压目录

1
cd DevKit-All-24.0.RC3-Linux-Kunpeng/

进行安装

1
./install.sh

测试

在VSCode的插件Kunpeng DevKit中登录

点击新建“快速创建鲲鹏工程或任务”,默认选择“迁移”功能中“软件迁移评估”,点击“确认”。