SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
NATIONAL AND KAPODISTRIAN UNIVESITY OF ATHENS
DEPARTMENT OF INFORMATICS AND TELECOMMUNICATIONS
iCE
Interactive cloud experimentation
in Python
George Lestaris
@glestaris
PyCon UK

20 September 2015
Coventry
Slides URL
http://bit.ly/iCE-PyConUK
/me
• University of Athens, Greece
• iCE is part of my Bachelor thesis
• Software engineer in Pivotal, London
• Cloud Foundry Container technology
• ex-CERNois
2iCE: Interactive cloud experimentation in Python
The original problem (1/2)
• Most applications deployed in public cloud (AWS)
use multiple VMs
• these VMs run services
• that communicate with each other
• in different rates
3iCE: Interactive cloud experimentation in Python
The original problem (2/2)
4iCE: Interactive cloud experimentation in Python
• So network performance (intra-cluster
communication) within the same availability zone is
very interesting and important
Web
Web
DB
Load balancer
DB
Web
Don’t really care
High bandwidthLow latency
Questions
• How do we measure intra-cluster network
performance?
• How consistent it is through time?
• Can we make predictions on the network
performance? - classification
• But remember requirements change all the time
5iCE: Interactive cloud experimentation in Python
The clique experiment (1/2)
6iCE: Interactive cloud experimentation in Python
• Run a number of VMs that send packets to each other
• Spawn n nodes in the same availability zone and same security
group and subnetwork
• Run transfers between each pair
• Measure speed and monitor consistency of the
results
• Is classification of VM-pairs into classes of “network
distance” possible?
The clique experiment (2/2)
7
In the mathematical area of
graph theory, a clique is
subset of vertices of an
undirected graph, such that
its induced 

subgraph is complete; 

that is, every two 

distinct vertices in the 

clique are adjacent.
Definition by Wikipedia
"VR complex" by David Eppstein - Own work. 

Licensed under Public Domain via Commons
iCE: Interactive cloud experimentation in Python
Here classification seems easy
8iCE: Interactive cloud experimentation in Python
Slow
class
Fast
class
Back to the example
9iCE: Interactive cloud experimentation in Python
D
C
B
F
A
E
Fast class
Slow class
Gauss, is that you?
10iCE: Interactive cloud experimentation in Python
Gauss, is that you?
11iCE: Interactive cloud experimentation in Python
• I need to run this experiment many times
• On different times of the day, different days of the week
• The results should be analysed and plotted
• If there is a classifier it needs to be fed with results
• The resulting model needs validation against any new results
• Automation, automation, automation
There will be iCE
12
because you shouldn’t run
experiments by hand
http://github.com/glestaris/iCE
iCE
• A tool that enables interactive experimentation.
• Experiment: a Python script file with:
• tasks: run remotely in each VM of the experiment
• runners: orchestrates tasks
• Interactive Shell
• AWS integration
13iCE: Interactive cloud experimentation in Python
Components
• Registry: VMs (instances) that participate in an
experiment are registered under experimentation
sessions
• Shell: facilitates spawning EC2 VMs and running
experiments
• AWS integration: create and delete EC2 VMs that will
register themselves to iCE
• Experiments: loads and runs experiments in remote
instances
14iCE: Interactive cloud experimentation in Python
• Registry: VMs (instances) that participate in an
experiment are registered under experimentation
sessions
• Shell: facilitates spawning EC2 VMs and running
experiments
• AWS integration: create and delete EC2 VMs that will
register themselves to iCE
• Experiments: loads and runs experiments in remote
instances
15iCE: Interactive cloud experimentation in Python
Half of it, for free
eve (Flask / Werkzeug) & requests
Fabric
boto
IPython
Sequence
16
RESTful API
VM
VM
VM
VM
VM
2. Registration
Public cloud
Client
1. Launches instances
with EC2 API
4. SSH
connections
3. Fetches list of
registered instances
iCE: Interactive cloud experimentation in Python
Static Demo
17
because your speaker
is a coward
Creating VMs
18iCE: Interactive cloud experimentation in Python
$> ice-shell
[DEBUG] Session id = 55fd40c4d8476f00211e12ae
* ********************************************************************
* Welcome to iCE version v2.0.0!
* You may leave this shell by typing `exit` or pressing Ctrl+D
* Type `h <Command>` to get usage information for a given command,
* or `h` for looking into a brief description of all commands.
* ********************************************************************
$> ec2_create -n 5 -t t2.micro
[DEBUG] Reservation r-149d56ed for 5 instances was created
+-----------------+---------------+-----------------+-------------+----------+
| Id | AMI Id | Instance type | Public IP | Status |
+-----------------+---------------+-----------------+-------------+----------+
| Reservation: r-149d56ed |
+-----------------+---------------+-----------------+-------------+----------+
| i-6989d3c4 | ami-6e7bd919 | t2.micro | None | pending |
|[...] |
+-----------------+---------------+-----------------+-------------+----------+
Experimentation
session
Waiting for VMs to come up
and register
19iCE: Interactive cloud experimentation in Python
$> inst_wait -n 5
[DEBUG] 0 instances found, sleeping for 5 seconds...
[...]
[INFO] Instances are ready!
$> inst_ls
[INFO] Found 5 instances
+--------------------------+--------------+----------------------------------+
| Id | Public IP | Cloud Id |
+--------------------------+--------------+----------------------------------+
| 55fd45b2d8476f00211e12b5 | 54.77.34.67 | eu-west-1.compute.amazonaws.com |
| [...] |
+--------------------------+--------------+----------------------------------+
$> ec2_ls
[DEBUG] Reservation r-149d56ed for 5 instances was created
+-----------------+---------------+-----------------+-------------+----------+
| Id | AMI Id | Instance type | Public IP | Status |
+-----------------+---------------+-----------------+-------------+----------+
| Reservation: r-149d56ed |
+-----------------+---------------+-----------------+-------------+----------+
| i-298cd684 | ami-6e7bd919 | t2.micro | 54.76.34.228| running |
| [...] |
+-----------------+---------------+-----------------+-------------+----------+
A simple experiment (1/2)
20iCE: Interactive cloud experimentation in Python
import ice # iCE package
from fabric import api as fab # Fabric API
@ice.Runner
def run(hosts):
"""A sample iCE runner. It gets the hostnames of all instances and
prints them out.
:param dict hosts: Dictionary of ice.entities.Instances objects.
"""
# Get hostnames of all instances, through fab.execute
# First argument: Python function
# Second argument: List of hosts
# It returns a dictionary with the task result as value.
hostnames = fab.execute(get_hostname, hosts)
# Prints
for key in hostnames:
print hostnames[key]
21
@ice.Task
def get_hostname(hosts):
"""A simple iCE task. It returns the FQDN hostname of the remote
instance.
:param dict hosts: Dictionary of ice.entities.Instances objects.
:rtype: str
:return: The FQDN hostname.
"""
# Get the FQDN hostname from each node
hostname = fab.run('hostname -f')
return hostname
A simple experiment (2/2)
iCE: Interactive cloud experimentation in Python
Loading and running an experiment
22iCE: Interactive cloud experimentation in Python
$> exp_load ./experiments/simple.py
[DEBUG] About to load module 'simple' from path '/Users/george/di_dev/Thesis/iCE/
experiments'
[INFO] Module `./experiments/simple.py` is successfully loaded!
$> exp_ls simple
> Module `simple`:
Runners:
* run: A sample iCE runner. It gets the hostnames of all instances and
prints them out. [...]
Tasks:
* get_hostname: A simple iCE task. It returns the FQDN hostname of the remote
instance. […]
$> exp_run simple
[ec2-user@ec2-54-77-17-214.eu-west-1.compute.amazonaws.com] run: hostname -f
[ec2-user@ec2-54-77-17-214.eu-west-1.compute.amazonaws.com] out: ip-172-31-6-35.eu-
west-1.compute.internal
[...]
ip-172-31-6-35.eu-west-1.compute.internal
ip-172-31-6-36.eu-west-1.compute.internal
[...]
Instead of a conclusion
• Start with a research problem that interests you, make
some basic assumptions
• Be lazy and automate things
• always be ready to rerun experiments and

reproduce results
• Use what is there
• Hope for the best and don’t be afraid to 

hit the wall fast
23iCE: Interactive cloud experimentation in Python
Talk / iCE
feedback

Mais conteúdo relacionado

Mais procurados

Api Versioning with Docker and Nginx
Api Versioning with Docker and NginxApi Versioning with Docker and Nginx
Api Versioning with Docker and Nginxtech.kartenmacherei
 
Solving Real World Production Problems with Docker
Solving Real World Production Problems with DockerSolving Real World Production Problems with Docker
Solving Real World Production Problems with DockerMarc Campbell
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twistedsdsern
 
WTF is Twisted?
WTF is Twisted?WTF is Twisted?
WTF is Twisted?hawkowl
 
Docker at Spotify
Docker at SpotifyDocker at Spotify
Docker at SpotifyRohan Singh
 
Securing Containers, One Patch at a Time - Michael Crosby, Docker
Securing Containers, One Patch at a Time - Michael Crosby, DockerSecuring Containers, One Patch at a Time - Michael Crosby, Docker
Securing Containers, One Patch at a Time - Michael Crosby, DockerDocker, Inc.
 
Asynchronous Python with Twisted
Asynchronous Python with TwistedAsynchronous Python with Twisted
Asynchronous Python with TwistedAdam Englander
 
KubeCon EU 2016: Transforming the Government
KubeCon EU 2016: Transforming the Government KubeCon EU 2016: Transforming the Government
KubeCon EU 2016: Transforming the Government KubeAcademy
 
Containerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and JavaContainerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and JavaJadson Santos
 
Using Docker in the Real World
Using Docker in the Real WorldUsing Docker in the Real World
Using Docker in the Real WorldTim Haak
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesLarry Cai
 
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...Docker, Inc.
 
Gotchas using Terraform in a secure delivery pipeline
Gotchas using Terraform in a secure delivery pipelineGotchas using Terraform in a secure delivery pipeline
Gotchas using Terraform in a secure delivery pipelineAnton Babenko
 
Docker for Developers - Part 1 by David Gageot
Docker for Developers - Part 1 by David GageotDocker for Developers - Part 1 by David Gageot
Docker for Developers - Part 1 by David GageotDocker, Inc.
 
KubeCon EU 2016: Killing containers to make weather beautiful
KubeCon EU 2016: Killing containers to make weather beautifulKubeCon EU 2016: Killing containers to make weather beautiful
KubeCon EU 2016: Killing containers to make weather beautifulKubeAcademy
 
Dockerize Laravel Application
Dockerize Laravel ApplicationDockerize Laravel Application
Dockerize Laravel ApplicationAfrimadoni Dinata
 
Docker Athens: Docker Engine Evolution & Containerd Use Cases
Docker Athens: Docker Engine Evolution & Containerd Use CasesDocker Athens: Docker Engine Evolution & Containerd Use Cases
Docker Athens: Docker Engine Evolution & Containerd Use CasesPhil Estes
 
What’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, DockerWhat’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, DockerDocker, Inc.
 
Chris Swan at Container.Camp: Docker networking
Chris Swan at Container.Camp: Docker networkingChris Swan at Container.Camp: Docker networking
Chris Swan at Container.Camp: Docker networkingCohesive Networks
 

Mais procurados (20)

Api Versioning with Docker and Nginx
Api Versioning with Docker and NginxApi Versioning with Docker and Nginx
Api Versioning with Docker and Nginx
 
Solving Real World Production Problems with Docker
Solving Real World Production Problems with DockerSolving Real World Production Problems with Docker
Solving Real World Production Problems with Docker
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twisted
 
WTF is Twisted?
WTF is Twisted?WTF is Twisted?
WTF is Twisted?
 
Docker at Spotify
Docker at SpotifyDocker at Spotify
Docker at Spotify
 
Securing Containers, One Patch at a Time - Michael Crosby, Docker
Securing Containers, One Patch at a Time - Michael Crosby, DockerSecuring Containers, One Patch at a Time - Michael Crosby, Docker
Securing Containers, One Patch at a Time - Michael Crosby, Docker
 
Asynchronous Python with Twisted
Asynchronous Python with TwistedAsynchronous Python with Twisted
Asynchronous Python with Twisted
 
KubeCon EU 2016: Transforming the Government
KubeCon EU 2016: Transforming the Government KubeCon EU 2016: Transforming the Government
KubeCon EU 2016: Transforming the Government
 
Containerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and JavaContainerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and Java
 
Using Docker in the Real World
Using Docker in the Real WorldUsing Docker in the Real World
Using Docker in the Real World
 
How we use Twisted in Launchpad
How we use Twisted in LaunchpadHow we use Twisted in Launchpad
How we use Twisted in Launchpad
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutes
 
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
 
Gotchas using Terraform in a secure delivery pipeline
Gotchas using Terraform in a secure delivery pipelineGotchas using Terraform in a secure delivery pipeline
Gotchas using Terraform in a secure delivery pipeline
 
Docker for Developers - Part 1 by David Gageot
Docker for Developers - Part 1 by David GageotDocker for Developers - Part 1 by David Gageot
Docker for Developers - Part 1 by David Gageot
 
KubeCon EU 2016: Killing containers to make weather beautiful
KubeCon EU 2016: Killing containers to make weather beautifulKubeCon EU 2016: Killing containers to make weather beautiful
KubeCon EU 2016: Killing containers to make weather beautiful
 
Dockerize Laravel Application
Dockerize Laravel ApplicationDockerize Laravel Application
Dockerize Laravel Application
 
Docker Athens: Docker Engine Evolution & Containerd Use Cases
Docker Athens: Docker Engine Evolution & Containerd Use CasesDocker Athens: Docker Engine Evolution & Containerd Use Cases
Docker Athens: Docker Engine Evolution & Containerd Use Cases
 
What’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, DockerWhat’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, Docker
 
Chris Swan at Container.Camp: Docker networking
Chris Swan at Container.Camp: Docker networkingChris Swan at Container.Camp: Docker networking
Chris Swan at Container.Camp: Docker networking
 

Destaque

Destaque (16)

Successfull project metrics
Successfull project metricsSuccessfull project metrics
Successfull project metrics
 
Rodrigo david aprendizaje colaborativo
Rodrigo david aprendizaje colaborativoRodrigo david aprendizaje colaborativo
Rodrigo david aprendizaje colaborativo
 
Social Network Sites: identity performances and relational practices
Social Network Sites: identity performances and relational practicesSocial Network Sites: identity performances and relational practices
Social Network Sites: identity performances and relational practices
 
Enterprise Risk Management (ERM); From theory to practice
Enterprise Risk Management (ERM); From theory to practiceEnterprise Risk Management (ERM); From theory to practice
Enterprise Risk Management (ERM); From theory to practice
 
Chanchamayo :B
Chanchamayo :BChanchamayo :B
Chanchamayo :B
 
Diario Resumen 20150930
Diario Resumen 20150930Diario Resumen 20150930
Diario Resumen 20150930
 
август
августавгуст
август
 
Simulation in HEP
Simulation in HEPSimulation in HEP
Simulation in HEP
 
Gladiator in a suit_se2016
Gladiator in a suit_se2016Gladiator in a suit_se2016
Gladiator in a suit_se2016
 
mujeres
mujeresmujeres
mujeres
 
NO MEIO DO CAMINHO
NO MEIO DO CAMINHONO MEIO DO CAMINHO
NO MEIO DO CAMINHO
 
Apresentação - Projeto Papo de Corredor: Atenção à Saúde da População em Situ...
Apresentação - Projeto Papo de Corredor: Atenção à Saúde da População em Situ...Apresentação - Projeto Papo de Corredor: Atenção à Saúde da População em Situ...
Apresentação - Projeto Papo de Corredor: Atenção à Saúde da População em Situ...
 
Symfony Consultas Sql Criterion Hydrate
Symfony Consultas Sql Criterion  HydrateSymfony Consultas Sql Criterion  Hydrate
Symfony Consultas Sql Criterion Hydrate
 
cukiernik 1.4
cukiernik 1.4cukiernik 1.4
cukiernik 1.4
 
El Liceo Emprendedor
El Liceo EmprendedorEl Liceo Emprendedor
El Liceo Emprendedor
 
Decorating houses on limited budgets
Decorating houses on limited budgetsDecorating houses on limited budgets
Decorating houses on limited budgets
 

Semelhante a PyCon UK - iCE: Interactive cloud experimentation

Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...Codemotion
 
DockerDay2015: Docker Networking
DockerDay2015: Docker NetworkingDockerDay2015: Docker Networking
DockerDay2015: Docker NetworkingDocker-Hanoi
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014Carlo Bonamico
 
DevOps in a multicloud environment with CloudCenter - Luca Relandini - Codemo...
DevOps in a multicloud environment with CloudCenter - Luca Relandini - Codemo...DevOps in a multicloud environment with CloudCenter - Luca Relandini - Codemo...
DevOps in a multicloud environment with CloudCenter - Luca Relandini - Codemo...Codemotion
 
Learn enough Docker to be dangerous
Learn enough Docker to be dangerousLearn enough Docker to be dangerous
Learn enough Docker to be dangerousDavid Tan
 
Docker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersDocker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersAnthony Chu
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy Systemadrian_nye
 
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, SollianceDocker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, SollianceDocker, Inc.
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsBen Hall
 
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureCloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureHabeeb Rahman
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developerPaul Czarkowski
 
Red Hat and kubernetes: awesome stuff coming your way
Red Hat and kubernetes:  awesome stuff coming your wayRed Hat and kubernetes:  awesome stuff coming your way
Red Hat and kubernetes: awesome stuff coming your wayJohannes Brännström
 
Building Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and AnsibleBuilding Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and AnsibleDamien Garros
 
Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...Jérôme Petazzoni
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Patrick Chanezon
 
From dev to prod: Kubernetes on AWS (short ver.)
From dev to prod: Kubernetes on AWS (short ver.)From dev to prod: Kubernetes on AWS (short ver.)
From dev to prod: Kubernetes on AWS (short ver.)佑介 九岡
 

Semelhante a PyCon UK - iCE: Interactive cloud experimentation (20)

Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
DockerDay2015: Docker Networking
DockerDay2015: Docker NetworkingDockerDay2015: Docker Networking
DockerDay2015: Docker Networking
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
DevOps in a multicloud environment with CloudCenter - Luca Relandini - Codemo...
DevOps in a multicloud environment with CloudCenter - Luca Relandini - Codemo...DevOps in a multicloud environment with CloudCenter - Luca Relandini - Codemo...
DevOps in a multicloud environment with CloudCenter - Luca Relandini - Codemo...
 
Learn enough Docker to be dangerous
Learn enough Docker to be dangerousLearn enough Docker to be dangerous
Learn enough Docker to be dangerous
 
Docker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersDocker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server Containers
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, SollianceDocker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
 
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureCloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Red Hat and kubernetes: awesome stuff coming your way
Red Hat and kubernetes:  awesome stuff coming your wayRed Hat and kubernetes:  awesome stuff coming your way
Red Hat and kubernetes: awesome stuff coming your way
 
Building Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and AnsibleBuilding Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and Ansible
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
Discovering OpenBSD on AWS
Discovering OpenBSD on AWSDiscovering OpenBSD on AWS
Discovering OpenBSD on AWS
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016
 
From dev to prod: Kubernetes on AWS (short ver.)
From dev to prod: Kubernetes on AWS (short ver.)From dev to prod: Kubernetes on AWS (short ver.)
From dev to prod: Kubernetes on AWS (short ver.)
 

Último

Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 

Último (20)

Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 

PyCon UK - iCE: Interactive cloud experimentation

  • 1. NATIONAL AND KAPODISTRIAN UNIVESITY OF ATHENS DEPARTMENT OF INFORMATICS AND TELECOMMUNICATIONS iCE Interactive cloud experimentation in Python George Lestaris @glestaris PyCon UK
 20 September 2015 Coventry Slides URL http://bit.ly/iCE-PyConUK
  • 2. /me • University of Athens, Greece • iCE is part of my Bachelor thesis • Software engineer in Pivotal, London • Cloud Foundry Container technology • ex-CERNois 2iCE: Interactive cloud experimentation in Python
  • 3. The original problem (1/2) • Most applications deployed in public cloud (AWS) use multiple VMs • these VMs run services • that communicate with each other • in different rates 3iCE: Interactive cloud experimentation in Python
  • 4. The original problem (2/2) 4iCE: Interactive cloud experimentation in Python • So network performance (intra-cluster communication) within the same availability zone is very interesting and important Web Web DB Load balancer DB Web Don’t really care High bandwidthLow latency
  • 5. Questions • How do we measure intra-cluster network performance? • How consistent it is through time? • Can we make predictions on the network performance? - classification • But remember requirements change all the time 5iCE: Interactive cloud experimentation in Python
  • 6. The clique experiment (1/2) 6iCE: Interactive cloud experimentation in Python • Run a number of VMs that send packets to each other • Spawn n nodes in the same availability zone and same security group and subnetwork • Run transfers between each pair • Measure speed and monitor consistency of the results • Is classification of VM-pairs into classes of “network distance” possible?
  • 7. The clique experiment (2/2) 7 In the mathematical area of graph theory, a clique is subset of vertices of an undirected graph, such that its induced 
 subgraph is complete; 
 that is, every two 
 distinct vertices in the 
 clique are adjacent. Definition by Wikipedia "VR complex" by David Eppstein - Own work. 
 Licensed under Public Domain via Commons iCE: Interactive cloud experimentation in Python
  • 8. Here classification seems easy 8iCE: Interactive cloud experimentation in Python Slow class Fast class
  • 9. Back to the example 9iCE: Interactive cloud experimentation in Python D C B F A E Fast class Slow class
  • 10. Gauss, is that you? 10iCE: Interactive cloud experimentation in Python
  • 11. Gauss, is that you? 11iCE: Interactive cloud experimentation in Python • I need to run this experiment many times • On different times of the day, different days of the week • The results should be analysed and plotted • If there is a classifier it needs to be fed with results • The resulting model needs validation against any new results • Automation, automation, automation
  • 12. There will be iCE 12 because you shouldn’t run experiments by hand http://github.com/glestaris/iCE
  • 13. iCE • A tool that enables interactive experimentation. • Experiment: a Python script file with: • tasks: run remotely in each VM of the experiment • runners: orchestrates tasks • Interactive Shell • AWS integration 13iCE: Interactive cloud experimentation in Python
  • 14. Components • Registry: VMs (instances) that participate in an experiment are registered under experimentation sessions • Shell: facilitates spawning EC2 VMs and running experiments • AWS integration: create and delete EC2 VMs that will register themselves to iCE • Experiments: loads and runs experiments in remote instances 14iCE: Interactive cloud experimentation in Python
  • 15. • Registry: VMs (instances) that participate in an experiment are registered under experimentation sessions • Shell: facilitates spawning EC2 VMs and running experiments • AWS integration: create and delete EC2 VMs that will register themselves to iCE • Experiments: loads and runs experiments in remote instances 15iCE: Interactive cloud experimentation in Python Half of it, for free eve (Flask / Werkzeug) & requests Fabric boto IPython
  • 16. Sequence 16 RESTful API VM VM VM VM VM 2. Registration Public cloud Client 1. Launches instances with EC2 API 4. SSH connections 3. Fetches list of registered instances iCE: Interactive cloud experimentation in Python
  • 17. Static Demo 17 because your speaker is a coward
  • 18. Creating VMs 18iCE: Interactive cloud experimentation in Python $> ice-shell [DEBUG] Session id = 55fd40c4d8476f00211e12ae * ******************************************************************** * Welcome to iCE version v2.0.0! * You may leave this shell by typing `exit` or pressing Ctrl+D * Type `h <Command>` to get usage information for a given command, * or `h` for looking into a brief description of all commands. * ******************************************************************** $> ec2_create -n 5 -t t2.micro [DEBUG] Reservation r-149d56ed for 5 instances was created +-----------------+---------------+-----------------+-------------+----------+ | Id | AMI Id | Instance type | Public IP | Status | +-----------------+---------------+-----------------+-------------+----------+ | Reservation: r-149d56ed | +-----------------+---------------+-----------------+-------------+----------+ | i-6989d3c4 | ami-6e7bd919 | t2.micro | None | pending | |[...] | +-----------------+---------------+-----------------+-------------+----------+ Experimentation session
  • 19. Waiting for VMs to come up and register 19iCE: Interactive cloud experimentation in Python $> inst_wait -n 5 [DEBUG] 0 instances found, sleeping for 5 seconds... [...] [INFO] Instances are ready! $> inst_ls [INFO] Found 5 instances +--------------------------+--------------+----------------------------------+ | Id | Public IP | Cloud Id | +--------------------------+--------------+----------------------------------+ | 55fd45b2d8476f00211e12b5 | 54.77.34.67 | eu-west-1.compute.amazonaws.com | | [...] | +--------------------------+--------------+----------------------------------+ $> ec2_ls [DEBUG] Reservation r-149d56ed for 5 instances was created +-----------------+---------------+-----------------+-------------+----------+ | Id | AMI Id | Instance type | Public IP | Status | +-----------------+---------------+-----------------+-------------+----------+ | Reservation: r-149d56ed | +-----------------+---------------+-----------------+-------------+----------+ | i-298cd684 | ami-6e7bd919 | t2.micro | 54.76.34.228| running | | [...] | +-----------------+---------------+-----------------+-------------+----------+
  • 20. A simple experiment (1/2) 20iCE: Interactive cloud experimentation in Python import ice # iCE package from fabric import api as fab # Fabric API @ice.Runner def run(hosts): """A sample iCE runner. It gets the hostnames of all instances and prints them out. :param dict hosts: Dictionary of ice.entities.Instances objects. """ # Get hostnames of all instances, through fab.execute # First argument: Python function # Second argument: List of hosts # It returns a dictionary with the task result as value. hostnames = fab.execute(get_hostname, hosts) # Prints for key in hostnames: print hostnames[key]
  • 21. 21 @ice.Task def get_hostname(hosts): """A simple iCE task. It returns the FQDN hostname of the remote instance. :param dict hosts: Dictionary of ice.entities.Instances objects. :rtype: str :return: The FQDN hostname. """ # Get the FQDN hostname from each node hostname = fab.run('hostname -f') return hostname A simple experiment (2/2) iCE: Interactive cloud experimentation in Python
  • 22. Loading and running an experiment 22iCE: Interactive cloud experimentation in Python $> exp_load ./experiments/simple.py [DEBUG] About to load module 'simple' from path '/Users/george/di_dev/Thesis/iCE/ experiments' [INFO] Module `./experiments/simple.py` is successfully loaded! $> exp_ls simple > Module `simple`: Runners: * run: A sample iCE runner. It gets the hostnames of all instances and prints them out. [...] Tasks: * get_hostname: A simple iCE task. It returns the FQDN hostname of the remote instance. […] $> exp_run simple [ec2-user@ec2-54-77-17-214.eu-west-1.compute.amazonaws.com] run: hostname -f [ec2-user@ec2-54-77-17-214.eu-west-1.compute.amazonaws.com] out: ip-172-31-6-35.eu- west-1.compute.internal [...] ip-172-31-6-35.eu-west-1.compute.internal ip-172-31-6-36.eu-west-1.compute.internal [...]
  • 23. Instead of a conclusion • Start with a research problem that interests you, make some basic assumptions • Be lazy and automate things • always be ready to rerun experiments and
 reproduce results • Use what is there • Hope for the best and don’t be afraid to 
 hit the wall fast 23iCE: Interactive cloud experimentation in Python Talk / iCE feedback