chef-zero | memory Chef server for testing and solo purposes | Configuration Management library
kandi X-RAY | chef-zero Summary
kandi X-RAY | chef-zero Summary
Chef Zero is a simple, easy-install, in-memory Chef server that can be useful for Chef Client testing and chef-solo-like tasks that require a full Chef Server. It IS intended to be simple, Chef 11+ compliant, easy to run and fast to start. It is NOT intended to be secure, scalable, performant or persistent. It does NO input validation, authentication or authorization (it will not throw a 400, 401 or 403). It does not save data, and will start up empty each time you start it. Because Chef Zero runs in memory, it's super fast and lightweight. This makes it perfect for testing against a "real" Chef Server without mocking the entire Internet.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Loads data for the user
- Creates a new instance
- Defines a chef server
- Create a request object .
- Starts a running process .
- Starts the server .
- Perform HTTP request
- Log request
- Check the api version number
- Get the data store
chef-zero Key Features
chef-zero Examples and Code Snippets
Community Discussions
Trending Discussions on chef-zero
QUESTION
Having a working gitlab instance on an Ubuntu 18.04 server for abouth 2 months, it now refuse to swpan due to the following 2 errors in /var/log/nginx/error.log
...ANSWER
Answered 2020-May-14 at 12:23This is almost certainly a permissions error.
Make sure that whatever file is readable: chmod a+r /opt/gitlab/embedded/service/gitlab-rails/config/database.yml
(according to the comments you already did this) AND
Make sure that all the directories are executable, which for directories allows cd'ing into that directory:
QUESTION
I am trying to understand how to correctly work with environment attributes in recipes. Note: I understand that my approach may not be Chef's best practices; however, my goal is to understand data flow here, not to necessarily use my approach in a production application.
Some details:
- I am using Vagrant and Chef -- specifically, the
chef-zero
provisioner (Thus I must use ruby files for my environments rather than JSON due to a chef-vagrant limitation). - Here is my directory structure:
ANSWER
Answered 2020-Feb-07 at 22:03You are doing everything right and your expectations are correct. The only thing, you are missing, is that you do not assign the environment to the vm. For that you need to add a line in your Vagrantfile
:
QUESTION
- I am using Vagrant and chef-zero; chef server is not part of my equation
- I have two roles:
base
andinfrastructure
, and two cookbooks:apt
andphp
. The purpose of thebase
role is to do some basic provisioning and package management and to clone a repository from github, etc. Theapt
cookbook has a recipe,update_upgrade.rb
which runs anexecute
resource to effectively callapt update
,apt upgrade
,apt-get autoremove
and so forth - The
infrastructure
role sets up PHP via thephp
cookbook. It'll include more later, but it serves as a good example of the need I have. - The
php
cookbook has two recipes:add_repository.rb
andinstall.rb
. Theadd_repository
recipe runs anexecute
resource to add theondrej/php
repository toapt
. Theinstall
recipe iterates over a list of packages in order to install php from the added repository. This is where the need for the utility comes into play.
The crux is, I need to run apt update
after I add the PHP repo and before I install its packages. What's the best way to achieve this?
Initially, I had my add_repository
and install
resources combined into a single install
recipe and had planned to use include_recipe apt::update_upgrade
to insert my apt
cookbook's execute
resource into that recipe. However, after scouring the chef docs, and this handy article: Should I use include_recipe or add the recipe to run_list?, it seems that include_recipe
doesn't run immediately where it's placed. The suggestion in said article was to use a run list to dictate precise execution of recipes, and the chef docs do suggest that the recipes execute in the order they are listed.
This led me to break up the php resources into add_repository
and install
and to use the following role run list for infrastructure
:
ANSWER
Answered 2020-Jan-03 at 05:16the best practice is to use the appropriate chef resource in conjunction with notification.
since you are using apt
, use the appropriate apt
resources, such as apt_update
(to make sure apt repositories are up to date), apt_package
(to manipulate packages using apt, apt_repository
(to add apt respository) and try to avoid using execute
resource to do all of that - this will take advantage of chef idompotance (you might like reading Thinking Like a Chef)
each chef resource, can notify and\or subscribe to notifications. but you might not need to use it if you write the resources in order.
if you these advises won't lead you the right way, please post a relevant snippet where you have an issue and i will try to help you farther.
UPDATE
since apt suffers from many failures during update, i would give it few retries and also a periodic update.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install chef-zero
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