All Projects → Verizon → Helm

Verizon / Helm

Licence: apache-2.0
A native Scala client for interacting with Consul

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Helm

Consul
Consul - Open Government and E-Participation Web Software
Stars: ✭ 1,088 (+1331.58%)
Mutual labels:  consul
Bookstoreapp Distributed Application
Ecommerce project is being developed using Spring Boot Microservices and Spring Cloud (Backend) and React (Frontend). Splitting the Ecommerce functionality into various individual microservices so that they can be distributed, scale really well and make use of resources efficiently.
Stars: ✭ 63 (-17.11%)
Mutual labels:  consul
Awesome System For Machine Learning
A curated list of research in machine learning system. I also summarize some papers if I think they are really interesting.
Stars: ✭ 1,185 (+1459.21%)
Mutual labels:  infrastructure
Consul With Docker
The environment of Consul with Docker include Consul Template and Registrator
Stars: ✭ 59 (-22.37%)
Mutual labels:  consul
Hashi Ui
A modern user interface for @hashicorp Consul & Nomad
Stars: ✭ 1,119 (+1372.37%)
Mutual labels:  consul
Pyats
Cisco DevNet pyATS Test Framework Bug Tracker
Stars: ✭ 66 (-13.16%)
Mutual labels:  infrastructure
Pocket Core
Official implementation of the Pocket Network Protocol
Stars: ✭ 50 (-34.21%)
Mutual labels:  infrastructure
Odin
ᚩ A DSL for describing and solving differential equations in R
Stars: ✭ 74 (-2.63%)
Mutual labels:  infrastructure
Terraform Modules
Reusable Terraform modules
Stars: ✭ 63 (-17.11%)
Mutual labels:  consul
Kardia
A humane service status API module to expose any operational/internals of any Node.js based microservice. JSON format over HTTP protocol.
Stars: ✭ 70 (-7.89%)
Mutual labels:  consul
Docker Vault
Docker Container for Hashicorp's Vault
Stars: ✭ 60 (-21.05%)
Mutual labels:  consul
Envoy
a gentle touch of Clojure to Hashicorp's Consul
Stars: ✭ 62 (-18.42%)
Mutual labels:  consul
Sceptre
Build better AWS infrastructure
Stars: ✭ 1,160 (+1426.32%)
Mutual labels:  infrastructure
Aspnetcore.services
Examples for ASP.NET Core webservices
Stars: ✭ 59 (-22.37%)
Mutual labels:  consul
Cintodeutilidadesdocker
My Docker templates repository 🐳 ☁️ 🐳
Stars: ✭ 74 (-2.63%)
Mutual labels:  infrastructure
Containerpilot
A service for autodiscovery and configuration of applications running in containers
Stars: ✭ 1,078 (+1318.42%)
Mutual labels:  consul
Envoy Control
Envoy Control is a platform-agnostic, production-ready Control Plane for Service Mesh based on Envoy Proxy.
Stars: ✭ 66 (-13.16%)
Mutual labels:  consul
Vip Manager
Manages a virtual IP based on state kept in etcd or Consul
Stars: ✭ 75 (-1.32%)
Mutual labels:  consul
Amp
** THIS PROJECT IS STOPPED ** An open source CaaS for Docker, batteries included.
Stars: ✭ 74 (-2.63%)
Mutual labels:  infrastructure
Pyinfra
pyinfra automates infrastructure super fast at massive scale. It can be used for ad-hoc command execution, service deployment, configuration management and more.
Stars: ✭ 1,168 (+1436.84%)
Mutual labels:  infrastructure

Helm

Logo

Build Status Maven Central codecov

A native Scala client for interacting with Consul. There is currently one supported client, which uses http4s to make HTTP calls to Consul. Alternative implementations could be added with relative ease by providing an additional free interpreter for the ConsulOp algebra.

Getting Started

Add the following to your build.sbt:

libraryDependencies += "io.verizon.helm" %% "http4s" % "1.4.78-scalaz-7.1"

The Helm binaries are located on maven central, so no additional resolvers are needed.

Algebra

Consul operations are specified by the ConsulOp algebra. Two examples are get and set:

import helm._
import ConsulOp.ConsulOpF

val s: ConsulOpF[Unit] = : ConsulOp.kvSet("key", "value")

val g: ConsulOpF[Option[String]] = : ConsulOp.kvGet("key")

These are however just descriptions of what operations the program might perform in the future, just creating these operations does not actually execute the operations. In order to perform the gets and sets, we need to use the http4s interpreter.

The http4s interpreter

First we create an interpreter, which requires an http4s client and a base url for consul:

import cats.effect.IO
import helm.http4s._
import org.http4s.Uri.uri
import org.http4s.client.blaze.Http1Client

val client = Http1Client[IO]().unsafeRunSync
val baseUrl = uri("http://127.0.0.1:8500")

val interpreter = new Http4sConsulClient(baseUrl, client)

Now we can apply commands to our http4s client to get back IOs which actually interact with consul.

import cats.effect.IO

val s: IO[Unit] = helm.run(interpreter, ConsulOp.kvSet("testkey", "testvalue"))

val g: IO[Option[String]] = helm.run(interpreter, ConsulOp.kvGet("testkey"))

// actually execute the calls
s.unsafeRunSync
g.unsafeRunSync

Typically, the Helm algebra would be a part of a Coproduct with other algebras in a larger program, so running the IO immediately after helm.run is not typical.

Contributing

Contributions are welcome; particularly to expand the algebra with additional operations that are supported by Consul but not yet supported by Helm.

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].