SlideShare a Scribd company logo
A practitioner's tale on clouds
Oπen conf, Athens, Greece
29 March 2019, Cloud day
Page - 2
CEO and co-founder
#OSATH organizer
Thanassis Parathyras
cloud expert, open-source enthusiast, OpenStack instructor, Ansible practitioner
www.linkedin.com/in/parathyras/
Page - 3
the cloud
expectations · meaning · practice
Page - 4
no downtime elastic resources
Page - 5
self-service application control
source: https://governance.openstack.org/tc/reference/technical-vision.html
PaaS
SaaS
IaaS
Page - 6
PaaS
SaaS
IaaS
Page - 7
PaaS
SaaS
IaaS
as-a-service Business model
Pay as you Go - OPEX
Minimizes IT fixed assets - CAPEX
Managed Services
Page - 8
Applications
Page - 9
Applications
Data center
Page - 10
Applications
Data centerAutomates
Page - 11
Applications
Data center
Increased
Automation
Page - 12
Ansible
plays · modules · inventory · variables
Page - 13
---
- hosts: web-farm
tasks:
- name: Be sure apache is installed
package:
name: "{{ httpd_packages }}"
state: present
- name: Be sure apache is configured
template:
src: httpd.conf.j2
dest: "{{ httpd_conf.MainConfPath }}"
Task Automation
Ansible play
Page - 14
---
- hosts: web-farm
tasks:
- name: Be sure apache is installed
package:
name: "{{ httpd_packages }}"
state: present
- name: Be sure apache is configured
template:
src: httpd.conf.j2
dest: "{{ httpd_conf.MainConfPath }}"
Task Automation
Ansible play
Ansible modules
Page - 15
---
- hosts: web-farm
tasks:
- name: Be sure apache is installed
package:
name: "{{ httpd_packages }}"
state: present
- name: Be sure apache is configured
template:
src: httpd.conf.j2
dest: "{{ httpd_conf.MainConfPath }}"
Task Automation
Ansible play
Ansible modules
Define desired state
with parameters
ansible-doc
Page - 16
A B
operation
Page - 17
A B B
operation operation
Page - 18
A B B
operation operation
IDEMPOTENCE
Page - 19
Initial
State
Final
State
Ansible
Ansible modules
IDEMPOTENCE
Ansible
Final
State
Page - 20
Variables
Config settings
System level
Application
Vars defined
CLI
several files
priority
# httpd version
httpd_version: "2.4.6"
httpd_packages:
- "httpd"
- "mod_ssl"
# httpd.conf options
httpd_conf:
ServerRoot: "/etc/httpd"
MainConfPath: "/etc/httpd/conf/httpd.conf"
DocumentRoot: "/var/www"
ListenPort:
- "80"
- "443"
Page - 21
---
- hosts: web-farm
vars_files:
- path/to/htppd.vars
tasks:
- name: Be sure apache is installed
package:
name: "{{ httpd_packages }}"
state: present
- name: Be sure apache is configured
template:
src: httpd.conf.j2
dest: "{{ httpd_conf.MainConfPath }}"
Task Automation
Ansible play
Variables
Ansible modules
Page - 22
---
- hosts: web-farm
vars_files:
- path/to/htppd.vars
tasks:
- name: Be sure apache is installed
package:
name: "{{ httpd_packages }}"
state: present
- name: Be sure apache is configured
template:
src: httpd.conf.j2
dest: "{{ httpd_conf.MainConfPath }}"
Task Automation
Ansible play
Inventory
Variables
Ansible modules
Page - 23
# Production servers
LIVE-web01 ansible_host=10.0.0.10
LIVE-web02 ansible_host=10.0.0.10
[web-farm]
LIVE-web01
LIVE-web02
[backend:children]
web-farm
[all:vars]
ansible_port=22
ansible_user=system
ansible_private_key_file=~/.ssh/id_rsa
Inventory
Define hosts
behavioral settings
host vars
Groups
Groups of groups
Group vars
default groups
Page - 24
Infrastructure as
Code
Orchestrate
cloud resources
---
- name: "Allocate AWS resources"
hosts: localhost
connection: local
tasks:
- name: "Provision a new EC2 instance"
ec2:
instance_type: t2.micro
region: us-east-1
key_name: lamp.key
image: ami-123456
vpc_subnet_id: subnet-29e63245
assign_public_ip: yes
Page - 25
Application
Stack
Definition
Ansible roles
galaxy.ansible.com
---
- name: "Allocate AWS resources"
hosts: ...
tasks: ...
- name: "Setup LAMP stack on web farm hosts"
hosts: web-farm
roles:
- role: centos
- role: php
- role: php-fpm
- role: apache
- role: mysql
Page - 26
CLOUD:
- {Easy, Fast, Secure, Unlimited}
- "Do not Repeat Yourself"
CATCH:
- abstracted("Infrastructure management")
- simplified("Software delivery")
- application(“Management and Operations")
Thank you for your attention!
A practitioner’s tale on clouds
THE END

More Related Content

A practitioner's tale on clouds

  • 1. A practitioner's tale on clouds Oπen conf, Athens, Greece 29 March 2019, Cloud day
  • 2. Page - 2 CEO and co-founder #OSATH organizer Thanassis Parathyras cloud expert, open-source enthusiast, OpenStack instructor, Ansible practitioner www.linkedin.com/in/parathyras/
  • 3. Page - 3 the cloud expectations · meaning · practice
  • 4. Page - 4 no downtime elastic resources
  • 5. Page - 5 self-service application control source: https://governance.openstack.org/tc/reference/technical-vision.html PaaS SaaS IaaS
  • 7. Page - 7 PaaS SaaS IaaS as-a-service Business model Pay as you Go - OPEX Minimizes IT fixed assets - CAPEX Managed Services
  • 10. Page - 10 Applications Data centerAutomates
  • 11. Page - 11 Applications Data center Increased Automation
  • 12. Page - 12 Ansible plays · modules · inventory · variables
  • 13. Page - 13 --- - hosts: web-farm tasks: - name: Be sure apache is installed package: name: "{{ httpd_packages }}" state: present - name: Be sure apache is configured template: src: httpd.conf.j2 dest: "{{ httpd_conf.MainConfPath }}" Task Automation Ansible play
  • 14. Page - 14 --- - hosts: web-farm tasks: - name: Be sure apache is installed package: name: "{{ httpd_packages }}" state: present - name: Be sure apache is configured template: src: httpd.conf.j2 dest: "{{ httpd_conf.MainConfPath }}" Task Automation Ansible play Ansible modules
  • 15. Page - 15 --- - hosts: web-farm tasks: - name: Be sure apache is installed package: name: "{{ httpd_packages }}" state: present - name: Be sure apache is configured template: src: httpd.conf.j2 dest: "{{ httpd_conf.MainConfPath }}" Task Automation Ansible play Ansible modules Define desired state with parameters ansible-doc
  • 16. Page - 16 A B operation
  • 17. Page - 17 A B B operation operation
  • 18. Page - 18 A B B operation operation IDEMPOTENCE
  • 19. Page - 19 Initial State Final State Ansible Ansible modules IDEMPOTENCE Ansible Final State
  • 20. Page - 20 Variables Config settings System level Application Vars defined CLI several files priority # httpd version httpd_version: "2.4.6" httpd_packages: - "httpd" - "mod_ssl" # httpd.conf options httpd_conf: ServerRoot: "/etc/httpd" MainConfPath: "/etc/httpd/conf/httpd.conf" DocumentRoot: "/var/www" ListenPort: - "80" - "443"
  • 21. Page - 21 --- - hosts: web-farm vars_files: - path/to/htppd.vars tasks: - name: Be sure apache is installed package: name: "{{ httpd_packages }}" state: present - name: Be sure apache is configured template: src: httpd.conf.j2 dest: "{{ httpd_conf.MainConfPath }}" Task Automation Ansible play Variables Ansible modules
  • 22. Page - 22 --- - hosts: web-farm vars_files: - path/to/htppd.vars tasks: - name: Be sure apache is installed package: name: "{{ httpd_packages }}" state: present - name: Be sure apache is configured template: src: httpd.conf.j2 dest: "{{ httpd_conf.MainConfPath }}" Task Automation Ansible play Inventory Variables Ansible modules
  • 23. Page - 23 # Production servers LIVE-web01 ansible_host=10.0.0.10 LIVE-web02 ansible_host=10.0.0.10 [web-farm] LIVE-web01 LIVE-web02 [backend:children] web-farm [all:vars] ansible_port=22 ansible_user=system ansible_private_key_file=~/.ssh/id_rsa Inventory Define hosts behavioral settings host vars Groups Groups of groups Group vars default groups
  • 24. Page - 24 Infrastructure as Code Orchestrate cloud resources --- - name: "Allocate AWS resources" hosts: localhost connection: local tasks: - name: "Provision a new EC2 instance" ec2: instance_type: t2.micro region: us-east-1 key_name: lamp.key image: ami-123456 vpc_subnet_id: subnet-29e63245 assign_public_ip: yes
  • 25. Page - 25 Application Stack Definition Ansible roles galaxy.ansible.com --- - name: "Allocate AWS resources" hosts: ... tasks: ... - name: "Setup LAMP stack on web farm hosts" hosts: web-farm roles: - role: centos - role: php - role: php-fpm - role: apache - role: mysql
  • 26. Page - 26 CLOUD: - {Easy, Fast, Secure, Unlimited} - "Do not Repeat Yourself" CATCH: - abstracted("Infrastructure management") - simplified("Software delivery") - application(“Management and Operations")
  • 27. Thank you for your attention! A practitioner’s tale on clouds THE END