preflight

package module
v0.0.0-...-cfaac7e Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

Preflight

Config management in go inspired by terraform (learning exercise).

Feel free to create Issues/PRs and learn with me!!

What Preflight Is.

Preflight is a learning exercise to see what is involved in making a simple yet capable Config Management System. It has a plugin api so that users can add custom functionality, it has a simple yet robust syntax built using HCL, and string interpolation, and it has a plan command to overview changes quickly and easily before they happen.

What Preflight Is Not.

Preflight is not a production system (yet) maybe it will be some day but for now the intentions are purely academic.

Status

Preflight is still very early and most of the system is just ideas half layed out in code, I really would like to build this out in the open where everyone can see, learn, and collaborate.

I urge anyone who is curious about how CMSs work or have a greate idea for a killer feature please contribute!

As for things todo here it is:

  • Implement way to consistently Diff system and state files to generate plan
  • Implement string interpolation and variable system
  • Implement system for retrieving Data, Plugins from various storage mediums
  • Implement system for remote/local execution
  • Build reference/standard plugins

Syntax (Subject to Change)

# vim: set ft=hcl:

data "script" "dotfiles" {
  source = "http://github.com/chrismckenzie/dotfiles/install.sh"
}

task "homebrew" "install_vim" {
  name = "vim"
  state = "present"
}

task "file" "create_vimrc" {
  name = "${path.home}/.vimrc"
  source = "${path.module}/vimrc"
  state = "present"

  attrs {
    owner = "chrism"
    group = "staff"
    perrmissions = 777
  }
}

task "script" "run_dotfiles_install" {
  content = "${data.script.dotfiles}"
}

Building

Currently plugins need to be built independently of the main binary this can be done by running the following.

go generate ./...

you may then test everything by running:

go test -v ./...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAPIServer

func RegisterAPIServer(s *grpc.Server, srv APIServer)

Types

type APIClient

type APIClient interface {
}

APIClient is the client API for API service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAPIClient

func NewAPIClient(cc *grpc.ClientConn) APIClient

type APIServer

type APIServer interface {
}

APIServer is the server API for API service.

type UnimplementedAPIServer

type UnimplementedAPIServer struct {
}

UnimplementedAPIServer can be embedded to have forward compatible implementations.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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