Skip to content

shivamgulati1991/DevOps-SpecialMilestone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevOps-SpecialMilestone

Team Members:

  1. Ayush Gupta - agupta25@ncsu.edu
  2. Nishtha Garg - ngarg@ncsu.edu
  3. Shivam Gulati - sgulati2@ncsu.edu

The project used for the milestone is the same as Milestone 3 at

https://github.com/shivamgulati1991/m3base

Diet Monkey

Shrink resources available on server.

  • We run the script shrink.js which shrinks the allocated memory of the server if the utilization is less.
  • It connects to the digital ocean droplets and reduced the memory.
  • The scipt can be run as
node shrink.js
  • Our droplet size was shrinked from a memory of 1gb to 512mb.

Screencast

Restart Monkey

Restart server. Check if services properly restarted.

  • We run the shell script restart.sh which initiates the server restart.
sh restart.sh
  • It first calls the file reboot.js which reboots the server.
echo "Preparing to reboot server"
#call reboot script to reboot
node reboot.js
  • Next, we induce a 30 second delay in the script so the server is back up fully.
echo "Getting services back up"
#30 seconds delay to allow for server to back up
sleep 30
  • Further, it runs the restartplaybook.yml file using ansible to get the services back up.
#playbook to run the application back
ansible-playbook -i inventory restartplaybook.yml
  • We can go the browser and run the application on port 3000 to see if it is back up.

Screencast

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published