Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

ilorest (1) Versions 1.0.0

Showcases the python ilorest library examples

Policyfile
Berkshelf
Knife
cookbook 'ilorest', '~> 1.0.0', :supermarket
cookbook 'ilorest', '~> 1.0.0'
knife supermarket install ilorest
knife supermarket download ilorest
README
Dependencies
Changelog
Quality 0%

ilorest Cookbook PyPI

Table of Contents

  1. Description
  2. Requirements
  3. Platforms - which platforms are supported
  4. Attributes
  5. Usage
  6. How to contribute

Description

ilorest is a Chef cookbook that installs the Python ilorest library and runs a handful of examples included in the library. Currently ilorest works with Windows Server and any 'nix distribution.

ilorest was written primarily as an example for server administrators to use as a template or basis for writing their own modules using the ilorest library. ilorest installs the ilorest library as part of the installation to preserve idempotency along with managing the example scripts.

What does ilorest do?

ilorest starts by installing the python ilorest library through the usage of pip install. It has been set to be idempotent and supports multiple runs. Additionally, it also copies the required files into the node's cache. Subsequently, it runs a few examples with either default or set attributes. These examples are ex09, ex03, and ex14. Find MAC address, Change a bios setting, and managing a user session.

Note: These examples have been slightly modified from the originals. They support arguments passing the iLO credentials.

Requirements

ilorest requires the node to have Python version 2.7.11+ installed for ilorest to work properly. It is suggested that poise-python be used for python installation and management.

It is strongly suggested by Chef and us that chef-client be run as root or administrator, to ensure that everything is working properly. If root/administrator is not used, ilorest may fail.

Platforms

  • Windows Server 2012, Ubuntu, Red Hat Linux

Chef

  • Chef 12.0 or later

Cookbooks

  • poise-python - ilorest needs python to be pre-installed.

Attributes

ilorest::default

These are default values that ilorest is set to.

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['ilorest']['iLO_IP']</tt></td>
<td>String</td>
<td>IP address of the node's iLO</td>
<td><tt>10.0.0.100</tt></td>
</tr>
<tr>
<td><tt>['ilorest']['iLO_username']</tt></td>
<td>String</td>
<td>username to login to the node's iLO</td>
<td><tt>admin</tt></td>
</tr>
<tr>
<td><tt>['ilorest']['iLO_password']</tt></td>
<td>String</td>
<td>password to login to the node's iLO</td>
<td><tt>password</tt></td>
</tr>
</table>

Usage

ilorest::default

include ilorest in your node's run_list to use the default values.

It is suggested that the attributes be edited before using since the default iLO IP address is unlikely to be the same as your node's. See the attribute example below for help in setting the attributes in JSON format.

Attribute example

Below is an example of what the attributes should look like when edit attributes is selected through the Chef Manage UI.

{
  "ilorest": {
    "iLO_IP" : "16.1.1.10",
    "iLO_username": "admin",
    "iLO_password": "password",
  }
}

Replacing examples

Examples can be easily added or replaced by following the format for the execute resource. newexample.py should be replaced with the new script you want to execute. live_stream is set to true here to show an output. The #{platformdirectory} variable is set depending on the platform running this module, and the ['ilorest'] attributes are set in the default.rb in the attribute's folder, or set through the use of knife or through the Chef Management UI.

execute "new example" do
  command "newexample.py #{node['ilorest']['iLO_IP']} #{node['ilorest']['iLO_username']} #{node['ilorest']['iLO_password']}"
  cwd "#{platformdirectory}"
  live_stream true
end

Note: live_stream is set to true to produce log results.

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Authors: TODO: List authors

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

ilorest CHANGELOG

This file is used to list changes made in each version of the ilorest cookbook.

1.0.0

  • [lumbajack] - Initial release of ilorest

Collaborator Number Metric
            

1.0.0 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

1.0.0 failed this metric

FC066: Ensure chef_version is set in metadata: ilorest/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

1.0.0 failed this metric

Failure: Cookbook should not contain binaries. Found:
ilorest/files/hprest_chif.dll

Testing File Metric
            

1.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

1.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number