Introducing automation in CI infrastructureMichal TyminskiBuild Engineer
INTRODUCTION
Where I work• Intel Corporation, Folsom, CA
What is my role• Technical Leader of US part of Build Team
What is my team responsibility• Supporting Build environment for Intel GFX driver
What is the purpose of this presentation• What problems did we solve with Ansible and what benefits came from this?
Share your automation story
1. How did you get started with Ansible?
2. How long have you been using it?
3. What's your favorite thing to do when you Ansible?
Pre-Automation Era
• Only certain team members knew how to deploy and configure systems
• Every machine was different as every person had different ways of work
• Lack of proper communication and documentation
Common issues
Automation Attempts
It has to be better way...
• CI server
• PowerShell / Bash
• Fabric
Automation for everyone
New foundations
• Everyone in team must use same tool
• Tool must be easily accesible
• Tool must be easy to use and understand how it works • Must be version controlled
• No more manual changes
Beginings
Our choice: Ansible + Gerrit
Why ansible? • It is easy to start with and understand• It uses YAML descriptive language• It is modular
Why Gerrit? • Leverage Git SCM• Provides Code review functionalities
Code quality by code review
Mandatory Code
Review
Automated validation
Code Quality
Code quality by code reviewyamllint --strict
ansible-lint
ansible-playbook -- syntax-check
Custom script looking for hosts in more than one inventory
Custom script looking for orphaned host and group vars
Manual code review
Future is now
Current state• 1550+ commits
• 4 inventories
• 1300 + hosts
• 80+ roles
Ecosystem
AnsibleGerritAWX
vCenter
Hyper-V
Zabbix
iLO
Windows OS
Linux OS
Benefits
• Knowledge is widespread across the team
• Learning trough code review
• Better bus factor
• Possibility to perform infra tasks by non-infra members or experts
• Team has time for improvements