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 <push-jobs>.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
Archive powered by MHonArc 2.6.16.