Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [chef]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
131 views

Automating cloudwatch agent installation for multiple arch types

I need to automate cloudwatch agent installation on new and existing instances created in EC2. We have a mix x86_64 and arm64 arch type vms as well different OSes(Ubuntu/Amazon Linux). I found Chef ...
user avatar
  • 13
0 votes
0 answers
32 views

Running Chef-client on a remote server behind firewall through SSH tunnel

I have a remote oracle linux node that needs to have chef-client ran. This node is behind a firewall. I have access to the server command line via ILO, but need to run chef to install VPN software. ...
user avatar
1 vote
0 answers
16 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 ...
user avatar
  • 11
2 votes
1 answer
37 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 ...
user avatar
0 votes
2 answers
74 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 / ...
user avatar
  • 75
0 votes
1 answer
48 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 ...
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 ...
user avatar
1 vote
0 answers
157 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 ...
user avatar
0 votes
1 answer
211 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 ...
user avatar
  • 3
0 votes
1 answer
737 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 ...
user avatar
  • 121
0 votes
1 answer
208 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 ...
user avatar
1 vote
0 answers
728 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 ...
user avatar
  • 1,120
2 votes
1 answer
159 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 ...
user avatar
  • 141
2 votes
1 answer
155 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 ...
user avatar
0 votes
1 answer
17 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 ...
user avatar
3 votes
2 answers
218 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 ...
user avatar
0 votes
1 answer
151 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 ...
user avatar
  • 213
-1 votes
2 answers
513 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 ...
user avatar
  • 213
0 votes
1 answer
60 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 ...
user avatar
3 votes
0 answers
234 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 ...
user avatar
  • 463
0 votes
1 answer
184 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 ...
user avatar
2 votes
1 answer
794 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 ...
user avatar
5 votes
1 answer
127 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 ...
user avatar
  • 429
3 votes
2 answers
7k 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....
user avatar
0 votes
1 answer
161 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 ...
user avatar
  • 153
1 vote
1 answer
186 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 ...
user avatar
0 votes
1 answer
592 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 ...
user avatar
  • 101
0 votes
1 answer
37 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 ...
user avatar
  • 332
0 votes
1 answer
83 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: ------...
user avatar
  • 231
0 votes
1 answer
91 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:...
user avatar
  • 231
1 vote
2 answers
758 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 ...
user avatar
0 votes
1 answer
103 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/...
user avatar
0 votes
1 answer
5k 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/...
user avatar
  • 115
0 votes
1 answer
95 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 ...
user avatar
  • 10.3k
1 vote
2 answers
325 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 ...
user avatar
  • 601
0 votes
1 answer
131 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 ...
user avatar
0 votes
0 answers
212 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 ...
user avatar
  • 153
0 votes
1 answer
139 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 ...
user avatar
  • 153
1 vote
1 answer
197 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 ...
user avatar
0 votes
0 answers
35 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 ...
user avatar
  • 539
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`...
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 ...
user avatar
  • 29.9k
0 votes
1 answer
39 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. ...
user avatar
  • 489
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 ...
user avatar
0 votes
1 answer
73 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 ...
user avatar
  • 33
0 votes
1 answer
1k 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: { ...
user avatar
0 votes
1 answer
403 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 ...
user avatar
  • 101
1 vote
2 answers
400 views

chef 13, and inhibiting bundler network requests

My Nodes have no internet access at all. We have no permission to set up a local gems mirror. All gems install needs to be from the chef server. When chef runs, now, it invokes 'bundler install' (...
user avatar
1 vote
2 answers
4k views

How can I automate creation of GPO shutdown script?

I'm managing Windows VMs in AWS ASGs that are not attached to a domain. I want to run a script at shutdown (not logoff) to remove these nodes from Chef, and I want to create/register the scripts using ...
user avatar
  • 153
4 votes
1 answer
70 views

Chef large recipe vs lots of small recipes

I was wondering what the general consensus is when it comes to one large CHEF recipe vs a lot of smaller ones. As an example, say you want to deploy a Radius server, would you have seperate recipes ...
user avatar
  • 173

1
2 3 4 5
13