Instrumental / instrumentald

Instrumental System and Service Daemon
MIT License
14 stars 3 forks source link

Add a homebrew formula to make installing instrumentald on macOS easier #44

Closed tonydewan closed 8 years ago

tonydewan commented 8 years ago

This formula uses the OSX tarball generated by fpm and assumes it's uploaded to GitHub as a release.

Our users will run the following to install instrumentald via homebrew:

brew install instrumental/instrumentald/instrumentald

This PR does not include changes to our build scripts that update the formula details (version, url, hash). Put another way: this formula will need to be manually updated when releases happen. given that it relies on on GitHub releases which is not currently automated, and given that this formula will be used from master whenever invoked by a user, it seemed prudent to not automate it until we automate GitHub releases.

If you'd like to test this locally, you can do what I did:

brew update &&  ln -s ~/YOUR_PROJECTS_DIR/instrumentald/HomebrewFormula/instrumentald.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/formula/instrumentald.rb

brew install instrumentald
janxious commented 8 years ago
/usr/local/Homebrew/

is non-standard, I think

janxious commented 8 years ago

The link the post-install points you to (https://instrumentalapp.com/docs/isd/getting-started) is not live yet (probably known). It would be good if the post install message told you what to do to get a key and where to put it. For example, where is the toml file?

janxious commented 8 years ago

This worked as expected. I have a couple suggestions, but this is probably shippable now. 💯

tonydewan commented 8 years ago

/usr/local/Homebrew/ is non-standard, I think

It wasn't, but when I started this an automatic brew update changed things up on me.

tonydewan commented 8 years ago

The link the post-install points you to (https://instrumentalapp.com/docs/isd/getting-started) is not live yet (probably known). It would be good if the post install message told you what to do to get a key and where to put it. For example, where is the toml file?

It is known. It exists in the isd-documentation branch on the web repo. My intention is for that page to have all the answers. Do you have wording suggestions for the post-install message to make that more clear?

For example, where is the toml file?

This formula explicitly doesn't put the toml file in place. This is because:

  1. It seems like it's not kosher to write directly to /etc/ in a Homebrew formula?
  2. The Homebrew formula is meant for kicking the tires, and so it seemed wrong to put the config there. You probably want to make that file and put it somewhere relevant to your project. Maybe I'm wrong?
janxious commented 8 years ago

Do you have wording suggestions for the post-install message to make that more clear?

Maybe something like:

instrumentald is ready to go! Learn about configuration and metric collection at: https://instrumentalapp.com/docs/isd/getting-started

Which is to say, we can probably output some colors/boldness on the link.


It seems like it's not kosher to write directly to /etc/ in a Homebrew formula

Homebrew formulae and other osx installers typically handle this by using /usr/local/etc/. We may not want to go so deep.

tonydewan commented 8 years ago

Homebrew formulae and other osx installers typically handle this by using /usr/local/etc/. We may not want to go so deep.

That was my thinking. I don't feel super strongly, though.

janxious commented 8 years ago

That was my thinking. I don't feel super strongly, though.

So, the question is: how does one get the config. Is it just going to be inlined in the getting started stuff? If so, given we tell them about -c option, I am 💯 on board.

tonydewan commented 8 years ago

This formula was moved to https://github.com/Instrumental/homebrew-instrumentald so that the desired installation command (brew install instrumental/instrumentald/instrumentald) would work as expected.