Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a quick guide for setting up the remote spawner #5846

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/plugins/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ Some of these plugins may have extra dependencies of their own.
optional/results/index
optional/robot
optional/varianters/index
optional/spawner_remote
1 change: 1 addition & 0 deletions docs/source/plugins/optional/spawner_remote.rst
39 changes: 39 additions & 0 deletions optional_plugins/spawner_remote/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
=====================
Remote Spawner Plugin
=====================

This plugin makes use of remote `aexpect
<https://github.com/avocado-framework/aexpect/>`__ sessions (to remote
hosts or equivalently remote containers behind remote hosts forwarded
via specific ports) as slots to schedule test runs on.

It mainly draws inspiration and mimics slot and other
code from the LXC spawner with the exception of extra configurable
test timeout that is enforced by aexpect as a dependency and fully
specific to this type of spawner.

To install the Remote Spawner plugin from pip, use::

$ sudo pip install avocado-framework-plugin-spawner-remote

After it is installed, add a slot (e.g. "board") to your avocado
config file::

[spawner.remote]
slots = ['board']

Then you need a JSON file of the same name as the slot. Its contents
are the command line parameters of aexpect's ``remote_login`` function
of module ``remote``, e.g.::

{
"client": "telnet",
"host": "192.168.64.2",
"port": "23",
"username": "root",
"password": "",
"prompt": "#"
}

Final important detail: the remote site also needs avocado
installed.
10 changes: 8 additions & 2 deletions optional_plugins/spawner_remote/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,18 @@
VERSION = version_file.read().strip()


def get_long_description():
with open(os.path.join(BASE_PATH, "README.rst"), "rt", encoding="utf-8") as readme:
readme_contents = readme.read()
return readme_contents


setup(
name="avocado-framework-plugin-spawner-remote",
version=VERSION,
description="Remote (host) based spawner",
long_description="Remote (host) based spawner",
long_description_content_type="text/plain",
long_description=get_long_description(),
long_description_content_type="text/x-rst",
author="Avocado Developers",
author_email="[email protected]",
url="http://avocado-framework.github.io/",
Expand Down
Loading