Changes

Jump to: navigation, search

OPS435 Python3 Lab 8

496 bytes added, 13:23, 3 July 2020
PART 3 - Clone the Workers
</source>
== PART 3 4 - Clone Running the Workers fab command in ad-hoc mode ==: WeThe 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='re only simulating bash'>fab [options] -- [shell commands]</source>: When running the real world where you'd have hundreds of VMs fab command in one or more cloudsad-hoc mode, but you can just imagine that it is very similar to running the SSH with commands attached at the end. Try the VMs youfollowing ad-hoc fab commands and record their results for later use:<source lang='re creating on your computer are actually being created on an Amazon or Microsoft Cloudbash'>[raymond.chan@mtrx-node05pd lab8]$ fab --host=myvmlab.senecacollege.ca --port=7200 --user=student -- 'date;hostname;id'[myvmlab.senecacollege.ca] Executing task '<remainder>'[myvmlab.senecacollege.ca] run: date;hostname;id[myvmlab.senecacollege.ca] out: Fri Jul 3 13:05:39 EDT 2020[myvmlab.senecacollege.ca] out: centos7[myvmlab.senecacollege.ca] out: uid=1002(student) gid=1002(student) groups=1002(student),10(wheel)[myvmlab.senecacollege.ca] out:
: '''** Optional **''' Make four clones of the master worker image you've just created. Then make sure that each of them has a unique IP address. That's all you're required to change manually. All the other configuration on the workers (inlcuding the hostnames) will be set by Fabric. Normally you would have some kind of automation doing all this cloning and IP address assignment as well, but we don't have time for that this semester.
Done.Disconnecting from myvmlab.senecacollege.ca: Make snapshots of all your workers so 7200... done.[raymond.chan@mtrx-node05pd lab8]$</source>: Note that there is no password prompting if you complete part 3 successfully and the output from the fab command can easily restore them to be very useful for recording keeping purpose - what has been done and whether the original state after you modify themcommands had been carried out successfully or not.
= INVESTIGATION 2: Fabric practice =
1,760
edits

Navigation menu