Automation

Cloudbolt integrates with Tintri

Greetings,

Clouldbolt, a hybrid cloud management system, integrated their GUI with Tintri by using Tintri’s Python SDK.  Watch this video by Tristan Todd.  As you can see in the video, Cloudbolt integrated Tintri’s snapshots, clones, and statistics. Cloudbolt’s graphs are similar to Tintri’s GUI graphs which make it easy to move between products.

If you’re interested in the integration, Cloudbolt provides the code on their GitHub site in the ui_extensions directory.  For the Tintri extension, look in the tintri directory and follow the README.md directions.

As Tintri’s Developer Evangelist, what interests me in the product is that it used Tintri’s PySDK.  This is one of the reasons why PySDK was developed:  to facilitate integration of current IT management and automation products with Tintri storage.

Until next time,

– Rick –

Upgrade VMstores in Parallel

Greetings,

I just added some PowerShell code that upgrades VMstores in parallel to our GitHub site.  A JSON configuration file is used to configure the VMstores.  For example:

[
    {
        "VmstoreDnsName": "vmstore1",
        "Username": "username",
        "Password": "password",
        "UpgradePathToFile": "C:\Users\TestUser\upgrade_file.rpm"
    },
    {
        "VmstoreDnsName": "vmstore2",
        "Username": "username",
        "Password": "password",
        "UpgradePathToFile": "C:\Users\TestUser\upgrade_file.rpm"
    }
]

The only required attribute is the VmstoreDnsName. All the other attributes are optional and can be from the command line.  Here is a JSON configuration with only the VMstore names:

[
    {
        "VmstoreDnsName": "vmstore1"
    },
    {
        "VmstoreDnsName": "vmstore2"
    }
]

The following code can uses the above file.

Import-Module -Name .\VmstoreUpgrade.psm1
Import-Module -Name .\Parallel-Upgrade.psm1

# Set the user, VMstore configuration file, and upgrade file.
$user = "admin"
$vmstore_list_file = ".\vmstore_upgrade_list.json"
$upgradeFile = "C:\tmp\txos-4.3.1.5-8520.45801.20652.x86_64.rpm"

# Do the parallel upgrade.
Write-Host "Parallel updating VMstores with $upgradeFile"

# Get credentials that will work for all VMstores.
$cred = Get-Credential -Username $Username -Message "Enter valid password for all servers"
$pass = $cred.GetNetworkCredential().Password

# Start the parallel upgrade using a JSON file containing the VMstores, and
# the same username and password for all VMstores. 
Parallel-Upgrade -Verbose -UserName $user -UseSameUserName -Password $pass -UseSamePassword -UpgradeFile $upgradeFile -UseSameUpgradeFile -UseJsonFile $vmstore_list_file

Write-Host "Done Updating"
Write-Host ""

The above code gets a credential that is valid for all VMstores in the configuration file. Then the command line specifies the user name, password, and two options, -UseSameUserName, and -UseSamePassword.

Parallel-Upgrade logs to a dated log file: YYYY-MM-dd-HH-mm-ss_parallel_upgrade.log. The Verbose option will produce extra verbiage to follow along in the process and assist in debugging problems.  Unfortunately, you have to read the Parallel-Upgrade.psm1 module for help.

Until next time,

– Rick –

Private Cloud Automation

I want to point out a set of 4 postings by Matthew Geddes, a Hyper-V architect, on Automation and Private Cloud.

  1. Part 1: sets the stage: a number of production SQL Server instances where some nightly reporting jobs are run. These reporting jobs are quite heavyweight and impact other users during their large processing window. What we want to do is to have the reporting jobs run on non-production VMs with that day’s production data.
  2. Part 2: shows how how to use syncVM from Tintri’s PowerShell Toolkit.  Matt breaks down usage of the PowerShell cmdlet, Sync-TintriVDisk; and then shows how to integrate it into a small script.
  3. Part 3: adds more code to the small script and wraps it into a function so that it can be used for multiple reports.
  4. Part 4: adds more automation with by showing how to parameterize the reports.  Matt summarizes and gives you some homework.

I like the way Matt goes through presents the use case, and then goes through the code step by step.

Until next time,

– Rick –