# GitOps - 為你的 IaC 基礎架構即程式碼平台加上自動化引擎
###### tags: `SRE2022`
---
Charlie
以 git 為中心管理 infra
他選 ansible (用的順手) <- 合理,VM base 用 ansible 好用
awx
https://github.com/ansible/awx
---
Brian
## what is gitops
iac (infra as code)
1. vm local storage confog error
2. point wrong dns
3. wrong time log (region)
查cncf找工具
## wwhy ansible awx (順手)
- web ui
- RBAC
- push button
- restful api
- webhook
- workflow
- enterprise integrate
- centralized log
- open source
## gitops - operation by PR
---
Gimmy
> 王偉任 Weithenn Principal System Manager, Micron Technology, inc.
### What is GitOpt
Git as single source of truth for declarative infra and app
### IaC
case 1: VM 設定錯誤
case 2: DNS 指向錯誤
case 3: Log 因為設定區域不正確,時間資料紀錄錯誤
以上人工疏失的問題,可以透過 IaC 有效降低發生機率
**選用 Ansible AWX**
- 有 GUI
- 有 Restful API
- 有權限管理
### Operations by Pull Requests
Code Repository 改變就能直接改變 infra 的現有狀態
DEMO github --> ansible AWX
---
## Chris
### GitOps?
以Git為中心進行管理,並非只是把Infra Code放在Git
工具可參考[CNCF](https://landscape.cncf.io/)
### Ansible AWX
- Web UI
- REST API
- access control
- webhook
- workflow
- logging
- open source
### GitOps - Operation by PR
#### 實作
GitHub 產生 Personal Access Token -> AWX Webhook 設定 -> 回GitHub Setting Webhook填入Payload URL