Skip to content

The Cisco HyperFlex Edge Automated Deployment Tool for Cisco Intersight enables automated deployment of HyperFlex Edge cluster installations through the Intersight API.

License

Notifications You must be signed in to change notification settings

ugo-emekauwa/hx-auto-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HyperFlex Edge Automated Deployment Tool for Cisco Intersight

HyperFlex Edge with Intersight Image

The Cisco HyperFlex Edge Automated Deployment Tool (HX Auto Deploy) for Cisco Intersight enables automated deployment of HyperFlex Edge cluster installations through the Intersight API.


published

Use Cases

  • Automatically build a HyperFlex Edge Cluster Profile with all Policies configured to your exact specification. Anything that can be done through the Intersight GUI can be done here!

  • Automatically assign the HyperFlex Edge Cluster Profile to HyperFlex servers registered under Intersight, using either the CIMC/KVM IP addresses or serial numbers.

  • Automatically deploy the HyperFlex Edge Cluster Profile to the assigned HyperFlex servers.

  • Quickly restore HyperFlex Edge Cluster Profile and Policy configurations as part of your on-prem Intersight backup solution.

  • Supported with Intersight SaaS, Connected Virtual Appliance, and Private Virtual Appliance.

Prerequisites

  1. Python 3.7 or higher installed, which can be downloaded from https://www.python.org/downloads/.

    • If you're installing for the first time on Windows, select the option "Add Python 3.x to PATH" during the installation.
  2. Git installed, which can be downloaded from https://git-scm.com/downloads/.

  3. Install the Cisco Intersight SDK for Python by running the following command:

    pip install git+https://github.com/CiscoUcs/intersight-python.git
    

    More information on the Cisco Intersight SDK for Python can be found at https://github.com/CiscoUcs/intersight-python.

  4. [Optional] If you already have the Cisco Intersight SDK for Python installed, you may need to upgrade. An upgrade can be performed by running the following command:

    pip install git+https://github.com/CiscoUcs/intersight-python.git --upgrade --user
    
  5. Clone or download the HyperFlex Edge Automated Deployment Tool for Cisco Intersight repository by using the GitHub Code Button link on the main repository web page or by running the following command from the target directory:

    git clone https://github.com/ugo-emekauwa/hx-auto-deploy
    

    If you are downloading the repository file as a zipped file, unzip the file once the download has completed.

  6. Generate a version 2 API key from your Intersight account.

    (a). Log into your Intersight account, click the Settings icon and select Settings.

    Figure 1 - Go to Settings

    (b). Under the API section in the work pane, click API Keys.

    Figure 2 - Go to API Keys

    (c). In the API Keys section in the work pane, click the Generate API Key button.

    Figure 3 - Click the Generate API Key button

    (d). In the Generate API Key window, enter a description or name for your API key.

    Figure 4 - Enter an API key description

    (e). In the Generate API Key window, under API Key Purpose, verify a version 2 API key is selected.

    Figure 5 - Verify version 2 API key selection

    (f). In the Generate API Key window, click the Generate button.

    Figure 6 - Click the Generate button

    (g). In the Generate API Key window, a new API key will be generated. Copy the API Key ID and download the Secret Key to a secure location.

    Figure 7 - Copy and save the API key data

  7. Gather the CIMC/KVM IP address or serial number of the servers registered with Intersight that you plan on using in your HyperFlex Edge cluster. You can login to the Intersight GUI and find this information in the ADMIN/Devices section under the Device IP and Device ID columns. HyperFlex Edge with Intersight currently supports 2, 3 or 4 server node clusters.

    Figure 8 - Gather the server attributes

How to Use

  1. Please ensure that the above Prerequisites have been met.

  2. Within the unzipped repository, edit the HX_Auto_Deploy.py file to set the key_id variable using the following instructions:

    (a). Open the HX_Auto_Deploy.py file in an IDLE or text editor of choice.

    (b). Find the comment # MODULE REQUIREMENT 1 #.

    Figure 9 - MODULE REQUIREMENT 1 location

    (c). Underneath, you will find the variable key_id. The variable is currently empty.

    Figure 10 - key_id variable location

    (d). Fill in between the quotes of the key_id variable value with the ID of your API key. For example:

    key_id = "5c89885075646127773ec143/5c82fc477577712d3088eb2f/5c8987b17577712d302eaaff"
  3. Edit the HX_Auto_Deploy.py file to set the key variable using the following instructions:

    (a). Open the HX_Auto_Deploy.py file in an IDLE or text editor of choice.

    (b). Find the comment # MODULE REQUIREMENT 2 #.

    Figure 11 - MODULE REQUIREMENT 2 location

    (c). Underneath, you will find the variable key. The variable is currently empty.

    Figure 12 - key variable location

    (d). Fill in between the quotes of the key variable value with your system's file path to the SecretKey.txt file for your API key. For example:

    key = "C:\\Keys\\Key1\\SecretKey.txt"
  4. Edit the HX_Auto_Deploy.py file to set all the HyperFlex configuration variable values using the following instructions:

    (a). Open the HX_Auto_Deploy.py file in an IDLE or text editor of choice.

    (b). Find the comment # MODULE REQUIREMENT 3 #.

    Figure 13 - MODULE REQUIREMENT 3 location

    (c). Underneath, you will find the instructions to edit the HyperFlex configuration variable values to match your environment. Each variable has a sample value for ease of use. The variable values to edit begin under the comment ####### Start Configuration Settings - Provide values for the variables listed below. #######.

    Figure 14 - Start Configuration Settings location

    Completion of editing the HyperFlex configuration variable values is marked by the comment ####### Finish Configuration Settings - The required value entries are complete. #######.

    Figure 15 - Finish Configuration Settings location

  5. Save the changes you have made to the HX_Auto_Deploy.py file.

  6. Run the HX_Auto_Deploy.py file. Upon a successful deployment, you will be informed that the new HyperFlex cluster profile has been deployed.

    Figure 16 - Completed HX_Auto_Deploy.py file execution

  7. Once the HX Auto Deploy Tool has completed running, you can login to the Intersight GUI to see the HyperFlex Edge cluster profile created and in a state of deployment in the CONFIGURE/Profiles section.

    Figure 17 - HyperFlex Cluster Profile Configuring state

The HyperFlex Notification Tool available on GitHub at https://github.com/ugo-emekauwa/hyperflex-notification-tool can be used to receive automated updates on the status of the HyperFlex Edge deployment.

Where to Demo

The HyperFlex Edge Automated Deployment Tool for Cisco Intersight is featured on Cisco dCloud in the following labs:

  1. Cisco HyperFlex Edge 5.0 with Intersight v1 (All Flash, 2-Node) - See the section Deploy HyperFlex Using API.
  2. Cisco HyperFlex Edge 5.0 with Intersight v1 (Hybrid, 2-Node) - See the section Deploy HyperFlex Using API.
  3. Cisco HyperFlex Edge 5.0 with Intersight v1 (All Flash, 3-Node) - See the section Deploy HyperFlex Using API.

dCloud is available at https://dcloud.cisco.com, where Cisco product demonstrations and labs can be found in the Catalog.

Related Tools

Here are similar tools to help administer and manage Cisco HyperFlex, UCS and Intersight environments.

Author

Ugo Emekauwa

Contact Information

uemekauw@cisco.com or uemekauwa@gmail.com

About

The Cisco HyperFlex Edge Automated Deployment Tool for Cisco Intersight enables automated deployment of HyperFlex Edge cluster installations through the Intersight API.

Topics

Resources

License

Stars

Watchers

Forks

Languages