CS 3700 Labs

Lab 1: Vagarant, Linux, & Bash

Pre-Lab Instructions

VirtualBox

Please download the appropriate VirtualBox 6.0 Installer from the Downloads page for older builds for your system architecture.

Vagrant

Please download the appropriate Vagrant Installer from the Vagrant Downloads Page for your system architecture

Khoury Log-in

It appears not everyone has a Khoury login at present. Please log into your Khoury account here. If you do not have a Khoury account, you can sign up for one here.

Introduction

The Lab TA(s)

The Lab TAs for this term are:

Virtualization

Why Virtual Machines?

Diagram of Virtual Machines

Citation: https://www.docker.com/blog/containers-replacing-virtual-machines

Virtualization creates an interface between the Operating System and the hardware. Adding an interface at any layer of your application stack provides various desierable properties:

For this class, Virtual Machines allow us to nest one operating system within another.

VirtualBox

What is VirtualBox?

In short, a hypervisor: the piece of software that implements the interface layer between the "host" operating system (your machine) and the "guest" OS (the OS running in the VM).

Why VirtualBox?

VirtualBox is ported to a number of systems and fairly plug-and-play. As a result, 200 students can install it and it will work for the most part.

Alternatives

Note: while you are free to use any hypervisor of your choice, the course staff will only support VirtualBox.

Vagrant

What is Vagrant?

Vagrant is a VM "orchestrator" (not to be confused with "conductors" of either type). Orchestrators are a piece of software that sits along-side the hypervisor (ie, on the host machine) and issues it commands. The purpose is to allow us to automate certain workflows involving starting up groups of

Why Vagrant?

The image we are using is provided by systems and distributed via Vagrant Cloud.

The Vagrant Image Lifecycle

States

Transitions:

Environment Setup

  1. Install VirtualBox 6.0 for your system
  2. Install Vagrant for your system
  3. Open a terminal of your choice + create a directory for your vagrant image

The Image

Referenced: Khoury Systems KB0013541

$ vagrant box add khoury/CentOS-7.6
$ vagrant init khoury/CentOS-7.6
$ vagrant up
$ vagrant ssh
 ...

The code snippit above will download, setup, start, and connect you to the environment.

Linux

History: Unix + Posix

Thompson and Ritchie

Citation: https://en.m.wikipedia.org/wiki/File:KenThompsonandDennisRitchie--1973.jpg

The pdp-11

Citation: https://commons.wikimedia.org/wiki/File:KenThompson(sitting)andDennisRitchieatPDP-11(2876612463).jpg

Unix was first developed at AT&T Bell Labs as an operating system for the PDP-7. Being written entirely in C was notable for the time because it provided portability to future architectures. Linux was a late last in a long line of several UNIX-esq OSes. Charge lead initially by Berkely's Software Distribution (BSD), which itself was originally just a software package.

Linus Torvalds

Citation: https://commons.wikimedia.org/wiki/File:LinuxConEuropeLinusTorvalds03_(cropped).jpg

Linux shows up in the mid 80's as a Finnish Grad Student (Linus Torvalds)'s research project. It is the first notable example of a major software package being provided for free to the world at large. Many variants now exist: Ubuntu, Debian, Fedora, and CentOS are notable instances of software built on top of the linux kernel. The kernel running in Mac OS X (known as Darwin) is a BSD descendent and cousin of Linux. The kernel in Anroid Phones is also a Linux variant.

The Linux Use-case

Very few people use Linux as their day-to-day. Linux is primarily seen in data centers as the defacto operating system for analytics and web apps.

Useful Links & Further Readings

Khoury Systems

Virtual Machine Primers

Oracle VirtualBox

Vagrant

*nix

Bash