0

I am currently learning chef and AWS (new to both of them).

I would like to create a node in https://manage.chef.io/organizations/su_cheflearning/nodes.

The followings are the steps I have done:

  1. Go to AWS Console and launch EC2 instance
  2. Once it is running, I take public IP address
  3. Use gitbash
  4. Run this command in chef-repo folder, knife bootstrap 52.65.76.66 -U ubuntu --sudo -i "D:\DevOpsClass\DevopsClass.pem" -N node01 --chef-license accept

Question

I am having an issue: The issue is I am asked to provide password for ubunt@52.65.76.66 :

I have searched online, some said enter passwd, but none of the suggestions work. I do not launch EC2 with password, so I am not sure what to enter...

  1. Checked online knief bootstrap, https://docs-archive.chef.io/release/12-2/chef_client.html
  2. checked how to find/ retrieve Ubuntu EC2 password???, EC2 Ubuntu 14 default password

Thanks for your help!

Suス
  • 1
  • 3

2 Answers2

0

Well, I know nothing about Chef, but a couple of points:

  1. If the IP shown above is your real public IP, you probably want to obscure it.

  2. Does the knife bootstrap command allow you to configure an SSH key? EC2 instances do not use password for SSH access, only keys. If you want the knife bootstrap command work, you'll need to configure the ssh key to work with the command.

halfer
  • 19,824
  • 17
  • 99
  • 186
Mark J. Bobak
  • 13,720
  • 6
  • 39
  • 67
  • 1
    Thanks! I didn't realise that!! I have deleted the IP. What I have done is launch EC2 with new .pem file and new security group. It works..... I am not sure why... Thanks again! – Suス Jan 06 '23 at 03:17
  • 1
    This 52.65.76.66 address is from EC2 instance which I have already deleted. Thanks for your comment! – Suス Jan 06 '23 at 03:19
0

I would like to share how I have troubleshoot. It might help other beginner chef learners like myself.

  1. Redownload Starter kit from Chef ( Go to Chef Manage -->Under Administration --> Select my organisation --> Actions --> From drop down menu --> select Starter Kit
  2. Terminate the existing EC-2. Launch a new EC2 with a new pem file
  3. Run knife bootstrap command and I can create the node.
Suス
  • 1
  • 3