MattFame / DevOps_CaseStudy_02

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DevOps_CaseStudy_02

In this case study ;

  • We will write a Shell script which runs a Python phone book application

  • In the Shell script; first check if the user knows the root password

  • If the user knows the root password, then echo a welcome message with the name of the user

  • Then check if AccessLog.txt file exists in the current directory

  • If the file doesn't exist, create it in the current directory

  • If the file exists, then append the name of the user, the date and the number of the record starting by 1 to the file

  • Later on, check if you have installed Python

  • If Python is not installed, install it within your script

  • If Python is installed, check if you have the path to Python in your environment variables

  • If the path to your Python binary files doesn't exist, you should export the path into your environment variables

  • Later on, your script should look into the current directory for your Python application which has the name "phone_book.py"

  • If the script finds the application, it should run it

  • If the script can't find the application, it should clone it from your git repository which already has your application in it and run the application. (But before that you should check if you have git installed and if not, you should install it first)

  • Your phone_book.py program should be able to list out all the people with their name, surname and phone number and sequence number (3 hard coded records are enough)

  • You should be able make CRUD (Create, Read, Update, Delete) operations with your application.

About


Languages

Language:Shell 100.0%