Name: ilo-chef
Owner: Hewlett Packard Enterprise
Description: iLO Resource Provider for Chef
Created: 2016-06-27 17:46:07.0
Updated: 2018-03-15 19:29:39.0
Pushed: 2018-03-15 19:42:38.0
Homepage: null
Size: 290
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Enables configuration of HPE iLOs via their APIs.
This cookbook is not intended to include any recipes. Use it by specifying a dependency on this cookbook in your own cookbook.
_cookbook/metadata.rb
nds 'ilo'
Now you can use the resources this cookbook provides. See below for some examples.
Each of the resources below requires you to pass in the info necessary to connect with the iLO API.
The basic structure accepted by the ilos
property is an array of hashes (or ILO_SDK::Client
objects):
= [
host: 'ilo1.example.com', # Required. IP or hostname
user: 'Administrator', # Optional. Defaults to 'Administrator'
password: 'secret123', # Required
ssl_enabled: false # Optional
host: '10.0.0.3',
user: 'User2',
password: 'secret456'
This array can be built using a variety of different sources, including [encrypted] databags, attributes, or read from json or yaml files. For example:
t directly in recipe:
list1 = []
list1.push { host: 'ilo1.example.com', user: 'Administrator', password: 'secret123' }
ad from data_bag:
list2 = data_bag_item('ilo_secrets', 'data_center_1')
ad from yaml file:
list3 = YAML.load_file('/root/ilo_secrets.yml')
The following resources are available for usage in your recipes. We give examples to show how to use each resource, but there are much more detailed examples in the examples directory. You may also find the recipes in the cookbook used for testing helpful as examples.
bios 'set BIOS configuration' do
[ilo1, ilo2]
ings(
fiShellStartup: 'Enabled',
fiShellStartupLocation: 'Auto',
fiShellStartupUrl: 'http://www.uefi.nsh',
cpv4: 'Enabled',
v4Address: '10.1.1.0',
v4Gateway: '10.1.1.11',
v4PrimaryDNS: '10.1.1.1',
v4SecondaryDNS: '10.1.1.2',
v4SubnetMask: '255.255.255.0',
lBootFile: 'http://www.urlbootfile.iso',
rviceName: 'iLO Admin',
rviceEmail: 'admin@domain.com'
NOTE: This is just an example; you can set as many or as few settings as you want.
(And there's a whole lot more you can set. See the API docs for the complete list.)
on :set # Not necessary, as this is the default
bios 'revert BIOS' do
[ilo1, ilo2]
on :revert
boot_settings 'set boot configuration' do
[ilo1, ilo2]
_order [ # Optional
D.Virtual.1.1",
eneric.USB.1.1",
D.Emb.1.1",
D.Emb.1.2",
IC.LOM.1.1.IPv4",
IC.LOM.1.1.IPv6"
_target 'None' # Optional
on :set # Not necessary, as this is the default
boot_settings 'revert boot configuration' do
[ilo1, ilo2]
on :revert
boot_settings 'dump boot configuration' do
[ilo1, ilo2]
_file '/full/path/to/boot_settings.yml'
r 'JohnDoe' # Optional: Owner of the file. Defaults to the current user
p 'Administrators' # Optional: Group ownership for the file. Defaults to the current user
on :dump
chassis 'dump power metrics and thermal metrics' do
[ilo1, ilo2]
r_metrics_file '/full/path/to/power_metrics.yml'
mal_metrics_file '/full/path/to/thermal_metrics.yml'
r 'JohnDoe' # Optional: Owner of the file. Defaults to the current user
p 'Administrators' # Optional: Owner of the file. Defaults to the current user
on :dump # Not necessary, as this is the default
computer_details 'dump computer details' do
[ilo1, ilo2]
_file '/full/path/to/computer_details.yml'
_bag 'computer_details_bag'
r 'JohnDoe' # Optional: Owner of the file. Defaults to the current user
p 'Administrators' # Optional: Owner of the file. Defaults to the current user
on :dump # Not necessary, as this is the default
computer_system 'set computer system info' do
[ilo1, ilo2]
t_tag 'HPE001' # Optional
state 'Lit' # Optional: 'Lit' or 'Off'
on :set # Not necessary, as this is the default
date_time 'set time zone' do
[ilo1, ilo2]
dhcpv4 false # Optional. Set to true to use the DHCPv4-supplied time settings
_zone 'Africa/Abidjan' # Optional. To use this, you must set :use_dhcpv4 to false
servers [ # Optional. To use this, you must set :use_dhcpv4 to false
0.168.0.2",
0.168.0.3"
on :set # Not necessary, as this is the default
firmware_update 'upgrade firmware' do
[ilo1, ilo2]
ersion '2.51'
ri 'www.firmware.domain.com/2.51'
on :upgrade # Not necessary, as this is the default
Note that this resource requires an ilo
property (Hash or ILO_SDK::Client) instead of an ilos
property (Array).
You'll need separate ilo_https_cert resources for each iLO you'd like to perform a task on.
https_cert 'generate CSR' do
ilo1
try 'US'
e 'Texas'
'Houston'
ame 'Example Company'
nit 'Example'
onName 'example.com'
on :generate_csr
https_cert 'dump CSR to file' do
ilo1
_path '/full/path/to/CSR.cert'
on :dump_csr
https_cert 'import certificate' do
ilo1
ificate '-----BEGIN CERTIFICATE-----...'
on :import # Not necessary, as this is the default
https_cert 'import certificate from file' do
ilo1
_path '/full/path/to/certificate_file.cert'
on :import # Not necessary, as this is the default
log_entry 'dump log entries' do
[ilo1, ilo2]
_file '/full/path/to/IEL_logs.txt'
type 'IEL' # 'IEL' or 'IML
r 'JohnDoe' # Optional: Owner of the dump file. Defaults to the current user
p 'Administrators' # Optional: Owner of the dump file. Defaults to the current user
tion 30 # Optional: Number of hours ago to begin collection at (until now)
rity_level 'OK' # Optional: Exclude this property to get all severities
on :dump # Not necessary, as this is the default
log_entry 'clear log entries' do
[ilo1, ilo2]
type 'IEL'
on :clear
manager_network_protocol 'set timeout' do
[ilo1, ilo2]
out 60 # Minutes
on :set # Not necessary, as this is the default
power 'power on' do
[ilo1, ilo2]
on :poweron # Not necessary, as this is the default
power 'power off' do
[ilo1, ilo2]
on :poweroff
power 'reset system' do
[ilo1, ilo2]
on :resetsys
power 'reset ilo' do
[ilo1, ilo2]
on :resetilo
secure_boot 'enable secure boot' do
[ilo1, ilo2]
le true # Optional: Defaults to false
on :set # Not necessary, as this is the default
service_root 'dump schema and registry' do
[ilo1, ilo2]
ma_prefix 'Account'
ma_file '/full/path/to/schema.txt'
stry_prefix 'Base'
stry_file '/full/path/to/registry.txt'
r 'JohnDoe' # Optional: Owner of the dump file(s). Defaults to the current user
p 'Administrators' # Optional: Owner of the dump file(s). Defaults to the current user
on :dump # Not necessary, as this is the default
te: You must set the :schema_file or :registry_file property, but are not required to set both
snmp_service 'set snmp mode and turn alerts on' do
[ilo1, ilo2]
_mode 'Agentless' # Optional: Defaults to 'Agentless'
_alerts true # Optional: Defaults to false
on :configure # Not necessary, as this is the default
user 'create user' do
[ilo1, ilo2]
name 'test' # Defaults to the resource's name attribute
word 'password123' # Optional for updates, but needed to create
n_priv true # Optional
te_console_priv false # Optional
_config_priv true # Optional
ual_media_priv false # Optional
ual_power_and_reset_priv true # Optional
config_priv false # Optional
on :create # Not necessary, as this is the default
user 'delete user' do
[ilo1, ilo2]
name 'test'
on :delete
virtual_media 'insert virtual media' do
[ilo1, ilo2]
uri 'http://10.254.224.38:5000/ubuntu-15.04-desktop-amd64.iso'
on :insert # Not necessary, as this is the default
virtual_media 'eject virtual media' do
[ilo1, ilo2]
on :eject
See the examples directory for examples with more detailed descriptions of using these resources. It may also be helpful to take a look at recipes in the cookbook used for testing.
Contributing: Please see CONTRIBUTING.md for more info.
Feature Requests: If you have a need that is not met by the current implementation, please let us know (via a new issue). This feedback is crucial for us to deliver a useful product. Do not assume we have already thought of everything, because we assure you that is not the case.
This project is licensed under the Apache 2.0 license. Please see LICENSE for more info.
Please see CONTRIBUTING.md for more info.