????docker??UI????????????
?????strayhrt ???????[ 2016/7/26 11:27:42 ] ????????????????
???????????docker
???????????????centos???????????docker?????в????????????鱣?????centos7?????3.10?????????
??????????????????????а?????centos6????????????????????????????????????????????
????docker?????????????????????
?????????docker?????????????????centos6.6?????
??????????????????????3???????????????behave?????pg/redis??????????application???????????????
???????app??pg??????????pg??????container?????????app?????????????????????????????????????ip??£?????app??????????й???pg??redis???????????127.0.0.1???????????????????????????????????н????????stop??pg??????????????????????app?????С?
???????????Ч????????????????????????????????????????????pg??redis??????app???????~
????docker run -d -v /opt/data/remote:/opt/share 172.16.154.92:5000/centos:6-cfp-apps-2.6.1
????docker run -d --net=container:{???????????????ID} 172.16.154.92:5000/centos:6-cfp-env-2.6.1
????????celery
????????????????????????????????????????????????????????????????????????celery??
????celery????????????python???????????docker???????behave?????а?????
?????????????????????????docker?????е?celery????n??behave???app??env????????????case???????????env??????
??????????????behave?????е?celery????????id??app??????ip???????????app????????????
????behave?????????supervisor???celery??????behave???????
[supervisord]
nodaemon=true
[program:celery]
command=bash -c "cd /root/ && celery worker -A tasks -Q behave -l info -c 1 -f /opt/share/celery%(ENV_celery)s.log"
startretries=0
????docker??????celery????main???С?
celery worker -A tasks -Q main -c 10 -l info
????celery??task???tasks.py?????????
from celery import Celery??platforms
import subprocess
import os??sys
import time
platforms.C_FORCE_ROOT = True
app = Celery()
app.conf.update(
CELERY_IMPORTS = ("tasks"?? )??
BROKER_URL = 'redis://172.16.154.92:9852/0'??
CELERY_RESULT_BACKEND = 'redis://172.16.154.92:9852/1'??
CELERY_ROUTES = {
'tasks.cfp_start': {'queue': 'main'}??
'tasks.behave_init': {'queue': 'main'}??
'tasks.get_ip': {'queue': 'main'}??
'tasks.behave': {'queue': 'behave'}??
'tasks.rm_docker': {'queue': 'main'}??
'tasks.stop_docker': {'queue': 'main'}??
}??
...
)
????????????????????????????????caseid?????????????????app??pg??behave?????????鵽app????ready????caseid??????ip??celery???С?
?????????case??й?????????case?????????case?????????pg???????????????caseid??ip??celery??????????????????????????????л?????
???????????????????????
??????????????????24?? 24g??????????? ???й???????????cpu??????90%??????????????????~~
???????????
??????????behave???????????case??????????junit???????????case???????????????????????
????????????????????????£? ??????????е???? xunitparser??junit_xml????????????????junit????
????????????jenkins???ò???????
????????????
???????????????????????????£?????????docker?????????????????????ip?????????????
????docker?????????????е?????????????????????????????????????????app?????????????????????Щ?????url??????Щ?????urlip??????е????????127.0.0.1??????? ????????????????squid????????app????????????Σ?????????????????????????????′???ok???
??????????????????е?????phantom????????н??????????????????????????У??????????????
??????????behave?????after_step() ??????????????????????к?????screenshot??????????????????????mount??docker?????С?
?????????????nginx?????????úy????????????????~~
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11