Notes taken while going through tutorial


Don’t make me move the hab command manually when I install it.

As I went through the tutorial, I realized that a prerequisite is a decent internet connection. Without a good internet connection habitat is essentially unusable.

Ran into docker problems:

~/d/habitat-sh/habitat-example-plans/mytutorialapp [branch:master] hab studio enter
/usr/local/bin/docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.
See '/usr/local/bin/docker run --help'.

Unfortunately the help command did nothing to help in this case and I had to dig around in Google.

Finally found

The first time I ran I had to run this:

docker-machine create --driver virtualbox default

The following must be run in the same shell where hab studio enter is run (thus I imagine this must be added to my bash profile or something similar:

eval $(docker-machine env default)

Tutorial indicates "Make sure Docker for Mac is running” - not enough.

By requiring docker, you inherit all of their problems.

When I built my artifact the first time I had vim running and it had not clean up temp files, resulting in the following when I attempted to run my built package:

~/d/habitat-sh/habitat-example-plans/mytutorialapp [branch:master] docker run -it -p 8080:8080 aeden/mytutorialapp
hab-sup(MN): Starting aeden/mytutorialapp
hab-sup(TP): Child process will run as user=hab, group=hab
hab-sup(GS): Supervisor c1a9cb43-a76e-4380-9d29-01eb8646aead
hab-sup(GS): Census mytutorialapp.default: 4fa6e29c-6004-4a73-8745-acec9d868223
hab-sup(GS): Starting inbound gossip listener
hab-sup(GS): Starting outbound gossip distributor
hab-sup(GS): Starting gossip failure detector
hab-sup(CN): Starting census health adjuster
hab-sup(SC): Error parsing config template file /hab/pkgs/aeden/mytutorialapp/0.2.0/20161015052224/config/.config.json.swp: IOError
hab-sup(SC)[src/]: IOError(Error { repr: Custom(Custom { kind: InvalidData, error: StringError("stream did not contain valid UTF-8") }) })

I had to make sure temp files were cleaned up before running build in the studio.

Studio loses history (i.e. I can’t up-arrow to get commands I previously ran). It’s a shell but doesn’t act like one.

Downloading resources every time sucks. Cache those things.

Tutorial indicates I should be able to connect to localhost:8080 with a browser, however this does not work. I had to figure out what IP address the docker container was actually accessible on.

~/d/habitat-sh/habitat-example-plans/mytutorialapp/habitat/config [branch:master] docker ps
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                              NAMES
548835d6c57a        aeden/mytutorialapp   "/ start aeden"   3 minutes ago       Up 3 minutes>8080/tcp, 9631/tcp   mad_ritchie
~/d/habitat-sh/habitat-example-plans/mytutorialapp/habitat/config [branch:master] docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER    ERRORS
default   *        virtualbox   Running   tcp://           v1.12.2

I can connect to

Anyhow, those are notes I took while running the tutorial.


Definitely useful information for us and greatly appreciated @aeden.

A couple of the things you mentioned here appear to already have related issues open in GitHub but one of the things you said that is pretty interesting to me is that by binding the tutorial to docker we inherit their problems. I feel that pain, its a real and unfortunately side-effect of not being able to run habitat natively on macOS.

Regardless, I want to make sure this gets sucked into the appropriate feedback loops on our side. Thank you so much for taking the time to type up all of your notes and thoughts on this I’m positive we can use them to polish the new user experience.