Questions tagged [chef]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
12 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 ...
0
votes
0answers
17 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 ...
0
votes
0answers
8 views

Chef: run package resource with -y option

Im running into problem where I have to confirm that everything is ok. Is it possible to run chef package resource with -y option?
0
votes
0answers
8 views

How to check if service not running in CHEF

How to check if service not running in CHEF? I'm trying to notify if service is not running. something like: if !(service.exist)?("httpd")
0
votes
0answers
16 views

Run knife from CloudInit to resize VMware disk

First I admit - I am new to Chef. I have used Ansible and somewhat Salt. Original task: Add additional VM disk of required size within VMware and then format it within OS when new Rancher node starts. ...
0
votes
2answers
52 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 / ...
0
votes
0answers
42 views

Windows 2012 R2 audit policy not showing in Group Policy Editor

I am trying to set the Audit Policy for a Windows 2012 R2 server using Chef. I am setting the Audit Policies using: auditpol /set /subcategory:"#{subcategory}" /success:enable /failure:...
0
votes
0answers
18 views

Can I put chef behind an AWS ELB that terminates to port 80?

In lue of buying a cert or having scripts run certbot on my chef server I would prefer to just use an AWS ELB that has ACM hooked up Is this possible? I would have an aws elb with https and ACM in ...
0
votes
1answer
39 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 ...
3
votes
2answers
947 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 ...
1
vote
0answers
98 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 ...
0
votes
1answer
141 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 ...
0
votes
1answer
563 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 ...
0
votes
1answer
134 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 ...
1
vote
0answers
540 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 ...
2
votes
1answer
108 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 ...
2
votes
1answer
104 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 ...
0
votes
1answer
15 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 ...
3
votes
2answers
149 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 ...
0
votes
1answer
97 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 ...
-1
votes
2answers
402 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 ...
0
votes
1answer
48 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 ...
3
votes
0answers
186 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 ...
0
votes
1answer
131 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 ...
2
votes
1answer
595 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 ...
5
votes
1answer
114 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 ...
3
votes
2answers
5k 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....
0
votes
1answer
104 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 ...
1
vote
1answer
152 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 ...
0
votes
1answer
506 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 ...
0
votes
1answer
31 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 ...
0
votes
1answer
73 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: ------...
0
votes
1answer
86 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:...
1
vote
2answers
595 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 ...
0
votes
1answer
84 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/...
0
votes
1answer
4k 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/...
0
votes
1answer
70 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 ...
1
vote
2answers
204 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 ...
0
votes
1answer
111 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 ...
0
votes
0answers
173 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 ...
0
votes
1answer
111 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 ...
1
vote
1answer
167 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 ...
0
votes
0answers
30 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 ...
0
votes
2answers
923 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`...
0
votes
1answer
38 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. ...
1
vote
1answer
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 ...
0
votes
1answer
69 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 ...
0
votes
1answer
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: { ...
0
votes
1answer
260 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 ...
1
vote
2answers
364 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' (...

1
2 3 4 5
13