Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
泰斯特Test
Taisite-Platform
提交
548c0f7c
T
Taisite-Platform
项目概览
泰斯特Test
/
Taisite-Platform
9 个月 前同步成功
通知
121
Star
28
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Taisite-Platform
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
548c0f7c
编写于
4月 22, 2020
作者:
泰斯特Test
提交者:
GitHub
4月 22, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update README.md
上级
58c72472
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
209 deletion
+4
-209
README.md
README.md
+4
-209
未找到文件。
README.md
浏览文件 @
548c0f7c
...
...
@@ -72,218 +72,13 @@ The platform follows the idea of "separate development frontend and backend". Th
![
泰斯特平台结构图_V1.0
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/泰斯特平台结构图_V1.0.png
)
##
IV . D
eploy
##
d
eploy
### Deploy under windows
[
click me
](
https://mp.weixin.qq.com/s/bLyDWHCAPCshF8vmbSHtWw
)
##
## 0. Clon
e
##
how to us
e
git clone https://github.com/amazingTest/Taisite-Platform.git
#### 1. Install python 3 env
#### 2. deploy NLP model
[
Download model
](
https://storage.googleapis.com/bert_models/2018_11_03/chinese_L-12_H-768_A-12.zip
)
2.
2 Extract the compression package
2.
3 Install python dependent-packages
pip install tensorflow==1.14.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install bert-serving-server==1.9.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
2.
4 Start the model
// Execute after the current directory is switched to the model folder directory
bert-serving-start -model_dir ./chinese_L-12_H-768_A-12/ -num_worker=1
After the startup is successful, the output is as follows:
![
NLP模型启动成功输出
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/NLP模型启动成功输出.png
)
#### 3. Deploy Mongodb database
#### 4. Set system environment variables
AUTOTEST_PLATFORM_ENV=production
AUTOTEST_PLATFORM_NLP_SERVER_HOST=127.0.0.1
AUTOTEST_PLATFORM_MONGO_HOST=${MONGO_HOST}
AUTOTEST_PLATFORM_MONGO_PORT=${MONGO_PORT}
AUTOTEST_PLATFORM_MONGO_USERNAME=${USERNAME}
AUTOTEST_PLATFORM_MONGO_PASSWORD=${PASSWORD}
AUTOTEST_PLATFORM_MONGO_DEFAULT_DBNAME=taisite
Where AUTOTEST_PLATFORM_ENV defaults to production (required)
AUTOTEST_PLATFORM_MONGO_HOST and AUTOTEST_PLATFORM_MONGO_PORT indicate the address and port of the database (required)
AUTOTEST_PLATFORM_MONGO_USERNAME and AUTOTEST_PLATFORM_MONGO_PASSWORD represent the account password of the database (if not required)
AUTOTEST_PLATFORM_NLP_SERVER_HOST (Natural Language Model Service) defaults to native boot (not required)
AUTOTEST_PLATFORM_MONGO_DEFAULT_DBNAME is the default data table name (required)
After the setting is completed, you can test it with the following commands (CMD switches to the project root directory)
python ./backend/config.py
If the configuration is successful, you can see the input configuration data.
#### 5. Package the front-end dist file (I have done this for you, skip it if you don't need secondary development)
5.
1 Install the Vue environment, download node.js and configure the environment, download the npm package manager
5.
2 Cmd into the frontend directory, configure cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org
5.
3 Execute the install dependency package command:
cnpm install
5.
4 Execute the package command:
cnpm run build
If successfully packaged, the dist folder will be generated in the project root directory.
#### 6. Start backend
// Switch to the project root directory to execute
pip install -r ./backend/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
// Start backend (default 5050 port)
python ./backend/run.py
// Create a platform administrator account password
python ./backend/createAdminUser.py
#### 7. Access project
You can now log in using http://127.0.0.1:5050/#/login using the created administrator account password.
![
平台登录界面2.png
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/平台登录界面2.png
)
### Docker containerized deployment in Linux environment
#### 0. Clone
git clone https://github.com/amazingTest/Taisite-Platform.git
#### 1. Natural language model deployment
sudo -i
docker pull shaoyuyishiwo/bertserver
docker run --name autotest-platform-bertserver -d shaoyuyishiwo/bertserver
#### 2. Mongo database deployment (skip this step if an existing database is available)
2.
1 Start database & data mount to host
sudo -i
docker pull mongo
docker run --name autotest-platform-mongo -p 27017:27017 -v /data/db:/data/db -v /data/configdb:/data/configdb ``-d mongo
2.
2 Create a database account
docker exec -it autotest-platform-mongo /bin/bash
mongo
> use admin
switched to db admin
> db.createUser({user:"${USERNAME}",pwd:"${PASSWORD}",roles:["root"]})
Successfully added user: { "user" : "admin", "roles" : [ "root" ] }
2.
3 Database memory expansion (recommended)
> db.adminCommand({setParameter:1, internalQueryExecMaxBlockingSortBytes:335544320})
{ "was" : 33554432, "ok" : 1 }
#### 3. Environment variable configuration
// Edit /etc/profile file
sudo -i
vi /etc/profile
If there is a warning, select (E)dit anyway (enter E)
3.
1 Insert the following data at the end of the text (enter i to get into insert status)
export AUTOTEST_PLATFORM_ENV=production
export AUTOTEST_PLATFORM_NLP_SERVER_HOST=${BERT_IPADRESS}
export AUTOTEST_PLATFORM_MONGO_HOST=${MONGO_HOST}
export AUTOTEST_PLATFORM_MONGO_PORT=${MONGO_PORT}
export AUTOTEST_PLATFORM_MONGO_USERNAME=${USERNAME}
export AUTOTEST_PLATFORM_MONGO_PASSWORD=${PASSWORD}
export AUTOTEST_PLATFORM_MONGO_DEFAULT_DBNAME=${DBNAME}
The variable is a dynamic value. The deployer can input it according to the actual situation.
The DBNAME value can be arbitrarily customized (database table name). The BERT_IPADRESS and
MONGO_HOST values can be queried by the following commands:
docker inspect autotest-platform-bertserver
docker inspect autotest-platform-mongo // If you used the above steps to deploy the database
The output is shown below:
![
控制台输出1.png
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/控制台输出1.png
)
3.
2 After inserting, click the ESC button, type :wq and click Enter to save.
3.
3 Environment variables take effect immediately after executing the following command
source /etc/profile
#### 4. Start the project
Before you start the project, you need to change the timezone info by modifying the RUN script in
**Dockerfile.backend**
which stay
in first-level directory of the project. The default timezone is Asia/Shanghai.
// Execute the deployment file in the project root directory
sh deploy ${PORT}
The ${PORT} variable fills in the project access port, and the administrator account password is also created when the
project starts, as shown in the following figure:
![
控制台输出2.png
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/控制台输出2.png
)
#### 5. Access project
The browser can access the ${PORT} port of the deployment server address.
![
平台登录界面.png
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/平台登录界面.png
)
#### EXTRA. FQA
The following output represents the NLP model startup failure
![
NLP部署失败.png
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/NLP部署失败.png
)
Solution steps:
1.
Remove the code from ./backend/app/init.py:
![
不使用NLP模型方法指南1.png
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/不使用NLP模型方法指南1.png
)
2.
Modify the following code in ./backend/testframe/interfaceTest/tester.py to pass:
![
不使用NLP模型方法指南2.png
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/不使用NLP模型方法指南2.png
)
When you start the project after you finish, you will not depend on the natural language model~
[
click me
](
https://shimo.im/docs/8TqxG3Ttjvj9yT8T
)
## V . Contact me
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录