How to bootstrap to Centos Node


#1

I’m using centos7, I setup a VM with port forwarding configurations as attached in the screenshot.

I’m trying to bootstrap to a node with the ip 10.0.2.4 which is using the port number as 2233 and Ip# 10.0.2.15 port# 9999. Can anyone help me to right command to bootstrap to these two nodes.

Here’s what I tried:
[root@chefworkstation ~]# knife bootstrap 10.0.2.4 --ssh-user admin --ssh-password password --ssh-port 2233 -N webserver

WARNING: No knife configuration file found
WARN: Failed to read the private key /etc/chef/client.pem: #<Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/chef/client.pem>
ERROR: Your private key could not be loaded from /etc/chef/client.pem
Check your configuration file and ensure that your private key is readable


#2

It doesn’t look like you have a client.rb or config.rb set up on your workstation that includes to your credentials to your Chef Server. You may have missed some steps. I’d recommend starting with the tutorial:

https://learn.chef.io/tutorials/learn-the-basics/rhel/