Git Product home page Git Product logo

heru's Introduction

What is it?

Heru, in its heart, is a DSL to describe the state of a UNIX system. You specify which files, user accounts, groups etc. should exist. If the system does not match the desired state, heru takes actions to correct that.

In that regard it's very similar to puppet. In fact, much of heru was directly inspired by puppet. However, there are significant differences. The most important is that heru aims to be standalone. The goal is to not have any external dependencies. Just drop it into a folder and you're ready to go. Also, heru does not provide you with any infrastructure. You are expected to use whatever tools you are already using to distribute the configuration files. These two things together make heru very small, lightweight and hopefully easier to configure.

How does it work?

First you have to describe your hosts (nodes). Each node has its own file, and contains the network configuration and manifests which should be applied to it. A manifest is a collection of one or more resources which should be present.

Let's take a closer look. A node description might look something like this:

exports.manifests = [
  'sshd', 'mysql'
]

The sshd manifest might describe that the file /etc/ssh/sshd_config needs to exist, have certain permissions and contents:

{ Manifest, Action } = require 'heru'
class module.exports extends Manifest

  'path:/etc/ssh/sshd_config': ->
    type: 'file', mode: 0644, user: 'root', group: 'root', action: ->
      Action.Render 'sshd_config'

If the file does not exist, heru will create it. The Render action takes the sshd_config template file and writes it to its correct location. There are other actions which you can use, and there are also cases where you don't have to specify an action.

If the syntax seems familiar to you, it's maybe because heru and all its configuration files are written in Coffee-Script.

How do I install it?

I recommend that you install heru into your /root/.heru folder, with the following structure:

runtime/  - The heru runtime (clone this repo here)
library/  - Library with your manifests
nodes/    - Node descriptions

Then you need to install Node.js and Coffee-Script. Node.js is fairly easy to compile (./configure --without-ssl && make). You can clone Coffee-Script into a directory and then add its bin/ folder to your path. In due time there will be a fully automated install script.

I like it, how do I help you?

This project has its home on GitHub. You can create tickets, fork the project and send me pull requests.

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.