- Edit existing node name. Update name and save. Chef will copy the node and create a new client entry.
knife node edit oldnode
- ssh to node
- Change hostname and dns information
- stop chef-client
sudo service chef-client stop
- Change to /etc/chef
cd /etc/chef
- mv existing client.pem file to client-oldnode.pem
- make sure validation.pem file exists for chef organization
- edit client.rb update node_name "newnode"
- run chef
sudo chef-client
- "Net::HTTPServerException: 403 "Forbidden"" I had to log into manage and check mark the permission to let clients update. Permissions
- run chef
sudo chef-client
Chef Client Finished
- restart chef-client
sudo service chef-client restart
- Delete original node
chef-repo ‹master*› » knife node delete db02 -y; knife client delete db02 -y;
Deleted node[db02]
Deleted client[db02]
knife show acls/nodes/<new_node_name>
to show node permissions.Output example (where
vandis_w
is the chef user I used to rename the Chef node):You must replace all the
vandis_w
occurrences with the new node name.To do so, use the command
knife edit acls/nodes/<new_node_name>
.You can check old/other node(s) permissions (
knife show acls/nodes/<old_node_name>
) to be sure.I hope this will help some people.