For the sake of simplicity, lets consider a simple Cloud Service architecture consisting of:
Code and run an Ansible Playbook to test the Failover scenario for our Demo Cloud Service.
Understand the encapsulated SRE framework and design a new Role to automate Fault Injections.
First things First...
Open up the terminal and:
cd ~
git clone https://github.com/CDSLab/interconnect2017-sreframework.git
cd interconnect2017-sreframework/
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 |
Let's quickly setup the demo service environment for our workshop.
cd env_setup
sh setup.sh
~/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:
And check cAdvisor at:
docker ps
~/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