Changes

Jump to: navigation, search

OPS435 Python3 Lab 8

998 bytes added, 11:03, 3 July 2020
INVESTIGATION 1: The Fabric Framework
:* Retrieve current firewall setting using the iptables -L -n -v command
= INVESTIGATION 1: The Fabric Framework Environment =
: The Fabric framework environment consists of the following components::# the Fabric Python Library - the fabric package(already installed on matrix):# the Fabric API - fabric.apapi:# the Fabric CLI command - '''fab - ''': run Fabric script, name of the script is default to fabfile.py in the current working directoryunless specified otherwise with the '-f' option.:# Fabric script: contains fabric environment object value and Python functions (or tasks) to be executed by the "'''fab" CLI''' command. :# Controller workstation - the machine that has the Fabric package installed and will run runs the "fab" CLIcommand:# Remote machine: the target machine on which a one or more Fabric task tasks will be executed.
== PART 1 - Configure and test your controller workstation ==: In this lab you will use your user login account on matrix.senecacollege.ca as your Fabric controller workstation.
: The Fabric package version 1.14.0 has already been installed on matrix.senecacollege.ca. You should have access to the '''fab''' command on matrix. Login to matrix.senecacollege.ca and run the following command to confirm the version of the fabric package:
$ fab --version
</pre>
: Type the following command to get the command line option options of the fabcommand:<source lang='bash'>
fab --help
</source>
number of concurrent processes to use in parallel mode
</source>
<font color='green'><b>Please note and study the following command-line optionsas they will be used in some of the activities in this lab:
:# -H,
:# -f,
:# --initial-sudo-password-prompt
</b></font>
 
== PART II: Connect to VM in myvmlab.senecacollege.ca ==
: You should have received an email from ITS containing the following information:
:* account name: (usually 'student')
:* password: (let's assume it is 'P@ssw0rd' for the following instruction in this lab)
:* port number for SSH access via myvmlab.senecacollege.ca (e.g. 7200)
: This VM will be used as the remote Linux machine in our Fabric environment. Login to matrix and try the following SSH command to test the connectivity between matrix and your assignment VM:
<pre>
[raymond.chan@mtrx-node05pd lab8]$ ssh -p 7211 student@myvmlab.senecacollege.ca
student@myvmlab.senecacollege.ca's password:
Last login: Fri Jul 3 11:06:24 2020 from mtrx-node05pd.dcm.senecacollege.ca
</pre>
=== Set up SSH key login ===
1,760
edits

Navigation menu