Ask Your Question
0

Puppet-AWS Could not find a suitable provider for ec2_instance

asked 2015-05-01 12:18:54 -0500

eliassal gravatar image

Hi, I followed instructions at https://github.com/puppetlabs/puppetl... to start playing with Puppet enterprise and AWS. I ran all setup in my home user directory, I have .Puppet,

I cd to /home/myuser/.puppet/modules/aws

, created a pp file based on the "Getting Started with aws" as follows

ec2_instance { 'instance-ByPuppet':
  ensure        => present,
  region        => 'us-west-2',
  security_groups   => 'gh-mysecgr',
  image_id      => 'ami-e7527ed7', # you need to select your own AMI
  instance_type => 't1.micro',
}

When I run

puppet apply tests/createAMI.pp --test

I get

Notice: Compiled catalog for pemaster in environment production in 0.07 seconds Info: Applying configuration version '1430499881' Error: Could not find a suitable provider for ec2_instance Notice: Finished catalog run in 0.24 seconds

So, my understanding that this should spin a new VM in AWS, I don't need to create a VM in order this to work, am I correct? Thanks ina advance

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2015-05-01 14:15:21 -0500

GregLarkin gravatar image

updated 2015-05-01 22:07:59 -0500

You very likely don't have the required gems installed, or the wrong method was used to install them. Double-check the documentation here: https://github.com/puppetlabs/puppetlabs-aws#requirements

If you've already installed those gems correctly, please post back here for further assistance.

UPDATE:

If you are using Puppet Enterprise or PE with Puppet Server, you need to make sure the install the gems properly. The instructions from the README are:

If you're running Puppet Enterprise, install both the gems with this command:

/opt/puppet/bin/gem install aws-sdk-core retries

This allows the gems to be used by the Puppet Enterprise Ruby.

If you're running Puppet Server, you need to make both gems available to JRuby with:

/opt/puppet/bin/puppetserver gem install aws-sdk-core retries

Once the gems are installed, restart Puppet Server.

edit flag offensive delete link more

Comments

Dear Greg, please see my response above

eliassal gravatar imageeliassal ( 2015-05-01 17:32:49 -0500 )edit

Greg, I did, posted a question at http://ask.puppetlabs.com/question/17031/puppet-aws-warning-ambiguous-subnet-name/ since Saturday but got no response so far Thanks

eliassal gravatar imageeliassal ( 2015-05-05 04:20:31 -0500 )edit

Sorry, I saw that after I answered above. :) I searched for some ideas about that error, but I haven't seen any so far.

GregLarkin gravatar imageGregLarkin ( 2015-05-05 07:39:04 -0500 )edit
0

answered 2015-12-15 01:00:20 -0500

/opt/puppetlabs/puppet/bin/gem install aws-sdk-core retries

Is the right command for 2015.3 PE.

edit flag offensive delete link more
0

answered 2016-05-04 04:37:36 -0500

I keep getting error "Could not find a suitable provider for ec2_instance" while running a manifest file to create ec2 instance from puppet Enterprise 2016.1 . Installed version are Ruby - ruby 1.9.3p484 (2013-11-22 revision 43786) puppet - 4.4.1 puppetlabs-aws (v1.4.0) I installed aws module using "/opt/puppetlabs/puppet/bin# gem install aws-sdk-core retries". Everything seems correct configuration, still keep getting the same error. I followed the suggestions given in similar threads but it is not helping Please advise.

edit flag offensive delete link more
0

answered 2015-05-01 17:31:57 -0500

eliassal gravatar image

Dear Greg, I followed the requirements as follows as I have the puppet enterprise

gem install aws-sdk-core retries

export AWS_ACCESS_KEY_ID=my_key_id
export AWS_SECRET_ACCESS_KEY=my_secret_access_key

export AWS_REGION=us-west-2

did

puppet module install puppetlabs-aws

Then restarted the puppet server

My gem is 2.0.14

Do you think I missed something?

edit flag offensive delete link more

Comments

Yes, you may have installed them incorrectly. Based on the command that you posted above, that's the way to install the gems for open-source Puppet, not Puppet Enterprise. I have updated my answer with the instructions from the README for installing the gems into PE.

GregLarkin gravatar imageGregLarkin ( 2015-05-01 22:06:22 -0500 )edit

Greg, it seems that I missed the step for the puppetserver command, I did as follows [salam@pemaster bin]$ sudo /opt/puppet/bin/puppetserver gem install aws-sdk-core retries Fetching: multi_json-1.11.0.gem (100%) Successfully installed multi_json-1.11.0. Fetching: builder

eliassal gravatar imageeliassal ( 2015-05-02 05:35:31 -0500 )edit

However, running "puppet apply /home/salam/.puppet/modules/aws/tests/createAMI.pp --test" gave the exact same error Notice: Compiled catalog for pemaster in environment production in 0.17 seconds

eliassal gravatar imageeliassal ( 2015-05-02 05:37:16 -0500 )edit

Info: Applying configuration version '1430562326' Error: Could not find a suitable provider for ec2_instance Notice: Fin

eliassal gravatar imageeliassal ( 2015-05-02 05:37:20 -0500 )edit

I even restarted the centos virtual machine

eliassal gravatar imageeliassal ( 2015-05-02 05:37:54 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-05-01 12:18:54 -0500

Seen: 820 times

Last updated: May 01 '15