Visão Geral
Este Curso Ansible Storage Devices oferece uma visão geral flexível (personalizável) do uso do Ansible para automatizar o conjunto de produtos de armazenamento Dell
incluindo PowerStore. Os exemplos destacam
Os exemplos destacam os recursos mais recentes da versão atual do Ansible, a criação de manuais complexos e o desenvolvimento de estratégias de fluxo de trabalho
estratégias de fluxo de trabalho, tudo isso observando as técnicas de práticas recomendadas.
Os alunos serão encorajados a partilhar com a turma as formas manuais como estão atualmente a fazer
trabalho em um esforço para criar soluções Ansible altamente aplicáveis. Através destas demonstrações,
demonstrações, os alunos aprenderão a usar código para estender a estrutura e a consistência às suas
operações. Embora este Curso Ansible Storage Devices se concentre nas soluções de armazenamento da Dell, o Ansible é um canivete suíço
de automação abstrata. Cada lição é altamente aplicável além de "apenas" a suíte de armazenamento da Dell.
Conteúdo Programatico
Ansible Introduction
- Ansible definition
- Exploring modules
- Building a task
- Places to define Ansible vars
- hosts aka "Inventory"
- Creating a A play
- Looking at the “handler”
- Running a playbook
- Introduction to YAML
- Requirements for connecting to remote hosts
Installation
- Configuration requirements on the control machine
- Understanding pre-requisites for connecting to remote infrastructure
- Ansible configuration with ansible.cfg
- Ansible connection types
- Touring the Ansible Python Plugin system
Ansible Static Inventory
- Defining Hosts and Groups
- Host and Group variables
- Understanding variable precedence
YAML
- YAML Gotchas
- YAML Dictionary
- YAML list
- YAML list of dictionaries
- YAML Alternate format
- Relationship to JSON
Writing a Simple Playbook
- Elements of a well written playbook
- Dell Storage Collection
- Using include files for tasks
- Available Dell Storage modules
- Creating dynamic playbooks with external variable files
- How a Dell inventory may differ from static inventories
Ansible base modules to know
- Understanding modules documentation
- setup / gather_facts
- gathering facts on Dell storage arrays
- apt / yum / pip
- command / shell
- uri module for API lookups
- git
- debug for variable display
- lineinfile for building configuration files
- Writing Ansible Playbooks with Dell Storage Modules and Ansible Base modules
Ansible Tower / Jenkins
- Running Dell Storage playbooks in Ansible Tower
- Running Dell Storage playbooks in Jekins
- Why you should consider using Jenkins as a replacement for Ansible Tower
- Pushing and pulling playbooks from GitHub
Variables, Conditionals and Looping Tasks
- Variables and Loops
- Building conditionals from Dell Storage module results
- Blocks
- Getting variables from the system
- Setting variables in playbooks
- Getting variables from the command line
- Where is the best source to derive variables values
Ansible and Jinja
- What is Jinja2?
- Jinja variables
- Jinja filters
- Jinja2 tests
- How to use ansible templates
- Building Jinja2 templates for Dell Storage
Ansible and RESTful API Requests
- Passing parameters within RESTful API requests
- General tips for connecting Ansible to any API
- AWS S3 Bucket Storage Example
Dynamic Inventory Management
- What is Dynamic Inventory?
- A review of static Inventory Practices
- Using JSON as an Inventory Source
- Using YAML as an Inventory Source
Securing Credentials for Dell Storage
- Best practices for credential management
- Prompting for sensitive input
- YAML shortcuts for passing credentials to Dell Storage
- Securing credentials with Ansible Vault
- Encrypting Playbooks with Ansible Vault
Collections, Roles and Ansible Galaxy
- Why we need Ansible Roles
- The problems solved by Ansible Collections
- Creating Roles
- Creating Collections
- Role Directory Structure
- Role default variables
- Converting a Playbook to a Role
- Exploring Ansible Galaxy
- Finding code on GitHub
- Augmenting Ansible with Ansible Galaxy content (Roles and Collections)
LABS
- Installing Dell Storage Collections
- Setting up the Ansible Controller
- Defining a static Ansible Inventory
- Running your first Playbook for Dell Storage
- Debug, Loops, and YAML Lists
- When Conditionals, YAML Dictionaries, and Jinja
- Error Handling in Dell Storage Playbooks – Rolling Back Errors
- Using Ansible to connect to RESTful APIs
- Building Jinja Templates for Configuration Files
- Interacting with Ansible Galaxy
- Creating a Dynamic Inventory with Python for Dell Storage
- Securing Dell Storage credentials with Ansible Vault
- Logging work performed on Dell Storage
- Integrating Python Tricks with Ansible Playbooks
- Running Dell Storage Playbooks with Jenkins
- Case Study – Using Dell PowerMax
- Case Study – Using Dell Isilion / PowerScale
- Case Study – Using PowerStore
- Case Study – Building Custom Solutions for Student Workflows