Professionals from RedHat who were there in that webinar,
🔸Mr. Shreejith Anujan :
The Principal Instructor at Red Hat
▪️Primarily responsible for empowering Red Hat customers with tailor-made enablement services.
▪️Also heading the designing and delivering high-quality content on integrated solutions and trusted partners across APAC, ANZ, and APJ.
▪️Connected with RedHat for around 12+ years.
▪️He was a Speaker in DevConf.in 2018 where he had discussed Linux Container Internals.
🔸Mr. Arun Eapen :
(Director, APAC Service Delivery, GLS RedHat Asia Pacific)
▪️ Specialist in Linux and Security 🔐
▪️The First RHC*(RHCA, RHCSS, RHCDS, RHCVA) in India.
▪️Founding member of the Free Software Foundation India.
▪️Being in open source software for more than 24 years.
A complete Demo of Ansible Tower and practical implementation and use-cases solved from that in industries are been delivered to us. Also how the Ansible helps us in Upskilling as per the industries automation need is possible using Ansible.
✔ I have written a blog last few weeks ago in which I have described about ansible and their use-case in Trivago.
But what I learnt in the Practical Demo Class yesterday is something way beyond that. In RH294 training I have come across various topics like vault, writing playbooks and deploying it using ansible-playbook command and also making roles and templates in jinja2. Having a session on Ansible-tower was like putting cherry over the cake.
Ansible Tower is built on top of Ansible-Engine using API for automating network infrastructure and can integrate with various technologies which we can’t from basic Ansible. It enable Redundancy in scaling playbooks for automation.
We have both CLI and GUI version for AWX (Ansible Tower), in command line command to run ansible-tower service is:
> ansible-tower-service <all attributes and options>
Most of the use-case were based on the ansible-tower WebUI which gives us facilities to focusing on various sub-processes:
1. Configuration Management in multiple Target machine.
2. Application Deployment in multiple Target machine which leads to microservice
3. Security Remediation using ansible-tower.
4. Orchestration of Ansible-automation . Example : Creating VM in RHVT (RedHat Virtualization Tooling) whenever old VM destroys.
5. Can Stitch all the remediation / notification and configuration together using workflows.
6. Can do Scaling in Automation and put conditions over jobs
7. ChatOPS, one of the messaging notify which can be used to collaborate all members of a DEVOPS team.( Example: In a production team whenever a new VM is creating then the team must know about this event for which a mail or slack message on channel would arrive to all.)
8. Custom Credential-type could be created using Templates. When third party tooling is not available by default in AWX then it could help in that case too.
9. Can create Job Templates for different tools and technologies.
10. Can create Virtual Environments for various IDE platforms using Ansible and can also Schedule them. (Example : Python Virtual Environment )
11. can run multiple Playbooks using Workflow Visualizer here we will get CI/CD facility. Mostly industries use this for Continuous Deployment.
12. Provisioning using Ansible-tower was that simple with ansible-tower just we need to give credential type and template then by running that workflow we get our desired state at any of the platform i.e. either over on-premise or over cloud.
(Example: Creating instance over AWS i.e. Amazon Web Services or OCP i.e. Oracle Cloud Platform).
13. For solving Single Point Of Failure i.e. SPOF, ansible-tower helps in redundancy and scaling of our Controller Node.
14. For Source Code Integration over our Automation workflows and to complete the workflow it uses GitOPS for deployment and Setup of a required environment.
Let’s see those different Use-Cases that we get to know in the webinar
USE CASE 1: Provisioning instance over AWS using Pre-created Template.
- Write Playbook including aws_instance module and defining the region, VPC, subnet, route-table, security groups, keys, OS to be provisioned in the instance i.e. AMI and other required attributes.
- Create a credential-type if not there in your ansible-tower subscription then create your credential using fingerprint, user-id, tenancy, tokens, key file.
- Create a Template importing those playbook and credential-file.
- Run that template for getting desired infrastructure over cloud. Now you can deploy any application over your instance by connecting using SSH from your Controller node.
USE CASE 2: Using ChatOPS create a notify job using modern messaging platform like Slack.
- Create a workspace in slack. Then create channels for your DEVOPS teams.
- Now over RHVT (RedHat Virtualization Tooling) Platform we would create a VM as per our scaling automation workflow, and for this we would create a Job over Workflow Visualizer.
- Ansible-tower will do the analysis of Workflow and get the task done. We have imported various playbooks for out work process. One of them is create_task_vm.yml which would create a VM according to our desire.
- Workflow is as follows:
5. Clicking Start button would help to run the Workflow and Notify on Slack Channel and Ask for Approval then after approval when job completes then another message is sent over the Slack Channel.
USE CASE 3: Creating Python Virtual Environment in some directory using Ansible-Tower
- install venv command to deploy the playbook for establishing python over a target node.
- command would be like:
> python3 -m venv <directory name>
USE CASE 4: Creating instance over OCI (Oracle Cloud Infrastructure)
- Check ansible collection if any certified collection is available for creating roles for instance over OCI.
- Create Credential using oracle-oci-credential type. (If credential type not available then you can create one custom credential for any technology using credential tab in AWX) for this you need user-name, key file, fingerprint and tenancy.
- deploy the Template after attaching both the Credential and collection.
- Make sure your Ansible-Tower license must support for the number of instance you want to create spontaneously using ansible-tower.
- Nodes you would manage from Ansible-tower depends on your valid subscription. Example: 2 storage device, 16 host device, for the community AWX subscription.
- Now you may connect to any of the instance over oracle cloud using:
> ssh -i ./ssh/id-oraclecloud-rsa opc@←ip —
Additional Information provided by our instructor
- Minimum requirements to install Ansible Tower over our systems are 4GiB RAM, 2 CPUs and 20 GB Hard disk.
- We can import or export playbooks over our AWX WebUI
- Ansible galaxy roles are not certified from RedHat.
- We can upload inventory file in ansible tower using ansible-tower command.
- Pre-requisite for establishing ansible tower is your Base OS must be Linux as ansible is designed to work on Linux Architecture.
Here I want to end this article the summary of the webinar I have poured over here is just a glimpse, trust me we have many more discussions in our Session. Mr. Arun have discussed how we need to upskill and various automation need that have spontaneously arrived in this pandemic period.
Thankyou for giving your time to read this Article. I might help you in exploring more about the Advanced use-case of Ansible.
I would Like to thanks Mr. Vimal Daga Sir and Mrs. Preeti Chandak ma’am for conducting such an amazing webinar.
Being a Part of ARTH we have explored various automation use-cases in DevOps with our Mentor Mr. Vimal Daga. And after experiencing all those using a WebUI tool seems to be more interesting.
Thanks Again LinuxWorld Team and RedHat Team. The knowledge I got have engrossed me with enthusiasm that there are many more things to learn and Explore. 🤩