You are on page 1of 58

An

Industrial Training Report


On

CLOUD COMPUTING WITH DEVOPS & LINUX


At
LEARN AND BUILD, JAIPUR
Submitted in partial fulfillment of the requirements for the award of the degree of
Bachelor of Technology
In
Computer Science & Engineering

(Session 2023-24)

Submitted to - Submitted by-


Ms. Archana Soni Mam Mayank Arora
(Faculty Coordinators- Industrial Training Seminar) Reg. No.-PCE21CY037

DEPARTMENT OF COMPUTER ENGINEERING


POORNIMA COLLEGE OF ENGINEERING, JAIPUR
RAJASTHAN TECHNICAL UNIVERSITY, KOTA
December ,2023

1
DECLARATION

I hereby declare that the work which is being presented in the Industrial Training report
titled
Cloud Computing with DevOps & Linux in partial fulfillment for the award of
the Degree of Bachelor of Technology in Computer Engineering and submitted
to the Department of Computer Engineering, Poornima College of
Engineering, Jaipur, is an authentic record of my work carried out at LEARN
AND BUILD during the session 2023-24 (Semester).
I have not submitted the matter presented in this report anywhere for the award of any
other Degree.

Signature of the Student with


Mayank Arora
PCE21CY037
Place: Jaipur
Date: 30.09.23

2
CERTIFICATE OF TRAINING

3
DEPARTMENT OF COMPUTER ENGINEERING

Date:30.09.23
CERTIFICATE
This is to certify that the Industrial Training report Cloud Computing with
DevOps & Linux has been submitted by Mayank Arora with PCE21CY037 in
partial fulfillment for the award of the Degree of Bachelor of Technology in
Computer Engineering during the session 2023-24, Even Semester. The industrial
training work is found satisfactory and approved for submission.

Names & Signatures (Dr.Nikita Jain)

Ms. Archana Soni Mam HOD CSE

Date: 30.09.23 Place: Jaipur

Acknowledgment

A project of such vast coverage cannot be realized without help from numerous sources
and people in the organization. I am thankful to Dr. Mahesh Bundele, Director, PCE
for providing me with a platform to carry out such training successfully.

I am also very grateful to Dr. Surendra Kumar Yadav (HOD, CSE) for his
kind support.

I would like to take this opportunity to show my gratitude to Ms. Archana Soni
(Faculty Coordinator, ITS) who helped me in the successful completion of my

4
Industrial Training. They have guided, motivated & were a source of inspiration for me
to carry out the necessary proceedings for the training to be completed successfully.

I am thankful to Mr. AMIT TIWARI for his kind support and for providing me with the
expertise in the domain to develop the project.

I would also like to express my heartfelt appreciation to all my friends whose direct or
indirect suggestions help me to develop this project and to the entire team members for
their valuable suggestions.

Lastly, thanks to all faculty members of the Computer Engineering department for their
moral support and guidance.

TABLE OF CONTENTS

CHAPT PARTICULARS PAGE


ER NO. NO.
Title Page i
Candidate’s Declaration ii
Certificate of Training iii
Certificate by the Department iv
Acknowledgment v
Table of Contents vi
List of Tables vii
List of Figures viii
Abstract 1
1 Introduction to Cloud Computing with DevOps & 2
Linux 2
2

5
1.1 Introduction 3
1.2 Features of Cloud
Computing with DevOps & Linux
1.3 Advantages of Cloud Computing
with DevOps & Linux
1.4 Applications of Cloud Computing with
DevOps & Linux
2 Technical Training Platform 4
2.1 Introduction

3 Training Introduction 5
4 Basics of Cloud Computing with DevOps 6
5 Module Used 10
7 Source Code and Output 21
11 Conclusion And Future Scope 45
12 References 46

ABSTRACT

Docker Container Orchestration is a pivotal aspect of modern application deployment,


streamlining the management of containerized applications at scale. Leveraging tools like
Kubernetes, Docker Swarm, or Amazon ECS, orchestration simplifies the deployment,
scaling, and maintenance of containerized services. At its core, orchestration enables the
automation of container lifecycle processes, such as load balancing, scaling, and self-healing,
ensuring seamless application delivery.

Containers encapsulate applications and their dependencies, fostering consistency across


different environments. Orchestration platforms facilitate the coordination of these

6
containers, ensuring optimal resource utilization and high availability. They enable
developers to define application topologies, deploy services across clusters, and automatically
manage container instances.

Key components include a master node for centralized control and worker nodes executing
containers. Orchestration platforms monitor the health of containers, restart failed instances,
and distribute traffic efficiently. They empower developers to declare desired states, with the
orchestration system continually working towards achieving and maintaining those states.

Container orchestration is indispensable in cloud-native architectures, allowing organizations


to build, ship, and scale applications flexibly. By abstracting the complexities of deployment,
it accelerates development cycles and enhances the reliability of distributed applications in
dynamic computing environments.

7
Chapter-1
Introduction to Cloud Computing with DevOps & Linux

Cloud Computing, in conjunction with DevOps practices and the Linux


operating system, forms a powerful trio that revolutionizes the way applications
are developed, deployed, and managed. This holistic approach transforms
traditional IT infrastructures into dynamic, scalable, and automated
environments, offering numerous benefits to businesses and developers.

 Cloud Computing Overview:


Cloud Computing involves delivering computing services—including
servers, storage, databases, networking, analytics, and more—over the
internet. Cloud service providers, such as Amazon Web Services (AWS),
Microsoft Azure, and Google Cloud Platform (GCP), offer these
resources on a pay-as-you-go basis, eliminating the need for
organizations to invest in and maintain physical hardware.

 DevOps Integration:
DevOps, a cultural and collaborative approach to software development
and IT operations, synergizes seamlessly with cloud computing. It
emphasizes communication, collaboration, and integration between
development and operations teams. The cloud facilitates DevOps by
providing on-demand infrastructure, automated provisioning, and tools
for continuous integration and delivery (CI/CD). DevOps practices
enhance agility, accelerate release cycles, and improve overall system
reliability.

 Role of Linux:
Linux, an open-source operating system kernel, is widely adopted in
cloud environments for its stability, security, and flexibility. Many cloud
instances run on Linux distributions, and it serves as a preferred choice
for developing cloud-native applications. DevOps practices often
leverage Linux for its command-line capabilities, scripting languages
support, and the ability to customize the operating system to meet
specific application requirements.

8
Key Points and Theoretical Concepts:

 Scalability:
Cloud computing allows applications to scale dynamically based on demand.
DevOps practices, coupled with the scalability features of cloud platforms,
ensure that applications can handle varying workloads efficiently.

 Infrastructure as Code (IaC):


DevOps emphasizes treating infrastructure as code, enabling the automation of
provisioning and management tasks. Tools like Terraform and Ansible,
combined with cloud services' APIs, allow developers to define and deploy
infrastructure through code.

 Continuous Integration and Continuous Delivery (CI/CD):


DevOps practices advocate for CI/CD pipelines to automate the software
delivery process. Cloud environments provide the necessary resources for
building, testing, and deploying applications automatically, fostering rapid and
reliable releases.

 Microservices Architecture:
Cloud-native applications often follow a microservices architecture, breaking
down large monolithic applications into smaller, independently deployable
services. DevOps principles guide the development, deployment, and
monitoring of these services.

 Containerization:
Containers, facilitated by tools like Docker, enable consistent deployment
across different environments. DevOps teams leverage containers to package
applications and their dependencies, ensuring consistency from development to
production.

9
 Monitoring and Logging:
DevOps practices stress the importance of monitoring and logging for real-time
visibility into application performance. Cloud platforms offer native monitoring
services, and tools like Prometheus and ELK stack integrate seamlessly for in-
depth analysis.

In conclusion, the integration of Cloud Computing, DevOps, and Linux


represents a transformative paradigm in modern IT. This synergy empowers
organizations to build, deploy, and manage applications efficiently, fostering
innovation and agility in a rapidly evolving technological landscape. The
combination of on-demand resources, automation, and open-source principles
positions this trio as a cornerstone for success in the digital era.

10
Chapter-2
Technical Training Platform

TRAINING PLATFORM: TECHIENEST

TECHIENEST is founded with the vision of producing innovative and


affordable IT-enabled solutions.
They provide offline courses to students and also software-related job
opportunities for new learners and hard-working people.

11
Chapter-3
Training Introduction

COURSE NAME: - Cloud Computing with DevOps & Linux

TRAINING COMPANY: - TECHIENEST

TRAINING PLATFORM: - Amazon Linux, Ec2, Docker

TRAINING COORDINATOR: - Mr. Ashish Agrawal

TRAINING STARTING DATE: - 01 August 2022

COURSE ENDING DATE: - 15 Sep 2022

TOTAL TRAINING DURATION: - 45 Days

TRAINING END DATE: - 15 Sep 2022

DATE OF CERTIFICATION: - 20 Sep 2022

12
Chapter-4
Basics of Cloud Computing with DevOps

In the ever-evolving landscape of Information Technology (IT), the


combination of Cloud Computing, DevOps practices, and the Linux operating
system has emerged as a transformative force. This powerful alliance
revolutionizes the way applications are developed, deployed, and managed,
offering unprecedented flexibility, scalability, and automation. This
comprehensive overview delves into the fundamentals of each component and
examines how their integration forms a robust foundation for modern IT
operations.

 Understanding Cloud Computing:

Definition and Characteristics;

Cloud Computing refers to the delivery of computing services over the


Internet, allowing users to access and utilize a variety of resources without the
burden of owning or maintaining physical infrastructure. This paradigm shift
from traditional on-premises data centers to the cloud is fuelled by several key
characteristics:

1. On-Demand Self-Service:
Cloud users can provision computing resources as needed, without requiring
human intervention from the service provider. This on-demand aspect enables
organizations to scale resources dynamically based on their requirements.

13
2. Broad Network Access:
Cloud services are accessible over the network and can be accessed by
various devices such as laptops, tablets, and smartphones. This accessibility
promotes flexibility and collaboration.

3. Resource Pooling:
Cloud providers pool computing resources to serve multiple customers. This
pooling optimizes resource utilization, resulting in economies of scale and cost
efficiency.

4. Rapid Elasticity:
Cloud resources can be scaled up or down rapidly to accommodate changes
in demand. This elasticity ensures optimal performance and cost-effectiveness.

5. Measured Service:
Cloud usage is metered, and customers are billed based on their consumption
of resources. This pay-as-you-go model provides transparency and cost
control.

 Cloud Service Models:

Cloud Computing offers services across various models, each catering to


specific needs:

1. Infrastructure as a Service (IaaS):


IaaS provides virtualized computing resources over the internet. Users can
deploy and manage virtual machines, storage, and networking components.
Examples include Amazon EC2 and Microsoft Azure Virtual Machines.

14
2. Platform as a Service (PaaS):
PaaS offers a platform that includes infrastructure and middleware,
simplifying application development and deployment. Developers focus on
building applications without managing the underlying infrastructure. Google
App Engine and Heroku are examples of PaaS.

3. Software as a Service (SaaS):


SaaS delivers fully functional software applications over the internet. Users
can access these applications through a web browser without the need for
installation or maintenance. Examples include Microsoft 365, Salesforce, and
Google Workspace.

 DevOps in the Cloud Era:

DevOps Principles:

DevOps is a cultural and collaborative approach to software development and


IT operations, aiming to break down silos, foster communication, and
streamline the entire software development lifecycle. The core principles of
DevOps include:

1. Collaboration:
DevOps emphasizes collaboration between development, operations, and
other stakeholders. This collaborative culture aims to bridge the gap between
traditionally separate teams, fostering shared responsibility.

2. Automation:
Automation is a cornerstone of DevOps practices. By automating repetitive
tasks, organizations can achieve consistency, reduce errors, and accelerate the

15
software delivery process.

3. Continuous Integration and Continuous Delivery (CI/CD):


CI/CD pipelines automate the building, testing, and deployment of
applications. Continuous Integration ensures that code changes are regularly
integrated into a shared repository, while Continuous Delivery automates the
deployment of applications into production-like environments.

4. Infrastructure as Code (IaC):


IaC involves managing and provisioning infrastructure through machine-
readable script files. This approach ensures consistency in infrastructure
configuration and facilitates automated provisioning.

 DevOps and Cloud Integration:

The integration of DevOps with Cloud Computing is a natural evolution that


aligns with the principles of agility, automation, and collaboration. Several key
aspects illustrate the synergy between DevOps and the cloud:

1. Agile Development:
DevOps encourages agile methodologies, emphasizing iterative and
incremental development. Cloud services provide a flexible and scalable
infrastructure that supports agile development practices.

2. Automated Testing:
DevOps promotes automated testing to ensure the reliability and quality of
applications. Cloud environments provide the necessary resources for running
automated tests in parallel, enabling faster feedback and reducing time-to-
market.

16
3. Continuous Monitoring and Feedback:
Cloud platforms offer native monitoring services that align with DevOps
principles of continuous feedback. Monitoring tools provide insights into
application performance, enabling teams to identify and address issues
proactively.

4. Scalability:
Cloud Computing allows applications to scale dynamically based on demand.
DevOps practices, when integrated with the cloud, ensure that applications can
handle varying workloads efficiently.

5. Continuous Deployment:
The cloud facilitates continuous deployment by providing scalable
infrastructure and automated deployment pipelines. DevOps teams can push
new features and updates to production environments seamlessly.

6. Infrastructure Automation:
DevOps leverages Infrastructure as Code (IaC) to automate the provisioning
and management of infrastructure. Cloud platforms offer APIs that enable the
integration of IaC tools like Terraform and Ansible, allowing for consistent
and reproducible environments.

 Linux in the DevOps and Cloud Context;

The Role of Linux:

Linux, an open-source operating system kernel, is a cornerstone in the realms


of DevOps and Cloud Computing. Its prevalence can be attributed to several

17
key factors:

1. Command-Line Capabilities:
Linux provides powerful command-line capabilities, empowering DevOps
professionals to perform tasks efficiently and automate processes through
scripting. The command line is a fundamental tool for managing Linux
systems and executing various tasks.

2. Scripting Languages Support:


DevOps commonly involves scripting for automation. Linux supports a
plethora of scripting languages, such as Bash, Python, and Perl, facilitating the
creation of automation scripts for tasks ranging from deployment to system
configuration.

3. Customization:
Linux allows users to customize the operating system according to specific
application requirements. DevOps teams appreciate the flexibility Linux
provides in configuring and optimizing the environment to meet the unique
needs of their applications.

4. Containerization and Orchestration:


Linux serves as the foundation for containerization technologies like Docker.
Containers encapsulate applications and their dependencies, ensuring
consistency across different environments. Linux provides the necessary kernel
features for container isolation and resource management.

5. Security:
Linux is renowned for its security features, making it a trusted choice in
DevOps practices. Secure configurations, access controls, and the ability to

18
audit and monitor system activities contribute to the overall security of cloud
environments.

 Containerization and Orchestration:

The advent of containerization has further transformed the way applications


are developed, deployed, and managed. Containers provide a lightweight,
portable, and consistent environment for applications, and Linux plays a
pivotal role in their adoption.

1. Docker and Linux:


Docker, a leading containerization platform, relies heavily on Linux kernel
features to provide container isolation and resource management. DevOps
teams use Docker to package applications and their dependencies into
containers, ensuring consistency from development to production.

2. Container Orchestration with Kubernetes:


Kubernetes, an open-source container orchestration platform, is widely
adopted in DevOps and cloud-native applications. It automates the
deployment, scaling, and management of containerized applications.
Kubernetes is inherently designed to work seamlessly with Linux-based
systems.

19
Chapter-4

Modules Used in Cloud Computing with DevOps and Linux

Cloud Computing, DevOps, and Linux bring a powerful synergy to modern IT


ecosystems. Various modules and tools facilitate the integration of these
technologies, streamlining processes, enhancing collaboration, and ensuring
efficient resource management. In this comprehensive guide, we'll explore key
modules used in Cloud Computing, DevOps, and Linux, showcasing their roles
in creating a robust and dynamic IT environment.

 Cloud Computing Modules

20
1. Amazon Web Services (AWS);
Description: AWS is a comprehensive cloud platform offering a wide range of
services, including computing power, storage, databases, machine learning, and
more.
Role in Cloud Computing: AWS provides the infrastructure for deploying
applications, scaling resources, and managing various cloud services.

2. Microsoft Azure:
Description: Azure is a cloud computing platform by Microsoft, offering
services such as virtual computing, analytics, storage, and networking.
Role in Cloud Computing: Azure enables businesses to build, deploy, and
manage applications seamlessly, leveraging a variety of integrated services.

3. Google Cloud Platform (GCP):


Description: GCP is a suite of cloud computing services provided by Google,
offering services for computing, storage, data analytics, machine learning, and
more.
Role in Cloud Computing: GCP facilitates the development and deployment
of applications on Google's infrastructure, promoting scalability and innovation.

 DevOps Modules

21
4. Jenkins:
Description: Jenkins is an open-source automation server that supports
building, deploying, and automating any project.
Role in DevOps: Jenkins facilitates continuous integration and continuous
delivery (CI/CD), automating the building, testing, and deployment of code.

5. Docker:
Description: Docker is a platform that enables developers to automate the
deployment of applications inside lightweight, portable containers.
Role in DevOps: Docker promotes containerization, ensuring consistency in
application deployment across various environments.

6. Ansible:
Description: Ansible is an open-source automation tool used for configuration
management, application deployment, and task automation.
Role in DevOps: Ansible simplifies and automates repetitive tasks, ensuring
consistency in infrastructure and application deployment.

7. Git:
Description: Git is a distributed version control system that enables multiple
developers to collaborate on projects.

22
Role in DevOps: Git tracks changes in source code, allowing for efficient
collaboration, version control, and integration with CI/CD pipelines.

8. Kubernetes:
Description: Kubernetes is an open-source container orchestration platform
that automates the deployment, scaling, and management of containerized
applications.
Role in DevOps: Kubernetes ensures the seamless operation of containerized
applications, managing their lifecycle and scalability.

 Linux Modules

9. Bash Scripting:
Description: Bash (Bourne Again SHell) is a command language interpreter
for Unix-like operating systems, allowing for the creation of shell scripts.
Role in Linux: Bash scripting is fundamental for automating tasks, managing
system configurations, and implementing DevOps practices.

10. Linux System Administration:


Description: Linux System Administration involves tasks like system
monitoring, user management, software installation, and security
configurations.
Role in Linux: System administrators leverage these skills to maintain and
optimize Linux servers, ensuring smooth operations in a cloud environment.

11. Linux Containers (LXC):


Description: Linux Containers are lightweight, portable, and consistent
execution environments for applications.
Role in Linux: LXC enables the isolation and packaging of applications,
contributing to the efficient deployment of services in a cloud or DevOps
environment.

12. SELinux (Security-Enhanced Linux):


Description: SELinux is a Linux kernel security module that provides a
mechanism for supporting access control security policies.
Role in Linux: SELinux enhances the security of Linux systems by enforcing
mandatory access controls and policies.

23
 integration of Modules: A Practical Example

Scenario: Continuous Deployment of a Web Application

Let's illustrate the integration of these modules in a real-world scenario.

1. Developing the Application:


Developers use Git for version control, ensuring collaborative development.
Bash scripting is utilized for automation in the development process.

2. Continuous Integration with Jenkins:


Jenkins is configured to monitor the Git repository for changes.
Upon code changes, Jenkins triggers the build process.

3. Containerization with Docker:


Docker is used to containerize the web application, ensuring consistency
across different environments.
The Docker image is stored in a registry, such as Docker Hub.

4. Configuration Management with Ansible;


Ansible scripts manage the configuration of the server where the application
will be deployed.
Ansible ensures consistent deployment and configuration changes.

5. Orchestration with Kubernetes;


Kubernetes orchestrates the deployment of the Dockized application.
It ensures the application's availability, scalability, and seamless updates.

6. Monitoring and Logging:


Tools integrated with the cloud platform (e.g., AWS CloudWatch, Azure
Monitor) monitor the application's performance.
Logging tools capture and analyse system logs for troubleshooting.

 Conclusion

24
The integration of modules in Cloud Computing with DevOps and Linux
creates a powerful ecosystem for building, deploying, and managing
applications. Each module plays a critical role, contributing to efficiency,
scalability, and security. Understanding and mastering these modules empower
IT professionals to navigate the complexities of modern IT landscapes, ensuring
they can effectively harness the potential of Cloud Computing, DevOps, and
Linux for successful project outcomes and operational excellence.

25
26
27
28
29
30
Chapter- 5
SOURCE CODE AND OUTPUT
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox

accountNo = ['xyz','abc','pqr']
pinNo = ['1234','7893','4423']
current_balance = [5000]

x = -1
y = -1

class SampleApp(tk.Tk):

def __init__(self, *args, **kwargs):


tk.Tk.__init__(self, *args, **kwargs)

self.shared_data = {'Balance':tk.IntVar()}

container = tk.Frame(self)
container.pack(side="top", fill="both", expand=True)
container.grid_rowconfigure(0, weight=1)

container.grid_columnconfigure(0, weight=1)
self.frames = {}
for F in (StartPage, MenuPage, WithdrawPage, DepositPage, BalancePage,ChangePin):

31
page_name = F.__name__
frame = F(parent=container, controller=self)
self.frames[page_name] = frame

# put all of the pages in the same location;


# the one on the top of the stacking order
# will be the one that is visible.
frame.grid(row=0, column=0, sticky="nsew")

self.show_frame("StartPage")

def show_frame(self, page_name):


'''Show a frame for the given page name'''
frame = self.frames[page_name]
frame.tkraise()

class StartPage(tk.Frame):
def __init__(self, parent, controller):
tk.Frame.__init__(self, parent,bg='#A5A3A3',bd=20,relief=tk.RIDGE)
self.controller = controller
self.controller.title('ATM')
self.controller.state('normal')
heading_label = tk.Label(self,
text='ATM STIMULATOR',
font=('orbitron',45,'bold'),

32
foreground='#000000',
background='#A5A3A3')
heading_label.pack(pady=25)
space_label = tk.Label(self,height=4,bg='#A5A3A3')
space_label.pack()
password_label = tk.Label(self,
text='Enter your account no.',
font=('orbitron',13),
bg='#A5A3A3',
fg='black')
password_label.pack(pady=5)
my_password = tk.StringVar()

password_entry_box = tk.Entry(self,
textvariable=my_password,
font=('orbitron',12),
width=22)
password_entry_box.focus_set()
password_entry_box.pack(ipady=5)
space_label = tk.Label(self,height=2,bg='#A5A3A3')
space_label.pack()

pinno = tk.Label(self,
text='Enter your pin no.',
font=('orbitron',13),
bg='#A5A3A3',
fg='black')
pinno.pack(pady=5)

33
my_pin = tk.StringVar()
pinno_entry_box = tk.Entry(self,
textvariable=my_pin,
font=('orbitron',12),
width=22)

pinno_entry_box.pack(ipady=7)
def handle_focus_in(_):
pinno_entry_box.configure(fg='black',show='*')
pinno_entry_box.bind('<FocusIn>',handle_focus_in)

def check_password():
account = my_password.get()
pin = my_pin.get()
global x
global y
x = accountNo.index(account)
y = pinNo.index(pin)
if account in accountNo and pin in pinNo:
if x==y:
my_password.set('')
my_pin.set('')
incorrect_password_label['text']=''
controller.show_frame('MenuPage')
else:
incorrect_password_label['text']='Invalid Pin or Account No.'
else:
incorrect_password_label['text']='Incorrect Password'

34
enter_button = tk.Button(self,
text='Enter',
command=check_password,
relief='raised',
borderwidth = 3,
width=40,
height=3)
enter_button.pack(pady=10)
incorrect_password_label = tk.Label(self,
text='',
font=('orbitron',13),
fg='black',
bg='#A5A3A3',
anchor='n')

35
incorrect_password_label.pack(fill='both',expand=True)

class MenuPage(tk.Frame):
def __init__(self, parent, controller):
tk.Frame.__init__(self, parent,bg='#A5A3A3',bd=20,relief=tk.RIDGE)
self.controller = controller
heading_label = tk.Label(self,
text='ATM STIMULATOR',
font=('orbitron',45,'bold'),
foreground='#000000',
background='#A5A3A3')
heading_label.pack(pady=25)
main_menu_label = tk.Label(self,
text='Main Menu',
font=('orbitron',23),
fg='black',

36
bg='#A5A3A3')
main_menu_label.pack()
selection_label = tk.Label(self,
text='Please make a selection',
font=('orbitron',16),
fg='black',
bg='#A5A3A3',
anchor='w')
selection_label.pack(fill='y',expand=True)

button_frame = tk.Frame(self,bg='#A5A3A3')
button_frame.pack(fill='both',expand=True)

def withdraw():
controller.show_frame('WithdrawPage')
withdraw_button = tk.Button(button_frame,
text='Withdraw',
command=withdraw,
relief='raised',
borderwidth=3,
width=50,
height=5)

withdraw_button.grid(row=2,column=0,pady=5)

def deposit():
controller.show_frame('DepositPage')
deposit_button = tk.Button(button_frame,
text='Deposit',

37
command=deposit,
relief='raised',
borderwidth=3,
width=50,

height=5)
deposit_button.grid(row=3,column=0,pady=20)

def balance():
controller.show_frame('BalancePage')
balance_button = tk.Button(button_frame,
text='Balance',
command=balance,
relief='raised',
borderwidth=3,
width=50,
height=5)
balance_button.grid(row=4,column=0,pady=5)

def back():
controller.show_frame('StartPage')
exit_button = tk.Button(button_frame,
text='Back',
command=back,
relief='raised',
borderwidth=3,
width=50,

38
height=5)
exit_button.grid(row=3,column=3,pady=5,padx=555)

def change():
controller.show_frame('ChangePin')
c_button = tk.Button(button_frame,
text='Change Pin',
command=change,
relief='raised',
borderwidth=3,
width=50,
height=5)
c_button.grid(row=2,column=3,pady=5,padx=555)

def exit():
controller.destroy()
return

d_button = tk.Button(button_frame,
text='Exit ',
command=exit,
relief='raised',

borderwidth=3,
width=50,
height=5)
d_button.grid(row=4,column=3,pady=5,padx=555)

39
class WithdrawPage(tk.Frame):
def __init__(self, parent, controller):
tk.Frame.__init__(self, parent,bg='#A5A3A3',bd=20,relief=tk.RIDGE)
self.controller = controller
heading_label = tk.Label(self,
text='ATM STIMULATOR',
font=('orbitron',45,'bold'),
foreground='#000000',
background='#A5A3A3')
heading_label.pack(pady=15)
space_label = tk.Label(self,height=4,bg='#A5A3A3')
space_label.pack()
w_amount_label = tk.Label(self,
text='Enter amount',

40
font=('orbitron',23),
bg='#A5A3A3',
fg='black')

w_amount_label.pack(pady=10)
amount = tk.StringVar()

withdraw_entry = tk.Entry(self,
textvariable=amount,

font=('orbitron',12),
width=22)
withdraw_entry.pack(ipady=7)
def withdraw(current_balance):
z=int(amount.get())
if z<current_balance[x]:
current_balance[x] -= z

41
controller.shared_data['Balance'].set(current_balance[x])
tk.messagebox.showinfo("showinfo", "Your transaction has been completed
successfully. Please collect your cash")

controller.show_frame('MenuPage')
amount.set('')

elif z==current_balance[x]:
tk.messagebox.showwarning("showwarning", "Your account must contain minimum
balance.")

else:
tk.messagebox.showwarning("showwarning", "Your account does not have that much
balance.")

42
43
enter_button = tk.Button(self,
text='Enter',
command=lambda:withdraw(current_balance),
relief='raised',

44
class DepositPage(tk.Frame):
def __init__(self, parent, controller):
tk.Frame.__init__(self, parent,bg='#A5A3A3',bd=20,relief=tk.RIDGE)
self.controller = controller
heading_label = tk.Label(self,
text='ATM STIMULATOR',
font=('orbitron',45,'bold'),
foreground='#000000',
background='#A5A3A3')
heading_label.pack(pady=25)

space_label = tk.Label(self,height=4,bg='#A5A3A3')
space_label.pack()

enter_amount_label = tk.Label(self,

text='Enter amount',

45
font=('orbitron',23),
bg='#A5A3A3',
fg='black')
enter_amount_label.pack(pady=15)

cash = tk.StringVar()

deposit_entry = tk.Entry(self,
textvariable=cash,
font=('orbitron',12),
width=22)
deposit_entry.pack(ipady=7)

def deposit_cash(current_balance):
current_balance[x] += int(cash.get())
controller.shared_data['Balance'].set(current_balance[x])
tk.messagebox.showinfo("showinfo", "Your transaction has been completed

46
height=3)
enter_button.pack(pady=10)

47
# Here we can see there is change in our balance. It changes to 5000 after adding the
deposited amount of Rs. 1000.

48
class BalancePage(tk.Frame):
def __init__(self, parent, controller):
tk.Frame.__init__(self, parent,bg='#A5A3A3',bd=20,relief=tk.RIDGE)
self.controller = controller
heading_label = tk.Label(self,
text='ATM STIMULATOR',
font=('orbitron',45,'bold'),
foreground='#000000',
background='#A5A3A3')
heading_label.pack(pady=15)
b_label = tk.Label(self,
text='Your current balance is : ',
font=('orbitron',23),
bg='#A5A3A3',
fg='black')
b_label.pack(pady=15)
controller.shared_data['Balance'].set(current_balance[x])
balance_label = tk.Label(self,

49
textvariable= controller.shared_data['Balance'],
font=('orbitron',16) fg='black',
bg='#A5A3A3',
anchor='w')

balance_label.pack(fill='y',expand=True)
button_frame = tk.Frame(self,bg='#A5A3A3')
button_frame.pack(fill='both',expand=True)

def menu():
controller.show_frame('MenuPage')

menu_button = tk.Button(button_frame,
command=menu,
text='Menu',
relief='raised',
borderwidth=3,
width=50,
height=5)
menu_button.grid(row=3,column=0,pady=5)

def exit():
controller.show_frame('StartPage')

exit_button = tk.Button(button_frame,
text='Exit',
command=exit,
relief='raised',

50
borderwidth=3,
width=50,
height=5)

exit_button.grid(row=3,column=1,pady=450,padx=555)

class ChangePin(tk.Frame):

def __init__(self, parent, controller):


tk.Frame.__init__(self, parent,bg='#A5A3A3',bd=20,relief=tk.RIDGE)
self.controller = controller

heading_label = tk.Label(self,
text='ATM STIMULATOR',
font=('orbitron',45,'bold'),
foreground='#000000',
background='#A5A3A3')
heading_label.pack(pady=25)

space_label = tk.Label(self,height=4,bg='#A5A3A3')
space_label.pack()

cp_label = tk.Label(self,
text='Enter Pin to be change :',
font=('orbitron',23),
bg='#A5A3A3',

51
fg='black')
cp_label.pack(pady=10)

pn = tk.StringVar()
pin_entry = tk.Entry(self,
textvariable=pn,
font=('orbitron',12),
width=22)
pin_entry.pack(ipady=7)
def cpnn(pinNo):
p=pn.get()
if p == pinNo[x]:
tk.messagebox.showwarning("showwarning","New pin cannot be the previous
one....")

52
else:
pinNo[x] = p
tk.messagebox.showinfo("showinfo","New pin will be changed")
controller.show_frame('MenuPage')
pn.set('')

enter_button = tk.Button(self,
text='Enter',
command=lambda:cpnn(pinNo),
relief='raised',
borderwidth=3,
width=40,
height=3)
enter_button.pack(pady=10)
button_frame = tk.Frame(self,bg='#A5A3A3')
button_frame.pack(fill='both',expand=True)

def menu():

53
controller.show_frame('MenuPage')
menu_button = tk.Button(button_frame,
command=menu,
text='Menu',
relief='raised',
borderwidth=3,
width=50,
height=5)
menu_button.grid(row=3,column=0,pady=5)

def exit():
controller.show_frame('StartPage')

54
exit_button = tk.Button(button_frame,
text='Exit',
command=exit,
relief='raised',
borderwidth=3,
width=50,
height=5)
exit_button.grid(row=3,column=1,pady=200,padx=555)

if __name__ == "__main__":
app = SampleApp()
app.mainloop()

55
Chapter-9
Conclusion and Future Scope

Conclusion:
• In a nutshell, this internship has been an excellent and rewarding experience. I can
conclude that I have gained confidence in working on Python and MySQL.
• Hands-on practice was the best part of this, as I worked on company projects to make
data management easier.
• Two main things that I’ve learned are the importance of time-management skills and
self-motivation.

Future Scope:

● Data Scientist

● Data Analyst

56
REFERENCES

● https://realpython.com/

● Computer Science with Python (Preeti Arora)

● Computer Science with Python (Sumita Arora)

● https://en.wikipedia.org/wiki/Python_(programming_language)

● https://webandcrafts.com/

● www.stackoverflow.com

57
58

You might also like