Chef-Cookbooks | Chef recipes with rbenv and Passenger Nginx | Runtime Evironment library
kandi X-RAY | Chef-Cookbooks Summary
kandi X-RAY | Chef-Cookbooks Summary
Chef recipes with rbenv and Passenger Nginx
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Chef-Cookbooks
Chef-Cookbooks Key Features
Chef-Cookbooks Examples and Code Snippets
Community Discussions
Trending Discussions on Chef-Cookbooks
QUESTION
I'm attempting to create a Chef cookbook that, for now, is mostly just a wrapper cookbook for another cookbook (the audit cookbook). I'm still learning Chef, but from what I can gather from the About Recipes documentation and the Resources Reference documentation, Chef recipes should execute in the order that they're defined (via Ruby code and/or Chef resources).
In the About Recipes documentation, it mentions that
When a recipe is included, the resources found in that recipe will be inserted (in the same exact order) at the point where the include_recipe keyword is located.
In the Resources Reference documentation, they have an apt_update resource that presumably executes before the include_recipe method due to the fact that it's defined earlier in the recipe.
My wrapper cookbook has a single recipe, default.rb, which is literally these two lines:
...ANSWER
Answered 2019-Oct-10 at 04:54if you would examine the audit::inspec
rescipe, you will find that it uses a compile time installation of the inspec rubygem (see the last line)
QUESTION
I wanted to ask what the best practice, and what is commonly done for testing and developing changes to cookbooks,environments,nodes, essentially the chef repo. Reason I ask this, is the current setup has one chef server. All environments (staging, beta, prod) use this server and have all the relevant info pulled from here.
However, when I want to make a change to a cookbook and test it on one of our staging environments...it pulls from this repo and I either have to make a mess of configuration changes or...upload a cookbook with a different name, test, and then proceed to rename my cookbook back to the original name. Far from efficient, and frustrating even.
I thought maybe I could have different git branches and somehow point them in different directions but it would still be pulling from the same repo I imagine..
My thought then was to simply have an entirely separate chef server dedicated for developing and testing, and point my staging environments to that chef server.
Not sure if there was another more simple way I was missing, thus why I'm asking the community.
This may seem related to another question I asked, but I hope the difference between these two questions is clear (How to update chef cookbooks in a developer workflow)
...ANSWER
Answered 2017-Jul-17 at 15:17Chef has the notion of different environments: https://docs.chef.io/environments.html
You can have prod and staging environment files which have all relevant cookbooks pinned to a stable version.
Then when you make a change to your cookbook you should bump the version number and update the staging environment with the new version so you can test the changes there. I.e.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Chef-Cookbooks
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page