Changes

Jump to: navigation, search

OPS445 Online Lab8

10 bytes added, 15:06, 18 July 2022
m
Part 2: Create remote task for updating rpm packages
# If you got similar result as shown above, you have successfully configured your controller workstation and your VM to use public key authentication.
=INVESTIGATION 2 - : Running the fab command in ad-hoc mode =
: The fab command relies on SSH to make the connection to the remote machine before executing the intended commands. The fab command can run in ad-hoc mode:<source lang='bash'>
fab [options] -- [shell commands]
: The following output had been trimmed, only showing the first few lines:<source lang='bash'>
[myvmlab.senecacollege.ca] Executing task 'updatePackage'
[myvmlab.senecacollege.ca] sudo: yum update -y--skip-broken
[myvmlab.senecacollege.ca] out: sudo password:
[myvmlab.senecacollege.ca] out: Loaded plugins: fastestmirror
</source>
= Optional Lab Exercise: Create a Fabric task called makeUser() =
1. Study the Fabric API run(), sudo(), local(), and put() and utilize them to create a new Fabric task called makeUser()<br>
2. The makeUser() task should perform the following on a remote machine to:
3. Add the makeUser() to your final version of fabfile.py.<br>
4. Run the new task makeUser() on your VM.<br>
5 .Verify and confirm that your new makeUser() task is working correctly.
= LAB 8 SIGN-OFF (SHOW INSTRUCTOR) =
: Complete each part of the lab and upload the version of your '''fabfile.py ''' to Blackboard by the due date.
[[Category:OPS445-Python]][[Category:rchan]]
572
edits

Navigation menu