Murray Oldfield, InterSystems Principal Technology Architect, presented Ansible as a tool for automating complex system deployments, emphasizing its use in environments like HealthShare by creating focused playbooks. He detailed a typical deployment workflow, declarative configuration management via playbooks, and the organization of hosts and variables within Ansible’s inventory. Oldfield also demonstrated Ansible in action, highlighting the use of modules, templating with Jinja2, targeted execution with tags, and the organizational benefits of roles like “Install IRIS.”
Ansible for System Deployment: Oldfield introduced Ansible as a tool for simplifying complex system deployments, highlighting its ability to automate tasks and reduce operator error, especially in environments like HealthShare. He emphasized the importance of creating focused playbooks that excel at one thing.
Deployment Workflow: Oldfield outlined a typical deployment workflow using Ansible, which includes installing packages, configuring instances, and managing plans for components such as web servers and databases. He mentioned that the process begins with gathering customer details and system requirements, often represented in a spreadsheet.
Configuration Management: Oldfield explained how Ansible manages configurations declaratively. When stating the desired state of the system, Ansible ensures that the state is achieved. He detailed the use of playbooks, which contain a series of tasks executed on target hosts, covering aspects such as operating system preparation, application installation, and specific configurations.
Ansible Inventory and Variables: Murray Oldfield described Ansible’s inventory file structure, which organizes hosts into groups and allows for setting variables at different levels (group, host, and instance). He highlighted the power of variables in customizing deployments without rewriting code, making it easy to manage different environments and instance configurations.
Ansible Modules and Playbooks in Action: Oldfield demonstrated Ansible in action, showing how playbooks execute tasks across multiple hosts in parallel. He explained the use of modules as discrete pieces of code for tasks like copying files and performing installations. The demonstration included an example of deploying HealthShare, showing real-time output and a summary of changes.
Templating and Dynamic Configuration: Oldfield discussed Ansible’s templating capabilities using Jinja2, which allows for substituting variables within configuration files during deployment. He also touched upon the possibility of dynamically generating the Ansible inventory based on cloud infrastructure, such as AWS.
Targeted Execution and Roles: Oldfield explained how to use tags to target specific tasks within a playbook for more granular control. He also introduced the concept of roles, which are pre-packaged sets of tasks and configurations, as a way to organize and reuse Ansible code, exemplified by an “install IRIS” role.