All Projects → hashicorp → hcat

hashicorp / hcat

Licence: MPL-2.0 license
Hashicorp Configuration and Templating library (hcat, pronounced hashicat)

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to hcat

offensive-infrastructure
Offensive Infrastructure with Modern Technologies
Stars: ✭ 88 (-1.12%)
Mutual labels:  consul, vault
vault-consul-kubernetes
vault + consul on kubernetes
Stars: ✭ 60 (-32.58%)
Mutual labels:  consul, vault
Hashi Helper
Disaster Recovery and Configuration Management for Consul and Vault
Stars: ✭ 155 (+74.16%)
Mutual labels:  consul, vault
Hashi Up
bootstrap HashiCorp Consul, Nomad, or Vault over SSH < 1 minute
Stars: ✭ 113 (+26.97%)
Mutual labels:  consul, vault
vagrant-vault-consul-docker-monitoring
No description or website provided.
Stars: ✭ 20 (-77.53%)
Mutual labels:  consul, vault
Envconsul
Launch a subprocess with environment variables using data from @hashicorp Consul and Vault.
Stars: ✭ 1,761 (+1878.65%)
Mutual labels:  consul, vault
Ansible Vault
🔑 Ansible role for Hashicorp Vault
Stars: ✭ 189 (+112.36%)
Mutual labels:  consul, vault
Terraform Modules
Reusable Terraform modules
Stars: ✭ 63 (-29.21%)
Mutual labels:  consul, vault
hookpick
A tool to manage some operational concepts of Hashicorp Vault
Stars: ✭ 83 (-6.74%)
Mutual labels:  consul, vault
hubble
hubbling the universe nebula by nebula
Stars: ✭ 18 (-79.78%)
Mutual labels:  consul, vault
k8s-deployer
Deploy Kubernetes service and store retrieved information in the Consul K/V store
Stars: ✭ 23 (-74.16%)
Mutual labels:  consul, consul-template
nomad-box
Nomad Box - Simple Terraform-powered setup to Azure of clustered Consul, Nomad and Traefik Load Balancer that runs Docker/GoLang/Java workloads. NOTE: Only suitable in dev environments at the moment until I learn more Terraform, Consul, Nomad, Vault :P
Stars: ✭ 18 (-79.78%)
Mutual labels:  consul, vault
Vaultron
🤖 Vault clusters Terraformed onto Docker for great fun and learning!
Stars: ✭ 96 (+7.87%)
Mutual labels:  consul, vault
Docker Compose Ha Consul Vault Ui
A docker-compose example of HA Consul + Vault + Vault UI
Stars: ✭ 136 (+52.81%)
Mutual labels:  consul, vault
Gomplate
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.
Stars: ✭ 1,270 (+1326.97%)
Mutual labels:  consul, vault
Cault
docker compose for consul and vault official images
Stars: ✭ 157 (+76.4%)
Mutual labels:  consul, vault
Fabio
Consul Load-Balancing made simple
Stars: ✭ 6,834 (+7578.65%)
Mutual labels:  consul, vault
Docker Vault
Docker Container for Hashicorp's Vault
Stars: ✭ 60 (-32.58%)
Mutual labels:  consul, vault
hashicorp-labs
Deploy locally on VM an Hashicorp cluster formed by Vault, Consul and Nomad. Ready for deploying and testing your apps.
Stars: ✭ 32 (-64.04%)
Mutual labels:  consul, vault
vault-consul-docker
HashiCorp Vault with Consul backend in Docker
Stars: ✭ 20 (-77.53%)
Mutual labels:  consul, vault

This package is unreleased, alpha quality that will have API breaking changes as we get it in shape. We'll do an official release when it is ready.

Hashicorp Configuration And Templating (hashicat) library

Go Reference ci

This library provides a means to fetch data managed by external services and render templates using that data. It also enables monitoring those services for data changes to trigger updates to the templates.

It currently supports Consul and Vault as data sources, but we expect to add more soon.

This library was originally based on the code from Consul-Template with a fair amount of refactoring.

Community Support

If you have questions about hashicat, its capabilities or anything other than a bug or feature request (use github's issue tracker for those), please see our community support resources.

Community portal: https://discuss.hashicorp.com/c/consul

Other resources: https://www.consul.io/community.html

Additionally, for issues and pull requests we'll be using the 👍 reactions as a rough voting system to help gauge community priorities. So please add 👍 to any issue or pull request you'd like to see worked on. Thanks.

Diagrams

While the primary documentation for Hashicat is intended to use official godocs formatting, I thought a few diagrams might help get some aspects across better and have been working on a few. I'm not great at it but with mermaid I'm hoping to incrementally improve them over time. Please feel free to file issues/PRs against them if you have ideas. Thanks.

Overview

These are some general attempts to get an high level view of what's going on with mixed results. Might be useful...

This diagram is kind of "thing" (struct) oriented. Showing the main structs and the contact points between them.

graph TB
    Watcher((Watcher))
    View[View]
    Template[Template]
    TemplateFunction[Template Function]
    Tracker[Tracker]
    Resolver[Resolver]
    Event[Event Notifier]
    Dependency[Dependency]
    Consul{Consul}
    Vault{Vault}

    Watcher --&gt; Template
    Watcher --&gt; Resolver
    Resolver --&gt; Template
    Template --&gt; TemplateFunction
    TemplateFunction --&gt; Dependency
    Template --&gt; Watcher
    Watcher --&gt; View
    View --&gt; Dependency
    Watcher --&gt; Event
    Watcher --&gt; Tracker
    Tracker --&gt; View
    Dependency --&gt; Vault
    Dependency --&gt; Consul

This diagram was another attempt at the above but including more information on what the contact points are and the general flow of things. In it the squares are structs and the ovals are calls/things-happening.

flowchart TB
    NW([NewWatcher])
    W[Watcher]
    T[Templates]
    R([Register])
    TN[TrackedNotifers]
    TE([TemplatesEvaluated])
    TF[TemplateFunctions]
    D[Dependencies]
    Rc([Recaller])
    TD[TrackedDependencies]
    V[View]

    NW --&gt; W
    T --&gt; R --&gt; W --&gt; TN
    W --&gt; TE --&gt; TF
    TF --&gt; D--&gt; Rc
    D --&gt; TD
    W --&gt; Rc
    Rc --&gt; V
    V --&gt; W
    TD --- TN

Channels

This shows the main internal channels.

flowchart TB
    W[Watcher]
    V[View]
    Ti[Timer]

    V -. err-from-dependencies .-&gt; W
    V -.data-from-dependencies.-&gt; W
    Ti -.buffer-period.-&gt; W
    W -.internal-stop.-&gt; W

States

I thought a state diagram was a good idea until I realized there just aren't that many states.

stateDiagram-v2
    [*] --&gt; Initialized
    Initialized --&gt; NotifiersTracked: templates registered
    NotifiersTracked --&gt; ResovingDependencies: templates run
    ResovingDependencies --&gt; ResovingDependencies: templates run
    ResovingDependencies --&gt; Watching: steady state achieved
    Watching --&gt; ResovingDependencies: data updates
    Watching --&gt; [*]: stop

Template.Execute() Flow

This is probably one of the more useful diagrams, dipicting the call flow of a Template execution. Note that "Dirty" is a term I swiped from filesystems, it denotes that some data that the template uses has been changed.

flowchart TB
    Start --&gt; Execute
    Execute --&gt; D{Dirty?}
    D --&gt;|no| Rc[Return Cache]
    D --&gt;|yes| TE[Template Exec]
    TE --&gt; TF[Template Functions]
    TF --&gt; R[Recaller]
    R --&gt; Tr[Tracker]
    R --&gt; Ca{Cache?}
    Ca --&gt;|hit|Rd[Return Data]
    Ca --&gt;|miss| Poll
    Poll --&gt; Dep[Dependency]
    Dep --&gt; Cl((Cloud))
    Cl --&gt; Dep
    Dep --&gt; Poll
    Poll --&gt; Ca

Watcher.Wait() Flow

Similar to the above.. What happens when you call watcher.Wait()?

flowchart TB
    Start --&gt; Wait
    Wait --&gt; S{Select?}
    S --&gt;|dataChan| NewData
    S --&gt;|bufferTimer| Return
    S --&gt;|stopChan| Return
    S --&gt;|errChan| Return
    S --&gt;|context.Done| Return
    NewData --&gt; SC[Save To Cache]
    NewData --&gt; N{Notifier approved?}
    N --&gt;|yes| B{Buffering?}
    B --&gt;|yes| S
    B --&gt;|no| Return
    N --&gt;|no| Return
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].