Chapter 13 - Software Deployment
- Authors
- Ms. Samavi Salman
- Dr. Rao Muhammad Adeel Nawab
- Supporting Material
Quick Recap
- Quick Recap - Software Debugging
In the previous Chapter, I presented the following main concepts:
- Bug
- A bug refers to an error, fault or flaw in any computer program or a hardware system
- Types of Bugs
- Following are the types of bug
- Syntax bugs
- Runtime bugs
- Logic bugs
- Arithmetic bugs
- Following are the types of bug
- Error
- A mistake in coding is called Error
- Defect
- A defect is a system error that does not allow the intended action to be completed
- Defect Status
- Defect Status or Bug Status in defect life cycle is the present state from which the defect or a bug is currently undergoing
- Software Bug
- A software bug is an error, flaw or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways
- Debugger
- A debugger or debugging tool is a computer program used to test and debug other programs
- pdb — The Python Debugger
- The module pdb defines an interactive source code debugger for Python programs
- Debugging
- Debugging is the process of detecting and removing of existing and potential errors (also called as ‘bugs’) in a software code that can cause it to behave unexpectedly or crash
- Steps – Debugging Software
- Step 1: Obtain the Software to be Debugged
- Step 2: Select a Suitable Debugger
- Step 3: Use Debugger to Debug the Software
Software Deployment
- Software Deployment
- Definition
- Software deployment includes all the process required for preparing a software application to run and operate in a specific environment
- It involves installation, configuration, testing and making changes to optimize the performance of the software.
- It can either be carried out manually or through automated systems
- Purpose
- Software deployment refers to the process of making the application work on a target device, whether it is a test server, production environment or a user’s computer or mobile device
- Importance
- The software Development involves a life cycle called the SDLC (Software Development Life Cycle). A software development when passed through each of the SDLC stages – there are high chances of delivering a good quality software
- Software deployment is one of the most important aspects of the software development process. Deployment is the mechanism through which applications, modules, updates, and patches are delivered from developers to users.
- Process of Software Deployment
- Steps involved in deploying a software are following
- Creating and maintaining up-to-date and ready-to-install software packages
- Configuring the target computers before the installation or uninstallation of the package
- Installing or uninstalling the software on the target computers
- Configuring the target computers post installation or uninstallation
- Steps involved in deploying a software are following
- Applications
- Today, most IT organizations and software developers deploy
- Software updates
- Patches
- New applications
- Today, most IT organizations and software developers deploy
- Strengths
- Time Saving
- The software can be deployed quickly and there is no need of training or learning anything. Different installation options can be used for rapid deployments
- Enhance Security
- Monitor user actions
- You can gain insight into user activities around the software. The findings can be utilized to perform historical user activity analysis
- Effective software updates
- Deploy software to newly added users/computers automatically
- Maintain all software packages in a central location
- Weaknesses
- During manual deployments, builds will be sent to their production environment without being tested in order to save time
- Suitable to Use
- Deploy a Software is suitable in following conditions
- Creating New Applications / Software
- Updating a Software
- Deploy a Software is suitable in following conditions
- Best Practices for Software Deployment
- Use a continuous integration server
- Adopt continuous delivery
- Automate your Deployment Process
- Choose the right Deployment Method
- Implement a deployment checklist
Deployment Activities
- Deployment Activities
- Following are the steps involved in deployment of a software
- Release
- Installation and activation
- Deactivation
- Uninstallation
- Update
- Built-in update
- Version tracking
Deployment Roles
- Deployment Activities
- in pre-production environments:
- application developers
- build-and-release engineers
- release managers
- deployment coordinators
- in production environments:
- system administrator
- database administrator
- release coordinators
- operations project managers
Steps – Converting a Python Program into an Executable File
- Steps – Converting a Program into an Executable File
- In Sha Allah, I will follow the following Steps to Convert a Program into an Executable File
- Step 01: Write Down System Settings
- Step 1.1: Select the Operating System for which you want to Create an Executable File
- Step 1.2: Select the Programming Language for which you want to Create an Executable File
- Step 1.3: Select the IDE / Framework which you will use to Create an Executable File
- Step 02: Use your System Settings to Step by Step Convert Program into an Executable File
- Step 01: Write Down System Settings
- Steps – Converting addition-v1.1.ipynb (Python Program) into an Executable File
- In Sha Allah, I will follow the following Steps to Convert addition-v1.1.ipynb (Python Program) into an Executable File
- Step 01: Write Down System Settings
System Settings | |
Programming Language | Python 3.8.3 |
IDE | Jupyter Notebook – 5.5.0 |
Browser Version | Google Chrome Version 83.0.4103.97 |
Operating System | 64-Bit Operating System Window 10/ Window 8 |
Date | 28-Jan-2021 |
- Step 02: Use your System Settings to Step by Step Convert Program into an Executable File
- Steps – Converting addition-v1.1.ipynb (Python Program) into an Executable File Cont…
- In Sha Allah, in the next Slides, I will follow the following Two Stage Process to show how addition-v1.1.ipynb will be converted into an Executable File using Jypyter Notebook IDE on Linux Operating System
- Stage 01: Convert addition-v1.1.ipynb File into addition-v1.1.py File
- Step 01: Open Jupyter Notebook 5.5.0 IDE
- Stage 01: Convert addition-v1.1.ipynb File into addition-v1.1.py File
- Step 02: Open addition-v1.1.ipynb
- Step 03: Convert addition-v1.1.ipynb File into addition-v1.1.py File
- Step 3.1: Click on File on extreme left
- A drop down menu will be displayed
- Step 3.1: Click on File on extreme left
- Step 03: Convert addition-v1.1.ipynb File into addition-v1.1.py File
- Step 3.2: From the drop down, click on Download as
- Step 3.3: A side menu appears. Click on Python (.py)
- Step 3.4: A new tab will open and the File starts downloading
- Stage 02: Convert addition-v1.1.py File into addition-v1.1.exe File
- Step 01: Click on the Start button in the Task Bar
- Step 02: Search for Command Line Prompt (CMD)
- If you are using Windows 8/8.1 Pro, Search button will appear as shown below
- Step 02: Search for Command Line Prompt (CMD)
OR
- Step 02: Search for Command Line Prompt (CMD)
- Note
- If you are using Windows 10 , Search button will appear as shown in below figure
- Note
- Step 02: Search for Command Line Prompt (CMD)
- Step 03: Click on Command Prompt
- Step 04: Command Prompt window will appear on your Computer Screen
- Step 05: Navigate to the Folder where Python (.py) File is placed using the following command
- In my case, it is placed on Desktop
- Step 5.1: Click on Enter key
- Step 05: Navigate to the Folder where Python (.py) File is placed using the following command
cd Desktop |
- Step 5.2: The cmd will enter to the Desktop
- Step 06: Write the following command on cmd. It will execute the Program in Python (.py) File
- Step 6.1: Press Enter key
- Step 06: Write the following command on cmd. It will execute the Program in Python (.py) File
python addition-v1.1.py |
- Step 6.2: The Program will be executed and display the Output on the cnd
- In my case, my program is named as Addition of Two Integer Numbers
- Step 6.2: The Program will be executed and display the Output on the cnd
- Step 07: Now Install pyinstaller by using the following command
- Step 7.1: Press Enter Key
- Step 07: Now Install pyinstaller by using the following command
pip install pyinstaller |
Step 08: Verify installation of pyinstaller by using the following command
Step 8.1: Press Enter Key
pyinstaller –version |
- Step 8.2: The pyinstaller version will be displayed
- In my case, it is 2
- Step 8.2: The pyinstaller version will be displayed
- Step 09: In order to convert a Python (.py) File to an Executable (.exe) File write following command
- Step 9.1: Press Enter key
- Step 09: In order to convert a Python (.py) File to an Executable (.exe) File write following command
pyinstaller addition-v1.1.py |
- It starts Building Analysis
- Step 10: After successful Analysis, Following Folders will be displayed on the navigated Folder (where .py File is placed)
- build
- dist
- addition-v1.1.spec
- Step 10: After successful Analysis, Following Folders will be displayed on the navigated Folder (where .py File is placed)
- Step 11: Click on dist Folder
- The addition-v1.1.exe Folder will be located
- Step 11: Click on dist Folder
- Step 12: Click on addition-v1.1 Folder
- Step 12.1: Inside addition-v1.1 Folder, there are almost 54 items
- Step 12: Click on addition-v1.1 Folder
- Step 13: Double Click on addition-v1.1.exe
- Step 13.1: A new cmd will be displayed which is executing the Program
OR
- Step 09: In order to convert a Python (.py) File to an Executable (.exe) File write following command
- Step 9.1: Press Enter key
pyinstaller addition-v1.1.py –onefile |
- It starts Building Analysis
- Step 10: After successful Analysis, Following Folders will be displayed on the navigated Folder (where .py File is placed)
- build
- dist
- addition-v1.1.spec
- Step 10: After successful Analysis, Following Folders will be displayed on the navigated Folder (where .py File is placed)
- Step 11: Click on dist Folder
- The addition-v1.1.exe Folder will be located
- Step 11: Click on dist Folder
Conclusion of the Book
- Summary - Steps (Converting a Python Program into an Executable File)
- Alhumdulilah, with Fazal of Allah and Dua and Tawajju of Akabir, addition-v1.1.ipynb File has been Converted into addition-v1.1.exe File
- In Sha Allah, in the next Section, I will try to show how to Deploy addition-v1.1.exe File on Client Machine
Steps – Deploying the Executable File on Client Machine
- Steps – Deploying the Executable File on Client Machine
- In Sha Allah, I will follow the following Steps to Deploy an Executable File on Client Machine
- Step 01: Check System Settings on Client Machine and ensure they Must be Exactly Same as we had in previous Section i.e., Steps Converting a Python Program into an Executable File
- Step 02: Deploy Executable File on Client Machine
- Step 03: Verify the Deployment on Client Machine
- Example - Steps (Deploying the Executable File on Client Machine)
- In Sha Allah, I will follow the following Steps to Deploy addition-v1.1.exe File on Client Machine
- Step 01: Check System Settings on Client Machine and ensure they Must be Exactly Same as we had in previous Section i.e., Steps Converting a Python Program into an Executable File
System Settings | |
Programming Language | Python 3.8.3 |
IDE | Jupyter Notebook – 5.5.0 |
Browser Version | Google Chrome Version 83.0.4103.97 |
Operating System | 64-Bit Operating System Window 10/ Window 8 |
Date | 28-Jan-2021 |
- Alhumdulilah, System Settings on Client Machine are suitable for Deployment
- Step 02: Deploy Executable File on Client Machine
- In Sha Allah, I will Deploy addition-v1.1.exe on Client Machine in the following Steps.
- Step 2.1: From your Machine, Copy addition-v1.1.exe in a Storage Device (USB, Hard Disk etc.)
- Step 2.2: From Storage Device, Copy addition-v1.1.exe File onto Client Machine
- In Sha Allah, I will Deploy addition-v1.1.exe on Client Machine in the following Steps.
- Step 03: Verify the Deployment on Client Machine
- Step 3.1: Run addition-v1.1.exe File multiple times (on Client Machine) for various Inputs
- Step 3.2: If (Output is Correct for Given Input)
THEN
ELSE
|
- Example - Steps (Deploying the Executable File on Client Machine)
- Samavi converted the .py file to .exe file in her Laptop. She has to deploy the execute File on Client Laptop using USB.
- Following are the steps followed by Ms. Samavi for deployment
- Step 01: Ms. Samavi copied the addition-v1.1.exe File from her Laptop and pasted to a USB drive
- Step 02: From the USB, Ms. Samavi pasted the File on Client’s Machine on Desktop/.exe File Folder
- Step 03: Double Click on the addition-v1.1.exe File
- A command Line Prompt will open and ask for user’s input
- Step 03: Double Click on the addition-v1.1.exe File
Chapter Summary
- Chapter Summary
To summarize, in this Chapter, I presented
- Software Deployment
- Definition
- Software deployment includes all the process required for preparing a software application to run and operate in a specific environment
- It involves installation, configuration, testing and making changes to optimize the performance of the software.
- It can either be carried out manually or through automated systems
- Definition
- Steps – Converting a Program into an Executable File
- Step 01: Write Down System Settings
- Step 1.1: Select the Operating System for which you want to Create an Executable File
- Step 1.2: Select the Programming Language for which you want to Create an Executable File
- Step 1.3: Select the IDE / Framework which you will use to Create an Executable File
- Step 02: Use your System Settings to Step by Step Convert Program into an Executable File
- Step 01: Write Down System Settings
- Steps – Deploying the Executable File on Client Machine
- Step 01: Check System Settings on Client Machine and ensure they Must be Exactly Same as we had in previous Section i.e., Steps Converting a Python Program into an Executable File
- Step 02: Deploy Executable File on Client Machine
- Step 03: Verify the Deployment on Client Machine
In Next Chapter
- In Next Chapter
- In Sha Allah, in the next Chapter, I will present a detailed discussion on
- Software Life Cycle