¿Por qué aconsejo a la gente que no aprenda Ansible? Migración de Sincronización de configuración a Infraestructura inmutable. Andrey Devyatkin

Comentario del autor: El objetivo principal de la charla es hablar sobre métodos de construcción de infraestructura (Sincronización de configuración / Infraestructura inmutable) y compararlos. Ansible se utiliza como ejemplo de una de las herramientas de sincronización de configuración. Desde el punto de vista del autor, el mundo avanza hacia una infraestructura inmutable y el informe aporta argumentos para esclarecer la posición del autor. Y dado que el mundo se está moviendo hacia una infraestructura inmutable, las herramientas de enseñanza que utilizan un enfoque de sincronización de configuración pueden no ser el mejor uso del tiempo. Repetiré una vez más: el informe no se trata de herramientas, sino de enfoques y toma de decisiones "desde el problema", no "desde la herramienta".







Descargo de responsabilidad: este informe es difícil porque está preparado para la audiencia rusa, que funciona en condiciones algo específicas. Tocaremos todas estas cosas durante la presentación. En Rusia, el uso de la infraestructura es específico, porque la gente generalmente no vive en Amazon. Hay empresas que viven allí, pero son pocas. Y esta es una limitación. Esto debe tenerse en cuenta en todos los informes relacionados con el despliegue de la infraestructura, para no decir: "Chicos, vayamos a la nube, todo estará bien en AWS" y hay una multitud de personas que no pueden ir allí. La audiencia rusa parece ser muy específica. Y esos informes que llegan a Europa no siempre llegan a Rusia. Quizás esto se deba a la percepción especial de esta audiencia.















! , ! , Ansible. .













- Ansible? .













.







– , - . . . Ansible vs Terraform, Ansible CloudFormation, Ansible Chef . .













, , : « ?»













:







  • FivexL.
  • , .
  • , , , . .
  • , . . , , . , , .








Ansible?













Ansible. Ansible. 2 , . , Ansible .







, application deployment, , . OpenSSH, WinRM.







: « , ?».













use-cases. , , .







, provisioning , , , . - .













. : « ».







, , .







, .







, . . .













, Ansible, , – IT.







, , , , .







, , .







Ansible.













, Ansible .







AWS .







Kubernetes.







HashiCorp Vault .







Ansible .













– Ansible , . . . .













, , .













. , mainstream, . Vendor, , , . - - -. : « , - . community, , community , . . - ».







: «, , , ? -, ?».







, , , -, , , - , , . , .













Ansible , , provisioning , applications, . , .













, , . . IT.







, , . . .













.







cloud engineering-.







AWS HashiCorp. HashiConf , .







- FivexL.







. podcast DevSecOps, , . , , . , .













, . 5 , .







, – .







, – .







immutable- , , , , .







, , .







, . .







, .













, IT, .







, , - , .







. , - , . - - .







, , .







. competition, . . , , , , , , . . , AWS , Google, Amazon, Alibaba, , . . , Amazon , . .







: Google, Amazon, Alibaba — Amazon Azure







, . . . , , , . .







. .













. , .













, – , , , ultimate state, . . .













: « Ansible?».













: « , ?».













: «DevOps!».







«Infrastructure as code!»







«Ansible!», .







? , .













. . – , , , .













.













– configuration drift. , Keif Morris « ». , . PuppetLabs .







, -- , - , , , - .













, - -. - , Martin Fowler .







- – , . , , , . . . . . , , -.













? , , . . 100%- , , .







, - , : , , . , , . , .







MTTR (mean time to recovery), . . .













. , AWS , , EC2 instance, , . -, , .







Amazon . , . , .







, shellshock . , , . . .







-, GPU-. - , . GPU-. . , .







, . , . ? ? ?













. , , 2010- .













?













– . 4 , « »:







  1. , . . .
  2. , , . disposable.
  3. , , .
  4. . , , , . -, -, , , - , . , , , . .


4 , .













, , – . – machine-readable, . . - , , , .













software – . , . . , , , , . code review, CI













, . . . infra as code.













.













.







, : Puppet, Chef. Ansible SaltStack . , . , .







, provisioning. . , firewall , , , SSH- , .













Martin Fowler. , , . , .







. . . , . . , , . , - , , . . , , .







, . , - . -.













.













? , . . , - : - , . , , , , . -.













, .













ThoughtWorks Phoenix server,













: , , - , , . , .













.













, , , . , - . - , , . . . , (wipe, ) . , . .







, , SSH, , - , , . SSH , . .













  • , , , .







  • . , AWS auto scaling . . -, , . ami ( ), auto scaling group , . , . . backing vs. frying, cattle vs pets. .







  • . , . . . , , . , - .







    , , ? . , : «, - IP-, IP-». . , IP-, . , . , .







  • , , provisioning , , , , EC2 spot instance. - spot instance , . , -, . . . 2 , , instance .















: « Ansible, , , , ?».













. , . , . , . : « , ! !».







, . , . , . , . . , , , 80 % 20 % .







, , .













, , , . , , . , immutable-.







, immutable- – .













? .













, , . , 12 app.







. , , , , : « 12 factor app ? ». .







, . immutable-.







, , .













, .







3 , :







  • - , . , , Ansible.
  • - , . , .
  • , , , . - , .








.













. , , . , AWS, instance-, credentials, .







Bare Metal, .







SPIFFE , identity. , identity .







– , , . , AWS KMS , . AMI , , . - HSM (hardware security module), , , . , , .







, , . . , , HashiCorp Vault. AWS, Secrets Manager .







credentials. immutable-, , .







(pull) , , , Consul.













?













, . , , . , SSH-, SSH- firewall. , firewall. - event. , . event , , .







. - - , 12 .













debug?













  • , . , , . . , , .
  • . . , . , , , . , . . , , . - , . . .
  • - , , , . , , . . , production.
  • , , .








  • . continuous integration, . .
  • . , , , .
  • , . . .
  • , . . , , , , . , - production.
  • . , . commit, . , , . , . , . commit. , - , – commit, , . commit. , . , commit, , , . , - CI. . . .
  • . , commit’ . . . - , . , . . . , .








, , .







HashiCorp Packer, , . , . Packer’, . .







cloud API, Terraform – . , . , vendor - , . . , Terraform – . PXE baremetal, baremetal .







, Packer’ PXE . , , , , , .







– Audibeat, WAZUH . Vault – . , , .







debug - , . Prometheus, Logstash. , CloudWatch, Datadog.













, .







Ansible . immutable-, Ansible , . Packer Ansible . , . .







Server provisioning. . , , .







, , , . . .







I task? , Ansible.













, .













, . – .













, , , . , .













immutable , . . docker-, docker images immutable. Docker container – mutable. 12 factors app, docker container. () immutable . . State , . . , .







. . , , , , . , . host, , . , volume.







stateless. , stateless , . - , – , , . .













, , - . Kubernetes. AWS ECS , Kubernetes . clouds, prime clouds, hybrid clouds, Nomad, 2 Reinvent Amazon , EKS ECS anywhere. , . , EKS ECS on-premises - Amazon. , .







Nomad – , (Cloudflare/CircleCI/Roblox), .







. 2015- . Kubernetes, CNCF . Docker Swarm, Mitrantis. , Kubernetes. OpenShift Kubernetes.













, container OS, . . , , . . . .







, . . , .













, . «», . ECS – . Kubernetes, . . Kubernetes.







– , Terraform , kubernetes-. kubernetes- . , community GitOps. GitOps, . , – . GitOps.







– Infra as data, . . . , , GitOps, yaml , .







– ArgoCD, . Helm, kubernetes’ . Terraform, . AWS, Terraform , CRD Kubernetes.







, . – , - . . – , .













Ansible , build .







Server provisioning , , , containers OS, . . . , .













Serverless. , . . Kubernetes – . Serverless – . , . Serverless . , Kubernetes Serverless, .













. , 8 , , . MicroVM.







, , AWS Firecracker, .







Unikernels – . , hypervisor, .







- , , , -. hypervisor. , , . Amazon Nitro. , - , Unikernel , .







. , , , . , , , , , . , , .













Kubernetes? . Kubernetes reconciliation loop, . . yaml, , etcd , , . – , ? , pod , pod . , , .







, , 2-3-5 , : « ? . . Terraform, - ». , cloud- - . YAML, cloud , . . Cloud , . , .













, – ? GitOps Chef? : , Kubernetes – Linux. Linux – , Kubernetes. Kubernetes – user space, . GitOps , , . . . ArgoCD , apply Kubernetes. , , Chef .







, . , , , immutable- – , . , . , . , , , immutable-.







, immutable-. , , , .













. - , , immutable- Kubernetes.







, kubernetes- ? , , . Kubernetes in-place, security- , . (), , .













, .













: « ? , Ansible. . ?». , .







, 10 ClearCase Git. , .







, , , .







- – , . , 2015- , , , . Kubernetes, Nomad, Docker Swarm. . - . 2 , Docker Swarm, , .







Technology bets – , . , - , . , , , . . , .













, . Chef, Ansible Terraform Google Trends. , Chef, Ansible Puppet Terraform, . , . .







Ansible . Terraform . cloud . - , .







. Terraform , cloud.













Yandex keyword-, . , , Ansible – 29 000.













Terraform – 6 000. Google Trends.













, . , Terraform. Ansible , cloud 5-6 . 2010- , Netflix. . Reinvent, , . . . . cloud. , 3-5 – , , .













, .













. . , . .













, , . . IT .







.







Ansible, Puppet, Chef .













- , immutable-. , , . - , .













? , . , . , . - , .







, , , : , .













. . , .







:







: , . . : « Ansible - ?». , infra . . , Kubernetes Helm. , Kubernetes, Ansible – ?







: . . , . . . , . immutable-, . . – . . , Ansible. . . , .







, , . , , . . , . , , - . , . .







: , , immutable-, ? . . , . , , , , . immutable- , , , , - , . immutable- ?







: . . , , . . , , . . , . . Ansible , , ? . , ?







. . , , Ansible , . , , Ansible playbook , , , . , . playbooks . .







, - , Ansible, . . , , . . . , vamilla , Packer . , . , - .







, -. - . 95 % , , , . , , .







: - Ansible? , , - . immutable- .







: . Packer, playbook Packer playbook, . , . , . , . , . .







: . ? . . , ? , , - . , MySQL - , . immutable ?







: . , .







: . . . , . , Mongo , . , unlock , . , . , . . , .







: . . , ? . . Mongo, ?







: , Mongo, . , .







: volume, , , , . . - . – immutable. - , , , , , . .







. . , . , . . , . .








All Articles