---
type: slide
slideOptions:
transition: slide
---
# Discourse Forum Automation
### Rajula Vineet Reddy
#### Supervisors:
#### Ismael Posada Trobo, Andreas Wagner
#### IT-CDA-WF
---
## 'Discourse Service'
#### Started about an year ago
#### 24 instances currently as of today
#### Numbers are expected to increase soon
---
## Current Deployment
----
## Openshift Templates
<!-- 
<!-- -->

---
## Problems with the current approach
----
### Templates are not flexible enough
----
### Instance failures/ problems require individual attention
----
### Templates will be deprecated in future OKD version
---
## Solution
:::success
:zap: Operators! :zap:
:::
---
## Operators!
#### Operators are code representation of operational logic with expertise
#### Operators are custom controllers
#### Flexible & customizable
#### Easy to build

---
## Operator Framework
#### Open source toolkit to create & manage operators
----
### Operator SDK
#### Framework built on Kubernetes *controller-runtime* library
#### Makes writing operators easier
----
### Ansible

---
## Discourse Operator
#### Built using Ansible
#### Can create & manage Discourse instances
#### Takes care of business logic

---
## Database?
#### Currently, we manually instatiate & configure the database for our applications
#### Procedure is manual & there is no automation
----
## Why not have a DB operator!
#### Create & delete DB instances automatically
#### DB deletion can be triggered on Discourse deletion using finalizers
---
## Postgresql Operator
### Crunchydata Postgresql Operator
#### Open source
#### Extensive features
#### *pgo* client to communicate with the operator

----
## Final outcome

----
### Problems faced
##### Openshift clusters - PV
##### *operator-sdk* better compatible with OKD 4.x
##### Kaniko build failure - *quay.io*
----
## Future work
#### Integrate with OLM (Operator Lifecycle Manager)
#### Add backup/ rollback functionalities
#### Auto upgrade with Discourse upstream test branches
#### Publish the operator
----
## References
#### Project Repo - https://gitlab.cern.ch/rvineetr/discourse-operator
#### operator-sdk - https://github.com/operator-framework/operator-sdk/
#### Lighting Talk - https://indico.cern.ch/event/830002/contributions/3523481/
----
# Thank you!