HewlettPackard/terraform-provider-oneview

Name: terraform-provider-oneview

Owner: Hewlett Packard Enterprise

Description: Automates the provisioning of physical infrastructure from a private cloud using templates from HPE OneView with Terraform

Created: 2016-08-04 22:38:38.0

Updated: 2017-12-27 19:53:25.0

Pushed: 2017-08-01 20:03:06.0

Homepage:

Size: 7115

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

terraform-provider-oneview

Build Status

A Terraform provider for oneview

Installing terraform-provider-oneview with Go
wnload the source code for terraform-provider-oneview
d build the needed binary, by saving it inside $GOPATH/bin
 get -u github.com/HewlettPackard/terraform-provider-oneview

py the binary to have it along the terraform binary
 $GOPATH/bin/terraform-provider-oneview /usr/local/bin/terraform
Using terraform-provider-oneview with Docker

We also provide a lightweight and easy way to test and execute terraform-provider-oneview. The dciacoe/terraform-provider-oneview docker image contains an installation of Terraform and our provider you can use by just pulling down the Docker Image:

wnload and store a local copy of terraform-provider-oneview and
e it as a Docker image.
cker pull dciacoe/terraform-provider-oneview

n docker commands using the "ash" shell from Alpine, this will create
sh session where you can create files, issue commands and execute both
rraform and the provider with ease.
cker run -it dciacoe/terraform-provider-oneview /bin/sh
Example terraform file to provision a server with an operating system
ider "oneview" {
_username   = "Administrator"
_password   = "thisisapassword"
_endpoint   = "https://oneview_instance.com"


urce "oneview_server_profile" "default" {
me              = "test"
mplate          = "Web Server Template"

specify this value so icsp can find the public ip address.
blic_connection = "pub_conn_1"


urce "icsp_server" "default" {
o_ip = "15.x.x.x"
er_name = "ilo_user"
ssword = "ilo_password"
rial_number = "${oneview_server_profile.default.serial_number}"
ild_plans = ["/rest/os-deployment-build-plans/1570001"]

this attribute gets you the public ip address
blic_mac = "${oneview_server_profile.default.public_mac}"

More information about how to configure the provider can be found here

Resources

Any resource that OneView can manage is on the roadmap for Terraform to also manage. Below is the current list of resources that Terraform can manage. Open an issue if there is a resource that needs to be developed as soon as possible.

Server Profile
urce "oneview_server_profile" "default" {
me = "test-server-profile"
mplate = "${oneview_server_profile_template.test.name}"

ICSP Server

This block takes an already provsioned server and through ICSP lays down an operating system or whatever is specified in the build plans.

urce "icsp_server" "default" {
o_ip = "15.x.x.x"
er_name = "ilo_user"
ssword = "ilo_password"
rial_number = "${oneview_server_profile.default.serial_number}"
ild_plans = ["/rest/os-deployment-build-plans/1570001"]

Image Streamer Deployment Plan

This block takes an already provisioned server and through Image Streamer lays down an Operating System.

urce "oneview_i3s_plan" "default" {
rver_name = "${oneview_server_profile.default.name}"
_deployment_plan = "Ubuntu 16.04"
ploy_net_name = "I3S-Deploy-v301"

Server Profile Template
urce "oneview_server_profile_template" "default" {
me = "test-server-profile-template"
closure_group = "my_enclosure_group"
rver_hardware_type = "BL460c Gen9 1"

Ethernet Network
urce "oneview_ethernet_network" "default" {
me = "test-ethernet-network"
an_id = 71

Fibre Channel Network
urce "oneview_fc_network" "default" {
me = "test-fc-network"

Fibre Channel over Ethernet Network
urce "oneview_fcoe_network" "default" {
me = "test-fcoe-network"
anId = 71

Network Set
urce "oneview_network_set" "default" {
me = "test-network-set"
twork_uris = ["${oneview_ethernet_network.default.*.uri}"]
tive_network_uri = "${oneview_ethernet_network.default.1.uri}"

Logical Interconnect Group
urce "oneview_logical_interconnect_group" "default" {
me = "test-logical-interconnect-group"

ternal_network_uris = ["${oneview_ethernet_network.default.0.uri}"]

terconnect_map_entry_template {
interconnect_type_name = "HP VC FlexFabric-20/40 F8 Module"
bay_number = 1


link_set {
name = "uplink-default"
network_uris = ["${oneview_ethernet_network.test.1.uri}"]
logical_port_config {
  bay_num = 4
  port_num = [20,21]
}


Enclosure Group
urce "oneview_enclosure_group" "default" {
me = "default-enclosure-group"
gical_interconnect_groups = ["${oneview_logical_interconnect_group.primary.name}",
                             "${oneview_logical_interconnect_group.secondary.name}"]

Logical Switch
urce "oneview_logical_switch" "default" {
me = "test-logical-switch"
itch_type_name = "Cisco Nexus 6xxx"
itch_count = 1

License

This project is licensed under the Apache 2.0 license.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.