Iris classifier with CircleCI, GitLab CI and GitHub Actions
The same decision-tree classifier shipped to GKE through three separate CI/CD pipelines.
What it does
The Iris dataset is cleaned with IQR-based outlier capping, split and used to train a Gini decision tree, with a Flask form serving predictions. The same app is delivered three ways: a CircleCI workflow, a GitLab CI pipeline and a GitHub Actions workflow, each building the Docker image, pushing it to Google Artifact Registry and deploying it to a GKE cluster.
What was built
- 01
Processing caps outliers in a feature column at 1.5 times the IQR, splits the data and saves it with joblib.
- 02
DecisionTreeClassifier (gini, max depth 30) is trained, evaluated and saved for the Flask app.
- 03
CircleCI workflow runs checkout, build-and-push and deploy jobs in a google/cloud-sdk executor.
- 04
GitLab pipeline builds in Docker-in-Docker and applies the Kubernetes manifest to GKE.
- 05
GitHub Actions tags images with the commit SHA and runs kubectl set image on the deployment.
The pipeline, layer by layer
Five layers, one pipeline.
L1Training
- Iris CSV
- Outlier capping
- Decision tree model
L2Serving
- Flask form
L3CI/CD options
- CircleCI
- GitLab CI
- GitHub Actions
L4Registry
- Artifact Registry
L5Runtime
- GKE deployment