ci infrastructure introducing automation in - ansible.com atl slide decks/introduc… · ci...

17
Introducing automation in CI infrastructure Michal Tyminski Build Engineer

Upload: others

Post on 17-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

Introducing automation in CI infrastructureMichal TyminskiBuild Engineer

Page 2: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

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?

Page 3: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

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?

Page 4: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

Pre-Automation Era

Page 5: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

• 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

Page 6: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

Automation Attempts

Page 7: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

It has to be better way...

• CI server

• PowerShell / Bash

• Fabric

Page 8: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

Automation for everyone

Page 9: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

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

Page 10: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

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

Page 11: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

Code quality by code review

Mandatory Code

Review

Automated validation

Code Quality

Page 12: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

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

Page 13: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

Future is now

Page 14: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

Current state• 1550+ commits

• 4 inventories

• 1300 + hosts

• 80+ roles

Page 15: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

Ecosystem

AnsibleGerritAWX

vCenter

Hyper-V

Zabbix

iLO

Windows OS

Linux OS

Page 16: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,

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

Page 17: CI infrastructure Introducing automation in - ansible.com ATL Slide Decks/Introduc… · CI infrastructure Michal Tyminski Build Engineer . INTRODUCTION Where I work •Intel Corporation,