Need to understand how to run the agent in docker container #118
Replies: 2 comments 1 reply
-
Hi @sameerpjoshi, Honestly i've not tried this yet myself (it is on the todo list) but it should work, and I heard from one of the other rfswarm users that they had it working, but I don't remember who. You have the agent showing up in the manager, this is good, means the agent is running and communicating with the manager. so this means that the rfswarm components are all working. I see from the screen shot that that 2 robots are assigned but none are running, hopefully that means the agent attempted to run the robot, remember it can take up to 10 seconds after the robot is assigned to the agent before the agent will attempt to start the first robot. First thing to check, if you scroll to the right in the agents screen you will see a list of robot framework libraries that the agent recognised as being installed (the agent asks pip for this list) so first thing to check is that the libraries you need for your test are all there? Next check the results directory, (depending on your scenario settings you may need to stop the test first), rfswarm agent will return the logs from robot framework back to the manager, if your not sure where the results directory is, check settings for the scenario and rfswarm. i'll check back here regularly to see how you got on. Dave. |
Beta Was this translation helpful? Give feedback.
-
This part of the error "File or directory to execute does not exist." is what doesn't make sense, I can't find anywhere that might be used in a file or directory, can you share the full log file? also which file did you find this error? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I got the docker container working with rfswarm-agent. Its also able to connect to the manager running on a public VM.
However , I see that its not able to run the tests. Not able to understand the reason. I think since the agent is able to be seen in agent list on manager side, its able to access the network port 8138 of manager.
`FROM python:3.11.0a7-bullseye
LABEL name="Docker build demo Robot Framework"
ADD ca-certificates.crt /etc/ssl/certs/
RUN wget -O /usr/local/share/ca-certificates/AvayaITrootCA2.crt http://avayaitserverca2.avaya.com/pki/avayaitrootca2.crt
RUN wget -O /usr/local/share/ca-certificates/AvayaITserverCA2.crt http://avayaitserverca2.avaya.com/pki/avayaitserverca2.crt
RUN wget -O /usr/local/share/ca-certificates/Zscaler.crt http://avayaitserverca2.avaya.com/pki/ZscalerRootCertificate-2048-SHA256.crt
RUN update-ca-certificates
RUN apt-get update
&& apt-get install -y xvfb wget ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0
libatspi2.0-0 libcups2 libdbus-1-3 libgbm1 libgtk-3-0 libnspr4 libnss3
libxcomposite1 libxkbcommon0 libxrandr2 xdg-utils ntpdate openssl
RUN python3 -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org robotframework && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org robotframework-requests && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org robotframework-selenium2library
&& pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org xvfbwrapper && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org robotframework-xvfb && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org certifi && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org asn1crypto
&& pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org bcrypt && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org robotframework-sshlibrary && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org cryptography && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pyOpenSSL
&& pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org idna && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org rfswarm-agent && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org requests[security]
RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
&& dpkg -i google-chrome*.deb
&& rm google-chrome*.deb
&& wget -q https://chromedriver.storage.googleapis.com/101.0.4951.41/chromedriver_linux64.zip
&& unzip chromedriver_linux64.zip
&& rm chromedriver_linux64.zip
&& mv chromedriver /usr/local/bin
&& chmod +x /usr/local/bin/chromedriver
CMD ["rfswarm-agent","-m http://xx.xx.xx.xx:8138"]`
Please let me know what am I missing here.
Beta Was this translation helpful? Give feedback.
All reactions