Snow Software® Commander® multi-tenancy is very powerful and flexible, and allows for completely unique experiences for each organization's members, whether these are customers for service providers, or business units in the enterprise. The process of adding a new Tenant to a Multi-Tenant Commander system involves several steps and can take a significant amount of time to perform manually. To speed up this process we've prepared a sample PowerShell script which automates many of the actions required in the onboarding process.
This script performs the following actions:
- Creates an Organization for the new Tenant in Commander
- Adds a new Owner for the Organization from a connected Active Directory system
- Creates a VM Folder on the selected vCenter for the new Tenant and a set of sub-folders under that root folder
- Creates a new Deployment Destination using a selected Datastore, Datacenter, Cluster, VM Folder and Network and configures the new Organization with the new Deployment Destination
- Configures the CPU, Storage and Memory Quota for the new Organization
This article will guide you through installing and configuring the New Tenant Onboarding scripts in your Commander system.
Requirements
- Snow Software® Commander 6.0.0 or later
- VMware PowerCLI 6.5R1installed on the Commander application server
- Snow Software Commander REST API PowerShell libraries installed on the Commander application server
- PowerShell v5 installed on the Commander application server
- Commander Scripts “ New Tenant Onboarding and Sync Custom Attributes scripts
Additionally, this script assumes you have connected a vCenter system and an Active Directory system to your Commander install.
Create Required Custom Attributes
The first step in configuring the Onboarding script is to create Custom Attributes. These custom attributes must be created to allow you to configure the various Deployment Destination options.
Custom Attribute names should match the list below. The Sync Custom Attributes script expects certain attribute names to function properly.
You will need to create the following Custom Attributes in your Commander system:
| Custom Field Name: | Custom Field Type: | Edit in Service Portal: | Description: |
| Organization Name | Text | True | This is the name of the new Tenant's organization. |
| Organization Manager Email | Text | True | This is the email address of the manager for the new organization. |
| CPU Quota | Text | True | This is the CPU quota (# of CPUs) allowed the new Tenant's organization |
| Memory Quota | Text | True | This is the Memory quota (GB of RAM) allowed the new Tenant's organization |
| Storage Quota | Text | True | This is the Storage quota (GB of HDD space) allowed the new Tenant's organization |
| Destination Folders List | Text | True | This is a comma separated list of Folders which will be created for the Tenant in vCenter. For example: Production, Testing, Development |
For details on creating a Custom Attribute please see this article.
Additional Custom Attributes will be automatically created by the Sync Custom Attributes script so you do not need to manually create them. They are detailed below for reference:
| Custom Field Name: | Custom Field Type: | Description: |
| Cloud Account (Managed System) | List | This is the list of cloud account (managed system) that you can choose from when onboarding the Tenant. This defines which VMware system the Tenant is hosted on. |
| Data Center | Sublist of Cloud Account (Managed System) list | This is the list of Data Centers under the selected Cloud Account (Managed System). |
| Datastore | Sublist of Cloud Account (Managed System) list | This is the list of Datastores under the selected Cloud Account (Managed System). |
| Cluster | Sublist of Cloud Account (Managed System) list | This is the list of Clusters unders the selected Cloud Account (Managed System). |
| Network | Sublist of Cluster list | This is the list of Networks under the selected Cluster. |
Preparing the Required Script Files
The New Tenant Onboarding and Sync Custom Attribute scripts should be placed in a Scripts folder on the root of the PC. The script files should be placed in C:\Scripts\. The Onboarding and Sync Custom Attribute scripts assume that other required files will also be in the C:\Scripts\ folder.
The New Tenant Onboarding script requires minor modifications to function. The Edit these for your Environment section in the Onboarding script details the variables you need to set to make use of the New Tenant Onboarding script.
Likewise, the Sync Custom Attributes script includes an Edit these for your Environment section which details the variables you need to set to make use of the Sync Custom Attributes script.
Please review both files and set the required variables as per the notes in the scripts.
Creating required Credentials Files
Several credentials files must be created to allow the scripts to connect to the Commander server, vCenter server and, optionally, the Active Directory server.
All the credentials should be placed in the C:\Scripts\ folder along with the script files.
- The Commander Credential file should be named CommanderCreds.xml
- The vCenter Credential file should be named VCenterCreds.xml
- The Active Directory Credential should be named ADCreds.xml
Instructions to create the encrypted credentials can be found in our support portal here.
Create a Command Workflow for Sync Custom Attributes
The Onboarding process uses values stored in a set of Custom Attributes. Those attributes are populated using the Sync Custom Attributes script which can be executed using a Command Workflow.
- Log into your Commander Admin portal and select Configuration -> Command Workflows from the main menu.
- Next, click the Add button to create a new Command Workflow. Name the new workflow Onboarding Custom Attribute Sync and set the Target Type to All Types. Select Next.
- On the Steps page, click the Add button and choose the Execute Script option. In the Command Line field, enter the following and then click Next:
powershell.exe -ExecutionPolicy Bypass &{C:\scripts\Sync_Custom_Attributes.ps1} - On the Permissions page chose any Organizations or Users which you want to have access to this Workflow. You can also choose to allow everyone to access the workflow. Click Next.
- Click Next on the Options page and then click Finish on the Summary page.
This Workflow must be run once before you can use the New Tenant Onboarding Service. The script will populate the Cloud Account (Managed System), Cluster, Data Center, Datastore and Network custom attributes so that you can select them when performing the New Tenant Onboarding Service request.
- To run the workflow, select Views->VMs and Templates from the top menu.
- Navigate the tree on the left, locate any VM. Right click the VM and select Run Workflow.
- Select the Onboarding Custom Attribute Sync workflow and click Run.
- The script will run and populate the required custom attributes. Check the Task an Workflow results in Commander to see the result and confirm that the workflow and script processed correctly.
Additionally, you can schedule the script to run regularly which will keep the various systems which are tracked using these custom attributes up to date. Windows Task Scheduler can be used to run the script on a schedule using the Powershell command in Step 3 above.
Create a Service for New Tenant Onboarding
Now that we've created the custom attributes and populated them we can create the Service to allow you to onboard a new tenant.
- Log into your Commander Admin Portal, select Configuration -> Service Request Configuration. Then click the Add Service button to create a new service.
- Enter the name as œNew Tenant Onboarding� and click the Next button.
- On the Component Blueprint page click the Add button and select New Component. Name the new component Onboarding Task and enter whatever annual cost is appropriate for Onboarding for your organization. Click Add to Service and then click Next.
- On the Onboarding Task page, select the Attributes tab. Click the Add Attributes link and add the following attributes:
Organization Name Storage Quota Datastore Organization Manager Email Destination Folders List Cluster CPU Quota Cloud Account (Managed System) Network Memory Quota Data Center
- Next, click the Form tab and add each of the Attributes above to the form as form elements. All the fields should be set as Required. Click Next once all the form elements have been added.
- On the Deployment page, click the Add Workflow link. Name the workflow œNew Tenant Workflow� and click Next.
- On the Steps page, click the Add button and select the Execute Script item. Enter the following in the Command Line box and click Next and then click Finish:
powershell.exe -ExecutionPolicy Bypass &{C:\scripts\New_Tenant_Onboarding.ps1 '#{request.id}'} -
Click Next. On the Visibility page select the Organizations, Users and Groups you wish to publish the workflow for. Normally this is published only to your administrators group. Click Next and then click Finish on the Summary page.
Now you can request the New Tenant Onboarding any time you want to add a new Tenant and simply fill in the form fields - the script will then handle creating the Organization, adding the Manager, setting the Quota and creating Folders and Deployment Destinations for the Tenant automatically.
Related Articles
Submitting Snow Software® Commander® Diagnostics 124Number of Views Configuring the Snow Software® Commander® Service Account 6Number of Views Does Snow Software® Commander® Use Cookies? 6Number of Views Observing Console Information During Snow Software® Commander® Installation 6Number of Views Measuring Application Resource Consumption with Snow Software® Commander® 6Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago