Acuerdos como CĂłdigo: cĂłmo refactorizar la infraestructura y no romperse



Esta es una transcripción de una charla en TechLeadConf 2020-06-09 . Antes de comenzar, intente responder la pregunta por sí mismo ¿cuáles son sus expectativas al interactuar con la infraestructura? Por ejemplo, cuánto tardará:



  • Implemente un nuevo entorno de prueba.
  • Actualice la versiĂłn de Java y / o SO dentro del contenedor.
  • Otorgue derechos de acceso al servidor.


TechLeadConf



, . -, ?





, , . , - . , , . .





C + + =





? . , . , : .



  1. . . , . / -( !). 10-15 . - . , , - - , . , .
  2. . , jira, email, slack . . " , , ". .
  3. . . : jira, 7 .






, , , . , . CoreOS compose . k8s . : YML git? ? , . . , . . . — , . . : , .



?







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



Agreements as Code





Jira. , . - - . . DSL, Ansible . . - . ? ?



Agreements as Code





/ . .



  • * — "" . / / .
  • — / .




:



  • , — . confluence , , .
  • , — , . REST api , DNS . .
  • , — . email? ? ?
  • , — , , .. . , , . , * IaC.


-> ->





. .



  • — , , , .
  • — . confluence . .
  • — " "() . , * as Service .




, ?



  • , — . , , LDAP . -> -> LDAP.
  • , — , .. , . AWS, * as Service , - . , , .
  • , — . - email , ; , web .
  • , — , , *( , .. !), .


, * as Service.



.



, . , , . , / . :



  • .
  • .
  • ...


Ansible: 120 VM c Coreos Centos 18





, configuration management . , , , .. , . Ansible, Ansible: 120 VM c Coreos Centos 18 . 1,5 ? — 80% reverse engineering 20% , . :



CFM 2 Ansible



  1. .
  2. .
  3. .
  4. .
  5. .
  6. â„–2.


Ansible,



RefactorizaciĂłn Ansible



Ansible. - , , .. . , air gap( ). . Ansible, , :



  1. .
  2. .
  3. .
  4. /, .


Ansible ?



Prueba de Ansible



, . Jenkins Pipeline, :



  1. .
  2. Jenkins.
  3. lint .
  4. molecule


IaC



RefactorizaciĂłn de IaC



, / * as Service. . :



  1. .
  2. .
  3. .
  4. .
  5. .
  6. ( ! ).
  7. .


. : , , . :



  • — , , .
  • — , , .
  • — , .






, , IaC . , , . :



  • — YML . , , - .
  • — Ansible .
  • — .


, :



  • .
  • .
  • .


, , . / .



IaC testing pyramid. !



Pirámide de pruebas de IaC



DevopConf , 200 000 . , , : , , , .



  • Static Analysis — , . , .
  • Unit — IaC . Ansible Molecule.
  • Integration — unit, .
  • E2E — , .


?



, . . . , ? .



â„–1





, .. , . , .



â„–2





. .



, . SLOC:



  • 2000 — .
  • 4000 —
  • 6000 — .
  • 8000 — E2E .


Lessons learned



  1. .
  2. Agreements as ode .
  3. -> -> .
  4. . .
  5. / .
  6. IaC testing pyramid. !







All Articles