Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Implement SelfTargetExecutor to run YChaos on the same machine #12

Closed
shashankrnr32 opened this issue Jun 23, 2021 · 4 comments
Closed
Assignees
Labels
enhancement New feature or request ychaos-executor This issue or pull request is regarding the YChaos Executor
Milestone

Comments

@shashankrnr32
Copy link
Member

Is your proposal related to a problem?

Currently we have a MachineTargetExecutor which connects to the remote hosts via ansible to run the agents using Coordinator. Some of the agents doesn't require SSHing to the hosts. They can be run directly from the same machine where the tool is being executed.

A simple example of this is the SSL Certificate validation/HTTP Overload Agent (currently NA in the framework)

What is the solution you are proposing?

Implement SelfTargetExecutor to run the YChaos coordinator right on the host where YChaos is being executed.

@shashankrnr32 shashankrnr32 added enhancement New feature or request ychaos-executor This issue or pull request is regarding the YChaos Executor labels Jun 23, 2021
@shashankrnr32 shashankrnr32 added this to the Version 1.0.0 milestone Jun 25, 2021
@shashankrnr32
Copy link
Member Author

shashankrnr32 commented Aug 18, 2021

Starting this discussion, Here are the possible ways to implement SelfTargetExecutor. Refer to MachineTargetExecutor to know how its implemented using Ansible to SSH to hosts and run commands on the host.

  1. We can write our own modules to run different tasks that is supposed to run for YChaos. For example, creation of Virtual Environment, installation of packages etc. Major work would be to create virtual environment locally and install packages. Other than that, rest of the work is simple here.
  2. We can use the Ansible's local_action (Delegation of tasks) feature for the same. See docs, https://docs.ansible.com/ansible/latest/user_guide/playbooks_delegation.html. This implementation would mean we would be reusing most of the way we do things in MachineTargetExecutor. We can make use of the same Ansible modules for the same.

Add your thoughts in this thread @yahoo/ychaos-dev

@lakshmi-k05
Copy link
Collaborator

I think the second approach is better. Handling dependancies of packages would be simpler, as we would not need to update it here. Plus, reusing Ansible's modules will enable us to have the same functions for remote hosts as well as running locally. Easier to maintain as well

@shashankrnr32
Copy link
Member Author

I agree. We can refactor MachineTargetExecutor to have common utility functions to delegate actions to the right target based on Ansible's features.

@AlfinST AlfinST self-assigned this Sep 1, 2021
@AlfinST AlfinST mentioned this issue Sep 16, 2021
13 tasks
@shashankrnr32
Copy link
Member Author

@AlfinST Can you please add documentation to the Self Target Executor and close this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request ychaos-executor This issue or pull request is regarding the YChaos Executor
Projects
None yet
Development

No branches or pull requests

3 participants