Ansible Tower - Drew Bomhof, Brandon Dunne - ManageIQ Design Summit 2016
-
Upload
manageiq -
Category
Technology
-
view
472 -
download
3
Transcript of Ansible Tower - Drew Bomhof, Brandon Dunne - ManageIQ Design Summit 2016
Ansible Tower IntegrationBrandon Dunne, Drew Bomhof
IntroductionsBrandon Dunne
Email: [email protected]
Github: bdunne
Drew Bomhof
Email: [email protected]
Github: syncrou
Greg Mccullough
Email: [email protected]
Github: gmcculloug
AgendaIntroduction
Use Cases
Implementation
Demo
Future
Q&A
Intro - What is Ansible?Ansible is a software platform for configuring and managing computers which combines software deployment, ad-hoc task execution, and configuration management.
- CLI Interface
- Uses SSH or WinRM to connect to host systems
- One-off or script based Playbook execution
- Automate IT infrastructure and system configurations
Intro - What is Ansible Tower?- Web UI and REST API
- Jobs launched based on Job Templates (fewer details required from the user)
- Dynamic inventory from Inventory Sources (Cloud / Virt)
- User permission system to allow delegation to users without access to credential properties
- Can dynamically update playbook on Job Template launch
Intro - Another Configuration ManagerForeman:
- Bare-metal provisioning integration with ManageIQ
- Desired State configuration, relies on scheduled checkins
- Agent based, driven from the agent, uses Puppet
Ansible Tower:
- Used to configure new and existing systems
- One-off or Scheduled Jobs based on Job Templates
- Drives configuration through local Ansible installation
Implemented Use Cases- Basic Inventory
- Ansible Tower as a service
- Custom Button
- Enhance provisioning state machines
Implementation - AnsibleTowerClient Gem- Ansible Tower has a browsable API making development easy
- Simple API wrapper to provide Ruby classes for each object type
- Methods are dynamically built based on the API content for the object type allowing the gem to adapt as new features are added
- Collection paging is implemented with lazy enumerators. Allows for quick initial results without the hassle of users requesting the next page
Implementation in ManageIQ (Modeling)
ManageIQ AnsibleTower Foreman (Satellite 6)
Configured System Host Host
Configuration Profile N/A Host Group
Configuration Script Job Template Puppet Script? (Not implemented in MIQ)
Orchestration Stack Job Reports? (Not Implemented in MIQ)
Implementation in ManageIQ (Refresh)Inventory (Root) Group
- name, ems_ref (id)
Configuration Scripts (Job Templates)
- description, inventory_root_group (inventory relation), manager_ref (id), name, survey_spec, variables (extra_vars)
Configured Systems (Hosts)
- manager_ref (id), hostname (name), inventory_root_group (inventory relation), virtual_instance_ref (Cloud / Infra Provider ID)
- Cross provider link to existing VM / Instance
Adding a new provider
Configuration Management menuAdding a new provider
Adding a new provider
Type selection:
URL can be a URL or hostname, we’ll fill in the missing pieces and save as a URL
Inventory
Provider
Inventory Group
Configured Systems
InventoryLimited Inventory, based on what is required to support current use cases.
Configured System to VM link data collected, not exposed in the UI yet.
Inventory - Configuration Script Summary
Custom ButtonsNavigate to Automate / Customization
Select VM and Instance / [Unassigned Buttons]
Configuration / Add a new Button
Custom Buttons
Request Type is Ansible_Tower_Job
Here you can select the Job Template by name
Params prefixed by “dialog_param_” PR#8960
Custom ButtonsAdd a new Button Group
Fill in the fields, add your button
Custom Buttons
Service DialogsA Service Dialog can be created from any Job Template
Service DialogsGive the Dialog a name
Navigate to ServicesCatalog ItemsAdd a new Catalog Item
Service Dialogs
Give the Service Catalog a name and description
Select the Catalog
Select the just created dialog
Select the provider
Select the Job Template
The pre-populated entry point is the default state machine
Service Dialogs
- Default creation includes all survey data, variables and limit
- Fields can be modified as below to match the desired needs of the delivered service (from Automate, Customization, Service Dialogs)
‘Limit’ was pulled out for this service dialog
Navigate to Service Catalogs - click Order
Demo- Awesome Demo
Future- Eventing, could poll Activity Stream for events to trigger refreshes
- More use cases to drive inventory collection
Q&ALink to Talk topic:
http://talk.manageiq.org/t/launching-ansible-tower-job-templates-from-manageiq/1394
Sprint 39 Demo (Ansible Tower features):
https://www.youtube.com/watch?v=uZYzX4ZqTEQ#t=44m07s
Minecraft Playbook:
https://github.com/syncrou/minecraft-pe-ec2-ansible