DevOps Classroom Series – 21/Oct/2021

Exercise – Deploying a Spring boot Application

  • This activity is about deploying a spring boot application
  • The application can be downloaded from Refer Here
  • Steps of configuring the machine
    • Install Open jdk 11
    • Download the jar file to some folder on the node /usr/share/spc/spring-petclinic.jar
    • Create a user
    sudo useradd spc
    sudo password spc
    sudo chown spc:spc /usr/share/spc/spring-petclinic.jar
    sudo chmod 500 /usr/share/spc/spring-petclinic.jar
    
    • Create a service file /etc/systemd/system/spc.service
      [Unit]
      Description=Spring petclinic application
      After=network.target
      
      [Service]
      
      User=spc
      ExecStart=/usr/bin/java -jar /usr/share/spc/spring-petclinic.jar SuccessExitStatus=143
      
      [Install]
      WantedBy=multi-user.target
      
    • Application should be accessible on http://publicip:8080
  • Exercise:
    • Ensure the manual steps are working
    • Write a playbook to make this spring petclinic application deploy on ubuntu and then centos
    • hint:
      • java installation:
        • ubuntu: sudo apt update && sudo apt install openjdk-11-jdk -y
        • centos: sudo yum install java-11-openjdk-devel -y

Leave a Reply

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

Please turn AdBlock off
Floating Social Media Icons by Acurax Wordpress Designers

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