Using Provider Generator to scaffold a new Cloud Manager

To kick start your new provider development, you can follow the steps below to get a new cloud manager running in minutes.


Use the provider generator to create a dummy provider named as AwesomeCloud with a cloud manager

cd manageiq
bundle exec rails generate provider awesome_cloud --dummy

You will see the console emitting the progress

      create  .codeclimate.yml
      insert  /Users/jwong/ws/manageiq/lib/workers/miq_worker_typ

Output of scaffolding

  • Newly created folderplugins/manageiq-providers-awesome_cloud

  • Modified Gemfile

    • The following lines are added

      group :awesome_cloud, :manageiq_default do
        manageiq_plugin "manageiq-providers-awesome_cloud" # TODO: Sort alphabetically...
    • During active development, you can replace the second line with

      gem 'manageiq-providers-awesome_cloud', :path => 'plugins/manageiq-providers-awesome_cloud'

  • Modified lib/workers/miq_worker_types.rb

    • The following lines are added

       "ManageIQ::Providers::AwesomeCloud::CloudManager::EventCatcher"                  => %i(manageiq_default),
       "ManageIQ::Providers::AwesomeCloud::CloudManager::MetricsCollectorWorker"        => %i(manageiq_default),
       "ManageIQ::Providers::AwesomeCloud::CloudManager::RefreshWorker"                 => %i(manageiq_default),

Now run bundle install to activate the new provider awesome_cloud plugin

Create an AwesomeCloud instance

Start rails console by executing bundle exec rails c and perform the following in the rails console

  1. Create the cloud manager
     ems = => 'CloudAwesome', :zone => Zone.default_zone)!
  2. Create an authentication and associate it with the new manager
     auth = => 'Awww', :userid=> 'admin', :password => 'secrets')
     auth.resource = ems # associated!

See it in UI


  • The dummy cloud manager comes with 2 dummy instances.
  • The code generated is similar to this dummy provider repo
1 Like

@jameswnl Thank you for the response. When I run the script, it tries to fetch the provider awesome_cloud from github and fails with the error
remote: Repository not found.
fatal: repository ‘’ not found

Did you replace the line in Gemfile as
gem ‘manageiq-providers-awesome_cloud’, :path => ‘plugins/manageiq-providers-awesome_cloud’ ?

Yeah, Its working fine as expected