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

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

Terraform with Ansible

  • Refer Here for terraform creation
  • Watch the classroom video
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

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

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Exit mobile version
%%footer%%