Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DMP 2024]: Implement Kubernetes Operator for Mifos/Fineract and/or PH-EE #1

Open
DavidH-1 opened this issue Jul 12, 2024 · 2 comments
Assignees

Comments

@DavidH-1
Copy link
Collaborator

Ticket Contents

Description

The goal of this project is to improve the deployability of key projects of our stack like Mifos/Fineract and Payment Hub EE.
Kubernetes operators give kubernetes application dev/ops a great deal of reliability and architectural control over kubernetes applications deployments. Reference Operator pattern for details on the benefits of Kubernetes operators. The benefits of Kubernetes operators can also be quite tangible and visibile by looking at those under development from peer projects in the financial inclusion space like Mojaloop vNext whom are building out a Kubernetes operator as a means to improve quality, simplify deployment, and improve reliability and testing.

Goals & Mid-Point Milestone

Goals

[1] [Gather learnings around Kubernetes operators and their patterns in general (i.e. Monga, Kafka, etc]
[2] [Design Kubernetes operator based on the above learnings ]
[3] [Identify what to move from existing Helm chart to Operator ]
[4] [Implement operator and implement a small helm chart to deploy the operator itself]
[5] [Project Documentation]
[6] [Goal - Design and Implement Kubernetes Operator that replaces helm chart and provide a small helm chart for deployment of operator]

Setup/Installation

No response

Expected Outcome

DevOps and Sys Admins running our projects would experience a more simplified deployment with greater degree of control, improved quality of their builds and greater reliability and ease of testing.

Acceptance Criteria

No response

Implementation Details

Mifos PH-EE Kubernetes Operator

Tech Skills Needed
Docker, Kubernetes, Jenkins, Bash, Java - Spring, PostgreSQL, MariaDB, Cassandra, TDD With JUnit 4, Gradle

Mockups/Wireframes

No response

Product Name

Mifos PH-EE Kubernetes Operator

Organisation Name

The Mifos Initiative

Domain

Financial Inclusion

Tech Skills Needed

Docker, Java, Jenkins, Kubernetes, Spring Boot, Other

Mentor(s)

@

Category

Backend, CI/CD, Delpoyment, Other

@DavidH-1
Copy link
Collaborator Author

This ticket replaces openMF/ph-ee-env-labs#262 which was in the wrong repo. @IOhacker @yashsharma127 can you please use this ticket for your goals and updates.

@yashsharma127
Copy link
Collaborator

yashsharma127 commented Jul 13, 2024

Weekly Learnings & Updates (To be filled by contributor)

Week 1

  • Explored the Project Repository to understand project architecture and Helm deployment configurations.
  • Studied core concepts, architecture, and components like CRDs and Controllers in Kubernetes Operators.
  • Researched design patterns and methods to create operators using Go, Helm, and Ansible.
  • Researched Kubernetes and Helm to understand their working better.

Week 2

  • Worked on setting up existing operators from operatorhub.io to understand structure and functionality.
  • Developed a custom Go-based operator for a three-tier test application.
  • Researched reconciliation logic and controller loop to manage the state of the pods.

Week 3

  • Created a Helm-based operator for a test Helm chart.
  • Conducted tests on custom operators by writing and applying custom resources.
  • Applied Helm chart deployment for a test operator and associated CRDs.

Week 4

  • Deployed PHEE (PaymentHub) on an Azure AKS cluster.
  • Worked towards deploying PaymentHub using Mojafos on an 8GB Ubuntu OS VM.
  • Researched the resource requirements and Configurations in current PHEE helm charts to run in an 8GB Ubuntu OS VM.

Week 5

  • Calculated the resources to be assigned.
  • Resolved errors in the deployment of PHEE using the helm chart on an 8GB Ubuntu OS VM.
  • Researched all the current helm chart deployments to be replaced with the kubernetes operator.

Week 6

  • Initiated Java operator development for the Mifos artifact importer-rdbms.
  • Created the basic setup of the operator, including defining CRDs and Custom Resources (CRs).
  • Implemented the operator initialization logic and controller registration.
  • Defined the Custom Resource (CR) class.
  • Began development of the deployment controller and reconciliation logic.
  • Created a pull request (PR) for the initial setup and basic implementation.

Week 7

  • Addressed and resolved errors encountered in the operator from Week 6.
  • Fixed issues related to incorrect imports, values, and dependencies.
  • Solved CRD and operator connection problems.
  • Added CR status updates to the operator.
  • Resolved permission-related issues.
  • Tested the Quarkus plugin for the Kubernetes operator.

Week 8

  • Successfully applied the status updates feature to the operator.
  • Successfully deployed importer-RDBMS using the operator in the Mojafos Environment.
  • Added liveness probing and other required configurations as per the Helm chart to the operator.
  • Resolved all environment-related issues.
  • Explored different methods to apply multiple deployments using an operator.

Week 9

  • Added probing to the importer-RDBMS deployment.
  • Implemented toggles to enable/disable resources and services with deletion upon disabling.
  • Researched approaches to implement multiple deployments using the operator.
  • Planned for next week: implementation of multiple deployments, documentation, and writing a script to integrate the operator with the Gazelle Chart.

Week 10

  • Added ingress and service creation code to the operator.
  • Created a script to set up the operator in the Mifos-Gazelle environment.
  • Began working on the logic for handling multiple deployments with the operator.
  • Planned for next week: continue working on multiple deployments.

Week 11

  • Created custom resources to implement multiple deployments and successfully applied them.
  • Performed code cleanups and updated configurations in the CRD.
  • Initially used hardcoded environment variables, then began working on making environment variables dynamic and passing them through the Custom Resource (CR).

Week 12

  • Worked on the environment variables logic in the operator.
  • Configured custom resources for 7 deployments under PaymentHub and successfully tested them.
  • Planned to configure the remaining deployments, test them, and add any necessary configurations in the next few days.
  • Worked on Documentation.

Week 13

  • Added init container logic and tested the operator using logs.
  • Successfully configured all the deployments under PaymentHub-EE.
  • Completed the documentation for the operator.
  • Completed the final setup with Mifos-Gazelle testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants