Skip to content
intentdPublic

About

Compose's simplicity, on the Kubernetes your app runs on. One file: your services, the data services production runs from their operators, Helm charts. jig up to develop in it, jig it to check it.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

jig: Compose's simplicity, on the Kubernetes your app runs on

Compose's simplicity, on the Kubernetes your app runs on.

CI Go Reference Go 1.27+ License

Developers avoid Kubernetes because it looks complex. For the problem it solves, it is. So are Docker and Docker Compose, yet developers love Compose. Why? Because it is simple to use.

jig brings that simplicity to Kubernetes. If developing on the thing your app actually runs on were that simple, would you still develop on anything else?

jig assembles what the Kubernetes community has spent a decade building and proving, so you can develop on it with Compose's simplicity.

One file

name: shop

services:
  api:
    image: shop-api:dev
    build: { context: ./api }
    ports: [8080]
    envFrom: [shop-db]        # the database's address and password
  web:
    image: nginx:1.27
    dependsOn: [api]
    ports: ["8081:80"]

data:
  postgres: { database: shop }  # the Postgres your platform runs, from its operator
  secrets:
    export: { name: shop-db }

checks:
  - name: the API answers
    kubectl:
      port-forward:
        - { service: api, port: 8080, path: /health, contains: ok }

The services read as Compose's do: an image or a build, ports, env, volumes, a health check, dependsOn, labels.

Every day

jig up          # a cluster, your images built, everything running; ports on localhost
jig ps          # what is running, and how it is doing
jig logs -f     # follow the logs
jig ui          # a UI on it, with a shell into the containers
jig down        # take it away; the cluster stays for next time

Change your code and jig up again: it rebuilds and redeploys what changed.

What production runs

The databases, queues and caches your app uses are declared, not hand-built: Postgres, MariaDB, RabbitMQ, Redis and Kafka, each from the operator that runs it in production. jig installs them and hands your services their addresses and passwords.

Anything else comes the way it always has on Kubernetes: a Helm chart or a manifest.

Prove it works

jig it          # stand it up on a fresh cluster, run the checks, take it away

The checks are what you would ask with kubectl if you knew Kubernetes well: is it ready, what does it answer, what did it log. CI runs the same file.

Install

curl -sSL https://raw.githubusercontent.com/intentd/jig/main/install.sh | bash

Or brew install intentd/tap/jig, or from source with make build.

You need Docker or Podman, and jig makes a local cluster with kind. Or point it at a cluster you already have (--use-current). It fetches kubectl, helm and kind itself when they are missing.

New to it? jig init writes a starter project, and jig init --list shows the examples.

Examples

Example What it is
app-image Build an image and prove it serves
stack Several services, the Compose case
data An app and its Postgres and Redis
helm-chart A chart, and its upgrade
manifests A job that must finish, then be gone
commands A script, no cluster at all
library jig from Go

Learn more

The docs: writing a jig, data services, developing on it, every command, and jig as a Go library.

Building

make build      # → ~/.jig/bin/jig
make test
make examples   # every example, on kind

jig started inside Inrun, which runs its end-to-end tests with it, and is now a separate tool with no dependency on Inrun. It builds on tools, KEL and kind.

About

Compose's simplicity, on the Kubernetes your app runs on. One file: your services, the data services production runs from their operators, Helm charts. jig up to develop in it, jig it to check it.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages