This is a transcript of a talk at TechLeadConf 2020-06-09 . Before we start, try to answer the question for yourself what are your expectations from interacting with the infrastructure? For example, how long will it take:
- Deploy a new test environment.
- Update java and / or OS version inside container.
- Grant server access rights.
, . -, ?
, , . , - . , , . .
C + + =
? . , . , : .
- . . , . / -( !). 10-15 . - . , , - - , . , .
- . , jira, email, slack . . " , , ". .
- . . : 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% , . :
- .
- .
- .
- .
- .
- №2.
Ansible,
Ansible. - , , .. . , air gap( ). . Ansible, , :
- .
- .
- .
- /, .
Ansible ?
, . Jenkins Pipeline, :
- .
- Jenkins.
- lint .
- molecule
IaC
, / * as Service. . :
- .
- .
- .
- .
- .
- ( ! ).
- .
. : , , . :
- — , , .
- — , , .
- — , .
, , IaC . , , . :
- — YML . , , - .
- — Ansible .
- — .
, :
- .
- .
- .
, , . / .
IaC testing pyramid. !
DevopConf , 200 000 . , , : , , , .
- Static Analysis — , . , .
- Unit — IaC . Ansible Molecule.
- Integration — unit, .
- E2E — , .
?
, . . . , ? .
№1
, .. , . , .
№2
. .
, . SLOC:
- 2000 — .
- 4000 —
- 6000 — .
- 8000 — E2E .
Lessons learned
- .
- Agreements as ode .
- -> -> .
- . .
- / .
- IaC testing pyramid. !
Links
- Slides
- Video
- English Version
- A list of awesome IaC testing articles, speeches & links
- What I learned from testing 200,000 lines of infrastructure code
- How to start testing Ansible, refactor a project in a year and not go crazy
- Ansible: Migrating 120 VM configuration from Coreos to Centos in 18 months
- Podcast nsfw.co.in/04 Agreements as Code
- Cross post from personal blog