Giter Club home page Giter Club logo

hatchet-v1-archived's Introduction

Welcome to Hatchet!

Note: Hatchet is in early alpha and is not yet ready for production use. We are actively working on improving the documentation and user experience. If you have any questions or feedback, please reach out to us on Discord.

Hatchet is a continuous integration and deployment (CI/CD) solution for Terraform. It focuses on making it easier to run secure and scalable infrastructure deployment pipelines without having to build those pipelines from scratch. More specifically, it offers:

  1. Remote execution of Terraform runs, such as terraform plan and terraform apply
  2. Integrations with Git-based repositories, which can be configured to run pipelines automatically against pull requests and merges.
  3. An extensive monitoring integration built using Open Policy Agent, an industry-standard policy as code framework.

How does it work?

Hatchet is self-hosted and runs entirely on your infrastructure. The Hatchet architecture can be grouped into three main components:

  • Hatchet Control Plane: This encompasses the Hatchet API server, background workers, database, and a few other services. Hatchet uses a custom build of Temporal to manage the execution of Terraform runs.
  • Hatchet Worker: The worker that executes your Terraform runs.
  • Hatchet Client: The web interface for Hatchet. This is where you view the status of your runs and configure your pipelines.

While there are a few moving pieces, the getting started guides will make it simple to deploy these components. After you've gotten a basic installation up and running, you can start to customize your instance by consulting the config file references.

After installing Hatchet, you can deploy infrastructure through either local deployments or Github-based deployments.

How is this different from other tools?

Hatchet was created due to the lack of open-source, self-hostable, and scalable alternatives to Terraform Cloud. Hatchet focuses on making it as easy as possible to manage your deployment pipelines, while also providing the flexibility to customize your deployment to your specific needs.

Why self-hosted?

For many organizations, it's essential that sensitive data never leaves your internal infrastructure. As a result, while most solutions offer self-hosted runners, Hatchet makes it easy to self-host everything, including your control plane, credentials backend, and runners.

Why open-source?

While there are many benefits to being open source, one strength of Hatchet is the flexibility it provides for customizing different aspects of your deployment pipelines by extending our open-source repository. For example, if you'd like to load in your cloud credentials from a custom secret storage engine, you can simply write a credential plugin for Hatchet. We aim to make everything customizable -- down to even the theme of the Hatchet dashboard.

How are you scalable?

Hatchet is built on top of Temporal, an open-source workflow engine. Temporal is a horizontally scalable system that can run thousands of workflows in parallel across as many tenants as you need.

These three features of Hatchet -- being open-source, self-hosted, and focused on scalability -- work hand-in-hand to give you the best possible solution for infrastructure management.

hatchet-v1-archived's People

Contributors

abelanger5 avatar

Stargazers

Lukas M avatar Emanuel Stanciu avatar Gabriel Suarez avatar Bryan Onel avatar Nigel Sheridan-Smith avatar Ray avatar Clayton Kehoe avatar Ludwig Müller  avatar Volodymyr S. avatar  avatar  avatar Rafael Gontijo Winter avatar Johnson Masilla Vino avatar Alexandros Solanos avatar Will Kleinhenz avatar Kevin Chen avatar Jacek avatar Hinata 0x1bf52 avatar  avatar Eduardo Teles avatar Anton avatar Sean avatar darron froese avatar  avatar Sharma Vikram  avatar mdheller avatar Andrey Larin avatar Mohammad Abdolirad avatar Amit Mishra avatar Alexander Jackson avatar Ali Moezzi avatar  avatar thiagoscherrer avatar Mikhail Naletov avatar Alex Simenduev avatar Daniel Hernández avatar Dan Molik avatar Mikhail Bulash avatar Manuel Rüger avatar  avatar Madan avatar Julian avatar Nikita avatar Maksim avatar Zachary Loeber avatar Caleb Woodbine avatar Chris "Not So" Short avatar klausn avatar Byungjin Park (Claud) avatar Eduardo Bellido Bellido avatar Daniel Sousa avatar Mohit Shukla avatar Satie Sharma avatar Shai avatar Francis Rodier avatar Ernestas Narmontas avatar Michael Warkentin avatar Alexey Demidov avatar SkalingClouds avatar Matt Shields avatar Mark Martirosian avatar Stefhen Hovland avatar Bohdan Shaparenko avatar Vincent Colombo avatar  avatar André Gaudêncio avatar Tertius Stander avatar Foo avatar Eric Ho avatar Debendra Oli avatar  avatar Mohamed Mohsen avatar Stefan Caraiman avatar 爱可可-爱生活 avatar Mohammed Almusaddar avatar Dave Wongillies avatar Diego Figueroa avatar  avatar robinoph avatar Andrejs Agejevs avatar Corcoran Smith avatar Ayodele avatar akae avatar Michael T Halligan avatar Nick Tkach avatar Jakub Olan avatar Atıl Sensalduz avatar Artem Chubchenko avatar  avatar Ivan Kolodrivskyi avatar Iago Alonso avatar Connor Edwards avatar Stefan Petran avatar Hüseyin Mert avatar Rahul Sadarangani avatar Marius Karnauskas avatar Birger J. Nordølum avatar Lucas Barbosa avatar ◤◢◤◢◤◢◤◢ avatar Mateusz Jaromi avatar

Watchers

Walter Vides avatar Loren Gordon avatar Michael T Halligan avatar Nicolas Frati avatar  avatar Alistair Heys avatar  avatar

hatchet-v1-archived's Issues

Add support for GitLab

This is a really good initiative and definitely something that's needed! Well done!

I would like to see GitLab integration in Hatchet. This might not be as easy as GitHub since they don't have an equivalent to "GitHub Apps" in GitLab, but should still be relatively easy.

About the latest release

👋 it looks like these alpha release have been for some time, any chance of releasing 0.1.0?
image

Quickstart issues

Just started going through the Quickstart page on a fresh setup and encountering some issues.

While going through the CLI setup on https://docs.hatchet.run/getting-started/setup/quickstart/#creating-your-first-module, I made a mistake when running the config set-address command and wrote https instead of http. This worked without any errors, so perhaps some validation would be good there. I know that it will validate once you run hatchet init, but maybe an earlier check is worth it.


Another issue I encountered is that the Team I set up during the registration phase wasn't actually set up properly. I didn't notice that and ran through the Quickstart commands (with the incorrect https address):

cd smoke-test
hatchet config set-address https://localhost:8080
hatchet config set-api-token $token

The return of the set-api-token command did not include a default team (I only noticed later):

$ hatchet config set-api-token '$token'
Set the current api token successfully
Set the current organization as 6145face-98c9-4566-b0a6-582caf6cfe69

When I then run hatchet init it results in:

$ hatchet init
team id must be set: run [hatchet config set-team]

Running hatchet config set-team then results in an index out of range panic.

$ hatchet config set-team
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/hatchet-dev/hatchet/cmd/hatchet-cli/cli.glob..func5(0x2154c60?, {0x22d8920?, 0x0?, 0x0?})
	/home/runner/work/hatchet/hatchet/cmd/hatchet-cli/cli/config.go:68 +0xda
github.com/spf13/cobra.(*Command).execute(0x2154c60, {0x22d8920, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x2153840)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
github.com/hatchet-dev/hatchet/cmd/hatchet-cli/cli.Execute()
	/home/runner/work/hatchet/hatchet/cmd/hatchet-cli/cli/root.go:38 +0x7f
main.main()
	/home/runner/work/hatchet/hatchet/cmd/hatchet-cli/main.go:8 +0x17

When I later to go check on my teams in the UI it's empty, despite having created an initial team in the registering phase. So perhaps there's an issue creating the initial team?
After creating a team on the http://localhost:8080/organization/teams page, it no longer paniced when I ran hatchet init. It timed out since I had incorrectly configured the hatchet URL, but after changing the URL it worked fine.

It was hard to figure out what I needed to do to fix it, so I ended up deleting the ~/.hatchet/hatchet.yaml file and start over.

It looks like if I just run hatchet config set-api-token again it will fetch the team correctly the second time, but it uses the Hatchet URL from the JWT token, so even if the URL is incorrect, you won't know because the hatchet config set-api-token successfully fetches your Org and Team.

The URL in the token should either be used to populate the URL in the ~/.hatchet/hatchet.yaml file or it should at least throw a warning if it detects that they differ. Maybe use the ~/.hatchet/hatchet.yaml URL when looking up Org/Team and ignore the JWT URL?

Create default policy for alerting on unapplied changes

Location

  • Frontend
  • hatchet-server
  • hatchet-runner
  • hatchet-runner-worker
  • hatchet-temporal

Motivation

For a git-based workflow, changes can occasionally be unapplied on a master or main branch for a long time without visibility into whether those changes have been applied. Hatchet should periodically check that there are no unapplied changes on a branch, and alert the user if they exist.

Requirements

  • Modify the OPA input for plan checks to determine when changes were last applied
  • Create a default policy upon team creation that checks for unapplied changes

Additional Details

Add support for generic OIDC and OAuth connectors

It should be possible to extend the auth mechanism to include more generic OIDC/OAuth integrations.

The config can look something like Dex OIDC connectors.

connectors:
- type: oidc
  id: google
  name: Google
  config:
    # Canonical URL of the provider, also used for configuration discovery.
    # This value MUST match the value returned in the provider config discovery.
    #
    # See: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig
    issuer: https://accounts.google.com

    # Connector config values starting with a "$" will read from the environment.
    clientID: $GOOGLE_CLIENT_ID
    clientSecret: $GOOGLE_CLIENT_SECRET

    # Dex's issuer URL + "/callback"
    redirectURI: http://127.0.0.1:5556/callback

Loggers should be consolidated between components and processes

Location

  • Frontend
  • hatchet-server
  • hatchet-runner
  • hatchet-runner-worker
  • hatchet-temporal

Motivation

Different logging formats are used between the chi logging middleware, GORM, and temporal. All of these packages accept a custom logger implementation, so it should be fairly simple to consolidate the loggers to allow for both JSON and readable logs.

Requirements

  • Pass Hatchet logger to:
    • GORM
    • Chi logging middleware (might have to write custom logging middleware)
    • Temporal
  • Make sure debug log level is respected (particularly by GORM)
  • Print stack traces on error logs
  • Update logging implementation to generate readable logs for testing/development

Additional Details

Running Hatchet behind Nginx over HTTPS results in HTTP/2 errors

Hey @abelanger5 - I'm running Hatchet on my lab server, where hatchet-server is running behind Nginx, and over SSL, on https://hatchet.rudimk-infrastructure.com. I'm able to access the dashboard, and I'm also able to use the CLI to authenticate against this instance, but running hatchet init in the quickstart's smoke-test module results in the following error:

could not run init: rpc error: code = Unavailable desc = connection error: desc = "error reading server preface: http2: frame too large"

A quick search threw this comment up, with the OTEL Helm charts. Wondering if there's something one can tweak in terms of config to get past it? I have a feeling running this on Kubernetes will probably let me get past this anyway, but since I run personal infrastructure on Hetzner, still working on a solid K8s installer there.

For reference, my hatchet-server config:

runtime:
  port: 8080
  url: https://hatchet.rudimk-infrastructure.com
  runBackgroundWorker: true
  runRunnerWorker: false
  runTemporalServer: true
  runStaticFileServer: true
auth:
  cookie:
    domain: hatchet.rudimk-infrastructure.com
    insecure: false
fileStore:
  kind: local
  local: 
    directory: ./tmp/files
logStore:
  kind: file
  file: 
    directory: ./tmp/logs

Improve quality of drift detection output and messages

Location

  • Frontend
  • hatchet-server
  • hatchet-runner
  • hatchet-runner-worker
  • hatchet-temporal

Motivation

Drift detection currently alerts on if drift exists, but doesn't have any helpful messaging for tracking down which resources have drifted.

Requirements

  • Modify the default OPA policy to parse the resource addresses of the drifted resources

Additional Details

Hatchet should manage concept of resource state and live-update resource changes

Location

  • Frontend
  • hatchet-server
  • hatchet-runner
  • hatchet-runner-worker
  • hatchet-temporal

Motivation

It should be possible to explore resources and view diffs of resource changes between applys. As a result, Hatchet should maintain a concept of each resource's state within a module.

Requirements

(TBD)

Additional Details

hatchet not working on alma8

hatchet --help
hatchet: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by hatchet)
hatchet: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by hatchet)

Update monitors/check against module lists when a module is deleted

Description

If a monitor previously has a single module specified in it's matched modules array, and that module is deleted, the empty array will result in the monitor running against all modules.

Location

  • Frontend
  • hatchet-server
  • hatchet-runner
  • hatchet-runner-worker
  • hatchet-temporal

Steps to reproduce

  1. Create a module
  2. Create a monitor and only select the previously created module
  3. Delete the module
  4. Monitor will now run against all modules

Additional Details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.