Reputation: 906
I have a strange situation. On my windows machine, if I try to bootstrap a node using the following command:
'''knife bootstrap ipaddress -x username -P password --sudo -N nodename'''
I get the following error:
'''Chef Infra Client cannot execute without accepting the license'''
and the bootstrap fails. If I do the exact same command from my Mac it works as expected. All of the other knife commands work find on my windows workstation. I'm running Chef Infra Client 15.6.10 on Windows. Any idea what I've messed up?
Upvotes: 0
Views: 608
Reputation: 1
Thanks so much @Draco Ater for explanation! I am new to chef and I have been stuck with this for nearly 5 hours. knife bootstrap 12.12.134.190 -U ubuntu --sudo -i "D:\DevOpsClass\DevopsClass.pem" -N node01
.
After I read your explanation and added --chef-license accept
to the end of the above command, it works!
For others who might get stuck like me, I have written down the steps I have taken to create this bootstrap command.
Must be inside chef-repo
knife bootstrap -U --sudo -i -N
public ip of the node - I get it from EC2 instance from AWS
-U means machine name - For this one, I get it from EC2 instance
pem file location - is the pem file that is used when I created EC2 instance.
Upvotes: 0
Reputation: 21206
Starting from Chef Infra Client 15, you need to provide --chef-license
key with one of the following values:
accept
- Accepts the license and attempts to persist a marker file locally. Persisting these marker files means future invocations do not require accepting the license again.accept-silent
- Similar to accept except no messaging is sent to STDOUTaccept-no-persist
- Similar to accept-silent except no marker file is persisted. Future invocation will require accepting the license again.Try running your bootstrap like that:
knife bootstrap ipaddress -x username -P password --sudo -N nodename --chef-license accept
More info in the Chef Docs
Upvotes: 2