Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [chef]

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

3
votes
2answers
25 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
0answers
16 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
1answer
26 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
17 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
35 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
16 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 ...
1
vote
1answer
127 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 ...
0
votes
0answers
33 views

How to install RVM using chef solo?

I'm trying to install RVM via chef-client --local-mode. I've tried using the chef-rvm cookbook (https://github.com/martinisoft/chef-rvm) but I'm having a few issus: how do I specify using the ...
0
votes
0answers
87 views

WinServer 2016, Chef, kitchen tests using Docker - how?

I have a Chef infrastructure, with cookbooks being tested via CI (Jenkins) on either Docker or VirtualBox via kitchen-dokken or kitchen-vagrant. This works beautifully on all Linux hosts. I now have ...
0
votes
0answers
20 views

How to configure chef-server Mail relay on existing chef installed server?

I want to install chef server Mail Relay on existing chef installed on-premises server and I didn't get any documentation from chef portal. Can anyone please help to find out the Mail relay ...
0
votes
0answers
98 views

Run chef-client periodically: error in command line

I'm trying to follow the Chef Tutorial (rif. https://learn.chef.io). I'm using CentOS 7 for my workstation environment and also for my destination node. They are generated using Vagrant box as ...
0
votes
0answers
48 views

How to Chef Spec tar_extract

In my chef recipe I’m using tar_extract to do exactly what it says. It works, but I’m trying to set up unit testing. Here’s my recipe code: tar_extract 'http://blahblah.tar.gz' do target_dir '/etc/...
4
votes
1answer
94 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
1answer
1k 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
0answers
74 views

Systemctl doesn't see a service running

I’m having a strange issue with systemd and sshd. I have an OpenVZ container. When I login into it from hardware node as root, systemctl shows that sshd service is up and running, but when I ssh from ...
0
votes
0answers
89 views

SSL: certify: ssl_handshake.erl:1490:Fatal error: unknown ca, trying to setup Chef Automate

I am trying to setup integration between our private github enterprise and Chef Automate using directions at https://docs.chef.io/integrate_delivery_github.html But after following: Create or update ...
0
votes
1answer
29 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
86 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
0answers
15 views

Chef - Restarting application stack in order with coordination

I'm patching Splunk within a chef environment. The process for patching splunk has phases like: ssh to cluster master and put into maintenance mode do ssh to indexer ++x and yum upgrade, reboot, ...
0
votes
0answers
44 views

Chef responding with “you need to sign in or sign up before continuing”

Whenever I try to use Chef on one Ubuntu server (e.g. knife nodes list), it returns the following (data obfuscated): ERROR: Failed to authenticate to https://***.***/organizations/*** as *** with key ...
0
votes
1answer
182 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
21 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
43 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
56 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:...
0
votes
2answers
236 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
36 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
550 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
28 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
81 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
88 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
47 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
68 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
89 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
22 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
391 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
28 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
439 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
46 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
539 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
69 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 ...
0
votes
2answers
202 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
vote
2answers
1k 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 ...
4
votes
1answer
69 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 ...
1
vote
1answer
716 views

Better way of running apt upgrade / dist-upgrade via chef

I am trying to run apt-get dist-upgrade via chef cookbook. I am aware that running apt-get upgrade in cookbook is not generally recommended (https://stackoverflow.com/questions/15080876/apt-get-update-...
0
votes
1answer
32 views

Updating .net on all machines in the same domain? [closed]

I have a ton of machines without internet (~100). I need to update powershell/.net on all of them. They all lie within the same domain. What is the best option? I don't have anything like Chef or SCCM ...
0
votes
1answer
854 views

Unable to connect to chef-server

Cannot connect to the chef-server from a workstation. Tried command "knife node list" Network Error: Error connecting to https://<chef-server-address>/nodes - Failed to open TCP connection to &...
0
votes
2answers
437 views

Using git with CHEF to deploy single file

I am fairly new to chef (and git for that matter), so please forgive me if this question is very basic: Using SVN as my repository, I can use the svn resource to check out a file when running my ...
1
vote
1answer
783 views

ERROR: Specified config file /etc/opscode/pivotal.rb does not exist

I keep getting the following when trying to install Chef: [root@COMMAND ~]# chef-server-ctl org-create chef "Chef Software, Inc." -f /tmp/chef.key ERROR: Specified config file /etc/opscode/pivotal.rb ...
0
votes
2answers
88 views

How to send source code to vagrant virtual machine?

I am looking for a way to start a virtual machine using my chef recipes that would deploy my application. The deployment works fine with a git repository, but the problem is that I would have to push ...
1
vote
2answers
1k views

Where is the cron from this Chef recipe?

I have added, and successfully setup and deploy an instance with this recipe: cron "haproxy_log" do command "logrotate /etc/logrotate.d/haproxy" minute '15' end But when I look at /etc/crontab I ...