Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#86 install cfn_nag using brew on Mac and Linux #267

Merged
4 commits merged into from
Aug 11, 2019
Merged

#86 install cfn_nag using brew on Mac and Linux #267

4 commits merged into from
Aug 11, 2019

Conversation

twellspring
Copy link
Contributor

@twellspring twellspring commented Jul 25, 2019

Closes #86

Update Readme to include brew gem installation method.

@erickascic The brew tap solution would require homebrew-tap/Formula/cfn-nag.rb to be updated any time a dependency of cfn-nag.gemspec gets updated. We could make a script that reads cfn-nag.gemspec and then writes a new homebrew-tap/Formula/cfn-nag.rb but that means having to handle the ~> and seems messy and prone to errors. The brew-gem does not ensure ruby is installed, but that is easy enough to add to the install instructions:

brew install ruby brew-gem
brew gem install cfn-nag

This appears to be the simplest from a maintenance standpoint and it is two commands just like the tap version would be, so the complexity for users is basically the same.

@twellspring
Copy link
Contributor Author

twellspring commented Jul 29, 2019

Hold on this PR. I totally removed cfn_nag (and all dependencies) and brew from my system and re-installed brew, then tried to install cfn_nag via brew and it did not work.

So I need to research what is going on

@Mr-Lizard
Copy link
Contributor

Are you by any chance using rbenv ? I'm noticing that it doesn't seem to play well with brew.

@twellspring twellspring reopened this Jul 29, 2019
@twellspring
Copy link
Contributor Author

twellspring commented Jul 29, 2019

@Mr-Lizard yes I use rbenv

I just created a clean MacOS on Virtualbox and the install worked fine.

The issue we have now is setting up automation to update the brew definition every time cfn_nag is updated. An alternative I am ran across and am looking at is https://github.com/sportngin/brew-gem

With that the install of cnf_nag would be

# brew install brew-gem
# brew gem install cfn_nag

And then no automation is needed to keep the homebrew-tap definition up to date

@Mr-Lizard
Copy link
Contributor

Well that would totally undo all my work on the formula in question. But...who cares ? It would work beautifully and be trouble free!

@twellspring twellspring requested a review from a user August 1, 2019 23:44
@twellspring
Copy link
Contributor Author

@Mr-Lizard Thanks for your understanding on this. The more I dug in to automation of the updating of the homebrew-tap definition and having to hard code in the exact versions of every dependency, the less I liked the solution. I played with parsing the cfn_nag gemspec file and building the homebrew-tap based on the dependencies listed in the gemspec. But that seems messy and error prone.

@twellspring
Copy link
Contributor Author

Once this is merged, I will PR the removal of the tap definition.

@Mr-Lizard
Copy link
Contributor

@twellspring , No problem. It is very decent of you to give me credit for this PR, thank you. Have you evaluated the 'brew gem' method anymore ?

@twellspring
Copy link
Contributor Author

@Mr-Lizard Yes, I updated this PR to use the 'brew gem' method. Just waiting for it to be approved.

@ghost ghost merged commit e8d3ae8 into master Aug 11, 2019
leppikallio pushed a commit to leppikallio/cfn_nag that referenced this pull request Aug 28, 2019
…#267)

* stelligent#86 install cfn_nag using brew on Mac and Linux

* Add bash to brew install README code

* stelligent#86 Add brew installation instructions to readme

* Update deploy_local script to uninstall brew gem
@ghost ghost deleted the feature/86 branch January 6, 2020 21:59
arothian pushed a commit to stelligent/homebrew-tap that referenced this pull request Apr 14, 2021
As discussed in stelligent/cfn_nag#267, cfn_nag uses `brew-gem` for handling install via homebrew, and this formula is not used in the cfn_nag documentation.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to install through homebrew
3 participants