Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Automatización de sistemas con Ansible - OpenSo...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
zisk0
May 07, 2016
Technology
1
34
Automatización de sistemas con Ansible - OpenSouthCode 16
Automatización de sistemas con Ansible - OpenSouthCode 16
zisk0
May 07, 2016
Tweet
Share
Other Decks in Technology
See All in Technology
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
260
AWS Network Firewall Proxyを触ってみた
nagisa53
1
240
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
540
1,000 にも届く AWS Organizations 組織のポリシー運用をちゃんとしたい、という話
kazzpapa3
0
150
コミュニティが変えるキャリアの地平線:コロナ禍新卒入社のエンジニアがAWSコミュニティで見つけた成長の羅針盤
kentosuzuki
0
130
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
160
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
1
170
マネージャー視点で考えるプロダクトエンジニアの評価 / Evaluating Product Engineers from a Manager's Perspective
hiro_torii
0
180
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
260
AIと新時代を切り拓く。これからのSREとメルカリIBISの挑戦
0gm
2
3.1k
Webhook best practices for rock solid and resilient deployments
glaforge
2
310
22nd ACRi Webinar - NTT Kawahara-san's slide
nao_sumikawa
0
100
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
650
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
70
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.6k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
260
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
WENDY [Excerpt]
tessaabrams
9
36k
Facilitating Awesome Meetings
lara
57
6.8k
Side Projects
sachag
455
43k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
52
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
590
How to make the Groovebox
asonas
2
1.9k
Transcript
Automatización de sistemas con
Whois Francisco López Sysadmin
Sysadmin: the hard way
The hard way ▪ Máquinas con configuración similar ▪ Servidores
“artesanos”
Simple IT Automation
Ansible ▪ Aprovisionamiento ▪ Gestión de la configuración ▪ Orquestación
▪ Despliegue de aplicaciones
Caracteristicas ▪ Simple pero potente Configuración en YAML. Plantillas en
jinja2. ▪ Sin agentes Usa SSH. ▪ Segura ...eehm, bueno, todo lo seguro que sea SSH.
Caracteristicas ▪ Muy bien documentada ▪ Respaldada por Red Hat
¡Es software libre! ▪ Core licenciado como GPLv3 ▪ Modulos
libres ▪ Roles libres
Ansible 101 Conceptos básicos
Inventory 192.168.1.10 opensouthcode.org [webservers] web1.osc.org web2.osc.org [databases:children] databases-masters databases-slaves [databases-masters]
master[1:3].osc.org [databases-slaves] slaves[1:3].osc.org Listado de máquinas
- name: Instalar vim apt: pkg=vim state=present update_cache=yes Task Acción
a realizar Compuesta de módulo y parámetros apt update && apt install vim
Módulos Amazon EC2 Amazon ECS Amazon S3 Command MongoDB Redis
MySQL Postgres IIS Windows Nagios Zabbix RabbitMQ Azure Digital Ocean Docker Google Cloud VMWare Rackspace Linux Apache2 Django JBOSS Jira Git Github Subversion F5 Cisco HAProxy
Play Inventario + tareas - name: Play simple de ejemplo
hosts: webservers tasks: - name: Instalar vim apt: pkg=vim state=present update_cache=yes - name: Instalar tcpdump apt: pkg=tcpdump state=present
Playbook Sucesión de plays Base de ejecución de Ansible
Config management
Variables app_path: “/home/app” monitoring: server-name: nagios server: 11.22.33.44 Se pueden
definir “en cualquier sitio”
inventario host_vars group_vars main.yml web.osc.org.yml --- app_path: “/home/app” servername: “web.osc.org”
monitoring: server-name: “nagios” server: 11.22.33.44
Variables - name: Clonar repositorio git:repo="
[email protected]
:app.git" clone=yes dest={{ app_path }}
Se referencian usando jinja2
Templates Aplicar variables a ficheros de configuración <VirtualHost _default_:{{ http_port
}}> ServerName {{ servername }} ...
Templates Aplicar variables a ficheros de configuración - name: Subir
config apache template: src=00-app.conf.j2 dest=/path/00-app.conf owner=root group=root mode=0644
inventario host_vars group_vars main.yml templates 00-app.conf.j2
Inclusión y roles
Inclusión En un playbook se pueden incluir otros ficheros con
tasks --- - hosts: webservers tasks: - include: dependencies.yml - include: deployment.yml - include: apache.yml
Roles Encapsulación de configuraciones --- - hosts: webservers roles: -
base - django - apache2
inventario host_vars group_vars main.yml templates roles
apache2 files meta roles handlers tasks vars templates
¿Resultados?
None
¡Gracias! ¿Preguntas? @zisk0
[email protected]