Changes

Jump to: navigation, search

OPS435 Python3 Lab 8

449 bytes removed, 23:32, 2 July 2020
INVESTIGATION 1: Extra VM Setup
:* Retrieve current firewall setting using the iptables -L -n -v command
= INVESTIGATION 1: Extra VM Setup The Fabric Framework =
: In order to experience The Fabric framework consists of the following components::# the Fabric Python Library - the fabric package:# the Fabric API - fabric.ap:# the Fabric CLI - fab - run Fabric's features in a realistic wayscript, we're going default to set up several virtual machines fabfile.py in the current working directory:# Fabric script: contains Python functions (You need at least one more VMor tasks). To begin with they are all going to have be executed by the same configuration"fab" CLI. Please make sure :# Controller workstation - the machine that each VM has direct network connection with other VMs you wish to control the Fabric package installed and configurewill run the "fab" CLI:# Remote machine: the target machine on which a Fabric task will be executed.
== PART 1 - Set up Configure your controller workstation ==: In this lab you will use your user account on matrix.senecacollege.ca as your Fabric controller workstation.
: In this lab you will use your existing vm The Fabric package version 1.14.0 has already been installed on matrix.senecacollege.ca. You should have access to the '''centos7fab''' as a workstation command on matrix. Login to control other VMs which we'll call workersmatrix.senecacollege. Later in ca and run the lab, we will try following command to control and monitor your vm in myvmlab using confirm the version of the fabfile we are going to develop.fabric package:<pre> $ fab --version</pre>: Install '''fabric''' using yum. Once it's installed you should have a '''fab''' command available. Type the following command to get the command line optionof fab:<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 options::# -H, :# -f, :# -li, and --port options.</b></font> == PART 2 :# - Create master Worker image == : Create a new virtual machinel, and allocate for it 1GB of RAM and 8GB of disk space. Install a Basic Web Server configuration of CentOS in that VM using the same CentOS .iso file you used for your first machine in this course. : Make sure that:# --port:* The hostname of the system is '''worker1'''.:* It has a static IP address appropriate for your virtual network.:* Create a regular user using your Seneca email name as the # --user name: [seneca_id]. :* Add this new regular user to the '''wheel''' group using the following command:<source lang="bash"> usermod # --initial-sudo-a password-G wheel [seneca_id]prompt </sourceb></font>This will allow the user to run the '''sudo''' command.:* After installation ensure that you can access '''worker1''' from your main vm using the static IP address you've assigned to it.
=== Set up SSH key login ===
== PART 3 - Clone the Workers ==
: We're only simulating the real world where you'd have hundreds of VMs in one or more clouds, but you can just imagine that the VMs you're creating on your computer are actually being created on an Amazon or Microsoft serverCloud.
: '''** 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.
1,760
edits

Navigation menu