An overview and description of how ansible plays a big role in having a less complex DevOps . Whiteklay has deep roots in using ansible and uses it for automating all its installation activities for deploying large-scale clusters having multiple software and hardware combinations.
2. 2
Whiteklay Technologies
Mandar D Gogate
Bigdata-DevOps Engineer
Whiteklay Technologies Pvt.
Ltd.
Email :- mandar.g@whiteklay.in
Website : www.whiteklay.com
About The Presenter
3. 3
Whiteklay Technologies
Agenda:-
• Before Ansible..
• After Ansible came in to picture
• How – It Works
• Installation
• Ad-hoc commands
• Inventory
• Playbooks
• Handlers
• Roles
• Modules
• Ansible Galaxy
4. 4
Whiteklay Technologies
What we do..
i) Building VM template
ii) Cluster configuration
iii) Storage Management
iv) Alert Monitoring
v) Customer Support
vi) Software Deployment
vii) Authorization / Authentication
viii) Performance Testing
ix) Software Upgradation
x) OS Upgradation
5. 5
Whiteklay Technologies
How we do it..
Building VM template
i) ISO install & configuration
ii) Network setup
iii) Set up User/Group,Security
iv) Software install & Configure
Server Maintenance
i) Ssh into each server & restart service
ii) Write scripts to log in to each server & update openssl
Building Clustors
i) Cloning no. of VMs from templates
ii) Hostname / Network Configuration
iii) Firewall configuration
9. 9
Whiteklay Technologies
Ansible:-
1) It is simple and easy to learn IT automation
system.
2) It handles configuration-management,
application deployment.
3) It provides cloud provisioning, ad-hoc task-
execution with multimode orchestration.
4) It also provides zero downtime rolling
updates with load balancers.
#Read the document and more at :-
http://ansible.com/
10. 10
Whiteklay Technologies
Features:-
i) Agent less
ii) Uses ssh
iii) Everything is a YAML file
iv) Easily extensible via modules
v) Encryption and Security built in
vi) More feature available in enterprise ( Tower)
vii) Idempotent
11. 11
Whiteklay Technologies
How it works..?
Building Blocks:-
i) Inventory
ii) Ad-hoc commands
ii) Playbook :-
a) Tasks
b) Variables
c) Roles
d) Handlers
e) Templates
f) Modules
19. 19
Whiteklay Technologies
Handlers:-
i) They are just written like a regular task
ii) They indicates a change in the system
iii)Any module can be used for the handler action
iv) Only run if triggered by the notify directive
Handler example:-
-name: Restart the tomcat
service : name= tomcat state=restarted
22. 22
Whiteklay Technologies
• Tasks - contains the main list of tasks to be
executed by the role.
• Handlers - contains handlers, which may be used by
the role or even anywhere outside the role.
• defaults - default variables for the role.
• vars - other variables for the role.
• files - contains files which can be deployed via the
role.
• templates - contains templates which can be
deployed via the role.
• meta - defines some meta data for the role.
Meaning & Use of different directories of
Roles:-
23. 23
Whiteklay Technologies
Modules:-
• Ansible ships with a number of modules (more
than 1000.)
• They are reusable, standalone scripts that can
be used by the Ansible API, or by
the ansible or ansible-playbook programs.
• They can be executed directly on remote hosts
or through Playbooks.
• Users can also write their own modules.
• They can control system resources, like
services, packages, or files (anything really), or
handle executing system commands.
• They take parameters and conditions to define
desired state.