flaminto_ta

FleetDM Helm Chart Deployment

This document shows deployment process for a FleetDM Helm chart on a local Minikube cluster started on Docker driver.

Prerequisites

To deploy the FleetDM Helm chart, the following tools are required:

Installation

The deployment process uses a Makefile to simplify cluster creation and chart installation.

  1. Create the Minikube Cluster: The cluster is created with the Docker driver.
    make cluster
    
  2. Install the Helm Chart: Deploy the FleetDM chart, including MySQL and Redis dependencies, to the flamingo namespace.
    make install
    
  3. Expose Services with Minikube Tunnel: To make services accessible via localhost, run Minikube tunnel in the background.
    make tunnel
    
  4. Access FleetDM: After running the tunnel, FleetDM is available at http://localhost.

Database Migration

The database migration for FleetDM is executed as a Kubernetes Job. Initially, I considered running fleetdm prepare db as a container within the same pod before starting fleetdm serve.

Verification

To confirm that FleetDM and its dependencies (MySQL and Redis) are running correctly, use the following checks:

FleetDM

MySQL

Redis

To make the FleetDM Helm chart publicly available, a Helm has been created at https://nikstormov.github.io/flamingo/charts. Further work is needed to learn how to maintain and release updates for the chart, including versioning and documentation.

For CI/CD integration, the proposed workflow includes:

  1. Updating chart dependencies using helm dependency update.
  2. Packaging the chart with helm package to create a .tgz archive.
  3. On successful build, pushing the updated chart to the Helm repository.
  4. Triggering a deployment to test or production environments.

Issues Encountered

During the setup, I faced issues with MySQL, which were resolved by adjusting the MySQL version.

MySQL Database Error