DevOps Classroomnotes 28/Jul/2022

Ansible Approach

  • Find all the manual steps to deploy application
  • Group steps into some common activity and consider this for playbook.
  • For each manual step create a task and find the right module of ansible.

Lets install an application which runs on tomcat server

  • I need a linux server
    • Ubuntu 20.04
  • Then execute the following commands
sudo apt update
sudo apt install openjdk-8-jdk -y
sudo apt install tomcat9 -y
wget https://referenceapplicationskhaja.s3.us-west-2.amazonaws.com/gameoflife.war
sudo cp gameoflife.war /var/lib/tomcat9/webapps/
sudo systemctl restart tomcat9.service
  • Lets figure out modules
    1. apt is the command
      Preview
    2. wget
      Preview
    3. cp
      Preview
    4. systemctl
      Preview

Notes

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner