P
P
panaceya2016-09-07 15:11:47
Continuous Integration
panaceya, 2016-09-07 15:11:47

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

Well, as an option - you can execute SSH commands from 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
- 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"

How can all this be implemented (and if the second option, then gently do not forget to enable SSH on VM2 to copy) in Gitlab-CI and Docker?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question