CDSLab / interconnect2017-sreframework

Source code for the Interconnect 2017 scheduled lab - 4486A.
0 stars 0 forks source link

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:

Target for the Lab:

Instructions:

First things First...

Open up the terminal and:

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

Understanding the directories:

File/Folder Explanation
env_setup Contains the files to setup the Demo Cloud service environment for our workshop
inventory Holds the Ansible inventory files
playbooks Contains the Ansible playbooks that we are going to code as a part of this workshop
sreFramework Underlying 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.