DevOps Classroom Series – 04/Jun/2021

Attributes

  • An attribute is a specific detail about node, Attributes are use by chef to understand

    • The current state of node
  • Attributes are defined by

    • The nodes as saved on the chef infra server
    • Attributes passed via JSON file Refer Here for understanding JSON and yaml formats
    • Cookbook
    • Roles
    • Environments
  • Refer Here for the lamp server cookbook with attributes

  • Refer Here for the correction.

Scenario: Tomcat

  • Refer Here for installing tomcat on ubuntu 18.04
  • Make a note of all the manual steps
  • Create a ubuntu 18 VM and execute the manual steps to verify if they are working
  • Manual Steps
    1. sudo apt update
    2. sudo apt-cache search openjdk
    3. sudo apt install openjdk-8-jdk -y
    4. java -version
    5. sudo groupadd tomcat
    6. sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat
    7. cd /tmp/
    8. wget https://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.46/bin/apache-tomcat-9.0.46.tar.gz
    9. sudo mkdir /opt/tomcat
    10. sudo tar xzvf apache-tomcat-*tar.gz -C /opt/tomcat –strip-components=1
    11. cd /opt/tomcat
    12. sudo chgrp -R tomcat /opt/tomcat
    13. sudo chmod -R g+r conf
    14. sudo chmod g+x conf
    15. sudo chown -R tomcat webapps/ work/ temp/ logs/
    16. sudo nano /etc/systemd/system/tomcat.service
    17. sudo systemctl daemon-reload
    18. sudo systemctl start tomcat
    19. sudo systemctl status tomcat

Leave a Reply

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

About learningthoughtsadmin