DevOps virtualization
In this assignment you will install a CLI version of Linux, often known as a headless version (no GUI).
Create a new VM using 1024MB RAM, 1 CPU, 16GB Hard Drive, the focal_server image. You will also create the following partitions on the machine: 6G on /, 3G on /home, 2G swap.
Follow the quick_guide instructions found here but note that any reference to bionic should read focal.
After the install is complete, ssh into the machine (remember that you may have to go through the ssh server if you are connecting from a machine outside our network).
sudo apt update
sudo apt install openssh-server
.ip a
.cat /etc/netplan/50-cloud-init.yaml
. The dhcp4 argument should be false. If it is true then it means that you failed to enter the network information during install.You can edit the file using sudo and vim. Download this worksheet [CLI-Network-Fix] (../files/CLI-Network-Fix.pdf)
sudo shutdown now
df -h | grep sda
should return something like the following (the sizes do not have to be exact but around 6G on / and 3G on /home:
swapon -s
should return something like the following. The size does not have to be exact but must be around 2G:
After you have successfully ssh’d into your VM:
Install Package
fortune
Create User
joe
sudo adduser joe
ls -la
Just for fun - some more fun commands
You must copy my key to your virtual machine. To do this, perform the following steps on your virtual machine logged in as your username - not JOE (Do not copy/paste all 6 lines at once, they must be individually entered):
sudo bash
wget http://cit.dixie.edu/it/3100/sources/install_key.bash
chmod +x ./install_key.bash
./install_key.bash
rm ./install_key.bash
exit
The grading script will be run as you are logged into scratch. The command you will execute will be similar for all of your assignments that have an autograder. Here is a sample of the command you will run: run_grader.py --n 2 --ip 1.2.3.4
. The 2 is representative of lab2. (Lab 3 would replace the 2 with a 3). NOTE you will pass in the ip address of your virtual machine that you have created. You will see some feedback. You should make sure that all your tests pass and that your score is correctly recorded. Please see your instructor for any help or questions on the output.