Problem: I would like to rotate the pivotal key on an Automate-installed Chef Server.
Solution:
# make sure existing key works, If not, stop here, do not continue chef-server-ctl org-list # backup existing pivotal.pem cp /hab/svc/automate-cs-oc-erchef/data/pivotal.pem pivotal.pem.backup # generate new pivotal.pem and then replace old key on disk # needs to be two step process, '>' will erase `pivotal.pem` before `chef-server-ctl` can read it and causing it to fail cause it can't authenticate to the Chef Infra Server API.
chef-server-ctl add-user-key pivotal -k pivotal-`date +%s` > pivotal.pem cp pivotal.pem /hab/svc/automate-cs-oc-erchef/data/pivotal.pem # check that the new key works chef-server-ctl org-list
Comments
0 comments
Article is closed for comments.