DevOps Classroomnotes 17/Jun/2023

Ansible Workshop

Game of life

  • To run this project with need tomcat with jdk 8
  • In the web apps folder of tomcat we need to copy gameoflife.war
  • Manual steps for ubuntu 20.04
sudo apt update
sudo apt install openjdk-8-jdk tomcat9 -y
cd /tmp
wget https://referenceapplicationskhaja.s3.us-west-2.amazonaws.com/gameoflife.war
sudo cp gameoflife.war /var/lib/tomcat9/webapps/gameoflife.war
  • Access the application over `http://:8080/gameoflife
    Preview

Activity – 1: Write an ansible playbook to automate the above

Activity – 2 : Write a role for gameoflife

Activity 3: integrating ansible with jenkins

  • We have written a jenkins pipeline
pipeline {
    agent { label 'ANSIBLE' }
    stages {
        stage('deploy') {
            steps {
                git 'https://github.com/asquarezone/AnsibleZone.git'
                sh 'cd May23/workshop/role_usage && ansible-playbook -i hosts gol.yaml'
            }
        }
    }
}
  • Execute build on jenkins
    Preview

Terraform with Ansible

  • Refer Here for terraform creation
  • Watch the classroom video

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner