Amazon AWS Basics Tutorial: Setting Up a Load-Balanced, Auto-Scaling Webserver

This step-by-step tutorial will show you how to build load-balanced, highly available, self-healing infrastructure on the Amazon Web Services (AWS) Cloud.

If you’ve been wondering how to get started with “DevOps,” “Cloud” System Administration, and public cloud providers in general, this is the series for you.

Amazon’s Cloud Services are vast — there are an enormous amount of things you can use:

  • services that replicate traditional Virtual Machines in a datacenter (EC2, RDS, Elasticache)
  • services that give you insane amounts of availability and durability, along with an innovative API (S3 for storage)
  • replacements for other solutions in brand new industries (ECS)
  • plenty of unique services that no one else is offering

 

If you really want to learn this stuff, you want to start with simple, practical examples that slowly walk you through the huge amount of new concepts that you’ll need to learn. You need something practical that you can use in real life, so that navigating Amazon’s immensely complex graphical user interface becomes second-nature.

Once you’ve got a grasp on the basic concepts and the most important services, we can dive into building more realistic, more complex infrastructure that uses specific AWS features to get the job done.

We’ll also explore the AWS API, which allows you to use a command-line client or bindings for your favorite programming language to work with infrastructure. This is the preferred way that professionals use to interact with AWS.

 

Video #1: Intro and EC2 Instance Creation

In the first video, you’ll learn the basics of working in the Amazon AWS Console (their graphical user interface) and set up an EC2 instance with a webserver on it. You’ll create your first security group (AWS network firewall rules), set up SSH keys, and connect to your ‘development’ instance for the first time.

Once you’re ready for launch, you’ll learn how to create a new Amazon Machine Image (AMI) from your EC2 instance, which we can use to spin up clones of that instance later on.

 

Video #2: Auto-Scaling Groups and Launch Configurations

In the second video, I’ll show you how to set up an Auto-Scaling Group (ASG) which uses a Launch Configuration to spin up new EC2 instances (clones of your development instance). We’ll talk a bit about scaling and how you’d set it up in a real project.

 

Video #3: Tying it together with an Elastic Load Balancer

In the third video, you’ll be setting up an Amazon Elastic Load Balancer (ELB) to balance traffic across the instances in your Auto-Scaling Group. I’ll show you how to add health checks and hook up the Application Load Balancer to your ASG, so it automatically balances across healthy instances in your ASG, even as they’re added and removed.

 

There’s more coming, so stay tuned!

Cron Jobs

Cron jobs allow you to repeatedly run commands. They can be run both in a timed manner, but also on bootup. While cron may seem a bit confusing in the beginning, it’s actually very simple to use once you know how it works.

Read more

man man – What does the 1 in ls(1) mean?

man pages – many people would have loved to have known earlier about them. This article could be summed up as “just read man-pages(7)”. But what does that mean and why should you care?

Read more

Git: Setting up a low-requirements, personal Git repository

In this tutorial you will learn how to  how to quickly set up a simple, low-requirements, no-database, no-webserver Git repository. All you need is (unprivileged) SSH access and the git program itself.

Read more

The System Administration Course on Udemy is now $12 (from $45)!

It’s been several months since I released my project-based system administration course on Udemy (https://www.udemy.com/hands-on-linux-self-hosted-wordpress-for-linux-beginners/?couponCode=SYSADMINW12).

To celebrate a big move back to the U.S. (and a new job), I just lowered the price from $45 to $25. As always, the tutorialinux sysadmin horde gets a better deal: $12 for all 8 hours of the video course.

For those that don’t know about the course, it’s titled “Hands-on Linux: Self-Hosted WordPress for Linux Beginners” and will teach you the basics of Linux system administration using a real-life project. You’ll set up a WordPress website, and the infrastructure to run further websites (as many as you want).

More info can be found in my original post about the course.

I also show you the sysadmin skills that you generally don’t see in tutorials or YouTube videos: automation, security hardening, backups and restores, next steps and add-on project ideas.

There’s a 30-day money back guarantee on Udemy, so there’s no risk if you find that the course isn’t for you.

Have fun!

https://www.udemy.com/hands-on-linux-self-hosted-wordpress-for-linux-beginners/?couponCode=SYSADMINW12

Shell Aliases

When working on Linux and Unix systems, you’ll often find yourself using long shell commands that you repeat several times per day (or per session). Things like

  • checking on the current resource usage of a system,
  • checking if a process has completed yet, or
  • using a complex group of commands, piped together with special options to give you just the output you want.

Generally, you’ll either use CTRL+R to search for these past commands in the shell’s history. Some of you may even copy useful commands to a special file that you can easily reference. You might even just enter them manually each time you need them, since you’re too lazy to be bothered.

There’s a simple solution that covers all of these cases well: Aliases.

Read more

How to convert an SSH2 Public Key into an OpenSSH public key

When working with people who don’t use a Unix-based operating system, you’ll often come across the SSH2 Public Key format. PuTTY is probably the most famous software using this format and nearly everyone on Windows uses it. To give them access to a system, SFTP server, Git repository or similar you often need to convert an SSH2 public key into the OpenSSH format. This article describes how to do exactly that.

Read more

How to Install Dwarf Fortress on Ubuntu 16.04

Note: If you don’t know what Dwarf Fortress is, you owe it to yourself to learn a bit about it. It’s one of the most interesting and detailed games/simulations/sandboxes ever created.

I just spent a bit of time getting Dwarf Fortress installed on Ubuntu 16.04. I didn’t find much in the way of up-to-date instructions, so I’m writing down what works as of today (June 2016). If you’re wondering how to install Dwarf Fortress on Ubuntu 16.04, here’s what you’ll want to do:

Read more

Linux Command-Line Basics: Two Videos

If you want to be a competent Linux or Unix Administrator, Developer, or IT Person, you need to be completely comfortable on the Linux Command Line. For that reason, I’ve approached the “Linux Command-Line Basics” topic from a few different angles so far.

This post should be a good jumping-off point for anyone who wants to dive in — it’s a one-stop shop for all the free videos I’ve made on the subject of Linux command-line basics and basic Bash shell skills over the last three years. Let’s get started!

Read more

Where to Get a ‘Cloud’ Server For $5/month

So you’re playing with setting up a cool project or web application (like the one I show you how to set up in my new Udemy course), and you want it to be accessible for your friends, your family, and yourself (while traveling away from your home network). How do you set that up?

Buckle up; I’m about to explain all the things.

Read more