ozbillwang
1/21/2015 - 10:03 PM

node_aws option with puppet command

node_aws option with puppet command

When reading the document Provisioning With Amazon Web Services, I am interesting how puppet provisions an Amazon AWS ec2 instance.

Default with puppet open source (I didn't test in PE), there is no option of node_aws. So when I run the command puppet help node_aws.

###Here is this error.

$ puppet help node_aws
Error: Could not load help for the face node_aws.
Please check the error logs for more information.

Detail: "Could not find Puppet Face node_aws"

Error: Try 'puppet help help help' for usage

If you don't install guid, you will get this error

$ puppet node_aws list
Error: Could not autoload puppet/face/node_aws/bootstrap: cannot load such file -- guid
Error: Could not parse application options: Could not autoload puppet/face/node_aws/bootstrap: cannot load such file -- guid

Here is the fix

gem install guid
gem install fog
vi ~/.fog

:default:
  :aws_access_key_id: XXXXXXX
  :aws_secret_access_key: XXXXXXXX

puppet module install puppetlabs-cloud_provisioner

Now you should be fine to run puppet help node_aws

How to use the option node_aws

# get the instance list
puppet node_aws list --region=us-west-2

# get key pair
puppet node_aws list_keynames --region=us-west-2

# get help 
puppet man node_aws
puppet help node_aws

Refer URLs

Puppet Client Cloud Provisioner Open Source OSX

Beginning adventures with Puppet from PuppetLabs