Automation and reusable automation components make up some of the core functionality of ManageIQ. This presentation walks through the roadmap of automate and what you can expect in future versions, including easier provisioning on all platforms, and the ability to push and share configs via git.
For more on ManageIQ, see http://manageiq.org/
4. Background
Automate is a ManageIQ toolset used to
1. Extend the product to implement customer specific requirements
2. Update the behavior of the different workflows in the product
3. Integrate with other products
Examples
4. Set the name of a VM or instance to be based on specific enterprise guidelines.
5. Control the placement of VM’s or instances.
6. Custom buttons to enable common tasks e.g. Add Hard Drive to a VM
5. Object Model
Automate uses an object model comprising of
● Domains
● Namespaces
● Classes
● Instances
● Methods
Domain
Namespace1 Namespace2
Class1 Class2 Class3 Class4
Instance1 Method1 Instance2 Method2
6. Domain Search
DOMAIN1 (Priority 10)
NAMESPACE1
CLASS1
● INST1
● INST2
DOMAIN2 (Priority 20)
NAMESPACE1
CLASS1
● INST1
● INST3
NAMESPACE1/CLASS1/INST1 will get picked from DOMAIN2
NAMESPACE1/CLASS1/INST2 will get picked up from DOMAIN1
This is a kin to the file search path when looking for executables in operating
systems. (ls versus /bin/ls)
7. Storage
Automate object model is stored in a relational database in the following 6 tables
1. miq_ae_namespaces
2. miq_ae_classes
3. miq_ae_instances
4. miq_ae_methods
5. miq_ae_fields
6. miq_ae_values
8. Basic Flow
PostgresSQL
Automate Explorer
Read/Write/Reset/Restore
Tools (Export/Import)
Automate Engine
Process Model
R/W
R/W
R
9. Recent Changes
In the Anand release of ManageIQ the following changes were introduced
1. The automate model was converted to YAML for
a. Seeding the database
b. Exporting models from PostgresSQL
c. Importing models into PostgresSQL
d. Restoring the Automate model from a backup
2. Domains were introduced to segregate the models
a. ManageIQ (Readonly)
b. User/Customer (Read/write)
c. Each domain is stored in a separate directory (vmdb/db/fixtures/ae_datastore)
3. Instance and Method overrides
10. Future Plan
Version control Automate Model
REST API for Automate Methods
Separate out the Automate Engine as a Ruby
Gem/Rails Engine
12. Use cases
● Users would like to make incremental
changes to the Automate model and revert
back to a previous state.
● User edits are currently written directly to the
database and cannot be easily undone.
● Audit Trail
13. Proposal
Use GIT to Version control the Automate model
The Automate Engine reads the model from the
GIT repository
The MIQ Automate Explorer will make changes
to the Automate model, which will get saved via
GIT.
14. Comparison
Postgres
Pros:
Single database can be shared
between multiple appliances in a
zone.
Transactions
Backups/Replications
Cons:
Lacks version control
GIT + Filesystem based DB
Pros:
Git provides the version control
Provides History
Ability to undo changes
Share repositories
Cons:
Another system to be managed for
backups, replications etc.
16. GIT Master
Manages the domain repository information in Postgres
Internal Domains (Customer typically Read/Write)
External Domains (ManageIQ,Vendor1,Vendor2 Readonly)
Repository Location
Last Commit Information
Automate Explorer Read/Write Automate Model
All Import/Export runs on this appliance only
17. GIT Slave
Synchronization
Reads the repository information from PostgresSQL
Disables the Automate Worker role for the appliance
Waits for all the existing Automate Workers to end
Synchronizes the Automate DB (add/update/delete domains)
Re-enables the Automate Worker role for the appliance
Automate Explorer read only mode
18. Commits
● Commit Boundaries
o Single File changes (Instance, Method)
o Multiple File Changes (Domain, Namespace, Class
changes)
19. Discussion Points
- GIT Server protocol (ssh, https?)
- Should we allow for branching?
- How often should we commit changes on
GIT Master?
- How often should the GIT pull be run on the
connected appliances?
20. Discussion Points
● RBAC for Automate Model
● UI controls
● Single/Multiple appliances allow for editing the model
● Undoing Commits
o Undoing back to a specific commit
o Undoing a single commit
25. REST API for Automate Methods
Automate methods are executed by the
Automate Engine.
Currently uses DRb to establish connection
with the Method process to exchange ruby
objects.
Ruby is the only language supported because
of DRb
26. Method Dispatch
The Automation Engine Worker
VMDB Workspace
DRb
Server Automate Method
Service Model DRb Client
27. Method Dispatch (REST)
The Automation Engine Worker
VMDB Workspace
Automate Method
REST Method
Web Service Worker
(REST Server)
Write
28. Plan
Add a new aetype for REST based methods
This would trigger saving of the workspace
Generating a token for the workspace persisted
to the DB
This has been implemented previously when
we supported Perl and other languages.
29. Discussions
Persisting the workspace
Reading/Writing workspace from the REST Worker
Reconstituting workspace for the Automate Worker when
the method ends
31. Automate Engine Gem
Automate Engine is responsible for
- Reading the Automate Model
- Instantiating a workspace to store objects
- Compose in memory objects from the
automate model
- Execute Methods
- Execute State Machines
32. Advantages of a Gem
● Easier to maintain
● Modular
● Isolated testing
33. Discussions
Dependency on core class in VMDB
(MiqQueue)
Deliver from Queue
Queue for retries
Exposing the Service Model
Registering built in methods that don’t use
DRb