johndpjr / AgTern

20 stars 5 forks source link

Implement CI/CD Pipeline with Kubernetes and GitHub Actions #207

Open JeremyEastham opened 8 months ago

JeremyEastham commented 8 months ago

This issue is intended to consolidate the following:

Last semester, I deployed the current version of our project to the DigitalOcean web hosting service using a "simple" Kubernetes configuration. The version of the project deployed to the Droplet is available under the project-presentations branch. There are several issues with the current configuration:

I plan to design a pipeline that will allow us to easily deploy our system without directly accessing the server. Here is an outline of how we would update AgTern:

  1. Someone suggests an idea and creates a GitHub Issue
  2. Someone implements the code to create the idea and submits a PR
  3. The code is merged into the dev branch in the repository
  4. When we have made enough progress on the dev branch, we merge dev into main (maybe prod or something similar?)
  5. A GitHub Actions Runner Controller on the server is watching the main branch for changes, sees the update, and executes a GitHub Action with a Self-Hosted Runner
  6. The GitHub Action will build the code into a Docker image on the server and automatically deploy it according to the kubernetes.yaml configuration file in the root of the repository

To-Do

This setup will take a lot of work initially, but my hope is that it will "just work" once it is complete so that we can focus on building AgTern!

JeremyEastham commented 8 months ago

I have decided that it will greatly simplify this process to convert AgTern into a Helm Chart. This allows us to depend on other Helm Charts such as Postgres, the GitHub Actions Runner Controller, and the Kubernetes Dashboard. I'm updating project-presentations with these changes.