DevOps Classroomnotes 04/Jan/2023

Ansible Tomcat installation Contd

  • We are suppose to continue from system d unit file creation Refer Here
  • We need to copy tomcat.service file from ansible control node to remote nodes. Refer Here for the module used
  • Refer Here for the changes done
  • Now we need to reload the daemon, enable and start the service
  • Refer Here for the changes done
  • Now access tomcat (Ensure 8080 port is opened in security groups)
    Preview
  • Lets configure Management interfaces Refer Here for manual steps
  • Refer Here for the changes done to accomodate host manager app configuration
  • Now execute the ansible playbook
    Preview
  • Access tomcat hostmanager and manager
  • Manager is working
    Preview
  • Host manager is failing and fixed the issue as xml was incomplete. Refer Here for the changes done
    Preview

Possible fixes

  • When we execute ansible playbook on the node where everything is installed, changes shouldn’t happen. But as of now there are changes during every execution done by ansible
    Preview
  • Context xml with same contents is created as two files and two times the copy is handled in two tasks
    Preview
  • Ansible playbook which we have written works only for ubuntu, we need to extend this to work for other linux distributions.
  • If we need to make this playbook work for future versions of tomcat it will not as we have hardcoded 10.1.4
  • If we want extend this playbook to install any version of java

Exercises

  • Install lamp stack on ubuntu 20.04 (skip ufw and mysql) Refer Here
  • Rather than virtual hosts file create a file info.php in /var/www/html/info.php
<?php
phpinfo();
?>

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube