Giter Club home page Giter Club logo

oneview_chef_box_hugger's Introduction

Chef Box Hugger Cookbook for HPE OneView

This cookbook provides recipes for the setup and configuration of HPE OneView.

HPE OneView provides a simple, consumer-inspired user experience that dramatically accelerates the everyday tasks of a Composable Infrastructure. By changing the focus from 'how devices are managed' to 'how people work', HPE OneView delivers a software-defined management platform that is extensible and easy to use.

Environment Variables

export ONEVIEWSDK_URL="https://oneviewIPaddress"
export ONEVIEWSDK_USER="OneViewUserName"
export ONEVIEWSDK_PASSWORD="Your_passoword"

And if you want to turn off SSL (because of self-signed certs)

export ONEVIEWSDK_SSL_ENABLED=false

OneView SDK for Ruby

Require the gem in your Gemfile:

$ gem 'oneview-sdk', '~> 5.2'
$ bundle install

Or run the command:

$ gem install oneview-sdk

https://github.com/HewlettPackard/oneview-sdk-ruby

Run the Code

$ chef-client -z -o oneview_chef_box_hugger::default

Attributes

Attributes that must be passed to Chef OneView:

['oneview']['do_not_delete']       = true or false  ## Delete All Configuration

['oneview']['ethernet_name']       = 'Ethernet Name'
['oneview']['network_set']         = 'Network Name'
['oneview']['fibre_channel']       = 'Fibre Channel Name'
['oneview']['vlanId']              = 'vLan Number' i.e. 3001
['oneview']['network_config']      = true or false

['oneview']['lig_name']            = 'Logical Interconnect Group Name'
['oneview']['lig_uls_name']        = 'Logical Interconnect Group UplinkSet1 Name'
['oneview']['icm_type']            = 'Interconnect Type'
['oneview']['enclosure_index']     = 'Enclosure Index Nbr'
['oneview']['side_a_bay']          = 'Nbr'  Note: Side A is 1,2 or 3
['oneview']['side_b_bay']          = 'Nbr'  Note: Side B is 4,5 or 6
['oneview']['port']                = 'Port' i.e. 'Q1' or 'Q1:1' or 'Q2'
['oneview']['interconnect_config'] = true or false

['oneview']['scope_1']             = 'Scope Name'
['oneview']['scope_2']             = 'Scope Name'
['oneview']['scope_config']        = true or false

['oneview']['server_profile_name']  = 'Server Profile Name'
['oneview']['server_hardware_type'] = 'HPE Server Type'

Recipes

network_config

This recipe creates the following based on the input attributes above:

  • Create Network - Ethernet
  • Create Network - Fibre Channel
  • Create Network Set

network_delete

This recipe removes the created 'network' components. It is also called if you have set the attribute

['oneview']['network_config'] = false

interconnect_config

This recipe creates the following based on the input attributes above:

  • Logical Interconnect Group
  • Uplink Set

interconnect_delete

This recipe removes the created 'logical interconnect group' components. It is also called if you have set the attribute

['oneview']['interconnect_config'] = false

scope_config

NOTE: Support only in API300 onwards. This recipe creates the scope.

scope_delete

This recipe deletes the scope. It is also called if you have set the attribute

['oneview']['scope_config'] = false

server_profile_config

This recipe creates the following based on the input attributes above:

  • Server Profile

server_profile__delete

This recipe deletes the scope. It is also called if you have set the attribute

['oneview']['server_profile_config'] = false

Video Demo

The following video shows the code in action.

Alt text

Testing

Use the HPE OneView plugin for InSpec. A demonstration of the code is here - https://github.com/anthonygrees/oneview_inspec_box_hugger

This cookbook uses the testing style documented here: https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD

License and Author

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

oneview_chef_box_hugger's People

Contributors

anthonygrees avatar nwright-nz avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

nwright-nz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.