Questions tagged [chef]

Chef is an open source configuration management framework for infrastructure automation.

Filter by
Sorted by
Tagged with
0 votes
1 answer
42 views

rb_sys_fail_path_in(rb_file_s_rename, (filepath1, filepath2)- errno == 0 error when running a newly installed version of chef

I have 1 box that seems to not want to run chef, while I have 5 other identical boxes that are working just fine using the same rhel and chef versions. On the non-working box, Chef runs correctly when ...
Alexander Brehm's user avatar
0 votes
0 answers
88 views

Alternatives to ansible-pull

I have a number of systems that need configuration/updates, while being offline for long periods of time. They therefore need to contact a configuration system on boot, and in regular intervals and ...
relet's user avatar
  • 101
3 votes
1 answer
139 views

What are the commands for restarting a service after a file is changed in Chef?

I am unable to figure out the correct solution in that if only when a file is updated, i.e. a conf file of a service, then the service is restarted (stopped and then started). This is what I have in ...
runningraptor's user avatar
0 votes
0 answers
25 views

Chef in "reverse mode" : keep track of node config changes, create versions, git-like

I'd like to know if there is any way to make chef work in "reverse mode", to keep track of configuration changes made in selected nodes, and create a version of the changes detected in chef ...
Mauricio Silveira's user avatar
0 votes
0 answers
68 views

Apache service start wont start again from chef recipe on Linux Red Hat

I have a customer who has 500 web sites on the server Linux Red Hat Centos, and I am trying to automate it with Chef. Sometimes when he wants to deploy configurations on the server Apache wont start ...
n3x's user avatar
  • 1
1 vote
0 answers
63 views

Is there a way to pass a role json file to the chef-run utility in chef-workstation?

The chef-run executable provided in chef workstation allows you to run adhoc configuration tasks. The documentation also states that you can run commands, recipes and even cookbooks on remote machines ...
Anand's user avatar
  • 11
2 votes
1 answer
45 views

How can chef run a command as a username?

In a Linux system, it is feasible to do sudo systemctl start my_server sudo -u ubuntu command ... so that the command is run as the username ('ubuntu' in this case). However, and when I run chef with ...
afernandez's user avatar
0 votes
2 answers
102 views

Using Configuration management tools to synchronize large files

We are looking into using a configuration mangement tool (like Salt or Puppet) to automate what is currently a lot of manual work. One requirement is that we have to distribute rather large files / ...
Leifb's user avatar
  • 115
0 votes
1 answer
56 views

Which server configuration management tool to use for my personal nextcloud deployment [closed]

I want to deploy a personal nextcloud application. I already have setup nextcloud using docker-compose, which tool should I use for server configuration management? I have the following things to ...
Shaz Hemani's user avatar
3 votes
2 answers
1k views

How to add a windows node for chef

I have 3 servers Following this guide for the chefmaster and chefworkstation https://www.itzgeek.com/how-tos/linux/centos-how-tos/setup-chef-12-centos-7-rhel-7.html chefmaster 192.168.1.200 ...
James Connigan's user avatar
1 vote
0 answers
245 views

How to upgrade Ruby Bundle version in AWS Opsworks

I have a project running on AWS Opsworks, which has current bundler version of 1.5.3 on Ruby 2.2.2. i want to upgrade the bundle version to 1.17.3 but when i try to do it i am getting this error ...
Nijeesh Joshy's user avatar
0 votes
1 answer
267 views

chef generate cookbook asking yes or no repeatedly

I'm trying to create a chef cookbook using the following command: chef generate cookbook cookbooks/create_files on the following versions of chef Chef Workstation version: 0.10.41 Chef Infra Client ...
RedXIV's user avatar
  • 3
0 votes
1 answer
911 views

chef: The authenticity of host 'x.x.x.x' can't be established

I'm running knife bootstrap command I'm getting following error Connecting to x.x.x.x WARN: [SSH] PTY requested: stderr will be merged into stdout The authenticity of host 'x.x.x.x ()' can't be ...
Jack's user avatar
  • 171
0 votes
1 answer
266 views

Chef: Kitchen Converge fails on Windows 10 Guest using Vagrant FileTransporter Error

As described in the bug I created here: https://github.com/test-kitchen/kitchen-vagrant/issues/407 When I perform a kitchen converge on a freshly created Windows 10 box, it connects and begins ...
Brandon Hawbaker's user avatar
1 vote
0 answers
882 views

Using Chef for setting Windows Active Directory GPO policies on domain controller

I am looking to use Chef to automate the setting of active directory controlled group policy settings (typically on the primary PDC per forest). I cant find any specific AD GPO functions, on the ...
morleyc's user avatar
  • 1,140
2 votes
1 answer
221 views

Chef Knife command - PowerShell "query session" failing with return code 1, although command is executed successfully

I am facing a peculiar problem in executing chef knife commands for PowerShell remotely. Command is executed successfully, however the return code is 1 with an error. > %CPath% && knife ...
goe's user avatar
  • 141
2 votes
1 answer
209 views

Is there such a Chef service that managed by K8s? [closed]

I'm looking for a way to manage a Chef into my K8s cluster. My cluster is scaling up and down and I need a way to bootstrap different dependencies for each new node in the namespace. My nodes are in ...
Lidor Ettinger's user avatar
0 votes
1 answer
41 views

How do I specify a Chef attribute that applies to a cluster?

Chef has a concept of environment attributes that applies to all hosts within an environment. It also has a concept of attributes that are specific to a single node. But is there a way to specify an ...
Jason Thompson's user avatar
3 votes
2 answers
265 views

AWS Opsworks Chef deployment using S3 Archive without making archive public

I'm trying to use the S3 Archive method to do a Chef deployment in Opsworks. I put the Chef archive in S3 and copied the address of https://s3.us-east-2.amazonaws.com/redacted/redacted.tar.gz. I gave ...
five_dollar_shake's user avatar
0 votes
1 answer
178 views

How to allow HTTP traffic using chef cookbook?

Previously, I have installed nginx using chef cookbook. Then I did research about firewall rules. For allowing HTTP traffic I have below script. firewall_rule 'http' do port 80 protocol :tcp ...
Janith's user avatar
  • 223
-1 votes
2 answers
570 views

Can we write a chef cookbook to enable epel repository on centos

I have configured 3 centos servers for chefworkstation, chefserver and chefclient. Now I want to install nginx using the cookbook. For that I have below script. package 'nginx' do action :install ...
Janith's user avatar
  • 223
0 votes
1 answer
79 views

Chef noop inside of shell command

I want to break out of chef if a bash command returns a certain value. execute 'noop' do command <<-EOH cmd_output=$(echo "test") if [ "$cmd_output" == "test" ]; then return ...
ClickThisNick's user avatar
3 votes
0 answers
291 views

Install Windows Service using chef and have it run using a Group Managed Service Account

I'm trying to setup a number of dev servers using Chef. I need a Windows Service to run as a managed service account. I have the following in a recipe: windows_service 'My Windows Service' do ...
Greg's user avatar
  • 463
0 votes
1 answer
216 views

How do I prevent chef from adding a random carriage return character to my text files?

I have a cookbook that delivers a number of bash shell scripts as cookbook_file resources. For some reason when I run chef-client, the bash shell scripts will suddenly gain a carriage return as the ...
Jason Thompson's user avatar
2 votes
1 answer
1k views

mkfs fails on ec2 t3.large instances

I would like to move to t3 instances from t2 instances on ec2 but my chef deployment script fails on t3 instances but works on t2 instances running under either ubuntu 16.04 or 18.04. I can create ...
BlueSkies's user avatar
5 votes
1 answer
143 views

What are the pros/cons of running Chef/Puppet at regular intervals?

I always worked where they used to run Puppet at regular intervals. So, distributing changes was easy and on the fly. In the new team, they frown upon running the Chef agent at regular intervals. They ...
deppfx's user avatar
  • 429
3 votes
2 answers
9k views

Getting "Couldn't connect to realm service" error while joining rhel7 instance to a domain

I am trying to join a rhel7 node to a domain using a chef cookbook but getting error: realm: Couldn't connect to realm service: Error calling StartServiceByName for org.freedesktop.realmd: GDBus....
Sameer T's user avatar
0 votes
1 answer
248 views

what is the proper way to force chef to execute a recipe?

I have a chef script which is doing directory '/home/ubuntu/s3' do action :create end execute 'copy from s3' do command "aws s3 cp s3://my-assets /home/ubuntu/s3/ --recursive" end ... I ...
patrick's user avatar
  • 153
1 vote
1 answer
251 views

Show when a Chef cookbook version changed on a node using knife

The infrastructure that I am working on uses Chef environments to manage the cookbook versions that are converged to nodes. While I can use knife to check what cookbook versions are available, and ...
Garreth McDaid's user avatar
0 votes
1 answer
673 views

Chef bootstrap error - 401 unauthorized

I am trying to set up a Chef node using Vagrant, but running in to an error with the bootstrap command. I am following the tutorial on learn.chef.io My Chef server is setup on EC2, and works great. I ...
ShivamD's user avatar
  • 101
0 votes
1 answer
51 views

chef-solo binary removed after chef upgrade, returns on reinstall

I'm setting up a server configuration for ubuntu trusty that must be compatible with our node configuration using chef-solo. This is in AWS EC2, and the base node is from the official ubuntu repo in ...
RogerFC's user avatar
  • 334
0 votes
1 answer
120 views

OpsWorks Chef 11.10 undefined method 'property'

Chef 11.10 ran fine until we resized an instance, now setup_failed on boot with log: NoMethodError ------------- undefined method `property' for #<Class:0x007f7c97afc100> Cookbook Trace: ------...
alyx's user avatar
  • 231
0 votes
1 answer
105 views

OpsWorks Chef error in dokku deploy

Everything worked fine until I resized one of our ec2 instances, now I'm getting this error in OpsWorks: Exception: Mixlib::ShellOut::ShellCommandFailed: ruby_block[git push --force dokku@localhost:...
alyx's user avatar
  • 231
1 vote
2 answers
906 views

chef: knife deps - how to specify a cookbook version

RE: https://docs.chef.io/knife_deps.html With the knife deps --remote option, I can query our chef server. knife cookbook list -a will return all the cookbook versions. How can I use knife deps to ...
Kevin Buchs's user avatar
0 votes
1 answer
121 views

Chef deploy not working on Ubuntu 14.04 looking for credentials

I am using Ubuntu 14.04 chef-solo stack but since today when I am running the deploy script its giving me below error. Please assist. ========== ubuntu@i-production-base:~$ sudo /var/chef/scripts/...
Chandan Singh's user avatar
0 votes
1 answer
6k views

cannot validate certificate for 10.90.239.223 because it doesn't contain any IP SANs

While configuring the chef provisioner I am running into the following error after running 'terraform apply' * chef_environment.terraform_01: Post https://10.90.239.223/organizations/mykitchen/...
scott's user avatar
  • 115
0 votes
1 answer
119 views

How to create dependency between two tasks within a chef cookbook?

I wrote the a Chef cookbook which configures a server in the company. One of the tasks there is to install an "apt_package" called "pssh" and another task is intended to be run after the pssh package ...
Itai Ganot's user avatar
  • 10.6k
1 vote
2 answers
438 views

Docker service discovery (or dns resolution) from the host

I have a recipe that sets up a docker instance with a specific mysql image I made for my app. As part of that recipe I would like to have it so, that after the container comes up with mysql running, a ...
Tom Klino's user avatar
  • 621
1 vote
1 answer
188 views

What exactly is the difference between node vs @node in chef template files

I am new to chef and not able to get a hang of the difference between node vs @node usage in template files. I am not able to find a good documentation around this particular thing. Any explanation or ...
Sidtharthan's user avatar
0 votes
0 answers
298 views

Combining NOT with other queries in Chef search returns no results?

I'm having some very strange issues with Chef search. I want to find instances that have failed to bootstrap properly, and I'm using two methods to detect this: instances in the default environment ...
Adrian's user avatar
  • 153
0 votes
1 answer
186 views

Searching Chef nodes by age

I'm trying to put together a tool to track Chef instances that have not converged properly. I can find those nodes easily, but I want to exclude nodes that are still pretty new, and so might still be ...
Adrian's user avatar
  • 153
1 vote
1 answer
261 views

Creating an installer package file like .MSI for Linux using Chef [closed]

We are building an analytic application. As a part of final deployment we are planning to install the application using an installer tool.Need to create an installer package like MSI for installing ...
Vishnu Rajalekshmi's user avatar
0 votes
0 answers
37 views

Chef on Windows Not Automatically Running

I have chef-client installed on a windows node and if I run: get-windows service *chef* I see the service is started. Yet my recipes don't seem to be run unless I open a command prompt or ...
Brad's user avatar
  • 619
0 votes
2 answers
1k views

Chef-Server 12 Getting me errors when the node is not time synced

I'm getting this error when the clock on my node is different than 15 minutes from my chef server. Authentication Error: Failed to authenticate to the chef server (http 401). enter code here`...
FlayRonin's user avatar
1 vote
3 answers
2k views

ssh command to add a public key to the local `authorized_keys`?

Is there a single line command to tell SSH to add a provided public key to the local machine's authorized_keys file? A local version of ssh-copy-id? I am writing a chef recipe and want to ensure a ...
Amandasaurus's user avatar
  • 31.1k
0 votes
1 answer
40 views

Dealing with deployment on instance start

I can't understand how am I supposed to handle 'Deploy' event that happens on instance start. The stack has two layers (Node.js and Rails) and two apps with distinct recipes to handle 'Deploy' events. ...
synapse's user avatar
  • 499
1 vote
1 answer
1k views

Chef can't find files however present in cookbook - Chef::Exceptions::FileNotFound

I'm struggling on the deployment of a cookbook in chef. It's not finding files that are, however, present in the directory it's looking for. My recipe installs and launch Apache, and then is ...
barthelemypousset's user avatar
0 votes
1 answer
76 views

Desired State for MsSQL and IIS (puppet or chef)

In our infrastructure, some developers/consultants change some mssql or iis configurations without any notification which cause us problems. For example, if somebody change mssql recovery simple to ...
Emre's user avatar
  • 33
0 votes
1 answer
2k views

Chef template: Lookup a hash key by another variable

I'm trying to build nginx files for different environments. My recipe has a hashmap like so: domain = { production: { public: 'example.com', internal: 'example.dev' }, staging: { ...
eternaltyro's user avatar
0 votes
1 answer
530 views

What is causing this error ERROR: undefined method `mysql_service' for #<Chef::Recipe:0x00000003ca0870>?

Basically I want to create a cookbook that installs MySQL 5.7 so I though I would utilize mysql from the supermarket. I started off by creating a fresh cookbook using chef generate cookbook MYSQL ...
Dylan's user avatar
  • 101

1
2 3 4 5
13