Warum rate ich Leuten, Ansible nicht zu lernen? Migration von der Konfigurationssynchronisierung zur unveränderlichen Infrastruktur. Andrey Devyatkin

Kommentar des Autors: Der Hauptzweck des Vortrags besteht darin, über Methoden zum Aufbau der Infrastruktur (Konfigurationssynchronisation / Unveränderliche Infra) zu sprechen und diese zu vergleichen. Ansible wird als Beispiel für eines der Konfigurationssynchronisierungstools verwendet. Aus Sicht des Autors bewegt sich die Welt in Richtung einer unveränderlichen Infrastruktur, und der Bericht liefert Argumente, um die Position des Autors zu klären. Und da sich die Welt in Richtung einer unveränderlichen Infrastruktur bewegt, sind Lehrmittel, die einen Konfigurationssynchronisationsansatz verwenden, möglicherweise nicht die beste Zeitnutzung. Ich werde es noch einmal wiederholen - in dem Bericht geht es nicht um Werkzeuge, sondern um Ansätze und Entscheidungen „aus dem Problem“, nicht „aus dem Werkzeug“.







Haftungsausschluss: Dieser Bericht ist schwierig, da er für das russische Publikum erstellt wurde, das unter bestimmten Bedingungen arbeitet. Wir werden all diese Dinge während der Präsentation berühren. In Russland ist die Nutzung der Infrastruktur spezifisch, da die Menschen im Allgemeinen nicht bei Amazon leben. Es gibt Unternehmen, die dort leben, aber es gibt nur wenige. Und das ist eine Einschränkung. Dies sollte in allen Berichten im Zusammenhang mit dem Ausbau der Infrastruktur berücksichtigt werden, um nicht zu sagen: „Leute, lasst uns in die Cloud gehen, in AWS wird alles in Ordnung sein“, und es gibt eine Menge Leute, die nicht dorthin gehen können. Das russische Publikum scheint sehr spezifisch zu sein. Und diese Berichte, die in Europa kommen, kommen nicht immer in Russland. Vielleicht liegt das an der besonderen Wahrnehmung dieses Publikums.















! , ! , 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