-
Notifications
You must be signed in to change notification settings - Fork 26
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
WIP | Consolidating fabric operations related methods #56
Open
hkumarmk
wants to merge
5
commits into
Juniper:master
Choose a base branch
from
hkumarmk:working
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Apr 5, 2016
-
Use ssh agent to connect between remote machines
Current method - copy ssh private key to remote node1 and then try to ssh using that key file - is not required, as ssh-agent forwarding will enable such facility without ssh private keys present in subsequent machines. You just need private key on test node and no need to copy private key to anywhere else, just run ssh-agent on test node and run the command on remote nodes (even between remote nodes with agent forwarding enabled. Added tools/common.sh with common bash functions. Added a new function "prepare" and also added a new parameter to run only "prepare". This will be helpful in case of manually running tests which actually need running tools/configure.py as well as starting ssh-agent on test node.
Configuration menu - View commit details
-
Copy full SHA for 2bfeb4e - Browse repository at this point
Copy the full SHA 2bfeb4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for af10d14 - Browse repository at this point
Copy the full SHA af10d14View commit details -
Moved fabric related methods to tcuils.fabutils
This is to refactor certain common code to central place and to reuse them. Current effort is to consolidate methods which use fabric operations to single place and avoid importing fabric module to various other files but to use the methods from fabutils.
Configuration menu - View commit details
-
Copy full SHA for f57a512 - Browse repository at this point
Copy the full SHA f57a512View commit details -
Renamed run_cmd_through_node to run_cmd to use it in wider usecases
This method to be used to run command on any remote nodes - whether it is a remote server or VM or between VMs. This method has capability to handle: 1. run remote command on remote server from test node 2. Run remote command on node-a through node-b from the test node * in this case node-a is the target node, node-b is gateway, and the nodes will be connect from testnode * This is to avoid situation to login to remote node (node-b in this case) and run script (fab script or pexpect or any such code) on that remote node (node-b) against running command on target node (node-a) 3. Run remote command on VM thorugh compute node - Same usecase as of Juniper#2 4. Run remote commands between VMs - say copy a file from vm1 to vm2 through compute node of vm1. * This will use ssh-agent forward to avoid copying ssh private keys to subsequent servers - Previously we used to copy ssh private keys to compute node and then copy the same file to vm1 in order to be able to connect from vm1 to vm2. * The commands will be running sitting on the test node then run an * "ssh/scp" command on vm1 through compute node of vm1 with agent_forward on * in this case flow is like this: test_node -> compute_of_vm1(gateway - passthrough) -> vm1 (run ssh/scp there) -> vm2 (final command is run) NOTE that in all above situations ssh is initiated from the test node and NO NEED TO SSH TO ANY OTHER NODE AND RUN SSH/FAB COMMANDS FROM THERE.
Configuration menu - View commit details
-
Copy full SHA for 95a82df - Browse repository at this point
Copy the full SHA 95a82dfView commit details -
Replace run_fab_cmd_on_node with run_cmd
Removed run_fab_cmd_on_node from the codebase and replaced all occurances of it with run_cmd.
Configuration menu - View commit details
-
Copy full SHA for ec1833a - Browse repository at this point
Copy the full SHA ec1833aView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.