Steps I took to configure Chef push jobs


#1

I just want to document what I’ve done so far to make this work. I followed these general guidelines but I had to read between the lines. https://docs.chef.io/install_push_jobs.html

To test, this, run "knife job start ‘chef-client’ ‘node name’ on the workstation.

I hope this helps somebody.

Chris


Need help configuring Chef-Push-Job-Server
#2

Please don’t forget to open ports 10000-10003 which are being used by pushy-client service… At least these are being used on windows platform boxes…
knife node status - will help to check availability of nodes configured to used push jobs. Available against node name is ok. If unavailable then no communication.

— Оригінальне повідомлення —
Від кого: “Fouts, Chris” chris.fouts@sensus.com
Дата: 30 січня 2015, 16:48:15

I just want to document what I’ve done so far to make this work. I followed these general guidelines but I had to read between the lines. https://docs.chef.io/install_push_jobs.html - Create the pushy_job_writers and pushy_job_readers on the organization of the Chef server; see https://docs.chef.io/server_orgs.html - Make user “jenkins” a member of the pushy_job_writers and pushy_job_readers group.on the Chef server. NOTE: “jenkins” is the user (node_name) in my currently-used knife.rb file. - Install Chef push feature on the server http://docs.chef.io/server/ctl_chef_server.html#install . Look at the “Chef Push Jobs” section - Download the Chef Push client, and archive it here if you want to - Copy the file to a location on some file server. I set up nginx for this, so I put the file so it’s accessible from http://someserver.domain.com/chef_packages/name-of-push-jobs.rpm ’ - Run this job https://jenkins.davis.sensus.lab/jenkins/view/Utils/job/arq-file-serv-copy-chef-packages/ - Download the Chef push-jobs cookbook by issuing the commands from the Chef workstation cd to chef repo directory knife cookbook site download push-jobs tar -xzvf .tar.gz -C cookbooks - Edit the push-jobs/attributes/default.rb file to have these values default[‘push_jobs’][‘package_url’] = ‘http://someserver.comain.com/chef_packages/name-of-push-jobs.rpm’ default[‘push_jobs’][‘package_checksum’] = ‘sha256sim checksum of name-of-push-jobs.rpm’ - Upload the push-jobs cookbook to the chef server – knife cookbook upload push-jobs - Add the push-jobs cookbook to the node’s run list To test, this, run "knife job start ‘chef-client’ ‘node name’ on the workstation. I hope this helps somebody. Chris


#3

Apparently they were already open, since I did not have to do this and I was able to do a knife node status to show available nodes. However, I will add this to my cheat sheet.

Chris

From: klum_tz@ukr.net [mailto:klum_tz@ukr.net]
Sent: Friday, January 30, 2015 10:01 AM
To: chef@lists.opscode.com
Cc: chef@lists.opscode.com
Subject: [chef] Re: Steps I took to configure Chef push jobs

Please don’t forget to open ports 10000-10003 which are being used by pushy-client service…
At least these are being used on windows platform boxes…

knife node status - will help to check availability of nodes configured to used push jobs. Available against node name is ok. If unavailable then no communication.
— Оригінальне повідомлення —
Від кого: “Fouts, Chris” <chris.fouts@sensus.commailto:chris.fouts@sensus.com>
Дата: 30 січня 2015, 16:48:15

I just want to document what I’ve done so far to make this work. I followed these general guidelines but I had to read between the lines. https://docs.chef.io/install_push_jobs.html

To test, this, run "knife job start ‘chef-client’ ‘node name’ on the workstation.

I hope this helps somebody.

Chris


#4

Guys,

I’m trying to setup two nodes (Windows and RedHat) with push-jobs cookbook. But these nodes don’t have Internet access. So I’m trying to set the package_url and package_checksum attributes dynamically according by each node. But I don’t understand how and where can I set these attributes.

I use this role[base] to call the push-jobs cookbook:

chef_type:           role
default_attributes:
description:         This is a role to run in all nodes.
env_run_lists:
  development:
    recipe[chef-client]
    recipe[chef-client::config]
    recipe[chef-client::delete_validation]
    recipe[push-jobs]
  preproduction:
  production:
  testing:
    recipe[chef-client]
    recipe[chef-client::windows_service]
    recipe[chef-client::config]
    recipe[chef-client::delete_validation]
json_class:          Chef::Role
name:                base
override_attributes:
  chef_client:
    interval: 600
    splay:    100
  push_jobs:
    package_checksum: 622f6fa1f1f9828ada9c3f44b82f4abb90522050d961d373d19990db4e6a124a
    package_url:      http://repo.mycompany.com.br/chef/packages/push-jobs/clients/windows/push-jobs-client-1.3.4-1.msi
run_list:
  recipe[chef-client]
  recipe[chef-client::config]
  recipe[chef-client::delete_validation]

How can I do these attributes to be dynamics?

Hopefully, thanks in advanced.