Skip to content

Latest commit

 

History

History
196 lines (151 loc) · 13.2 KB

README.md

File metadata and controls

196 lines (151 loc) · 13.2 KB

RMK CLI - Reduced Management for Kubernetes

Release Software License Powered By: Edenlab

Command line tool for reduced management and provisioning of Kubernetes clusters and environments, Helm secrets and releases.

Overview

This tool has been designed and developed initially by Edenlab LLC as the main CLI for managing Kodjin FHIR Server on Kubernetes clusters in different environments.

It is a wrapper around many popular CI/CD and DevOps CLI tools, including:

The main goal of the tool is to simplify ("reduce") management of Kubernetes clusters and releases.

RMK is an abbreviation which stands for "Reduced Management for Kubernetes".

Advantages

RMK simplifies the start of any level of complexity of a project using Kubernetes due to the following advantages:

  • Respects the GitOPS approach: Each Git branch is used as a unique identifier for determining the environment, cluster name, set of configurations and other attributes required for setting up the wrapped tools for project management in the Kubernetes environment.
  • Respects the GitLabFlow workflow: Supports the standard develop, staging, production and different ephemeral (e.g, feature, release) environments.
  • Provides a transparent project structure with a basic set of configurations: Allows you to correctly reuse configurations between projects and inherit project configurations from other repositories, e.g., establish parent-child ("upstream-downstream") project relationships.
  • Allows a diverse team to work in the DevOPS methodology without blocking each other: Each team or multiple teams can develop and release their projects separately, later on the result of their work can be combined in a single project.
  • Supports versioning of projects in a CI/CD pipeline: Each project can be versioned and referenced by static or dynamic tags (e.g., SemVer2), which guarantees stable, well-tested and predictable releases.
  • Integrates with any CI/CD tool easily: The tool is a self-sufficient binary that strictly follows the 12 factor app methodology.
  • Calls the CLI tools directly instead of using their libraries/SDKs: RMK executes the tools directly in a way that a typical person would do it, passing correct sets of CLI arguments and flags to the commands based on a project configuration structure. This decouples the updating of RMK itself from the wrapped CLI tools, allowing developers to utilize recent functionality and fixes.

Edenlab LLC use cases

At Edenlab LLC, RMK is used for deploying the Kodjin FHIR Server.

A classic Kodjin installation uses 3-level inheritance:

  • Dependencies (upstream#1): Core components like DBs, search engines, caches, load balancers/proxies, operators etc.
  • Kodjin (downstream#1): Kodjin FHIR API (REST)
  • Target installation (downstream#2): Products based on Kodjin, such as UI components, user portals and middleware services.

The additional components used by Kodjin are:

  • *.provisioner.infra: Repositories for Kubernetes cluster provisioning.
  • helmfile.hooks.infra: Shell scrips used as Helmfile hooks in deps/Kodjin/any other tenant.
  • core.charts.infra: Helm charts used by the Kodjin services.

The examples of Kubernetes providers, to which Kodjin has been installed, are:

Related OSS repositories

Requirements

Currently, RMK only supports Unix-like operating systems (OS):

  • OS:
    • MacOS: amd64, arm64 (M1, M2 require Rosetta)
    • Linux: amd64
  • Software:
    • Python >= 3.9
    • AWS CLI
    • For managing local clusters using K3D: Version v5.x.x requires Docker => v20.10.5 (runc >= v1.0.0-rc93) to work properly.

If this is your first project repository managed by RMK, ensure that the above tools are specified in the project.yaml file.

Installation

To install RMK, run the self-installer script using the following command:

curl -sL "https://edenlabllc-rmk.s3.eu-north-1.amazonaws.com/rmk/s3-installer" | bash

Alternatively, you can go directly to https://github.com/edenlabllc/rmk/releases and download the binary.

As another option, the binary can be built from source.

Update

General update process

To update RMK to the latest version, run the following command:

rmk update

Update to specific version

You can update to a specific RMK version to maintain backward compatibility or when updating to the latest version is not possible.

This may be necessary due to specific version requirements or when a bug has been detected.

To update to a specific version, use the following command:

rmk update --version vX.X.X 

Features

Supported Kubernetes providers

By design, RMK can work with any Kubernetes provider.

Among the providers are:

Roadmap

  • Guidelines for contributors: Create comprehensive guidelines for contributors, including instructions for creating pull requests (PRs).
  • Integration with Helmfile vals: Integrate RMK with the vals tool for enhanced values and secret management.
  • Major update of the AWS EKS cluster provider: Update the AWS EKS cluster provider to the latest versions to utilize all the supported features of the Terraform CLI and modules.
  • Implementation of additional RMK cluster providers: Implement support for additional cluster providers for popular Kubernetes services such as GKE, AKS, etc.
  • Offline artifact mode: Implement the offline artifact mode to install artifacts in fully isolated offline environments.
  • Web documentation generator: Add an HTML documentation generator based on the .md files.
  • Automatic testing of RMK during the CI/CD pipeline: Ensure that changes to the RMK codebase do not introduce errors or regressions during the CI/CD.

Check the issues for more information.

License

RMK is open source software (OSS) licensed under the Apache 2.0 License.