开发者提交给 DPDK
社区的 patch
都会被执行 CI
测试。dpdk-ci-site
是一个由社区开发的、用于展示 patch
测试详情的网站后台。它是基于 Django
框架开发的,需要 Python3.6+
。下面简单介绍一下它的安装方法。
首先需要 clone
网站源码
$ git clone git://dpdk.org/tools/dpdk-ci-site
接着,进入 dpdk-ci-site
目录以非 root
用户运行 ./configure
脚本,以 root
用户运行此脚本会报错:
$ ./configure
Do not run this script as root
上面提示不要以 root
用户来运行此脚本,因此需要切换到一个非 root
用户。./configure
脚本运行时间稍长,大概需要 4
分钟左右,在这个过程中需要创建 Python
虚拟环境,并安装一系列的依赖包。
$ su zhoumin
$ ./configure
Checking for pre-commit tool in PATH...not found
Creating virtual environment in env...success
^@^@Installing project requirements...success
Installing settings.py...installed
Check if database exists...no
Create database if needed and apply migrations...success
^@Load sample data into database...success
Installing client JavaScript dependencies...success
Building client JavaScript...success
Done! To run the server, run the following commands:
source venv/bin/activate
cd cisite
./manage.py createsuperuser # do this once
./manage.py runserver 0:8000
如果 ./configure
脚本执行报错,则需要打开 ./config.log
文件来查看具体的报错信息,然后解决问题,并重新运行该脚本。一般来说,报错主要是因为缺少相关依赖包,或是安装相关依赖包失败而导致的。
如果 ./configure
脚本执行成功,则根据上面输出内容的提示,接下来只需要激活 Python
虚拟环境,并启动 web
站点就可以了。
$ source venv/bin/activate
$ cd cisite
$ ./manage.py createsuperuser # do this once
$ ./manage.py runserver 0:8000