This document discusses using Ansible to automate deployment and improve the workflow for testers. It describes a case where Ansible was used to automate deployment of a virtual customer premises equipment (vCPE) system. Automating repetitive tasks with Ansible provides benefits like reduced errors, faster deployment, and freeing up staff to focus on more important work. Ansible is well-suited for automation since it is agentless, uses simple YAML files for automation tasks, and has a wide library of modules that can be used to configure and deploy systems. The document provides an overview of using Ansible playbooks and ad-hoc commands to automate deployment and configuration of a vCPE system.
7. How we solved it?
Have a lot of repetitive tasks - automate it!
PS. Let's allow smart people to focus on more smart
things instead of wasting time on repetitive tasks
8. Why “Handmade” is not a good idea?
Lack of transparency
Lack of accountability
Long time deployment
9. Automation is better!
⇨Confidence in your operations
⇨Much fewer errors and mistakes
⇨Anyone can do deployment just in few simple steps
⇨Faster iteration (Faster deployment)
⇨Version control
11. Deployment automation is easy with Ansible
Ansible is …
An Open Source automation platform
Tool for configuration management
Tool for software deployment
Tool for task automation
12. So, why Ansible?
❖User friendly
❖Simple to learn and use
❖Python based
❖Self-documented
❖Consistent
❖Have a lot of modules
13. Ansible modules are single scripts that will be deployed on target hosts
~ 750 modules
18. So, let’s do automation!
PS. But do not forget about manual execution
Manual
- Determine what is worthwhile to automate and what
should be automated first
- Do some research
Automated
- Faster time to market
- Increased effectiveness
- Better quality
Prepare scripts and ... push the button!
19. Feel free to contact me:
Olga Grynyk
Automation Engineer @ Ostware Services
olga.grynyk@ostware-services.com
fb.com/olya.grynyk
Editor's Notes
Mistakes happen even if everything is perfectly documented
Only a few people can execute the deployment
Sometimes it takes a long time to teach new member to do the deployment
There is no guarantee that every deployment will be the same
Lack of transparency
Lack of accountability
Long time deploymentThere is no single place where everyone take a look to which version of software was deployed, by whom,when etc (transparency and accountability)
Spend some time at the beginning of Automation process, but save time in the future!
Create value quickly – Deployment Automation helps minimize your Feature Cycle TimeYou should not wait until somebody will come and deploy smth for you. Instead you can just do it by yourself (and in case of argent you may add more playbboks with more features - one more + of continious delivery)
Ansible will SSH into the desired hosts to do its job. NO AGENTS!
Configuration files deployed by your Ansible playbooks are all kept in source control. Easily go back and see past changes.
ad-hoc mode allows direct management of your hosts by executing single line commands and leveraging Ansible modules. Ad-hoc mode is useful when you plan to perform a quick and simple activity like shutting down your hosts or checking connectivity between your Ansible server and hosts using ping. But when you plan to manage host configurations and deployments, Ansible playbooks become more attractive.
But when you plan to manage host configurations and deployments, Ansible playbooks become more attractive.
Playbooks – Playbooks are the heart of Ansible. As mentioned above, modules can run in ad-hoc way but when you are looking to orchestrate your configuration and execute series of complex commands in an order, playbooks comes into picture. Playbooks are written in YAML format. In a playbook, you can include multiple modules and perform tasks synchronously or asynchronously.
A playbook is broken into multiple parts:
hosts: where you want to deploy your configuration
remote_user: execution of steps as a defined user
tasks: execute modules with specific variables
handlers: triggering a specific execution only once if notified by multiple tasks or system state changes. It depends upon notify block under tasks.