HewlettPackard / oneview-puppet

This project is no longer being developed and has limited support. In the near future this repository will be fully deprecated. Please consider using other OneView projects, such as Terraform and Ansible Collection
https://forge.puppet.com/hewlettpackard/oneview
Apache License 2.0
8 stars 17 forks source link

New to Puppet #206

Closed ckurka closed 6 years ago

ckurka commented 6 years ago

Scenario/Intent

Trying to run a simple manifest and I am receiving this

Notice: Compiled catalog for puppet.atlpss.hp.net in environment production in 0.05 seconds Error: Could not find a suitable provider for oneview_server_hardware Error: Could not find a suitable provider for oneview_server_profile Notice: Applied catalog in 0.07 seconds

I may be just missing something simple in my setup

Environment Details

Steps to Reproduce

puppet apply serverprofile.pp

Expected Result

New Server Profile Applied

Actual Result

Debug: Failed to load library 'oneview-sdk' for feature 'oneview': cannot load such file -- addressable Debug: Puppet::Type::Oneview_server_hardware::ProviderC7000: feature oneview is missing Debug: Failed to load library 'oneview-sdk' for feature 'oneview': cannot load such file -- addressable Debug: Puppet::Type::Oneview_server_hardware::ProviderSynergy: feature oneview is missing Debug: Class[Main]: Resource is being skipped, unscheduling all events Debug: Stage[main]: Resource is being skipped, unscheduling all events Error: Could not find a suitable provider for oneview_server_hardware Error: Could not find a suitable provider for oneview_server_profile

Here is my manifest

Vars

$server_profile_name = 'Server profile with OS Deployment Plan - PUPPET DEMO' $server_hardware_name = '2-SYNERGY105-M, bay 2' $server_hardware_type = 'SY 480 Gen9 1' $network_1 = 'Mgmt' $network_2 = 'Deploy' $deployment_plan_name = 'RHEL74_SUT'

Powering off the server in order to apply the Server Profile

WARNING: This is a non-idempotent operation

oneview_server_hardware{'Server Hardware Power Off': ensure => 'set_power_state', data => { hostname => $server_hardware_name, power_state => 'off', }, }

Create and apply a Server Profile, using Image Streamer to deploy the OS

oneview_server_profile{'Server Profile Creation': ensure => 'present', data => { name => $server_profile_name, serverHardwareUri => $server_hardware_name, serverHardwareTypeUri => $server_hardware_type, osDeploymentSettings => { osDeploymentPlanUri => $deployment_plan_name }, boot => { manageBoot => true, order => [ 'HardDisk' ] }, bootMode => { manageMode => true, pxeBootPolicy => 'Auto', mode => 'UEFIOptimized', }, connections => [ { id => 1, name => 'connection1', functionType => 'Ethernet', networkUri => $network_1, requestedMbps => 2500, requestedVFs => 'Auto', boot => { priority => 'NotBootable', } }, { id => 2, name => 'connection2', functionType => 'Ethernet', networkUri => $network_2, requestedMbps => 2500, requestedVFs => 'Auto', boot => { priority => 'Primary', initiatorNameSource => 'ProfileInitiatorName' } }, { id => 3, name => 'connection3', functionType => 'Ethernet', networkUri => $network_2, requestedMbps => 2500, requestedVFs => 'Auto', boot => { priority => 'Secondary', initiatorNameSource => 'ProfileInitiatorName' } } ] } }

Power on the Server Hardware after the Server Profile has been applied

WARNING: This is a non-idempotent operation

oneview_server_hardware{'Server Hardware Power On': ensure => 'set_power_state', data => { hostname => $server_hardware_name, power_state => 'on', }, }

madhav-bharadwaj commented 6 years ago

Hi ckurka, This seems to be an issue with your setup. Let us know if the below checklist is complete:

  1. Have you installed oneview puppet module yet? puppet module install hewlettpackard-oneview
  2. Is your directory name "oneview" and not "oneview-puppet".
  3. Are you running your manifest from the examples directory?
  4. If yes to all the above, can you try puppet apply serverprofile.pp --modulepath <Path to your oneview puppet module>

If still it doesn't work, please share the steps you have performed in your setup.

ckurka commented 6 years ago

Madhav,

Thanks... I tried that and I am still seeing the same thing. Let me try a clean install. the steps I followed was.

  1. Install OS (Centos 7.3) and required RPMs
  2. Install RVM
  3. Install Ruby
  4. Install the OV Ruby SDK
  5. Installed Puppet

-Chris

madhav-bharadwaj commented 6 years ago

Note: Oneview puppet module for api600 is not yet released. The support for most of the resources are already available in the git repo. So include --modulepath option to make use of them.