Automation

Provisioning -> Automation

The Automation section is composed of Tasks and Workflows. Tasks can be scripts added directly, scripts and blueprints from the Library section, recipes, playbooks, salt states, puppet agent installs, or http (api) calls. These Tasks are are combined into workflows, which can be selected to run at provision time or executed on existing instances via Actions -> Run Workflow.

Tasks

Overview

There are many Task Types available, including scripts added directly, scripts and templates from the Library section, recipes, playbooks, salt states, puppet agent installs, and http (api) calls. Tasks are primarily created for use in Workflows, but a single Task can be executed on an existing instance via Actions -> Run Task.

Role Permissions

The User Role Permission ‘Provisioning: Tasks FULL’ is required to create, edit and delete tasks.

Tasks Types that can execute locally against the Morpheus Appliance have an additional Role Permission: Tasks - Script Engines. Script Engine Task Types will be hidden for users without Tasks - Script Engines role permissions.

Common Options

When creating a Task, the required and optional inputs will vary significantly by the Task type. However, there are options which are common to Tasks of all types.

Target Options

When creating a Task, users can select a target to perform the execution. Some Task types allow for any of the three execution targets listed below and some will limit the user to two or just one. The table in the next section lists the available execution targets for each Task type.

  • Resource: An Morpheus-managed Instance or server is selected to execute the Task

  • Local: The Task is executed by the Morpheus appliance node

  • Remote: The user specifies a remote box which will execute the Task

Execute Options

  • Retryable: When marked, this Task can be configured to be retried in the event of failure

  • Retry Count: The maximum number of times the Task will be retried when there is a failure

  • Retry Delay: The length of time (in seconds) Morpheus will wait to retry the Task

  • Allow Custom Config: When marked, a text area is provided at Task execution time to allow the user to pass extra variables or specify extra configuration

Task Types

Available Task Types

Task Type

Task Description

Source Options

Execute Target Options

Configuration Requirements

Role Permissions Requirements

ansible

Ansible

Runs an Ansible playbook. Ansible Integration required

Ansible Repo (Git)

Local, Resource

Existing Ansible Integration

Provisioning: Tasks

ansibletower

Ansible Tower

Relays Ansible calls to Ansible Tower

Tower Integration

Local, Remote, Resource

Existing Ansible Tower Integration

Provisioning: Tasks

chef

Chef bootstrap

Executes Chef bootstrap and run list. Chef Integration required

Chef Server

Resource

Existing Chef Integration

Provisioning: Tasks

email

Email

Send an email from a Workflow

Task Content

Local

SMTP Configured

Provisioning: Tasks

groovy

Groovy script

Executes Groovy Script locally (on Morpheus app node)

Local, Repository, Url

Local

None

Provisioning: Tasks, Tasks - Script Engines

http

HTTP

Executes REST call for targeting external API’s.

Local

Local

None

Provisioning: Tasks

javascript

Javascript

Executes Javascript locally (on Morpheus app node)

Local

Local

None

Provisioning: Tasks, Tasks - Script Engines

jruby

jRuby Scirpt

Executes Ruby script locally (on Morpheus app node)

Local, Repository, Url

Local

None

Provisioning: Tasks, Tasks - Script Engines

libraryscript

Library Script

Creates a Task from an existing Library Script (Provisioning -> Library -> Scripts)

Library Script

Resource

Existing Library Script

Provisioning: Tasks

template

Library Template

Creates a Task from an existing Library Template (Provisioning -> Library-> Templates)

Library Template

Resource

Existing Library Templates

Provisioning: Tasks

powershell

PowerShell Script

Execute PowerShell Script on the Target Resource

Local, Repository, Url

Remote, Resource

None

Provisioning: Tasks

puppet

Puppet Agent Install

Executes Puppet Agent bootstrap, writes puppet.conf and triggers agent checkin. Puppet Integration required

Puppet Master

Resource

Existing Puppet Integration

Provisioning: Tasks

python

Python Script

Executes Python Script locally

Local, Repository, Url

Local

virtualenv installed on Appliance Nodes (pip install virtualenv)

Provisioning: Tasks, Tasks - Script Engines

restart

Restart

Restarts target VM/Host/Container and confirms startup status before executing next task in Workflow

System

Resource

None

Provisioning: Tasks

shellscript

Shell Script

Executes Bash script on the Target Resource

Local, Repository, Url

Local, Remote, Resource

None

Provisioning: Tasks

vro

vRealize Orchestrator Workflow

Executes vRO Workflow on the Target Resource

vRO Integraiton

Local, Resource

Existing vRO Integration

Provisioning: Tasks

Task Configuration

  • Ansible Playbook

    ansible

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • ANSIBLE REPO: Select existing Ansible Integration

    • GIT REF: Specify tag or branch (Option, blank assumes default)

    • PLAYBOOK: Name of playbook to execute, both playbook and playbook.yml format supported

    • TAGS: Enter comma separated tags to filter executed tasks by (ie --tags)

    • SKIP TAGS: Enter comma separated tags to run the playbook without matching tagged tasks (ie --skip-tags)

    Important

    Using different Git Refs for multiple Ansible Tasks in same Workflow is not supported. Git Refs can vary between Workflows, but Tasks in each Workflow must use the same Git Ref.

  • Chef bootstrap

    chef

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • CHEF SERVER: Select existing Chef integration

    • ENVIRONMENT: Populate Chef environment, or leave as _default

    • RUN LIST: Enter Run List, eg role[web]

    • DATA BAG KEY: Enter data bag key (will be masked upon save)

    • DATA BAG KEY PATH: Enter data bag key path, eg /etc/chef/databag_secret

    • NODE NAME: Defaults to Instance name, configurable

    • NODE ATTRIBUTES: Specify attributes inside the {}

  • Groovy script

    groovy

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • RESULT TYPE: Single Value, Key/Value Pairs, or JSON

    • CONTENT: Contents of the Groovy script if not sourcing it from a repository

  • Email

    email

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • SOURCE: Choose local to draft or paste the email directly into the Task. Choose Repository or URL to bring in a template from a Git repository or another outside source

    • EMAIL ADDRESS: Email addresses can be entered literally or Morpheus automation variables can be injected, such as <%=instance.createdByEmail%>

    • SUBJECT: The subject line of the email, Morpheus automation variables can be injected into the subject field

    • CONTENT: The body of the email is HTML. Morpheus automation variables can be injected into the email body when needed

    • SKIP WRAPPED EMAIL TEMPLATE: The Morpheus-styled email template is ignored and only HTML in the Content field is used

    Tip

    To whitelabel email sent from Tasks, select SKIP WRAPPED EMAIL TEMPLATE and use an HTML template with your own CSS styling

  • HTTP (API)

    http

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • RESULT TYPE: Single Value, Key/Value Pairs, or JSON

    • URL: An HTTP or HTTPS URL as the HTTP Task target

    • HTTP METHOD: GET (default), POST, PUT, PATCH, HEAD, or DELETE

    • AUTH USER: Username for username/password authentication

    • PASSWORD: Password for username/password authentication

    • BODY: Request Body

    • HTTP HEADERS: Enter requests headers, examples below:

    Authorization

    Bearer token

    Content-Type

    application/json

    • IGNORE SSL ERRORS: Mark when making REST calls to systems without a trusted SSL certificate

  • Javascript

    javascript

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • RESULT TYPE: Single Value, Key/Value Pairs, or JSON

    • SCRIPT: Javascript contents to execute

  • jRuby Script

    jruby

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • RESULT TYPE: Single Value, Key/Value Pairs, or JSON

    • CONTENT: Contents of the jRuby script is entered here if it’s not being called in from an outside source

  • Library Script

    libraryscript

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • RESULT TYPE: Single Value, Key/Value Pairs, or JSON

    • SCRIPT: Search for an existing script in the typeahead field

  • Library Template

    template

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • TEMPLATE: Search for an existing template in the typeahead field

  • Powershell Script

    powershell

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • RESULT TYPE: Single Value, Key/Value Pairs, or JSON

    • ELEVATED SHELL: Run script with administrator privileges

    • IP ADDRESS: IP address of the PowerShell Task target

    • PORT: SSH port for PowerShell Task target (5985 default)

    • USERNAME: Username for PowerShell Task target

    • PASSWORD: Password for PowerShell Task target

    • Content: Enter script to execute if not calling the script in from an outside source

  • Puppet Agent Install

    puppet

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • PUPPET MASTER: Select Puppet Master from an existing Puppet integration

    • PUPPET NODE NAME: Enter Puppet node name. Variables supported eg. <%= instance.name %>

    • PUPPET ENVIRONMENT: Enter Puppet environment, eg. production

  • Python Script

    python

    Important

    Beginning with Morpheus version 4.2.1, Python Tasks use virtual environments. For this reason, virtualenv must be installed on your appliances in order to work with Python Tasks. See the information below for more detailed steps to install virtualenv on your Morpheus appliance node(s).

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • RESULT TYPE: Single Value, Key/Value Pairs, or JSON

    • CONTENT: Python script to execute is entered here if not pulled in from an outside repository

    • COMMAND ARGUMENTS: Optional arguments passed into the Python script. Variables supported eg. <%= instance.name %>

    • ADDITIONAL PACKAGES: Additional packages to be installed after requirements.txt (if detected). Expected format for additional packages: ‘packageName==x.x.x packageName2==x.x.x’, the version must be specified

    • PYTHON BINARY: Optional binary to override the default Python binary


    CentOS 7 / Python 2.7 (RHEL system Python)

    With a fresh install of Morpheus on a default build of CentOS 7, Python Tasks will not function due to the missing requirement of virtualenv.

    If you attempt to run a python task, you will get an error similar to the following:

    Task Execution Failed on Attempt 1
    sudo: /tmp/py-8ae51ebf-749c-4354-b6e4-11ce541afad5/bin/python: command not found
    

    In order to run Morpheus Python Tasks in CentOS 7, install virtualenv: yum install python-virtualenv

    If you require python3, you can specify the binary to be used while building the virtual environment. In a default install, do the following: yum install python3. Then, in your Morpheus Python Task, specify the binary in the PYTHON BINARY field as “/bin/python3”. This will build a virtual environment in /tmp using the python3 binary, which is equivalent to making a virtual environment like so: virtualenv ~/venv -p /bin/python3.

    If you wish to install additional Python packages into the virtual environment, put them in pip format and space-separated into the ADDITIONAL PACKAGES field on the Python Task. Use the help text below the field to ensure correct formatting.

    CentOS 8 and Python

    In CentOS 8, Python is not installed by default. There is a platform-python but that should not be used for anything in userland. The error message with a default install of CentOS 8 will be similar to this:

    Task Execution Failed on Attempt 1
    sudo: /tmp/py-cffc9a8f-c40d-451d-956e-d6e9185ade33/bin/python: command not found
    

    The default virtualenv for CentOS 8 is the python3 variety, for Morpheus to use Python Tasks, do the following: yum install python3-virtualenv

    If Python2 is required, do the following: yum install python2 and specify /bin/python2 as the PYTHON BINARY in your Morpheus Task.

    This will build a virtualenv in /tmp using the python2 binary, which is equivalent to making a virtualenv like so: virtualenv ~/venv -p /bin/python2

    If you wish to install additional Python packages into the virtual environment, put them in pip format and space-separated into the ADDITIONAL PACKAGES field on the Python Task. Use the help text below the field to ensure correct formatting.

  • Restart

    restart

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

  • Shell Script

    shellscript

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • RESULT TYPE: Single Value, Key/Value Pairs, or JSON

    • CONTENT: Script to execute is entered here if not pulled in from an outside repository

  • vRealize Orchestrator Workflow

    vro

    • NAME: Name of the Task

    • CODE: Unique code name for API, CLI, and variable references

    • RESULT TYPE: Single Value, Key/Value Pairs, or JSON

    • vRO INTEGRATION: Select an existing vRO integration

    • WORKFLOW: Select a vRO workflow from the list synced from the selected integration

    • PARAMETER BODY (JSON):

Task Management

Adding Tasks

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Click the Add button.

  4. From the New Task Wizard input a name for the task.

  5. Select the type of task from from the type dropdown.

  6. Input the appropriate details dependent on the task type you selected from the dropdown.

  7. Save

Editing Tasks

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Click the Edit icon on the row of the task you wish to edit.

  4. Modify information as needed.

  5. Click the Save Changes button to save.

Deleting Tasks

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Click the Delete icon on the row of the task you wish to delete.

Task Results

Overview

Task Results allow Tasks to use the output from preceding Tasks in the same Workflow phase via results variables.

Results are available for all tasks executed in the same phase in a workflow. For example, instead of using just one Tasks results in another Task, we can use all of the Task Results from the tasks in the same provision phase in a single task inside a workflow.

Configure Tasks

In script type tasks, if RESULT TYPE is set, Morpheus will store the Task’s output as a variable.

Results Types

  • Single Value

    Entire task output is stored in <%=results.taskCode%> or <%=results["Task Name"]%> variable.

  • Key/Value pairs

    Expects key=value,key=value output. Entire task output is available with <%=results.taskCode%> or <%=results["Task Name"]%> variable (output inside []). Individual Values are available with <%=results.taskCode.key%> variables.

  • JSON

    Expects key:value,key:value json formatted output. Entire task output is available with <%=results.taskCode%> or <%=results["Task Name"]%> variable (output inside []). Individual Values are available with <%=results.taskCode.key%> variables.

Important

The entire output of a script is treated as results, not just the last line. Ensure formatting is correct for the appropriate result type. For example, if Results Type is json and the output is not fully json compatible, the result would not return properly.

Important

Task results are not supported for Library Script task types

Script Config Examples

Single Value using Task Code
Source Task Config
  • NAME: Var Code (single)

  • CODE: singleExample

  • RESULT TYPE: Single Value

  • SCRIPT: echo "string value"

Source Task Output: string value

Results Task Config (using task code in variable)
  • NAME: N/A

  • CODE: N/A

  • RESULT TYPE: N/A

  • SCRIPT: echo "single: <%=results.singleExample%>"

Results Task Output: single: string value

Single Value using Task Name
Source Task Config
NAME

Var Code

CODE

none

RESULT TYPE

Single Value

SCRIPT

echo "string value"

Source Task Output

string value

Results Task using task name in variable
Results Task Script

echo "task name: <%=results["Var Code"]%>"

Results Task Output

task name: test value

Key/Value Pairs
Source Task Config
NAME

Var Code (keyval)

CODE

keyvalExample

RESULT TYPE

Key/Value pairs

SCRIPT

echo "flash=bang,ping=pong"

Source Task Output

flash=bang,ping=pong

Results Task for all results
Results Task Script

echo "keyval: <%=results.keyvalExample%>"

Results Task Output

keyval: [flash:bang, ping:pong]

Results Task for a single value)
Results Task Script

echo "keyval value: <%=results.keyvalExample.flash%>"

Results Task Output

keyval value: bang

JSON
Source Task Config
NAME

Var Code (json)

CODE

jsonExample

RESULT TYPE

JSON

SCRIPT

echo "{\"ping\":\"pong\",\"flash\":\"bang\"}"

Source Task Output

{"ping":"pong","flash":"bang"}

Results Task for all results
Results Task Script

echo "json: <%=results.jsonExample%>"

Results Task Output

json: [ping:pong, flash:bang]

Results Task for a single value
Results Task Script

echo "json value: <%=results.jsonExample.ping%>"

Results Task Output

json value: pong

Multiple Task Results
Results Task Script
echo "single: <%=results.singleExample%>"
echo "task name: <%=results["Var Code"]%>"
echo "keyval: <%=results.keyvalExample%>"
echo "keyval value: <%=results.keyval.flash%>"
echo "json: <%=results.jsonExample%>"
echo "json value: <%=results.jsonExample.ping%>"
Results Task Output
single: string value
task name: string value
keyval: [flash:bang, ping:pong]
keyval value: bang
json: [ping:pong, flash:bang]
json value: pong

Workflow Config

Add one or multiple tasks with Results Type configured to a workflow, and the results will be available to all tasks in the same phase of the workflow via the <%=results.variables%> during the workflow execution.

  • Task Results are only available to tasks in the same workflow phase

  • Task Results are only available during workflow execution

Workflows

Workflows are groups of Tasks, which are described in detail in the preceding section. Operational Workflows can be run on-demand against an existing Instance or server from the Actions menu on the Instance or server detail page. Additionally, they can be scheduled to run on a recurring basis through Morpheus Jobs (Provisioning > Jobs).

Provisioning Workflows are associated with Instances at provision time (in the Automation tab of the Add Instance wizard) or after provisioning through the Actions menu on the Instance detail page. Provisioning Workflows assign Tasks to various stages of the Instance lifecycle, such as Provision, Post Provision, and Teardown. When the Instance reaches a given stage, the appropriate Tasks are run. Task results and output can be viewed from the History tab of the Instance or server detail page.

Provisioning Workflow Execution Phases

  • Configuration: Tasks are run prior to the initial provisioning

  • Pre Provision: Tasks are run after the VM is running, for containers these Tasks are executed on the Docker host

  • Provision: Tasks are run during provisioning, for many users this is the most commonly used phase

  • Post Provision: Tasks are run after provisioning has completed

  • Start Service: Tasks are run during start services

  • Stop Service: Tasks are run during stop services

  • Pre Deploy: Tasks are run prior to App deployment

  • Deploy: Tasks are run during App deployment

  • Reconfigure: Tasks are run during a reconfigure action on the Instance or host

  • Teardown: Tasks are run during VM or container destroy

For VMs, Pre Provision and Provision phases execute after the VM is running. Pre Provision can be used for a Blueprint so it is added before a script which is set at the Provision phase executes. Pre Provision for scripts is mainly for Docker as you can execute on the host before the container is running. For Tasks that need to run prior to the start of provisioning, use the Configuration phase. Post Provision will execute after the entire provisioning process is complete.

Note

When adding a node to an Instance, Workflow Tasks in the Post Provision phase will be run on all nodes in the Instance after the new node is provisioned. This is because Post Provision operations may need to affect all nodes, such as when joining a new node to a cluster. Tasks in the Pre Provision and Provision phases would only be run on the new node.

Add Workflow

  1. Select the Provisioning link in the navigation bar

  2. Select Automation from the sub-navigation menu

  3. Click the Workflows tab to show the Workflows tab panel

  4. Click the + Add dropdown and select a Workflow type (Operational or Provisioning, see the section above for more on Workflow type differences)

  5. From the New Workflow Wizard input a name for the workflow

  6. Optionally input a description and a target platform

  7. Add Tasks and Option Types using the typeahead fields, Tasks must be added to the appropriate phases for Provisioning Workflows

  8. If multiple tasks are added to the same execution phase, their execution order can be changed by selecting the grip icon and dragging the task to the desired execution order

  9. For multi-Tenant environments, select Public or Private visibility for the Workflow

  10. For Operational Workflows, optionally mark “Allow Custom Config” from the Advanced Options section if needed. See the next section for more on this selection

  11. Click the SAVE CHANGES button to save

Note

When setting Workflow visibility to Public in a multi-Tenant environment, Tenants will be able to see the Workflow and also execute it directly from the Workflows list (if it’s an Operational Workflow). They will not be able to edit or delete the Workflow.

Allow Custom Config

When marked on Operational Workflows, the user is shown a text area for custom configuration at execution time. This could be used to pass extra variables that wouldn’t normally be in the script or for specifying extra configuration.

Edit Workflow

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Click the Workflows tab to show the workflows tab panel.

  4. Click the Edit icon on the row of the workflow you wish to edit.

  5. Modify information as needed.

  6. Click the Save Changes button to save.

Delete Workflow

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Click the Workflows tab to show the workflows tab panel.

  4. Click the Delete icon on the row of the workflow you wish to delete.

Executions

Automation - Executions contains execution status and history from Task and Operational Workflow Executions run from Automation - Tasks and Automation - Workflows.

Note

Tasks and Workflows executed from a Job or from Instance or Host Actions do not populate in Automation -> Executions, and can be referenced from the History tab on the target resource. All task and Workflow executions can be referenced in Operations -> Activity -> History

Execution results in the ui display:

NAME

Name of the Task or Workflow Executed

TYPE

Type of execution (Task or Workflow)

START DATE

Date and time of execution

ETA/DURATION

Estimate time of completion for executions in progress, or the total execution time for completed executions.

RESULTS

Result status of execution (Succeeded, Failed, In-Progress or Pending)

Execution Detail (i)

Click on the i to view process output results

Note

Job and automation executions can be expanded to show process details by clicking on the arrow icon immediately to the right of the NAME column.

Scale Thresholds

Scale Thresholds are pre-configured settings for auto-scaling Instances. When adding auto-scaling to an instance, existing Scale Thresholds can be selected to determine auto-scaling rules.

Creating Scale Thresholds

  1. Navigate to Provisioning -> Automation -> Scale Thresholds

  2. Select + ADD

  3. Populate the following:

NAME

Name of the Scale Threshold

AUTO UPSCALE

Enable to automatically upscale per Scale Threshold specifications

AUTO DOWNSCALE

Enable to automatically downscale per Scale Threshold specifications

MIN COUNT

Minimum node count for Instance. Auto-scaling will not downscale below MIN COUNT, and will auto upscale if the MIN COUNT is not met)

MAX COUNT

Maximum node count for Instance. Auto-scaling will not upscale past MAX COUNT, and will auto downscale if MAX COUNT is exceeded.

ENABLE MEMORY THRESHOLD

Check to set auto-scaling by specified memory utilization threshold (%)

MIN MEMORY

Enter MIN MEMORY % for triggering downscaling.

MAX MEMORY

Enter MAX MEMORY % for triggering upscaling.

ENABLE DISK THRESHOLD

Check to set auto-scaling by specified disk utilization threshold (%)

MIN DISK

Enter MIN DISK % for triggering downscaling.

MAX DISK

Enter MAX DISK % for triggering upscaling.

ENABLE CPU THRESHOLD

Check to set auto-scaling by specified overall CPU utilization threshold (%)

MIN CPU

Enter MIN CPU % for triggering downscaling.

MAX CPU

Enter MAX CPU % for triggering upscaling.

Integrations

The Integrations section in Provisioning -> Automaton -> Integrations is for adding and managing Automation Integrations. Existing Automation Integrations from Administration -> Integrations are also populated and accessible from Provisioning -> Automaton -> Integrations and vice-versa.

Provisioning: Automation Integrations and Admin: Integrations are separate Role permissions, so Automations Integration access can be separated from the Administration Integrations section.

Automation Integrations

  • Ansible

  • Ansible Tower

  • Chef

  • Puppet

  • Salt

Note

Automation integrations can be added and managed in Administration -> integrations as well. Adding and editing Integrations in Provisioning -> Automaton -> Integrations and Administration -> Integrations are the same dataset and additions and updates are reflected in both sections.

Note

Role access for Integrations: Ansible determines user access to Ansible Integration detail page, which contains Ansible command line and execution access.

Power Scheduling

Set weekly schedules for shutdown and startup times for Instances and VM’s, apply Power Schedules to Instances pre or post-provisioning, apply Power Schedule policies on Group or Clouds, or use Guidance to automatically recommend and apply optimized Power Schedules.

Create Power schedules

  1. Navigate to Provisioning -> Automation -> Power Scheduling

  2. Select + ADD

  3. Configure the following options:

    NAME

    Name of the Power Schedule

    DESCRIPTION

    Description for the Power Schedule

    TIME ZONE

    Time Zone the Power Schedule times correlate to.

    TYPE
    Power On

    Power Up and then Down at scheduled times

    Power off

    Power Down then Up at scheduled times

    Enabled

    Check for Power Schedule to be Active. Uncheck to disable Power Schedule.

    DAYS

    Slide the start and end time controls for each day to configure each days Schedule. Green sections indicate Power on, red sections indicate Power Off. Time indicated applies to selected Time Zone.

    ../../_images/powerSchedule.png
  4. Select SAVE CHANGES

Tip

To view the Instances a power schedule is currently set on, select the name of a Power Schedule to go to the Power Schedule Detail Page.

Add Power Schedule to Instance

  1. Navigate to Provisioning -> Instances

  2. Select an Instance

  3. Select EDIT

  4. In the POWER SCHEDULE dropdown, select a Power Schedule.

  5. Select SAVE CHANGES

Add Power Schedule to Virtual Machine

  1. Navigate to Infrastructure -> Hosts -> Virtual Machines

  2. Select a Virtual Machine

  3. Select EDIT

  4. Expand the Advanced Options section

  5. In the POWER SCHEDULE dropdown, select a Power Schedule.

  6. Select SAVE CHANGES

Add Power Schedule Policy

Note

Power Schedule Policies apply to Instances created after the Policy is enabled.

  1. Navigate to Administration -> Policies

  2. Select + ADD

  3. Select TYPE Power Schedule

  4. Configure the Power Schedule Policy:

    NAME

    Name of the Policy

    DESCRIPTION

    Add details about your Policy for reference in the Policies tab.

    Enabled

    Policies can be edited and disabled or enabled at any time. Disabling a Power Schedule Policy will prevent the Power Schedule from running on the Clouds Instances until re-enabled.

    ENFORCEMENT TYPE
    • User Configurable: Power Schedule choice is editable by User during provisioning.

    • Fixed Schedule: User cannot change Power Schedule setting during provisioning.

    POWER SCHEDULE

    Select Power Schedule to use in the Policy. Power schedule can be added in Provisioning -> Automation -> Power Scheduling

    SCOPE
    Global

    Applies to all Instances created while the Policy is enabled

    Group

    Applies to all Instances created in or moved into specified Group while the Policy is enabled

    Cloud

    Applies to all Instances created in specified Cloud while the Policy is enabled

    User

    Applies to all Instances created by specified User while the Policy is enabled

    Role

    Applies to all Instances created by Users with specified Role while the Policy is enabled

    Permissions- TENANTS

    Leave blank to apply to all Tenants, or search for and select Tenants to enforce the Policy on specific Tenants.

  5. Select SAVE CHANGES

Execute Scheduling

Execute Scheduling creates time schedules for Jobs, including Task, Workflow and Backup Jobs. Jobs, which are discussed in greater detail in another section of Morpheus docs, combine either a Task or Workflow with an Execute Schedule to run the selected Task or Workflow at the needed time. Backup Jobs are a special type of Job configured in the Backups section which also use Execute Schedules to time backup runs as needed.

Schedules use CRON expressions, such as 0 23 * * 2 equalling Executes every week on Tuesday at 23:00. CRON expressions can easily be created by clicking the corresponding translation in the create or edit Execution Schedule modal below the Schedule field and selecting a new value.

Note

For more on writing CRON expressions, see our KnowledgeBase article on the topic.

Create Execution Schedules

NAME

Name of the Execution Schedule

Note

When assigning Execution Schedules, the name value will appear in the selection drop-down. Using a name that references the time interval is often helpful

DESCRIPTION

Description of the Execution Schedule for reference in the Execution Schedules list

TIME ZONE

Time zone for execution

Enabled

Check to enable the schedule. Uncheck to disable all associated executions and remove the schedule as an option for Jobs in the future

SCHEDULE

Enter CRON expression for the Execution Schedule, for example 0 0 * * * equals Every day at 00:00

SCHEDULE TRANSLATION

The entered CRON schedule is translated below the SCHEDULE field. Highlighted values can be updated by selecting the value, and relevant options will be presented. The CRON expression will automatically be updated

Variables

A vast number of variables are available for use in Tasks, Scripts, Templates, Resource Names, Cloud-Init User Data and Option List configs.

Important

Variables are case sensitive

Pre-Provision Vars

A subset of variables are available for Instance, Host Name and Hostnames. These can be passed inside ${ } blocks during provisioning or in relevant policy configs.

Instance Naming Policy example: ${userInitials}-${cloudCode}-${platform == 'windows' ? 'W' : 'L'}-${sequence}

Available variables for Naming Policy naming patterns include:

${account}
${accountId}
${accountName}
${accountNumber}
${accountType}
${cloudCode}
${cloudName}
${customerNumber}
${customOptions.fieldName}
${groupCode}
${groupName}
${instance.instanceContext} # Environment Code
${platform == 'windows' ? 'w':'l'} # results in `w` for Windows platforms and `l` for Linux Platforms
${platform}
${provisionType}
${sequence} # results in 1
        ${sequence+100} # results in 101
  ${sequence.toString().padLeft(5,'0')} #results in 00001
${tenantId}
${tenant} # Teant Name
${tenantSubdomain}
${type}
${userId}
${userInitials}
${username}

An example Instance Name Policy using a naming pattern with User Initials, Cloud Code, Instance Type, and a sequential number starting at 3000 is ${userInitials}-${cloudCode}-${type}-${sequence+3000}, resulting in an Instance Name of md-vmwd3-centos-3001 for the first instance, followed by md-vmwd3-centos-3002 and so on.

Syntax Examples

PowerShell Example: $app_id = "<%= instance.metadata.app_id %>"

Bash Example: HOSTNAME="<%= container.server.hostname %>"

Python Example: hostname = morpheus['server']['hostname']

HTTP Body Example: {"name": "<%= instance.createdByUsername %>"}

../../_images/Metadata-Enviornment-Variable-Spot ../../_images/Tags-Variable-Spot

Note

customOptions values are defined from custom Option Types.

Common Examples

container.configGroup: <%=container.configGroup%>
container.configId: <%=container.configId%>
container.configPath: <%=container.configPath%>
container.configRole: <%=container.configRole%>
container.containerTypeCode: <%=container.containerTypeCode%>
container.containerTypeName: <%=container.containerTypeName%>
container.containerTypeShortName: <%=container.containerTypeShortName%>
container.cores: <%=container.cores%>
container.dataPath: <%=container.dataPath%>
container.dateCreated: <%=container.dateCreated%>
container.domainName: <%=container.domainName%>
container.environmentPrefix: <%=container.environmentPrefix%>
container.externalIp: <%=container.externalIp%>
container.hostMountPoint: <%=container.hostMountPoint%>
container.hostname: <%=container.hostname%>
container.image: <%=container.image%>
container.internalHostname: <%=container.internalHostname%>
container.internalIp: <%=container.internalIp%>
container.logsPath: <%=container.logsPath%>
container.memory: <%=container.memory%>
container.planCode: <%=container.planCode%>
container.provisionType: <%=container.provisionType%>
container.server: <%=container.server.serverTypeName%>
container.serverId: <%=container.serverId%>
container.sshHost: <%=container.sshHost%>
container.status: <%=container.status%>
container.storage: <%=container.storage%>
container.version: <%=container.version%>
customOptions: <%=customOptions.fieldName%>
evar: <%=evars.name%>
evars: <%=evars%>
group.code: <%=group.code%>
group.datacenterId: <%=group.datacenterId%>
group.location: <%=group.location%>
group.name: <%=group.name%>
instance.autoScale: <%=instance.autoScale%>
instance.configGroup: <%=instance.configGroup%>
instance.configId: <%=instance.configId%>
instance.configRole: <%=instance.configRole%>
instance.containers[0]: <%=instance.containers[0].containerTypeName%>
instance.cores: <%=instance.cores%>
instance.createdByEmail: <%=instance.createdByEmail%>
instance.createdByFirstName: <%=instance.createdByFirstName%>
instance.createdById: <%=instance.createdById%>
instance.createdByLastName: <%=instance.createdByLastName%>
instance.createdBYUsername: <%=instance.createdByUsername%>
instance.deployGroup: <%=instance.deployGroup%>
instance.description: <%=instance.description%>
instance.displayName: <%=instance.displayName%>
instance.domainName: <%=instance.domainName%>
instance.environmentPrefix: <%=instance.environmentPrefix%>
instance.expireDate: <%=instance.expireDate%>
instance.firewallEnabled: <%=instance.firewallEnabled%>
instance.hostname: <%=instance.hostname%>
instance.instanceContext: <%=instance.instanceContext%> (tip: instanceContext = Environment)
instance.instanceLevel: <%=instance.instanceLevel%>
instance.instanceTypeCode: <%=instance.instanceTypeCode%>
instance.instanceTypeName: <%=instance.instanceTypeName%>
instance.instanceVersion: <%=instance.instanceVersion%>
instance.memory: <%=instance.memory%>
instance.metadata: <%=instance.metadata%>
instance.name: <%=instance.name%>
instance.networkLevel: <%=instance.networkLevel%>
instance.plan: <%=instance.plan%>
instance.provisionType: <%=instance.provisionType%>
instance.status: <%=instance.status%>
instance.statusMessage: <%=instance.statusMessage%>
instance.storage: <%=instance.storage%>
instance.tags: <%=instance.tags%>
instance.userStatus: <%=instance.userStatus%>
server.agentInstalled: <%=server.agentInstalled%>
server.agentVersion: <%=server.agentVersion%>
server.apiKey: <%=server.apiKey%>
server.category: <%=server.category%>
server.commType: <%=server.commType%>
server.configGroup: <%=server.configGroup%>
server.configId: <%=server.configId%>
server.configRole: <%=server.configRole%>
server.consoleHost: <%=server.consoleHost%>
server.consolePort: <%=server.consolePort%>
server.consoleType: <%=server.consoleType%>
server.consoleUsername: <%=server.consoleUsername%>
server.dataDevice: <%=server.dataDevice%>
server.dateCreated: <%=server.dateCreated%>
server.description: <%=server.description%>
server.displayName: <%=server.displayName%>
server.domainName: <%=server.domainName%>
server.externalId: <%=server.externalId%>
server.externalIp: <%=server.externalIp%>
server.fqdn: <%=server.fqdn%>
server.hostname: <%=server.hostname%>
server.internalId: <%=server.internalId%>
server.internalIp: <%=server.internalIp%>
server.internalName: <%=server.internalName%>
server.internalSshUsername: <%=server.internalSshUsername%>
server.lastAgentUpdate: <%=server.lastAgentUpdate%>
server.lvmEnabled: <%=server.lvmEnabled%>
server.macAddress: <%=server.macAddress%>
server.managed: <%=server.managed%>
server.maxCores: <%=server.maxCores%>
server.maxMemory: <%=server.maxMemory%>
server.maxStorage: <%=server.maxStorage%>
server.name: <%=server.name%>
server.nodePackageVersion: <%=server.nodePackageVersion%>
server.osDevice: <%=server.osDevice%>
server.osType: <%=server.osType%>
server.osTypeCode: <%=server.osTypeCode%>
server.parentServerId: <%=server.parentServerId%>
server.plan: <%=server.plan%>
server.platform: <%=server.platform%>
server.platformVersion: <%=server.platformVersion%>
server.powerState: <%=server.powerState%>
server.serialNumber: <%=server.serialNumber%>
server.serverModel: <%=server.serverModel%>
server.serverType: <%=server.serverType%>
server.serverTypeCode: <%=server.serverTypeCode%>
server.serverTypeName: <%=server.serverTypeName%>
server.serverVendor: <%=server.serverVendor%>
server.softwareRaid: <%=server.softwareRaid%>
server.sourceImageId: <%=server.sourceImageId%>
server.sshHost: <%=server.sshHost%>
server.sshPort: <%=server.sshPort%>
server.sshUsername: <%=server.sshUsername%>
server.status: <%=server.status%>
server.statusMessage: <%=server.statusMessage%>
server.tags: <%=server.tags%>
server.toolsInstalled: <%=server.toolsInstalled%>
server.visibility: <%=server.visibility%>
task.results (using task code): <%=results.taskCode%>
task.results (using task name): <%=results["Task Name"]%>
task.results.value: <%=results.taskCode.key%>
zone.agentMode: <%=zone.agentMode%>
zone.cloudTypeCode: <%=zone.cloudTypeCode%>
zone.cloudTypeName: <%=zone.cloudTypeName%>
zone.code: <%=zone.code%>
zone.domainName: <%=zone.domainName%>
zone.firewallEnabled: <%=zone.firewallEnabled%>
zone.location: <%=zone.location%>
zone.name: <%=zone.name%>
zone.regionCode: <%=zone.regionCode%>
zone.scalePriority: <%=zone.scalePriority%>
cypher: <%=cypher.read('secret/hello')%>

Instance

instance {
        adminPassword,
        adminUsername,
        apps.[],
        assignedDomainName,
        autoScale,
        backup.{},
        configGroup,
        configId,
        configRole,
        container.{},
        containers.[],
        cores,
        createBackup,  true/false
        createdByEmail,
        createdByFirstName,
        createdById,
        createdByLastName,
        createdByUser.{
                 username,
                 displayName,
                 firstName,
                 lastName,
                 email,
                 linuxUsername,
                 windowsUsername
        },
        createdByUsername,
        createUser, # true/false
        customOptions,
        deployGroup,
        description,
        displayName,
        domainName,
        environmentPrefix,
        evars:{},
        expireDate, # YYYY-MM-DD-T00:00:00Z
        expireDays,
        expose.[],
        firewallEnabled:true/false,
        hostId,
        hostname,
        id,
        instanceContext,
        instanceLevel,
        instanceTypeCode,
        instanceTypeName,
        instanceVersion,
        isEC2:true/false,
        isVpcSelectable, # true/false
        layoutCode,
        layoutId,
        layoutName,
        layoutSize,
        lbInstances.[],
        memory(bytes),
        memoryDisplay, #MB/GB
        metadata.{},
        name,
        nestedVirtualization,
        networkLevel,
        noAgent,
        plan,
        poolProviderType,
        ports,
        provisionType,
        resourcePoolId,
        scheduleStatus,
        servicePassword,
        serviceUsername,
        smbiosAssetTag,
        sslCertId,
        sslEnabled, # true/false
        status,
        statusMessage,
        storage, # bytes
        tags,
        userStatus,
        vmwareFolderId,
}

Container

container {
        configGroup,
        configId,
        configPath,
        configRole,
        containerTypeCode,
        containerTypeShortName,
        cores,
        dataPath,
        dateCreated,
        domainName,
        environmentPrefix,
        externalIp,
        hostMountPoint,
        hostname,
        image,
        internalHostname,
        internalIp,
        logsPath,
        memory,
        planCode,
        provisionType,
        server:{},
        serverId,
        sshHost,
        status,
        storage,
        version,
        containerTypeName
}

Server

server {
        agentInstalled,
        agentVersion,
        apiKey,
        category,
        commType,
        configGroup,
        configId,
        configRole
        consoleHost,
        consolePort,
        consoleType,
        consoleUsername,
        dataDevice,
        dateCreated,
        description,
        displayName,
        domainName,
        externalId,
        externalIp,
        fqdn,
        hostname,
        internalId,
        internalIp,
        internalName,
        internalSshUsername,
        lastAgentUpdate,
        lvmEnabled,
        macAddress,
        managed,
        maxCores,
        maxMemory,
        maxStorage,
        name,
        nodePackageVersion,
        osDevice,
        osType,
        osTypeCode,
        parentServerId,
        plan,
        platform,
        platformVersion,
        powerState,
        serialNumber,
        serverModel,
        serverType,
        serverTypeCode,
        serverTypeName,
        serverVendor,
        softwareRaid,
        sourceImageId,
        sshHost,
        sshPort,
        sshUsername,
        status,
        statusMessage,
        tags,
        toolsInstalled,
        visibility,
        volumes {
                name
                id
                deviceName
                maxStorage
                unitNumber
                displayOrder
                rootVolume
        }
}

Zone (Cloud)

zone {
        agentMode,
        cloudTypeCode,
        cloudTypeName,
        code,
        datacenterId,
        domainName,
        firewallEnabled,
        location,
        name,
        regionCode,
        scalePriority
}

Group (Site)

group {
        code,
        location,
        datacenterId,
        name
}

Custom Options (Option Types)

customOptions {
        customOptions.fieldName
}

Global

ex: <%= morpheus.user.id %>

"morpheus":{
   "user":{
      "id":value,
      "account":{
         "id":value
      },
      "username":"value",
      "displayName":"value",
      "email":"value",
      "firstName":"value",
      "lastName":"value",
      "dateCreated":0000-00-00T00:00:00Z,
      "lastUpdated":0000-00-00T00:00:00Z,
      "enabled":true/fase,
      "accountExpired":true/false,
      "accountLocked":false,
      "passwordExpired":false,
      "defaultGroupId":value,
      "defaultZoneId":value,
      "hasLinuxUser":true/false,
      "hasWindowsUser":true/false,
      "role":{
         "id":value
      },
      "instanceLimits":value
   },
}

Instance Map Example

"instance":{
   "poolProviderType":value,
   "isVpcSelectable":true/false,
   "smbiosAssetTag":value,
   "isEC2":true/false,
   "resourcePoolId":value,
   "hostId":value,
   "createUser":true/false,
   "nestedVirtualization":value,
   "vmwareFolderId":value,
   "expose":[

   ],
   "noAgent":value,
   "customOptions":value,
   "createBackup":true/false,
   "memoryDisplay":"MB/GB",
   "backup":{
      "veeamManagedServer":,
      "createBackup":true/false,
      "jobAction":"value",
      "jobRetentionCount":value
   },
   "expireDays":value,
   "layoutSize":value,
   "lbInstances":[

   ],
   "evars":{
      "evar1":{
         "value":value,
         "export":true/false,
         "masked":true/false,
         "name":"value"
      },
      "evar2":{
         "value":value,
         "export":true/false,
         "masked":true/false,
         "name":"value"
      }
   },
   "id":value,
   "instanceTypeName":"value",
   "instanceTypeCode":"value",
   "provisionType":"value",
   "layoutId":value,
   "layoutCode":value,
   "layoutName":"value",
   "instanceVersion":"value",
   "plan":value,
   "name":value,
   "displayName":value,
   "description":value,
   "environmentPrefix":value,
   "hostname":value,
   "domainName":"value",
   "assignedDomainName":,
   "firewallEnabled":true/false,
   "status":"value",
   "userStatus":"value",
   "scheduleStatus":"value",
   "networkLevel":"value",
   "instanceLevel":"value",
   "deployGroup":value,
   "instanceContext":value,
   "autoScale":true/false,
   "statusMessage":value,
   "expireDate":0000-00-00T00:00:00Z,
   "tags":"value",
   "storage":value(bytes),
   "memory":value(bytes),
   "cores":1,
   "configId":value,
   "configGroup":value,
   "configRole":value,
   "ports":value,
   "sslEnabled":true/false,
   "sslCertId":value,
   "serviceUsername":value,
   "servicePassword":value,
   "adminUsername":value,
   "adminPassword":value,
   "createdByUsername":"value",
   "createdByEmail":"value",
   "createdByFirstName":"value",
   "createdByLastName":"value",
   "createdById":value,
   "metadata":{

   },
   "createdByUser":{
      "username":"value",
      "displayName":"value",
      "firstName":"value",
      "lastName":"value",
      "email":"value",
      "linuxUsername":"value",
      "windowsUsername":"value"
   },
   "containers":[
      {
         "maxMemory":value(bytes),
         "maxStorage":value(bytes),
         "maxCpu":value,
         "maxCores":value,
         "coresPerSocket":value,
         "poolProviderType":value,
         "isVpcSelectable":true/false,
         "smbiosAssetTag":value,
         isEC2:true/false,
         "resourcePoolId":value,
         "hostId":value,
         "createUser":true/false,
         "nestedVirtualization":value,
         "vmwareFolderId":value,
         "expose":[

         ],
         "noAgent":true/false,
         "vm":true/false,
         "networkInterfaces":[
            {
               "id":value,
               "network":{
                  "id":value,
                  "group":value,
                  "subnet":value,
                  "dhcpServer":true/false,
                  "name":value,
                  "pool":{
                     "id":value,
                     "name":value
                  }
               },
               "ipAddress":value,
               "networkInterfaceTypeId":value,
               "ipMode":
            }
         ],
         "volumes":[
            {
               "volumeCustomizable":true/false,
               "readonlyName":true/false,
               "controllerId":value,
               "maxIOPS":value,
               "displayOrder":value,
               "unitNumber":value,
               "minStorage":value(bytes),
               "configurableIOPS":true/false,
               "controllerMountPoint":0000:0:00:0,
               "vId":value,
               "size":value,
               "name":"root",
               "rootVolume":true/false,
               "storageType":value,
               "typeId":value,
               "id":value,
               "resizeable":true/false,
               "datastoreId":"value",
               "maxStorage":value(bytes)
            }
         ],
         "storageController":value,
         "datastoreId":value,
         "networkId":value,
         "cpuCount":value,
         "memorySize":value,
         "osDiskSize":value,
         "publicKeyId":value,
         "storagePodId":value,
         "vmwareUsr":value,
         "vmwarePwd":value,
         "domainName":"value",
         "hostname":value,
         "networkType":value,
         "ipAddress":value,
         "netmask":value,
         "gateway":value,
         "dnsServers":value,
         "resourcePool":value,
         "folder":value,
         "vmwareCustomSpec":value,
         "hosts":{
            value
         },
         "evars":{

         },
         "id":value,
         "name":value,
         "containerTypeName":value,
         "containerTypeCode":value,
         "containerTypeShortName":"value",
         "containerTypeCategory":"value",
         "provisionType":"value",
         "dataPath":"value",
         "logsPath":"value",
         "configPath":"value",
         "planCode":value,
         "dateCreated":0000-00-00T00:00:00Z,
         "status":"running",
         "environmentPrefix":"value",
         "version":"value",
         "image":"value",
         "internalHostname":value,
         "storage":value(bytes),
         "memory":value(bytes),
         "cores":value,
         "internalIp":value,
         "externalIp":value,
         "sshHost":value,
         "hostMountPoint":value,
         "configId":value,
         "configGroup":value,
         "configRole":value,
         "certificatePath":value,
         "certificateStyle":value,
         "changeManagementExtId":value,
         "changeManagementServiceId":value,
         "serverId":value,
         "server":{
            "poolProviderType":value,
            "isVpcSelectable":true/false,
            "smbiosAssetTag":value,
            isEC2:true/false,
            "resourcePoolId":value,
            "hostId":value,
            "createUser":true/false,
            "nestedVirtualization":value,
            "vmwareFolderId":value,
            "noAgent":value,
            "id":value,
            "uuid":value,
            "serverTypeName":"value",
            "serverTypeCode":"value",
            "computeTypeName":"value",
            "computeTypeCode":"value",
            "parentServerId":value,
            "plan":value,
            "visibility":"value",
            "osTypeCode":value,
            "sourceImageId":value,
            "name":value,
            "displayName":value,
            "internalName":value,
            "category":value,
            "description":value,
            "internalId":value,
            "externalId":value,
            "platform":"value",
            "platformVersion":value,
            "agentVersion":value,
            "nodePackageVersion":value,
            "sshHost":value,
            "sshPort":value,
            "sshUsername":"value",
            "consoleType":value,
            "consoleHost":value,
            "consolePort":value,
            "consoleUsername":value,
            "internalSshUsername":"value",
            "internalIp":value,
            "externalIp":value,
            "osDevice":"value",
            "dataDevice":"value",
            "lvmEnabled":true/false,
            "apiKey":value,
            "softwareRaid":true/false,
            "status":"value",
            "powerState":"value",
            "dateCreated":0000-00-00T00:00:00Z,
            "lastAgentUpdate":0000-00-00T00:00:00Z,
            "serverType":"value",
            "osType":"value",
            "commType":"value",
            "managed":true/false,
            "agentInstalled":true/false,
            "toolsInstalled":true/false,
            "hostname":value,
            "domainName":value,
            "fqdn":value,
            "statusMessage":value,
            "maxStorage":value(bytes),
            "maxMemory":value(bytes),
            "maxCores":value,
            "macAddress":value,
            "serverVendor":value,
            "serverModel":value,
            "serialNumber":value,
            "tags":value,
            "configId":value,
            "configGroup":value,
            "configRole":value,
            "createdByUser":{
               "username":"value",
               "displayName":"value",
               "firstName":"value",
               "lastName":"value",
               "email":"value",
               "linuxUsername":"value",
               "windowsUsername":"value"
            },
            "volumes":[
               {
                  "id":value,
                  "name":"value",
                  "deviceName":"value",
                  "maxStorage":value(bytes),
                  "unitNumber":value,
                  "displayOrder":value,
                  "rootVolume":true/false
               }
            ]
         },
         "ports":[
            {
               "index":value,
               "external":value,
               "internal":value,
               "link":true/false,
               "loadBalance":true/false,
               "loadBalanceProtocol":value,
               "export":true/false,
               "exportName":value,
               "displayName":"value",
               "visible":true/false,
               "primaryPort":true/false,
               "protocol":value,
               "name":"value"
            }
         ],
         "portMap":{
            "rpc":{
               "index":value,
               "external":value,
               "internal":value,
               "link":true/false,
               "loadBalance":true/false,
               "loadBalanceProtocol":value,
               "export":true/false,
               "exportName":value,
               "displayName":"value",
               "visible":true/false,
               "primaryPort":true/false,
               "protocol":value,
               "name":"value"
            }
         },
         "internalPort":value,
         "externalPort":value
      }
   ],
   "container":{
      "maxMemory":value(bytes),
      "maxStorage":value,
      "maxCpu":value,
      "maxCores":value,
      "coresPerSocket":value,
      "poolProviderType":value,
      "isVpcSelectable":true/false,
      "smbiosAssetTag":value,
      isEC2:true/false,
      "resourcePoolId":value,
      "hostId":value,
      "createUser":true/false,
      "nestedVirtualization":value,
      "vmwareFolderId":value,
      "expose":[

      ],
      "noAgent":true/false,
      "vm":true/false,
      "networkInterfaces":[
         {
            "id":value,
            "network":{
               "id":value,
               "group":value,
               "subnet":value,
               "dhcpServer":true/false,
               "name":value,
               "pool":{
                  "id":value,
                  "name":value
               }
            },
            "ipAddress":value,
            "networkInterfaceTypeId":value,
            "ipMode":
         }
      ],
      "volumes":[
         {
            "volumeCustomizable":true/false,
            "readonlyName":true/false,
            "controllerId":value,
            "maxIOPS":value,
            "displayOrder":value,
            "unitNumber":value,
            "minStorage":value,
            "configurableIOPS":true/false,
            "controllerMountPoint":value,
            "vId":value,
            "size":value,
            "name":"root",
            "rootVolume":true/false,
            "storageType":value,
            "typeId":value,
            "id":value,
            "resizeable":true/false,
            "datastoreId":"autoCluster",
            "maxStorage":value(bytes)
         }
      ],
      "storageController":value,
      "datastoreId":value,
      "networkId":value,
      "cpuCount":value,
      "memorySize":value,
      "osDiskSize":value,
      "publicKeyId":value,
      "storagePodId":value,
      "vmwareUsr":value,
      "vmwarePwd":value,
      "domainName":"value",
      "hostname":value,
      "networkType":value,
      "ipAddress":value,
      "netmask":value,
      "gateway":value,
      "dnsServers":value,
      "resourcePool":value,
      "folder":value,
      "vmwareCustomSpec":value,
      "hosts":{
         value
      },
      "evars":{

      },
      "id":value,
      "name":value,
      "containerTypeName":value,
      "containerTypeCode":value,
      "containerTypeShortName":"value",
      "containerTypeCategory":"value",
      "provisionType":"vmware",
      "dataPath":"value",
      "logsPath":"value",
      "configPath":"value",
      "planCode":value,
      "dateCreated":0000-00-00T00:00:00Z,
      "status":"value",
      "environmentPrefix":"value",
      "version":"value",
      "image":"value",
      "internalHostname":value,
      "storage":value(bytes),
      "memory":value(bytes),
      "cores":value,
      "internalIp":value,
      "externalIp":value,
      "sshHost":value,
      "hostMountPoint":value,
      "configId":value,
      "configGroup":value,
      "configRole":value,
      "certificatePath":value,
      "certificateStyle":value,
      "changeManagementExtId":value,
      "changeManagementServiceId":value,
      "serverId":value,
      "server":{
         "poolProviderType":value,
         "isVpcSelectable":true/false,
         "smbiosAssetTag":value,
         isEC2:true/false,
         "resourcePoolId":value,
         "hostId":value,
         "createUser":true/false,
         "nestedVirtualization":value,
         "vmwareFolderId":value,
         "noAgent":value,
         "id":value,
         "uuid":value,
         "serverTypeName":"value",
         "serverTypeCode":"value",
         "computeTypeName":"value",
         "computeTypeCode":"value",
         "parentServerId":value,
         "plan":value,
         "visibility":"value",
         "osTypeCode":value,
         "sourceImageId":value,
         "name":value,
         "displayName":value,
         "internalName":value,
         "category":value,
         "description":value,
         "internalId":value,
         "externalId":value,
         "platform":"value",
         "platformVersion":value,
         "agentVersion":value,
         "nodePackageVersion":value,
         "sshHost":value,
         "sshPort":value,
         "sshUsername":"value",
         "consoleType":value,
         "consoleHost":value,
         "consolePort":value,
         "consoleUsername":value,
         "internalSshUsername":"value",
         "internalIp":value,
         "externalIp":value,
         "osDevice":"value",
         "dataDevice":"value",
         "lvmEnabled":true/false,
         "apiKey":value,
         "softwareRaid":true/false,
         "status":"provisioned",
         "powerState":"on",
         "dateCreated":0000-00-00T00:00:00Z,
         "lastAgentUpdate":0000-00-00T00:00:00Z,
         "serverType":"value",
         "osType":"value",
         "commType":"value",
         "managed":true/false,
         "agentInstalled":true/false,
         "toolsInstalled":true/false,
         "hostname":value,
         "domainName":value,
         "fqdn":value,
         "statusMessage":value,
         "maxStorage":value,
         "maxMemory":value,
         "maxCores":value,
         "macAddress":value,
         "serverVendor":value,
         "serverModel":value,
         "serialNumber":value,
         "tags":value,
         "configId":value,
         "configGroup":value,
         "configRole":value,
         "createdByUser":{
            "username":"value",
            "displayName":"value",
            "firstName":"value",
            "lastName":"value",
            "email":"value",
            "linuxUsername":"value",
            "windowsUsername":"value"
         },
         "volumes":[
            {
               "id":value
               "name":"root",
               "deviceName":"value",
               "maxStorage":value(bytes),
               "unitNumber":value,
               "displayOrder":value,
               "rootVolume":true/false
            }
         ]
      },
      "ports":[
         {
            "index":0,
            "external":value,
            "internal":value,
            "link":true/false,
            "loadBalance":true/false,
            "loadBalanceProtocol":value,
            "export":true/false,
            "exportName":value,
            "displayName":"value",
            "visible":true/false,
            "primaryPort":true/false,
            "protocol":value,
            "name":"value"
         }
      ],
      "portMap":{
         "rpc":{
            "index":0,
            "external":value,
            "internal":value,
            "link":true/false,
            "loadBalance":true/false,
            "loadBalanceProtocol":value,
            "export":true/false,
            "exportName":value,
            "displayName":"value",
            "visible":true/false,
            "primaryPort":true/false,
            "protocol":value,
            "name":"value"
         }
      },
      "internalPort":value,
      "externalPort":value
   },
   "apps":[

   ]
}