Answer the question
In order to leave comments, you need to log in
How to run tests on two VM/Docker?
Hello!
How can I run a test (gitlab-ci) on two different machines within the same test?
Well, or at least run two (3-5) machines, and execute commands from one.
Tests are something like this:
Run on all machines
VM1:
- yum install uwsgi nginx
- cp app.py /var/www/project
- cp conf/uwsgi.ini /etc/uwsgi.d/test.ini
- service start uwsgi
- service start nginx
VM2:
- yum install nginx
- cp conf/uwsgi.ini /etc/uwsgi.d/test.ini
- service start uwsgi
- touch file.txt
VM1:
- script.py VM1 test1
VM2:
- script.py VM2 test1
VM1:
- script.py VM1 test2
VM2 :
-script.py VM2 test2
- yum install uwsgi nginx
- cp app.py /var/www/project
- cp conf/uwsgi.ini /etc/uwsgi.d/test.ini
- service start uwsgi
- service start nginx
- ssh VM2 "yum install nginx"
- ssh VM2 "cp conf/uwsgi.ini /etc/uwsgi.d/test.ini"
- ssh VM2 "service start uwsgi"
- ssh VM2 "touch file.txt"
- script.py VM1 test1
- ssh VM2 "script.py VM2 test1"
- script.py VM1 test1
- ssh VM2 "script.py VM1 test2"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question