automate - madhu kanoor, greg mccullough - manageiq design summit 2016

36
Automate Madhu Kanoor, Greg McCullough

Upload: manageiq

Post on 07-Jan-2017

196 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

AutomateMadhu Kanoor, Greg McCullough

Page 2: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

AgendaRecently Added FeaturesFuture Enhancements

Page 3: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Recently Added FeaturesRBACMETHOD::.missing - (instance_name)

Page 4: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

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

Page 5: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

RBAC

Future Version● Global Automate configuration

○ Strict (Default)○ Method controlled○ Disabled

Page 6: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

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

Page 7: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

METHOD::

Before: After:

Page 8: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

METHOD::

Page 9: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

.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

Page 10: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

.missing - (instance_name)

Advantages● Reduces the number of instances in Automate● Can be substituted into any field

Page 11: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

_missing_instance/ConfigurationManagement/AnsibleTower/Operations/JobTemplate/MyTemplate

.missing

If MyTemplate doesn’t exist_missing_instance = MyTemplate

Page 12: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Future Enhancements

Git integrationExpression MethodConsolidated EmailEnhanced state-machine messagingState-machine statsCustom buttons - Multiple ItemsScheduled Automate Tasks

Page 13: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

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

Page 14: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

● 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

Page 15: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Git Integration

Appliance1

Appliance 2

Appliance 3

Appliance 4

Repos

Postgres

Repos

Page 16: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Git IntegrationDemo

Page 17: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

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

Page 18: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Comparison of Expression Method

Engine

DRb (Server)

DRb (Client)

Method Script

Postgres

Engine

Expression

Regular Automate Method Automate Expression Method

Page 19: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Editing Expression Methods

Page 20: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Sample

Page 21: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Expression Method

● Demo

Page 22: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Email Consolidation

● Uses a single built-in method

● Define email parameters in instance

● Fetch values from config object

● Default implementation does not require scripts

Page 23: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Model Comparison

Classes Instances External Methods

Built-in Methods

Current Model 15 41 39 1

Consolidated 1 61 0 1

Page 24: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

New Email Class and Instances

Page 25: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

New Email Schema

Page 26: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Sample Email Instance

Page 27: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

New features to support Consolidated Email

● Null Coalescing Operator

● Substitution support for methods with arguments

● Accessing VMDB Objects from model

Page 28: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

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}

Page 29: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016
Page 30: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Substitution enhancement

● Support methods with arguments

● ${/#miq_request.get_option(:owner_email)}

Page 31: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

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

Page 32: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016
Page 33: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Enhanced State Machine Messaging● Adopted Kevin Morey’s update_provision_status method enhancements

Sample

Page 34: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

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

Page 35: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

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

Page 36: Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016

Q&A