Skip to content

Latest commit

History

82 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Interconnect-2017 - Session 4486A

How to Immunize your Cloud Services before the Epidemic strikes

Technologies involved:

Lab Architecture:

For the sake of simplicity, lets consider a simple Cloud Service architecture consisting of:

  • Two Apache Web Server Docker containers running a cloud App (Container 2 as Backup Server).
  • One NginX Load Balancer Docker container.
  • A cAdvisor Docker container monitoring the host machine as well as the Docker containers in the Cloud Service.

Target for the Lab:

  • Get familiar with Ansible and how it can make a Cloud Engineer #sleepmore
  • Exercise 1

    Code and run an Ansible Playbook to test the Failover scenario for our Demo Cloud Service.

  • Exercise 2

    Understand the encapsulated SRE framework and design a new Role to automate Fault Injections.

Instructions:

First things First...

  • Navigate to the labs > 4486 > 4486_Ubuntu-14-04-base Folder from the Desktop.
  • Double-click the Ubuntu-14-04.vmx file.
  • Click Power on this virtual machine in the left panel.
  • Log into the Ubuntu VM for our workshop 4486A using the credentials provided on the left panel.
    • Username: localuser
    • Password: passw0rd
  • Make sure that you have Internet Connection.
  • Make sure that you are able to use a browser and the terminal.
  • If all’s well, we are good to go!

Open up the terminal and:

cd~
git clone https://github.com/CDSLab/interconnect2017-sreframework.git
cd interconnect2017-sreframework/

Understanding the directories:

File/FolderExplanation
env_setupContains the files to setup the Demo Cloud service environment for our workshop
inventoryHolds the Ansible inventory files
playbooksContains the Ansible playbooks that we are going to code as a part of this workshop
sreFrameworkUnderlying Ansible-based SRE Framework leveraged by the Cloud Services to inject faults in their Environments

Environment setup:

Let's quickly setup the demo service environment for our workshop.

cd env_setup
sh setup.sh

Expected output:

~/interconnect2017-sreframework/env_setup$ sh setup.sh
*********** INITIATING SETUP **************>> Pulling the required docker images...
>> Docker images pulled.
>> Starting the Apache containers...
Apache containers started successfully.
>> Setting up the NginX Load Balancer...
>> Load Balancer setup completed.
>> Setting up CAdvisor to monitor the containers...
>> CAdvisor set up successfully.
*********** SETUP COMPLETED **************
App: http://localhost
CAdvisor: http://localhost:8081

Now you have a running Demo Cloud Service environment in your VM.

Open up a browser to check the running app at:

http://localhost

And check cAdvisor at:

http://localhost:8081

Check the running docker containers

docker ps

Expected output:

~/interconnect2017-sreframework$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e4eb480fa089 google/cadvisor "/usr/bin/cadvisor..." 8 minutes ago Up 7 minutes 0.0.0.0:8081->8080/tcp cadvisor
d16a5378c7b1 smebberson/alpine-nginx "/init" 8 minutes ago Up 8 minutes 0.0.0.0:80->80/tcp, 443/tcp loadbalancer
47dc09057d2a nimmis/alpine-apache "/boot.sh" 8 minutes ago Up 8 minutes 80/tcp, 443/tcp app2
629f049efb94 nimmis/alpine-apache "/boot.sh" 8 minutes ago Up 8 minutes 80/tcp, 443/tcp app1

Finally, lets head on to our Exercise 1.

About

Source code for the Interconnect 2017 scheduled lab - 4486A.

Resources

Stars

0 stars

Watchers

7 watching

Forks

Releases

Packages

Contributors

Languages