Automation with GreenLake for Private Cloud Enterprise: Virtual Machines

H37XGAAE

Course ID

H37XGAAE

Duration

2 hours

Format

eLearning

Overview

This course introduces the use of the GreenLake Terraform Provider with the GreenLake for Private Cloud Enterprise: Virtual Machines service to deploy and manage compute instances using the Terraform Infrastructure as Code (IaC) application. You learn how to install open-source Terraform on a system, create a Terraform configuration file to describe a configuration of virtual machine instances, create an GreenLake API client, and then run Terraform to validate the configuration file and deploy virtual machine instances.

Course ID

H37XGAAE

Duration

2 hours

Format

eLearning

  • Audience

    This course is ideal for users and developers who want to take advantage of the bare metal infrastructure provided by GreenLake for Private Cloud Enterprise to employ Terraform Infrastructure as Code (IaC) automation to build and configure virtual machine instances.

  • Prerequisites

    There are no prerequisites for this course, but we recommend you have the following before attending:

    • Experience provisioning and using virtual machines
    • Familiarity with using resources such as servers, storage, and networks in a public or private cloud

  • Objectives

    After completing this course, you should be able to:

    • Describe the high-level components of the hpegl Terraform provider
    • Specify environment variables required by the provider
    • List the steps to install the Terraform provider
    • Describe how to configure the Terraform provider and a resource configuration
    • List the commands to initialize Terraform, validate the execution plan, and then execute the plan
    • Describe how to specify dynamic resources in a Terraform configuration

Divider Line
  • Course outline

Module 1: Overview of GreenLake Infrastructure as Code


  • Using GreenLake REST APIs
  • Infrastructure as Code for rapid provisioning
  • What is Terraform?
  • GreenLake Terraform integration
  • Services supported by the hpegl provider
  • Virtual Machines service required roles

Module 2: Creating an API Client


  • GreenLake API client
  • Creating an API client
  • Capturing essential API information
  • Creating a role assignment
  • Finding your tenant ID
  • Setting environment variables

Module 3: Creating a Terraform Configuration


  • Installing Terraform
  • Creating a Terraform configuration file
    • Terraform block
    • Provider block
    • Terraform documentation

Module 4: Creating a Virtual Machine Instance


  • Getting Terraform help
  • Ensuring consistent formatting
  • Initializing Terraform
  • Generating an optional execution plan
  • Applying the configuration
  • Inspecting the Terraform state

Module 5: Additional Actions


  • Refreshing the configuration state
  • Evolving your infrastructure
  • Adding metadata using tags and labels
  • Adding a volume
  • Creating a VM instance snapshot

5 reasons to choose HPE as your training partner

  1. Learn HPE and in-demand IT industry technologies from expert instructors.
  2. Build career-advancing power skills.
  3. Enjoy personalized learning journeys aligned to your company’s needs.
  4. Choose how you learn: in-person , virtually , or online —anytime, anywhere.
  5. Sharpen your skills with access to real environments in virtual labs .

Explore our simplified purchase options, including HPE Education Learning Credits .

  • Lab outline

Lab 1: Signing in to GreenLake


  • Starting a browser and navigating to GreenLake
  • Signing in with SSO
  • Viewing the services catalog
  • Selecting HPE Private Cloud Enterprise
  • Viewing the Dashboard features

Lab 2: Creating an API client


  • Creating an API client
  • Collecting client authorization details
  • Creating role assignments for the API client
  • Setting environment variables

Lab 3: Creating a Terraform Configuration


  • Accessing Terraform documentation
  • The Terraform CLI
  • Creating Terraform configuration files
  • Getting started using WSL
  • Editing the Terraform configuration files
  • Applying the Terraform configuration
  • Checking the resource state

Lab 4: Adding tags and labels


  • Adding tags and labels to a resource block
  • Applying the changes to the infrastructure using Terraform
  • Using the terraform show command to view the current state
  • Validating the labels and tags in Morpheus

Lab 5: Adding a volume


  • Adding a volume to a Terraform resource block
  • Applying the configuration changes using the terraform apply command
  • Viewing changes using the terraform show command

Lab 6: Creating an VM instance snapshot


  • Specifying an instance snapshot in the terraform configuration
  • Applying the modified terraform configuration
  • Viewing the added volume in Morpheus
  • Deleting your infrastructure

Recommended for you