Upload
manageiq
View
196
Download
3
Embed Size (px)
Citation preview
AutomateMadhu Kanoor, Greg McCullough
AgendaRecently Added FeaturesFuture Enhancements
Recently Added FeaturesRBACMETHOD::.missing - (instance_name)
RBAC
Automate Methods should only be allowed to see objects that they can access based on Tenant.
Backward Compatibility● Enable RBAC $evm.enable_rbac● Disable RBAC $evm.disable_rbac● Query RBAC $evm.rbac_enabled?
Default Setting● Disabled
RBAC
Future Version● Global Automate configuration
○ Strict (Default)○ Method controlled○ Disabled
METHOD::
● Optionally allows a state field to directly contain a method● Methods can be stored in the same class
Advantages● Don’t need method instances to accompany each method● Reduces the number of instances in the Automate
Database
METHOD::
Before: After:
METHOD::
.missing - (instance_name)
The .missing instance contains default values for use when an instance is not found.
● A new attribute _missing_instance contains the name of the original instance
● Can be used in substitution e.g ${#_missing_instance}● This attribute is only available on the .missing instance
.missing - (instance_name)
Advantages● Reduces the number of instances in Automate● Can be substituted into any field
_missing_instance/ConfigurationManagement/AnsibleTower/Operations/JobTemplate/MyTemplate
.missing
If MyTemplate doesn’t exist_missing_instance = MyTemplate
Future Enhancements
Git integrationExpression MethodConsolidated EmailEnhanced state-machine messagingState-machine statsCustom buttons - Multiple ItemsScheduled Automate Tasks
Git Integration
● Import an Automate Domain from Git Repositories
● User can select a Branch or Tag
● Automate Model stored in Postgres DB and shared between appliances
● Branches and Tags stored in Postgres DB
● Domains are locked
● Sync overwrites existing domain
● A single appliance acts as a Git Owner
● Refresh and Import calls get routed to the Git Owner Appliance
● Rest API call to initiate domain updates
Git Integration
Git Integration
Appliance1
Appliance 2
Appliance 3
Appliance 4
Repos
Postgres
Repos
Git IntegrationDemo
Expression MethodNew Automate Method that uses Expressions
● Expression Method runs inside the Automate Engine
● Ideal for Dynamic Dialogs
● Results can be processed as Hash, Array
● RBAC enforced
● Expression stored in Automate model
● Works on a single database object
Advantages:
● Performance - No DRb overhead
● No scripting needed
Comparison of Expression Method
Engine
DRb (Server)
DRb (Client)
Method Script
Postgres
Engine
Expression
Regular Automate Method Automate Expression Method
Editing Expression Methods
Sample
Expression Method
● Demo
Email Consolidation
● Uses a single built-in method
● Define email parameters in instance
● Fetch values from config object
● Default implementation does not require scripts
Model Comparison
Classes Instances External Methods
Built-in Methods
Current Model 15 41 39 1
Consolidated 1 61 0 1
New Email Class and Instances
New Email Schema
Sample Email Instance
New features to support Consolidated Email
● Null Coalescing Operator
● Substitution support for methods with arguments
● Accessing VMDB Objects from model
Null Coalescing Operator
● Multiple String values separated by “||”
● Evaluated on new attribute data type “Null Coalescing”
● Order dependent, left to right evaluation
● First non-blank value is used
● Skip and warn about missing objects
e.g.
${/#owner.email} || ${/#miq_request.get_option(:owner_email)} || ${/#miq_request.requester.email} || ${/#config.to_email_address}
Substitution enhancement
● Support methods with arguments
● ${/#miq_request.get_option(:owner_email)}
Accessing VMDB objects● Class Schema allows for the following new data types
○ EMS (Provider)
○ Host
○ Policy
○ Provision
○ Request
○ Server
○ Storage
○ User
○ VM (or Template)
● The value contains the id of the object
○ e.g. ${/#vm.evm_owner_id}
● If the object is not found the attribute is not defined
● RBAC enforced
Enhanced State Machine Messaging● Adopted Kevin Morey’s update_provision_status method enhancements
Sample
State Machine Runtime Statistics
● Record the following stats when we execute a state
○ Start Time
○ End Time
○ Number of Retries
○ Status (ok/retry/warn/error)
○ Server IDs where it was executed
● State Machine Visualizer
○ During execution
○ After execution for debugging purposes
Additional Items● Custom Button Multi Select
○ Allow user to select multiple items (vm, host, …)
● Rest Integration
○ RBAC
● Running automate methods inside a docker container
○ Security
● Schedule Automate Tasks
○ Schedule Automate Tasks from UI
Q&A