Lesson 1: First Steps

Homepage Content Slides Video

Warning

This lesson is under construction. Learn from it at your own risk. If you have any feedback, please fill out our General Feedback Survey.

Vocabulary

A 10,000ft view of the world
General Topics:
  • Software: A program that runs on a computer.
  • Operating System: Computer software that manages other software.
  • GNU/Linux: A free Operating System.
  • Computer Security: Like physical security but harder to solve with a baseball bat.
  • Virtual Machine: A computer emulated in software.
Development:
  • Version Control: A way to track changes and contributions to a project.
  • Continuous Integration: Releasing updates continuously.
Buzzwords:
  • FOSS: Free (and Libre) Open Source Software. Free as in Speech, not Free as in Pizza (but that too usually).
  • ‘The Cloud’: Computers somewhere else.
  • Containers: Not virtual machines, but basically virtual machines.

TODO: What Vocabulary Do You Know?

What other vocabulary can you think of related to DevOps?

What about Silicon Valley, Programming, System Administration, etc?

Note

This is a TODO. It’s basically an exercise or activity but with a cheeky name. Try them out if you don’t feel confident in a topic.

Notation

  • Variable (use whatever word you like here e.g., foo, bar, baz)
    • $ONE_VARIABLE_NOTATION
    • <another notation for variables>
  • Literal (copy this exactly)
    • copy_me_exactly
  • Comments (parts of the code just for humans)
    • this_is(code)  # everything after the octothorp is a comment!
    • other_code(line)  // This can also be a comment.  It depends on the langauge!
  • Code-block:
#! /usr/bin/env python
# This is a code block.
# Most of the time you can copy this code and run it exactly as is.
# It should be clear Where it 'goes' and how to run it based on context.
print('Hello world!')
$ echo Hello World    # Copy the text after `$` into your termianal and press enter.

TODO: Reading Examples

Trick question: how would you read this
#!/bin/python
dogs = ['$BREED_ONE', '$BREED_TWO', '$BREED_THREE']
for breed in dogs:
    print(breed)

Answer: Reading Examples

Replace the $BREED_N with actual dog breeds.

#!/bin/python
dogs = ['corgie', 'pug', 'french bulldog']
for breed in dogs:
    print(breed)

Getting Setup on Linux

Tux Linux Logo

Lecture Setup

  1. Get login credentials from your lecturer.
    • You will be provided a username, password, host, and port.
Linux/Mac:
  1. Open a terminal and verify you have ssh installed by entering the command ssh --version.
  2. Run ssh -p <port> <username>@<host> and enter the password when prompted (it will hide your password in the terminal).
Windows:
  1. Install an SSH Client (install Putty)

  2. Log into your remote Linux environment using the credentials given to you.

    1. Under Host Name (or IP address) enter <user>@<host>, under Port enter <port>.
    2. You will be prompted for your password in new window, it will hide the password as you type it.

Home Setup

We suggest you install Vagrant, a tool which makes it easy to run and acquire Virtual Machines.

You may also need to install VirtualBox, a tool necessary for Vagrant to function.

Vagrant logo

TODO: Change Your Password!

Challenge Change your password on your Linux machine.
$ passwd
Changing password for user <user>.
Changing password for <user>.
(current) UNIX password: # Enter old password, hidden
New password:   # Enter new password, also hidden
Retype new password:
passwd: all authentication tokens updated successfully.

Don’t forget: when you login next time, use the new password you just set.

Further Reading