Live data from Hacker News

Habitat — A new approach to automation

habitat.sh

41–50 of 57 posts

Re: Habitat — A new approach to automation

#41

I've been waiting for this announcement for a few weeks. Since the home page is quite lean on an actual explanation, let me give a rough summary of interesting points as i understand it. I apologize in advance if I have anything wrong. 1. It is a from-scratch source build system written in rust that borrows a huge amount from nix. This means repeatable software builds with isolated dependencies. 2. It attempts to mov…

>1. It is a from-scratch source build system written in rust that borrows a huge amount from nix. This means repeatable software builds with isolated dependencies. Except the builds aren't at all repeatable in a meaningful way, judging by the example code on the home page. The 'do_build' function runs 'npm install'. This means that 1) the build container has network access (i.e. it's nondeterministic by definition) a…

You always have the option of running a local npm cache/registry. We do for npm and artifactory.

Not exactly the same as vendoring dependencies, but it's a decent compromise in some situations.

Re: Habitat — A new approach to automation

#42
post #40
post #16

Earlier quoted context omitted.

The main points around automation seem to be[1]: * Flexible versioning and configuration rollout * Ability to deploy anywhere * Ease of management Concretely, they're touting their gossip-based configuration and topology management layer as a way to send configuration updates to service groups, and then letting the service groups apply the changes to all the group members. Contrast this with a more traditional way of…

So but am I automating devices in my home/building IoT-style? Or am I automating deployments of software? Or hardware? "gossip-based configuration and topology management" means nothing to me unless I know actually what the overall context is here.

From what I'm reading, I believe this is primarily geared towards trying to automate software deployments.

Re: Habitat — A new approach to automation

#43
post #31

Earlier quoted context omitted.

They used npm install in their example code? Well that was a poor choice. Having dealt with npm and node apps in my own build system, I have not found a good solution for deterministically building node apps. Does nix have a solution for this? Thankfully the prepackaged software with reasonable source build systems don't do craziness like this. See the redis package for example: https://app.habitat.sh/#/pkgs/adam/red…

The nix solution is npm2nix, which runs npm against a package.json file and generates a nix expression for all the npm modules you need. This mostly works, but occasionally you need to override the generated derivations to add implicit dependencies that npm doesn't capture, or otherwise tweak packages that rely on quirks of npm.

So basically it "does not work"...

Re: Habitat — A new approach to automation

#44
post #19

Ah, another limiting abstraction layer to learn and to fight. Bash is plenty good.

But all of the package recipes are just Bash scripts, which I think is just terrible, btw. Using a real programming language would have been a much better choice.

> Using a real programming language would have been a much better choice.

The problem is that everyone disagrees on what a tolerable real programming language is. Some refuse to use Python; others Ruby; others Scheme; others Lisp.

At least every can tolerate shell more or less.

Re: Habitat — A new approach to automation

#45

I love the Chef ppl, but... Is it just me or are there a ton of other folks doing this? The idea of introducing yet another layer of stuff is scary, and there's lots of work left to do on Chef. In a lot of ways, they feel just like Nomad (coincidentally also on the front page)... I wish they would spend some time on their core products versus expanding into an overfilled market.

That's what I thought, too. Chef (software/ecosystem) needs a bit more love IMHO.

However it shows that Chef (Company) is still able to design, build and ship a new product, as an organization. That's a very positive sign. Until recently I thought when comparing Chef with Hashicorp: Hashicorp is so much faster in building and releasing usable stuff but they seem to feel the pain in growing too fast and too broad in terms of products.

So, in the end: It's a great thing, just also don't forget to put more love into Chef (software) and don't dissipate developers/time/budget :)

Re: Habitat — A new approach to automation

#46
post #27

Found this elsewhere, interesting to note, Habitat looks to be built mostly with Rust https://github.com/habitat-sh/habitat

This is Adam - Rust has been amazing to work with, and was the prefect choice for this platform. It's great.

Could you elaborate a bit more on why you chose Rust, and why you think it was the right choice for this project?

Re: Habitat — A new approach to automation

#47
post #16
post #11

I'm not sure what I'm looking at. What is being "automated" here? The headline and home page don't give much context.

The main points around automation seem to be[1]: * Flexible versioning and configuration rollout * Ability to deploy anywhere * Ease of management Concretely, they're touting their gossip-based configuration and topology management layer as a way to send configuration updates to service groups, and then letting the service groups apply the changes to all the group members. Contrast this with a more traditional way of…

The two-word answer seems to be "software builds".

I am always amazed at people's capability to give an extremely complicated answer to an extremely simple question. "What is being automated here?" "Software builds."

Re: Habitat — A new approach to automation

#48
post #43
post #31

Earlier quoted context omitted.

The nix solution is npm2nix, which runs npm against a package.json file and generates a nix expression for all the npm modules you need. This mostly works, but occasionally you need to override the generated derivations to add implicit dependencies that npm doesn't capture, or otherwise tweak packages that rely on quirks of npm.

So basically it "does not work"...

Well, let's be clear, if it doesn't work, you know at compile time, not at runtime. I don't care how broken things are at compile time if I'm guaranteed that everything will work at runtime. That's kind of the whole point of nix. It's not impossible to write code with errors, but you should not be able to build as long as the errors exist.

Re: Habitat — A new approach to automation

#49
post #46
post #27

Earlier quoted context omitted.

This is Adam - Rust has been amazing to work with, and was the prefect choice for this platform. It's great.

Could you elaborate a bit more on why you chose Rust, and why you think it was the right choice for this project?

On the heels of this, I've been exploring Rust a bit lately but haven't been able to find any solid patterns / style guides for idiomatic Rust. Do any such resources exist? For example, the official rust book describes Arc, Mutex, etc but.. Are there more of these in the standard library? What purpose do they serve? What are some good idioms to apply when using them? I can surely make them work, but maybe I should be using some other thing?
Post reply on HN