glu

package module
v0.0.1-prerelease9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 42 Imported by: 0

README

Stu - The Glu mascot

Glu

A deployment pipeline framework that sticks

Glu is the missing piece in your CI/CD toolbelt. It is a framework for orchestrating, manipulating, and introspecting deployment configuration stored in version control.


Go Reference

What Is It?

Glu is a framework built to help manage and coordinate multi-environment deployments using configuration stored in Git.

https://github.com/user-attachments/assets/b6f4d20b-e166-4ec9-8aa3-0c4d5e0cf410

Glu has an opinionated set of models and abstractions, which when combined, allow you to build consistent command-line and server processes for orchestrating the progression of applications and configuration across target environments.

📖 Check out our introductory blog post to learn more about why we built Glu.

What's Included

  • An engine for orchestrating the progression of resources across environments by opening pull requests in your Git repositories (optional).
  • A CLI for interacting with the state of your pipelines.
  • An API for interacting with the state of your pipelines.
  • An (optional) UI for visualizing and interacting with the state of your pipelines.

Use Cases

Use it to implement anything that involves automating updates to Git repositories via commits and pull requests.

  • ✅ Track new versions of applications in source repositories (OCI, Helm, etc) and trigger updates to target configuration repositories (Git). ⌛️ Coordinate any combination of scheduled, event-driven, or manually triggered promotions from one environment to the next.
  • 🔍 Expose a single pane of glass to compare and manipulate the state of your resources in one environment to the next.
  • 🗓️ Export standardized telemetry which ties together your entire end-to-end CI/CD and promotion pipeline sequence of events.

Getting Started

  1. Install Glu
go get github.com/get-glu/glu
  1. Follow the GitOps Example Repository to see Glu in action.

  2. Implement your own pipelines using the Glu SDK.

Development

See DEVELOPMENT.md for more information.

Roadmap Ideas

In the future, we plan to support more functionality, such as:

  • New sources:
    • Helm
    • Webhook / API
    • Kubernetes (direct to cluster)
  • Progressive delivery (think Kargo / Argo Rollouts)
    • Ability to guard promotion with condition checks on resource status
    • Expose status via Go function definitions on resource types
  • Pinning, history, and rollback
    • Ability to view past states for phases
    • Be able to pin phases to current or manually overridden states
    • Rollback phases to previously known states

Built By

The team at Flipt. We built Glu to power our own internal promotion pipelines and open-sourced it so that others can benefit from it.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Annotation

func Annotation(k, v string) containers.Option[Metadata]

Annotation returns a functional option for Metadata which sets a single annotation k/v pair on the provided Metadata

func Label

func Label(k, v string) containers.Option[Metadata]

Label returns a functional option for Metadata which sets a single label k/v pair on the provided Metadata

func WithUI

func WithUI(ui fs.FS) containers.Option[System]

WithUI configures the provided fs.FS implementation to be served as the filesystem mounted on the root path in the API

glu.NewSystem(ctx, glu.Name("mysystem"), glu.WithUI(ui.FS())) see: github.com/get-glu/glu/tree/main/ui sub-module for the pre-built default UI.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config is a utility for extracting configured sources by their name derived from glu's conventional configuration format.

func (*Config) BoltDB

func (c *Config) BoltDB(name string) (*bbolt.DB, error)

BoltDB constructs and configures a boltdb instance from configuration. It caches built instances and returns the same instance for subsequent calls with the same name.

func (*Config) GitRepository

func (c *Config) GitRepository(name string) (_ *git.Repository, proposer srcgit.Proposer, err error)

GitRepository constructs and configures an instance of a *git.Repository using the name to lookup the relevant configuration. It caches built instances and returns the same instance for subsequent calls with the same name.

func (*Config) OCIRepository

func (c *Config) OCIRepository(name string) (_ *oci.Repository, err error)

OCIRepository constructs and configures an instance of a *oci.Repository using the name to lookup the relevant configuration. It caches built instances and returns the same instance for subsequent calls with the same name.

type Descriptor

type Descriptor = core.Descriptor

Descriptor is an alias for the core Descriptor interface (see core.Descriptor)

type Edge

type Edge = core.Edge

Edge is an alias for the core Edge interface (see core.Edge)

type Metadata

type Metadata = core.Metadata

Metadata is an alias for the core Metadata structure (see core.Metadata)

func Name

func Name(name string, opts ...containers.Option[Metadata]) Metadata

Name is a utility for quickly creating an instance of Metadata with a name (required) and optional labels / annotations

type Phase

type Phase = core.Phase

Phase is an alias for the core Phase interface (see core.Phase)

type Pipeline

type Pipeline = core.Pipeline

Pipeline is an alias for the core Pipeline interface (see core.Pipeline)

func NewPipeline

func NewPipeline(meta Metadata) *Pipeline

NewPipeline delegates to core.NewPipeline

type Pipelines

type Pipelines interface {
	Pipelines() iter.Seq2[string, *core.Pipeline]
}

Pipelines is a type which can list a set of configured name/Pipeline pairs.

type Resource

type Resource = core.Resource

Resource is an alias for the core Resource interface (see core.Resource)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type System

type System struct {
	// contains filtered or unexported fields
}

System is the primary entrypoint for build a set of Glu pipelines. It supports functions for adding new pipelines, registering triggers running the API server and handly command-line inputs.

func NewSystem

func NewSystem(ctx context.Context, meta Metadata, opts ...containers.Option[System]) *System

NewSystem constructs and configures a new system with the provided metadata.

func (*System) AddPipeline

func (s *System) AddPipeline(pipeline *core.Pipeline) *System

AddPipeline invokes a pipeline builder function provided by the caller. The function is provided with the systems configuration and (if successful) the system registers the resulting pipeline.

func (*System) Configuration

func (s *System) Configuration() (_ *Config, err error)

func (*System) Context

func (s *System) Context() context.Context

Context returns the systems root context.

func (*System) GetPipeline

func (s *System) GetPipeline(name string) (*core.Pipeline, error)

GetPipeline returns a pipeline by name.

func (*System) Pipelines

func (s *System) Pipelines() iter.Seq2[string, *core.Pipeline]

Pipelines returns an iterator across all name and pipeline pairs previously registered on the system.

func (*System) Run

func (s *System) Run() error

Run invokes or serves the entire system. Given command-line arguments are provided then the system is run as a CLI. Otherwise, the system runs in server mode, which means that: - The API is hosted on the configured port - Triggers are setup (schedules etc.)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL