- docker
- submission system (https://github.com/tjumyk/submit)
- prepare python environment
# prepare a python virtual environment first
pip install -r requirements.txt
- In
config.json
of the submission system, add an entry inworkers
underAUTO_TEST
, e.g.
{
"name": "test_worker_1",
"password": "ALongPassword"
}
A random password can be generated by:
python3 -c 'import secrets; print(secrets.token_urlsafe(12))'
You need to restart submission system server to let this take effect.
You will need to add this block into local config as well (see below).
cp config.example.json config.json
# edit config.json
- Update
AUTO_TEST_WORKER
according to the config in the section above - Edit
SITE
according to real setup - Delete
broker_use_ssl
inAUTO_TEST
, updatebroker
andbackend
if rabbitmq and redis is in a remote server. (if in remote server, also need to configure listen address of rabbitmq and redis and system firewall)
bash init.sh
celery -A testbot.bot worker -Q testbot_env_test_script,testbot_env_test_docker -l info -n 'testbot@%h' -c 2
Note: the user who runs this test bot need to be in the group docker
to use docker without password.