Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automating Satellite Installation and Configura...

Keith Resar
November 05, 2019

Automating Satellite Installation and Configuration With the Ansible Foreman Modules

Red Hat Satellite installation and configuration has always been far too much of a manual process. While we could use traditional sys-admin style automation to get Satellite installed, management and configuration of Satellite objects like Activation Keys, Content Views, etc. was always too elusive.

This deck reviews the history of Satellite automation, culminating in the power available from a new suite of Foreman modules for Ansible that finally allow idempotent interaction with every Satellite object.

Keith Resar

November 05, 2019
Tweet

More Decks by Keith Resar

Other Decks in Technology

Transcript

  1. Foreman Katello Pulp Candlepin System provisioning and life cycle management

    Subscription and repo management Repo + Content management Subscription management @KeithResar
  2. SIMPLE POWERFUL AGENTLESS App deployment Configuration management Workflow orchestration Network

    automation Orchestrate the app lifecycle Human readable automation No special coding skills needed Tasks executed in order Usable by every team Get productive quickly Agentless architecture Uses OpenSSH & WinRM No agents to exploit or update Get started immediately More efficient & more secure WHY ANSIBLE? @KeithResar
  3. CLOUD SECURITY NETWORK DEVOPS AWS Azure Century Link Cloud Scale

    Google Linode OpenStack Rackspace Docker Digital Ocean Palo Alto Check Point Splunk Snort F5 Arista A10 Cumulus Big Switch Cisco Dell F5 Juniper Palo Alto OpenSwitch HipChat IRC Jabber Email RocketChat Sendgrid Slack Twilio INFRASTRUCTURE RHEL VMware Windows Netapp Stacki @KeithResar
  4. Ansible module implementation follows a predictable lifecycle... Phase I -

    Nothing We are all sad, no built-in support. @KeithResar 1 • Make use of uri and command modules • Ugly python in playbooks • Do as I say, not as I do 2 3
  5. Ansible module implementation follows a predictable lifecycle... Phase II -

    Introduce Primitives Primitives introduced support automation, but not using expected Ansible patterns @KeithResar 1 Plenty of examples in the network space • foo_facts → getter • foo_config → setter • foo_command → executer 2 3
  6. Ansible module implementation follows a predictable lifecycle... Phase III -

    Supported Functionality Number of modules explodes, Ansible patterns throughout! @KeithResar 1 The tactical modules you know and love are available. _You implement using the language of_ _Ansible, not vendor functional language._ 2 3
  7. Ansible Foreman Demo? @KeithResar Never, go to close your eyes

    (pg 99) -or- Soon, go to a few more slides (pg 8)
  8. Satellite configuration questions Questions you need to answer when deploying

    satellite. How many of them can you answer just based on your subscriptions? @KeithResar • Organizations, Locations • Subnets, domains • Products, Content Views, Life cycle environments • Content Sync
  9. Automation Flow Phase I - Satellite Install @KeithResar 1 •

    Pre-flight Tasks • Storage • Repos • Apply RPMs • Install Satellite 2 3
  10. Automation Flow Phase III - Satellite configuration @KeithResar 1 •

    Manifests • Lifecycle envs • Enable Repos • Sync plan • Custom products • Content Views • Activation Keys 2 3
  11. Delivering Automation Hammer? @KeithResar 1 • (We just saw this)

    • Abstracts multiple APIs calls into a well-defined CLI client. Let’s you use object names rather than IDs 2 3 4
  12. Delivering Automation Ansible Native (pre 2.8/2.9) @KeithResar 1 • foreman

    and katello modules • Requires nailgun • Limited support • Limited Discoverability 2 3 4
  13. Delivering Automation Ansible Native + URI (pre 2.8/2.9) @KeithResar 1

    • uri module • Directly interact with Satellite API • Review API documentation and WUI implementation (limited discoverability) 2 3 4
  14. Delivering Automation Ansible + Foreman Collection @KeithResar 1 • Install

    with mazer or ansible-galaxy • Uses apypie 2 3 4
  15. Are we done yet? @KeithResar Please stop talking, go.. Just

    go (pg 6) -or- Just one more thing, go AAPL RIP (pg 78)
  16. Just one more thing Inventory and Inventory Plugins @KeithResar 1

    • Dynamic inventories → No • Inventory Plugins → Yes! 2 # my.foreman.yml plugin: foreman url: http://localhost:2222 user: ansible-tester password: secure validate_certs: False
  17. Just one more thing Foreman Callback @KeithResar 1 • Sends

    facts to Foreman • Captures custom facts too - /etc/ansible/facts.d/*.fact • Does not work under Tower/AWX 2
  18. Closing The Future (aka Roadmap) @KeithResar 1 • Planned supported

    RPMs with Satellite 6.8 release • Documentation on how to use the modules • An SOE guide including example Ansible Playbooks 2
  19. Closing Resources @KeithResar 1 • github.com/jjaswanson4/satellite6-deployment Josh Swanson’s AWESOME role

    • github.com/flyemsafe/satellite-day-two-ops Another role getting traction, but my favorite • github.com/theforeman/foreman-ansible-modules The Foreman modules 2