Final Year Project Report 2023 - Aaron Mkandawire - 2010435-DESKTOP-EHVSGBT

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 124

Designing and Developing a Portable-Cloud Computing

Platform for Student Training: a case of the Zambia University


College of Technology
By

Aaron Mkandawire
2010534

Dissertation Submitted to Zambia University College of Technology in Partial


fulfilment for the award of Bachelor of Software Engineering.

ZAMBIA UNIVERSITY COLLEGE OF TECHNOLOGY

NDOLA

2023
NOTICE OF COPYRIGHT
I do hereby declare that the content of this document is my own and all other works
by other people have been only referenced and that this work has not been previously
presented to another University for the same purpose.

______________________ ________________________
Aaron Mkandawire Date
(Candidate)

______________________ ________________________
Mr Kaputula. L Date
(Supervisor)

i
DEDICATION
I dedicate this dissertation to my family who made it possible for me to be in
university and supported me throughout. I also dedicate this document to the Zambia
University College of Technology management for ensuring we had adequate access
to learning resources and an excellent learning environment.

ii
INDUSTRIAL TRAINING PLATFORM (ITP) CLOUD

iii
CERTIFICATE OF APPROVAL
This dissertation by Aaron Mkandawire (2010534) entitled, ‘Designing and
Developing a Portable -Cloud Computing Platform for Student Training: a case
of the Zambia University College of Technology’ has been approved as a fulfilling
requirement for the award of a Bachelor’s Degree in Software Engineering.

Examiners Name

Examiner One Date

........................................................ .........................................

Examiner Two Date

........................................................ .........................................

Chairperson of the Board of Examiners Date

........................................................ .........................................

iv
ACKNOWLEDGEMENT
I would like to express my deepest gratitude to all those who have supported me throughout
the journey of completing my final year undergraduate project. This endeavour would not
have been possible without the unwavering support, guidance, and encouragement of
numerous individuals and institutions.

First and foremost, I extend my heartfelt appreciation to my supervisor, Mr. Kaputula, for his
invaluable guidance, expertise, and patience. His insightful feedback and constant
encouragement played a pivotal role in shaping the direction of my research and improving
the quality of this dissertation.

I am also profoundly thankful to the faculty members of the faculty of IT at the Zambia
University College of Technology for their dedication to education and for providing a
conducive learning environment. Their commitment to excellence has been a constant source
of inspiration.

I am indebted to my family for their unwavering support, love, and understanding throughout
my academic journey. Their belief in me has been a driving force, and I am truly grateful for
their sacrifices and encouragement.

I would like to acknowledge the assistance of MEIT WORLD TECHNOLOGIES LIMITED


for providing financial aid and internship during my academic journey. My experience with
them allowed me to improve my technical skills and knowledge. Their contribution greatly
enriched the depth and breadth of my research.

Lastly, I am grateful to all the participants who took part in my study, as their willingness to
contribute their time and insights was essential to the success of my research.

v
ABSTRACT
This research work generally summarizes the activities carried out in the design and
development of the Intra-cloud Computing Platform for Student Training. The training
platform addresses one of the biggest challenges for schools and institutions offering IT-
training programs, and specifically the Zambia University College of Technology. By means
of this platform, the gap between student’s university education and real-world practices in IT
may be reduced to the point of elimination. The objectives attained were (1) creating a
portable cloud platform to aid students with their project-based trainings, (2) providing a
portal for students to easily deploy web application projects on the cloud platform and lastly
(3) providing a platform for students to practice security skills in a controlled environment.
The project’s design was then constructed to visualize the attainment of these objectives
using Unified Modelling Language diagrams – namely, Entity Relationship Diagrams,
Sequence Diagrams, Component Diagrams, and Class Diagrams. In the implementation part
of this project, the qualitative method for requirements elicitation was used for the
development of this project. CodeIgniter 4 and Spring Boot were the core frameworks that
were used to implement the development of this project.

Keywords: Cloud Computing, Web Hosting, Project Based Learning, Continuous


Deployment, Continuous Integration, Database Management, Agile, Scrum, Software Testing

vi
TABLE OF CONTENTS

NOTICE OF COPYRIGHT..................................................................................................................i
DEDICATION.......................................................................................................................................ii
CERTIFICATE OF APPROVAL.......................................................................................................iv
ACKNOWLEDGEMENT.....................................................................................................................v
ABSTRACT...........................................................................................................................................vi
TABLE OF CONTENTS....................................................................................................................vii
LIST OF FIGURES..............................................................................................................................xi
LIST OF ACRONYMS.......................................................................................................................xii
CHAPTER 1: INTRODUCTION.........................................................................................................1
1.1. Introduction and Background.................................................................................................1
1.2. Problem Statement.................................................................................................................2
1.3. Aim........................................................................................................................................3
1.4. Research Objectives...............................................................................................................3
1.5. Research Questions................................................................................................................3
1.6. Scope Of Study......................................................................................................................3
CHAPTER 2: LITERATURE REVIEW............................................................................................4
2.1. Introduction...........................................................................................................................4
2.2. Background to the Problem...................................................................................................4
2.3. A Prospective Solution: Project Based Learning...................................................................5
Definition......................................................................................................................................5
Project Based Learning Features...............................................................................................5
Studies on the Effectiveness of PjBL..........................................................................................5
2.4. A Prospective Solution: Project Based Learning and its implementation..............................6
CHAPTER 3: RESEARCH AND SOFTWARE DEVELOPMENT METHODOLOGY..............7
3.1. Introduction...........................................................................................................................7
3.2. Research Design....................................................................................................................7
3.2.1. Populations & Sampling....................................................................................................7
3.2.2. Data Collection..................................................................................................................7
3.2.3. Methods Used for Research...............................................................................................8
3.2.3.1. Primary Data..............................................................................................................8
3.2.3.2. Secondary Data..........................................................................................................8
3.3. Software Development Methodology....................................................................................8
3.4. Requirements Specification...................................................................................................9
3.4.1. Key Stakeholders.............................................................................................................10

vii
3.4.2. Requirements Gathering..................................................................................................10
3.4.3. Requirements Analysis....................................................................................................10
3.4.3.1. Functional Requirements.............................................................................................10
3.4.3.1.1. Functional Requirements – Student.............................................................................11
3.4.3.1.2. Functional Requirements – Lecturer (Moderator)........................................................11
3.4.3.2. Non-Functional Requirements.....................................................................................12
3.4.3.2.1. Performance Requirements..........................................................................................12
3.4.3.2.2. Safety Requirements....................................................................................................12
3.4.3.2.3. Security Requirements.................................................................................................13
3.4.3.2.4. Software Quality Attributes.........................................................................................13
3.4.3.2.4.1. Availability..........................................................................................................13
3.4.3.2.4.2. Interoperability and Portability............................................................................13
3.4.3.2.4.3. Testability............................................................................................................14
3.4.3.2.4.4. Usability...............................................................................................................14
3.4.3.2.5. Consistency and Integrity.........................................................................................14
3.4.4. Requirements Validation.................................................................................................14
3.5. Summary..............................................................................................................................15
CHAPTER 4: SYSTEM DESIGN AND IMPLEMENTATION.....................................................15
4.1. Introduction.........................................................................................................................15
4.2. Architectural Design............................................................................................................16
4.3. Software Design...................................................................................................................17
4.3.1. Software Design Tools.....................................................................................................17
4.3.2. Component Design..........................................................................................................17
4.3.2.1. Contextual Model........................................................................................................17
4.3.2.2. Use Case Model...........................................................................................................18
4.3.2.2.1. ITP Core...................................................................................................................18
4.3.2.2.2. ITP Engine...............................................................................................................21
4.3.2.3. Sequence Diagram.......................................................................................................22
4.3.2.3.1. Authentication: Login Sequence..............................................................................22
4.3.2.3.2. Authentication: Registration Sequence....................................................................23
4.3.2.3.3. User’s System Account Creation Sequence.............................................................24
4.3.2.3.4. Database Creation Sequence....................................................................................24
4.3.2.3.5. Website Creation Sequence......................................................................................25
4.3.2.3.6. User’s System Account Deletion Sequence.............................................................26
4.3.2.3.7. Database Deletion Sequence....................................................................................27
4.3.2.3.8. Website Deletion Sequence......................................................................................29

viii
4.3.2.4. Activity Diagram.........................................................................................................29
4.3.2.4.1. Authentication: Login..............................................................................................30
4.3.2.4.2. Authentication: Registration....................................................................................31
4.3.2.4.3. User’s System Account Creation.............................................................................32
4.3.2.4.4. Website Creation......................................................................................................32
4.3.2.4.5. User’s System Account Deletion.............................................................................33
4.3.2.4.6. Website Deletion......................................................................................................34
4.3.2.5. Class Diagram..............................................................................................................34
4.3.2.5.1. ITP Core...................................................................................................................34
4.3.2.5.2. ITP Engine...............................................................................................................38
4.3.2.6. Relational Data Model Diagram..................................................................................41
4.4. Software Development........................................................................................................42
4.4.1. Software Development Tools...........................................................................................42
4.4.2. Component Development................................................................................................42
4.4.3. Evaluation and Testing Techniques.................................................................................42
4.5. System Snapshots................................................................................................................44
4.6. Deployment.........................................................................................................................51
4.7. Summary..............................................................................................................................51
CHAPTER 5: RESULTS AND DISCUSSION.................................................................................52
5.1. Introduction.........................................................................................................................52
5.2. Results.................................................................................................................................52
5.3. Discussion............................................................................................................................54
5.4. Summary..............................................................................................................................55
CHAPTER 6: CONCLUSION...........................................................................................................55
6.1. Introduction.........................................................................................................................55
6.2. Success Accomplished.........................................................................................................55
6.3. Limitations of System..........................................................................................................56
6.4. Future Enhancements...........................................................................................................57
6.5. Recommendations................................................................................................................57
REFERENCES.....................................................................................................................................58
Appendix...............................................................................................................................................60
Appendix A: Questionnaire.............................................................................................................60
Appendix B: Gannt Chart................................................................................................................64
Appendix C: Budget........................................................................................................................64
Appendix D: Essential Source Code Segments................................................................................64
ITP Core..........................................................................................................................................65

ix
Code Snippet 1: WebsiteMangementController.php....................................................................65
Code Snippet 2: DatabaseMangementController.php..................................................................70
Code Snippet 3: FileManagementController.php.........................................................................73
Code Snippet 4: DevConsoleController.php................................................................................74
Code Snippet 5: UserManagementController.php.......................................................................74
Code Snippet 6: UserManagementController.php.......................................................................82
Code Snippet 7: ModeratorDashboardController.php..................................................................84
Code Snippet 8: ITPEngineProxy.php.........................................................................................85
ITP Engine.......................................................................................................................................89
Code Snippet 1: UserAccountController.java..............................................................................89
Code Snippet 2: UserAccountService.java..................................................................................90
Code Snippet 3: FtpServerController.java...................................................................................91
Code Snippet 4: FtpServerService.java........................................................................................92
Code Snippet 5: WebsiteController.java......................................................................................94
Code Snippet 6: WebsiteService.java..........................................................................................94
Code Snippet 7: DatabaseServerController.java..........................................................................97
Code Snippet 8: DatabaseServerService.java..............................................................................99
Code Snippet 9: OSTerminal.java.............................................................................................101
Code Snippet 9: TerminalOperationSession.java.......................................................................103
Appendix E: System Installation Procedure...................................................................................104
Phase 1: Environment Setup......................................................................................................104
Phase 2: ITP Core Installation...................................................................................................105
Phase 3: ITP Engine Installation................................................................................................106

x
LIST OF FIGURES
Figure 1 - Architectural Design...........................................................................................................14
Figure 2 - Contextual Model................................................................................................................15
Figure 3- ITP Core Use Case Diagram................................................................................................17
Figure 4- ITP Engine Use Case Diagram.............................................................................................20
Figure 5- Login Sequence Diagram.....................................................................................................21
Figure 6 - Registration Sequence Diagram..........................................................................................21
Figure 7 - Create User's System Account Sequence Diagram..............................................................22
Figure 8 - Create Database Sequence Diagram....................................................................................23
Figure 9 - Website Creation Sequence Diagram..................................................................................24
Figure 10 - User's Account Deletion Sequence Diagram.....................................................................25
Figure 11 - Database Deletion Sequence Diagram..............................................................................26
Figure 12 - Website Deletion Sequence Diagram................................................................................27
Figure 13 - User Login Activity Diagram............................................................................................28
Figure 14 - User Registration Activity Diagram..................................................................................29
Figure 15 - Create User's System Accounts Activity Diagram............................................................30
Figure 16 - Create Website Activity Diagram.....................................................................................31
Figure 17 - User's System Account Deletion Activity Diagram..........................................................31
Figure 18 - Database Deletion Activity Diagram.................................................................................32
Figure 19 - ITP Core Class Diagram - Authentication Package...........................................................33
Figure 20 - ITP Core Class Diagram - Developer Console Package....................................................34
Figure 21 - ITP Core Class Diagram - Moderator Console Package....................................................35
Figure 22 - ITP Core Class Diagram – Models Package......................................................................36
Figure 23 - ITP Core Class Diagram – Libraries Package...................................................................36
Figure 24 - ITP Engine - Database Package........................................................................................36
Figure 25 - ITP Engine - User Account Package.................................................................................37
Figure 26 - ITP Engine - FTP Package................................................................................................37
Figure 27 - ITP Engine - Website Package..........................................................................................38
Figure 28 - ITP Engine - OS Utils Package.........................................................................................39
Figure 29 - Relational Data Model......................................................................................................39
Figure 30 - Home page........................................................................................................................42
Figure 31 - Websites Page...................................................................................................................43
Figure 32 - Login Page........................................................................................................................43
Figure 33 - Register Account Page......................................................................................................44
Figure 34 - Activate Account with Code.............................................................................................44
Figure 35 - Complete KYC Page.........................................................................................................44
Figure 36 - Await Verification Page....................................................................................................45
Figure 37 - Moderator Dashboard Home Page....................................................................................45

xi
Figure 38 - KYC Approvals Page........................................................................................................46
Figure 39 - KYC Candidate Approval Page........................................................................................46
Figure 40 - KYC Candidate Rejection Page........................................................................................47
Figure 41 - Users Page.........................................................................................................................47
Figure 42 - Developer Console Home Page.........................................................................................48
Figure 43 - Databases Page..................................................................................................................48
Figure 44 - Databases Page - Credentials View...................................................................................49
Figure 45 - Database Page - Database Connection Details View.........................................................49
Figure 46 - Websites Page...................................................................................................................49
Figure 47 - New Website Page............................................................................................................50
Figure 48 - File Management Page......................................................................................................50
Figure 49 - Questionnaire Overall Responses Statistics.......................................................................51
Figure 50 - Statistics of familiarity with frameworks...........................................................................52
Figure 51 - Respondent s familiar with SQL.........................................................................................52
Figure 52 - Respondents familiar with clous application deployment.................................................53
Figure 53 - Respondents who don't know how to setup a LAMP stack...............................................53

LIST OF ACRONYMS

xii
xiii
CHAPTER 1: INTRODUCTION
1.1. Introduction and Background
In recent years, institutions of higher learning have been trying to provide students with both
hard skills - cognitive knowledge and professional skills – and soft skills, such as problem-
solving and teamwork [1]. However, these skill related goals are not easy to achieve as
traditional learning focuses on a teaching methodology where the source of the knowledge is the
lecturer, and the student is only the receiver of the information [2] [3]. Because of this, students
find it difficult to engage fully in educational practices, leading to a superficial understanding of
disciplinary knowledge [2]. Thus, this causes a gap between what students learn at the university
and what they need in the workplace [4].

In order to address this challenge, it was suggested that students be provided with the
opportunity to engage in real problem-solving and knowledge construction in professional
situations. One attractive way to achieve this goal was through project-based learning (PjBL)
[2]. Bell [5] defines project-based learning as an advanced approach to education that teaches a
variety of ideas pivotal for success in these modern times where students drive their learning
through study, as well as working together to research and create projects that reflect their
knowledge. The idea of learning by doing is a fundamental component of project-based learning.

Pengyue, et el. [2] simplified the definition of Project Based Learning (PjBL) further to mean an
inquiry-based teaching method that engages learners in knowledge building and acquisition by
having them accomplish meaningful projects and develop real-world products. Successful
project-based learning is achieved by implementing one or all of the next six features. These
features where highlighted by Krajcik and Shin [6] in their book about project-based learning.
They include: a driving question, the focus on learning goals, participation in educational
activities, collaboration among students, the use of scaffolding technologies, and the creation of
tangible artifacts, as key features of Project Based Learning.

Among all these features, the creation of artifacts that solve authentic problems is what
distinguishes PjBL from other student-oriented trainings [2]. The creation process requires
learners to work together to find solutions to authentic problems via the process of knowledge
integration, application, and construction. The results of project-based learning were seen in
another study. Ralph [7] reviewed fourteen studies that adopted PjBL in STEM education. It

1
turned out that PjBL increased the development of both learners’ knowledge and skills. PjBL
also encouraged students towards collaboration and negotiations within the group [7].

Due to the practical nature of IT related programmes like Software Engineering and Cyber
Security, Project Based Learning seems to be an effective approach towards imparting more than
a superficial kind of training to students. A number of institutions have attempted to implement
project-based learning, however, most of them target socially oriented features of project-based
learning, such as, collaboration among students, a driving question, the focus on learning goals,
etc. Most implementations of project-based learning seem not to focus on the creation of
tangible artifacts as a primary way of implementing project-based learning. And even those
that do manage to incorporate artefact creation, tend to only implement Project Based Learning
at some point in the training program and not consistently throughout the training period. This
project acts as a solution to that problem. It focuses on implementing project-based learning by
facilitating it through the construction of a cloud platform (web hosting platform). Such a
platform will facilitate and promote project-based learning among students, through construction
of artifacts that can be deployed onto the platform. In addition, such a platform will ensure that
Project Based Learning is implemented throughout the student’s training program.

1.2. Problem Statement


One main problem with the traditional approach of learning, is that the majority of graduating IT
students are unable to carry out tasks and jobs required by industry. This is caused by the gap
between what students learn at the university and what they need in the workplace [4]. As a
result, many IT graduates remain unemployed [9]. Salah and Husein [8] attributed this problem,
to the misalignment of the education curriculum with the demand of the market. Commenting on
the value of this alignment, [8] Yusuf Alpaydın & Kürşad Kültür said that as a key player in job
creation, higher education should continue to blend learning with real-world experience, with
support from employers through partnerships with industries.

Various attempts have been made to address this misalignment. As an example, J. L. Sanchez-
Romero et al. [9] proposed and experimented with the integration of project-based learning into
the curriculum of a Computer Engineering degree program at a university. The aim was to
bridge the knowledge-to-skill gap. While some progress was achieved through this approach, it
was limited to first-year students in a single course. This raises a fundamental issue: Project
Based Learning is implemented irregularly and inconsistently, typically restricted to the first or

2
final year of the training program, and not continuously throughout the throughout the course
duration.

The problems associated with how IT students are trained can, therefore, be narrowed down into
2 main problems outlined below:

i. Graduate IT students are unable to carry out tasks and jobs required by industry because
of the knowledge-skill gap
ii. Project Based Learning (a promising solution to the knowledge-skill gap) is implemented
irregularly and inconsistently, typically restricted to the first or final year of the training
program, and not continuously throughout the program duration

1.3. Aim
The aim of this project was to design and develop a cloud platform (web hosting platform) that
would facilitate and encourage, regular and consistent project-based learning, throughout the
program duration of IT related programs.

1.4. Research Objectives


1. To create a portable cloud platform to aid students with their project-based trainings.
2. To provide a portal to allow students to easily deploy web application projects on the
cloud platform.
3. To provide a platform for students to practice security skills in a controlled environment.

1.5. Research Questions


1. How can a portable cloud platform be created that can aid students with their project-
based trainings?
2. How can a portal that easily allow students deploy web application projects on the
cloud platform be provided?
3. How can a platform for students to practice security skills in a controlled environment be
provided?

1.6. Scope Of Study


The case study of this project was carried out within the locality of Ndola. Specifically, the
Zambia University College of Technology (ZUT). The focus group was mainly the students that
belong to the faculty of IT. However, because the project centred around learning, lecturers were

3
engaged occasionally to determine some feature that the cloud platform needed, so that the aim
of the project would be achieved. In addition, due to the need for regulation and administration,
selected lecturers were engaged to determine the policies that should guide the domain
requirements of the research and the cloud platform at large. The project documentations
include:

Chapter 2 - Entails the literature Review: - Historical Overview, Current


Findings, Related work, Summary.
Chapter 3 - Requirements, Analysis and Design: - Overview, Requirements Specifications,
Design Overview, Detailed or low-level design, Summary.
Chapter 4 - Implementation: - Overview, Main features, Major technical
problems, overcoming technical problems, Testing and Summary.
Chapter 5: Focuses on presenting and discussing the results of the work conducted. This chapter
provides a platform to convey the findings, draw conclusions, and engage in meaningful
discussions about the implications
of those results.
Chapter 6 - Evaluation, Conclusion, and Recommendation: - Overview,
Achievements, challenges, Future enhancements, Recommendations, Summary.

4
CHAPTER 2: LITERATURE REVIEW
2.1. Introduction
This section will focus on systematically reviewing literature as it relates to the problem identified. Then
explore the wide variety of solutions that have been proposed in the past and their implementation. And
finally focus on one of the solutions, its technical implications and related implementations.

2.2. Background to the Problem


In recent years, institutions of higher learning have been trying to provide students with both
hard skills - cognitive knowledge and professional skills – and soft skills, such as problem-
solving and teamwork [1]. However, these skill related goals are not easy to achieve as
traditional learning focuses on a teaching methodology where the source of the knowledge is the
lecturer, and the student is only the receiver of the information [2] [3]. Because of this, students
find it difficult to engage fully in educational practices, leading to a superficial understanding of
disciplinary knowledge [2]. Thus, this causes a gap between what students learn at the university
and what they need in the workplace [4].

In order to address this challenge, it was suggested that students be provided with the
opportunity to engage in real problem-solving and knowledge construction in professional
situations. One attractive way to achieve this goal was through project-based learning (PjBL)
[2].

2.3. A Prospective Solution: Project Based Learning


Definition
Bell [5] defines project-based learning as an advanced approach to education that teaches a
variety of ideas pivotal for success in these modern times where students drive their learning
through study, as well as working together to research and create projects that reflect their
knowledge. The idea of learning by doing is a fundamental component of project-based learning.

Pengyue, et el. [2] simplified the definition of Project Based Learning (PjBL) further to mean an
inquiry-based teaching method that engages learners in knowledge building and acquisition by
having them accomplish meaningful projects and develop real-world products.

5
Project Based Learning Features
Project based learning has a number of main features that makes it up. These features have been
identified described by various authors differently. The next few paragraphs will outline and
briefly discuss six key features.

i. Active learning
The central emphasis of PBL is on the belief that learning is most impactful when
learners apply theoretical concepts in practical situations [10]. In PBL, students actively
engage in a series of activities to address real-life problems and produce a product. These
activities include designing their own inquiries, planning their learning, organizing their
research, employing various learning strategies, and evaluating their projects [11].
ii. Real-world problems
The feature of “real-world” in project-based learning is essential because it encourages
students' interest and nurtures their motivation to learn by establishing connections
between academic goals and external social, political, and environmental processes [11].
[11] further added that this assignment offers the project team (the students) the
opportunity to take greater responsibility for selecting and organizing their projects. They
engage in researching real-world questions, proposing solutions to actual problems, and
rigorously designing real-world products. Thus, this feature facilitates bridging the
knowledge-skill gap problem by means of encouraging students to solve real world
problems that they will find in industry.
iii. Instructor’s role as a facilitator
In the process of creating, learners collaborate to address real problems by integrating,
applying, and constructing knowledge. Instructors and community members, often
serving as facilitators, offer feedback and support to assist learners in their learning
journey [2].
iv. Interdisciplinary
To complete a project, students require knowledge and skills spanning various
disciplines, from physical sciences to natural and social sciences. This characteristic
highlights the need for schools and teachers to equip students with adaptability and
holistic thinking, enabling them to address issues across different disciplines [11].
v. Cooperative learning
[12] explained “student activity revolves around a complex series of interactions between

6
team members over time and draws on a range of key transferable skills such as
communication, planning and team working since they co-plan their learning with the
support of the teacher, research the literature, and as appropriate, meet with adult experts,
build prototypes and conduct surveys and experiments, among other learning activities”.
This approach thus allows learners to collaborate in teams, mentored by their teachers
[11].
vi. Artifact Creation
In the PBL approach, both students and teachers participate in a project, leading to the
creation of tangible results that represent what the students have learned (Stivers, 2010).
[13] cited Harmer & Strokes who said that a “quality product” is a fundamental
distinguishing feature of project-based learning and on which “drives the project
planning, production and evaluation.”. Therefore, we can say that the creation of artifacts
acts as the driver of skill acquisition for students and narrows the knowledge-skill gap.

Studies on the Effectiveness of Project Based Learning


Numerous studies in the literature have examined the efficacy of PjBL. For instance, [13] found
that PjBL is a good way to teach because it gets students more involved and helps them
understand the course material better by letting them learn on their own. Similarly, [14] also said
that PjBL positively changed how teachers behave when it comes to protecting the environment.
The paper ended by talking about the connections between environmental education, science,
social and cultural issues, and what it means for education. In other words, [14] said that
instructors take a more active approach to educating students about matters relating to the direct
environment in which the students will exists after being educated.

[15] suggested that teachers and curriculum designers should actively prioritize validity when
creating project-based learning experiences for students, emphasizing that the validity of projects
significantly influences the learning process. In other words, [15] suggested that relevant
projects that are current of the environment are effective and aid effective learning.

[16] indicated a positive connection between learning content knowledge and engaging in PjBL
within collaborative environments. Consequently, students showed improved learning
performance, expressed positive reactions to effective learning, and found the learning
atmosphere to be highly interesting.

7
[17] conducted a pilot program that demonstrated it enhanced participants' laboratory skills,
scientific presentation abilities, and proficiency in experimental design. The analyses suggested
that the small-scale practice employed in this study was effective for students and could be
broadly shared or adopted. In other words, the pilot project-based learning program that [17]
conducted improved the practical abilities and skills of the students.

2.4. A Prospective Solution: Project Based Learning and its implementation


Due to the practical nature of IT related programmes like Software Engineering and Cyber Security,
Project Based Learning seems to be an effective approach towards imparting more than a superficial kind
of training to students. A number of institutions have attempted to implement project-based learning,
however, most of them target socially oriented features of project-based learning, such as, collaboration
among students, a driving question, the focus on learning goals, etc.

Most implementations of project-based learning seem not to focus on the creation of tangible artifacts as
a primary way of implementing project-based learning. And even those that do manage to incorporate
artefact creation, tend to only implement Project Based Learning at some point in the training program
and not consistently throughout the training period. This project acts as a solution to that problem. It
focuses on implementing project-based learning by facilitating it through the construction of a cloud
platform (web hosting platform). Such a platform will facilitate and promote project-based learning
among students, through construction of artifacts that can be deployed onto the platform. In addition,
such a platform will ensure that Project Based Learning is implemented throughout the student’s training
program.

CHAPTER 3: RESEARCH AND SOFTWARE DEVELOPMENT


METHODOLOGY
3.1. Introduction
In this chapter, we delve into the methodology that underpins the research methodology and the software
development process as well. The section firstly describes the approach that was taken during the
academic research of the project. It also served as a roadmap which guided the entire software
development lifecycle. The sections to follow describes the research design, population & sampling, Data

8
Collection and methods used during the research. Additionally, the software development methodology
that was employed during the project’s development lifecycle will be described in full detail.
Furthermore, how requirements were gathered, analysed and specified is also explained. A
comprehensive set of functions and non-functional requirements are also presented. Then lastly, a
summary of this chapter is made after explaining the requirements validation instruments used.

3.2. Research Design

The research study was basically based on the partially quantitative and qualitative type of research
approach and data analysis. Using the descriptive research of the quantitative design, online
questionnaires were used, specifically targeting students of the Zambia University College of
Technology.

3.2.1. Populations & Sampling

This study mainly focused on the Zambia University College of Technology students that are based in
Ndola town, and it’s from this population that a general perspective of the current state of the knowledge-
skill gap was drawn. A study sample of 15 was taken to measure the findings, in which, students in their
second, third and fourth year of academic education at the institution were evaluated. The survey was
random and participants were invited to participate at will.

3.2.2. Data Collection

To carry out the study, online questionnaires using google forms were utilised. The online questionnaire
was distributed through the University WhatsApp groups and recipients were drawn from within
organization. Due to this limitation of coverage, the number of respondents was unfortunately low, only
15 students participated. Upon collection of the data, it was further analysed and interpreted through
graphs and charts which were generated by google forms

3.2.3. Methods Used for Research


3.2.3.1. Primary Data

Questionnaires were used for primary data collection. Questions with predefined answers were
deemed fit to collect information that helped with achieving the objectives of the research. The
types of questions used in the questionnaire were both quantitative in nature. Questionnaires are
commonly used in market research as well as in the social and health sciences. For example, a
company may ask for feedback about a recent customer service experience, or psychology
researchers may investigate health risk perceptions using questionnaires.

In this scenario, the questionnaire was used to obtain information about the wideness of the
knowledge-skill gap that exists between what students know and what industry actually demands

9
of them. Establishing this fact was instrumental in constructing a solution that would be essential
in bridging the gap earlier identified.

3.2.3.2. Secondary Data

The researcher also depended on the secondary data which was collected through literature
survey. The researcher reviewed literature from various sources like already existing web
hosting and cloud services for student academic training. During the literature survey, books,
researches preview studies, periodicals, journals, issued reports, thesis, publication, conference
proceedings and websites that other researchers have studied and researched on were reviewed.

Focus was given to material that centred on project-based learning, web hosting, and cloud
computing. The reviews conducted helped to uncover and unpack what others have done to
narrow the gap between what students learn and what they need to know and do to be successful
in this modern job market. Consequently, this helped in consolidating what needs to be done to
successfully bridge the knowledge-skill gap and thus promote enhanced practical and hands-on
training for IT students.

3.3. Software Development Methodology


A Software Development Methodology is a set of principles and techniques used to guide the process of
creating a software product. It provides a structured approach to planning, designing, building, and
managing the development process. Due to the nature of this project, the Agile Scrum methodology was
used to develop the software incrementally. Then finally, documenting the final version of the system.

To start with, Agile software development refers to a group of software development methodologies that
use an iterative development kind of approach to building software. The iterative nature of Agile
methodologies is manifested in the sense that requirements, designs and features keep evolving through
collaboration between the software engineers and key stakeholders [18].

Scrum is a subset of Agile. It is a lightweight process framework for agile development. It involves the
use of development cycles called Sprints. A Sprint may last for a week or so. During each Sprint, specific
features and tasks are worked on. These tasks are retrieved from the Sprint Backlog [19].

The basis for using the Agile Scrum Methodology was because of the following reasons:

i. Weekly meetings were scheduled with the key stakeholder, the project supervisor. This meant
that each week, goals and objective would be set, then executed or carried out during the course
of the week. Then at the end of the week, a stand-up meeting would be held to review what was

10
accomplished. New goals and objectives for the week to follow would be set and the process
would repeat.
ii. Due to the inherit complexity of the proposed system, the Agile Scrum made it easier to manage
the complexity of the project. This was accomplished by decomposing the project features into
smaller units that could be implemented during 1-week sprints.
iii. Another reason for using the Agile Scrum methodology is that the requirements for the realistic
deliverables, kept changing. For instance, at the beginning of this project, it was expected that a
miniature cloud platform would be built. However, because of time constraints, it was only
realistic to build a basic web hosting platform that could be scaled up to a cloud platform later on.

3.4. Requirements Specification


Requirements specification is a systematic process that involves the elicitation, analysis, definition and
documentation of software requirements for a given software product.

During the requirements analysis phase, use cases were identified from existing systems. These use
cases where comprehensively analysed and detailed. Specific research was carried out to determine how
each use case could be achieved. This also facilitated the process of determining the technical feasibility
of each system feature.

After all the prospective system features were identified, the IEEE Software Requirements
Specification standard was used to specify the requirements into a single document. A copy of this
document has been attached in the Appendix. The requirements defined in the SRS mentioned earlier,
were validated incrementally during the Agile Scrum stand-up meetings held weekly.

3.4.1. Key Stakeholders


This project targeted two main stakeholders. These are the students and lecturers. Students are the main
focus of this project. In fact, 90% of the system features will be used by Students. These features will
allow them to engage in more proactive learning practices as a consequence of this project. Since the
project facilitates project-based learning, lecturers are needed to monitor and catalyse the process.

3.4.2. Requirements Gathering


A number of approaches can generally be used to elicit requirements for a software product. These
include:

i. Interviews
ii. Observation
iii. Software Prototyping
iv. Focus groups

11
v. Questionnaires
vi. Reverse Engineering

During the lifetime of this project, two approaches were used to gather requirements. These are the
observation and reverse engineering approaches. Since, the system that has been developed is not a
new invention, similar existing systems were closely examined and analysed.

Reverse engineering involves extracting knowledge or requirements from already built software products
[20]. In other words, reverse engineering is a process of generating a working system’s source code,
designs and requirements specifications by simply observing how it is working. In some other cases, we
may apply a top-down approach to determine the system features. By means of reverse engineering, we
can find out how a program is working and see areas where we can improve its operation.

3.4.3. Requirements Analysis


According to [21], Requirements analysis is a systematic process of studying, determining and
documenting user needs and expectations of the software system to be designed that solves a particular
problem. In other words, requirements analysis is the process of determining the functional and non-
functional requirements of a software system that solves a problem.

3.4.3.1. Functional Requirements


The functional requirements to follow will be grouped based on the two user groups that will use the ITP
Cloud Platform. Under each category, functional requirements will be grouped based on category.

3.4.3.1.1. Functional Requirements – Student


The functional requirements to follow describes what the system will be able to allow students to do. The
requirements will be described based on the category to which the requirement belongs.

A. Authentication
Students will be able to:
i. Create an account using their details
ii. Activate their newly created account using email verification
iii. Log into their account
iv. Log out from their account
v. Be verified and approved or rejected
B. Resource Management: Databases
Students will be able to:
i. Create a database

12
ii. Create database user
iii. View the details of a selected database
iv. Delete a database
v. Delete database user
vi. Access phpMyAdmin
C. Resource Management: Websites
Students will be able to:
i. Create a website instance
ii. Setup and configure the website instance settings
iii. Edit an existing website instance’s configuration
iv. Delete a website instance
D. Resource Management: DevOps
Students will be able to:
i. Deploy a website using an SFTP client
ii. Manage files using File Browser

3.4.3.1.2. Functional Requirements – Lecturer (Moderator)


The system will also allow the moderators (lecturers) to perform the following functions.
A. Authentication
i. Log into the system
ii. Log out from their account
B. Content and User Management
i. Verify pending student account registrations
ii. Moderate content being published on the platform
iii. Ban users who violate the terms of use
iv. Remove websites that do not conform to the regulations set forth

3.4.3.2. Non-Functional Requirements

Non-functional requirements, sometimes referred to as quality attributes, detail the attributes of the
system, such as performance, security, scalability, and usability. They define how well the system should
perform its functions and are critical for the overall user experience.

13
3.4.3.2.1. Performance Requirements

When talking about performance in IT systems, we normally determine it by how fast a system responds
to user’s requests. The cloud platform about to be developed is expected to consistently provide fast
response times (at least within 2000 milliseconds) while maintaining an uptime of at least 75.0%. The
goal for the platform is to try accommodating a minimum of 50 concurrent users without performance
degradation. In addition, the platform should efficiently manage resources, scale seamlessly to handle
increased loads, and employ caching mechanisms for improved response times.

3.4.3.2.2. Safety Requirements

Safety requirements are crucial for ensuring the security and well-being of users, data, and the system
itself. Since the cloud platform being developed is a sandbox for students to enhance their skills, some
form of data protection will be implemented. However, the majority of student projects deployed on the
platform will have to be secured by the students themselves. On the other hand, the cloud platform is
expected to ensure that user data relative to it is secured. This will involve data encryption and
implementing authentication and authorization mechanisms throughout the system. In case data loss does
occur, all system users will be notified and instructed to change their authentication details. Other than
that, a detailed report of the breach will be written and shared. This will add to the learning process.

3.4.3.2.3. Security Requirements

As briefly discussed in the previous section, user authentication and authorization will be implemented to
ensure security on the cloud platform. Authentication will require that the end user provide an email and
password for them to log into the cloud platform dashboard. In addition, users will be given the option to
enable Multi-Factor Authentication, via email.

Other security considerations involve not saving end user credentials to provisioned resources like
databases accounts, ftp accounts, etc., on the any storage form. This includes files, and databases. The
end users need to save the credentials when they get displayed to them. After this point, the system will
not allow them to see their password. However, a provision will be availed to reset the password in case
they forget theirs.

Authorization on the platform will be facilitated through the use Role Based Access Control and Linux
Operating System Permissions. At specified intervals, permission audits will be carried out to ensure that
all systems users have access to the correct resources.

Usually, when talking about data security, three security objectives are addressed: confidentiality,
integrity, and availability:

14
i. Confidentiality describes the state in which data is protected from unauthorized disclosure, e.g., a
loss of confidentiality occurs when the content of a communication or a file is disclosed.

ii. Integrity means that the data has not been altered or destroyed, which can be done accidentally
(e.g., transmission errors) or with malicious intent (e.g., sabotage). Integrity more specifically is
expected to be implemented on a database level by using transactions.

iii. Availability refers to authorized persons accessing data and systems within an appropriate period
of time. Reasons for loss of availability may be attacks or instabilities of the system.

3.4.3.2.4. Software Quality Attributes


3.4.3.2.4.1. Availability

ITP Cloud Platform will be available 24/7 with a fully functional end user support team that will respond
to queries when they can. Also, a group of volunteers, the system maintenance team, will be responsible
for making sure the system is working properly.

3.4.3.2.4.2. Interoperability and Portability

The ITP Cloud Platform is intended to be portable and interoperable with any standard Linux Operating
System Distribution. If modifications are needed, these are minor, such as, with regards to the Linux
Terminal Commands. Other hand that, as long a standard set of dependencies is installed as prescribed by
the installation guide, everything should work right off the back.

3.4.3.2.4.3. Testability

Software testability indicates how well a software-driven system allows Software Testing professionals to
conduct tests in line with predefined criteria. This attribute also assesses the ease with which Software
Quality Assurance engineers can develop test criteria for a said system and its various components.
Engineers can assess the testability of a system by using various techniques such as encapsulation,
interfaces, patterns, low coupling, and more. All of the aforementioned is expected to be achieved with
reference to the ITP Cloud Platform.

3.4.3.2.4.4. Usability

Every software-driven system is designed for ease of use to accomplish certain tasks and the ITP Cloud
Platform is not an exception. The system is purposely designed to make website deployment and
management very easy for students. Students can easily get started on the ITP Cloud Platform. Besides
all the above, the user interface will be designed in an intuitive way so that users easily navigate the
website and access various resources and administer various tasks.

15
In addition, setting up a custom instance of the ITP Cloud Platform on the Virtualized environment will
equally made easy. This will be aided through the provision of comprehensive and easy to use
Installation Instructions or Documentation. Additionally, user training will be provided in the form of
YouTube video tutorials.

3.4.3.2.5. Consistency and Integrity

Long operations such as, Database Operations and Linux Terminal Operations, will need to be ATOMIC.
This means that they must execute to completion or not at all. And each operation should leave the
System in consistent state.

3.4.4. Requirements Validation


Requirements validation has been defined as the process of checking that requirements defined for
development of a software system, correspond to what the customer really wants. Validating
requirements implies guaranteeing that the set of requirements is right, and complete. The following are
some techniques employed during requirements validation:

 Black Box Testing


 Expert review
 Demonstration

During this project’s lifetime, all of the above requirements validation techniques were used. Black Box
Testing used extensively to ensure that all the specified use cases were achieved as system features.
Expert reviews were also used weekly during the Agile Scrum Stand-Up meetings. The Expert in this
context was the project Supervisor. And lastly, demonstrations of the working system features were
shown during the earlier mentioned stand-up meetings.

3.5. Summary
This summary discusses the key elements of the research methodology used during the project. In the
context of software development methodologies, this report delved into the fundamental principles and
techniques guiding the creation of software products. It emphasizes the significance of Agile software
development, a group of methodologies characterized by an iterative approach. Specifically, this study
underscored and utilized Scrum - a lightweight process framework within the Agile paradigm, marked by
its deployment of development cycles known as ‘Sprints.’

The project involved a thorough requirements specification process, including use case identification.
Two main stakeholders for the project were identified: students and lecturers. Functional requirements
were categorized under various user groups and areas like authentication, resource management, content
management, user management, and DevOps.

16
The section also established the non-functional requirements, often referred to as quality attributes, which
played a critical role in defining the system's performance and its impact on the overall user experience.
These attributes encompassed performance, safety, security, availability, interoperability, portability,
testability, usability, consistency, integrity, and usability.

Furthermore, the research highlights the rigorous validation techniques employed throughout the project's
lifecycle. These encompass Black Box Testing to ensure the fulfilment of specified use cases, weekly
expert reviews conducted during Agile Scrum Stand-Up meetings, with the project supervisor serving as
the expert, and periodic demonstrations of working system features during these meetings.

CHAPTER 4: SYSTEM DESIGN AND IMPLEMENTATION


4.1. Introduction

This chapter will focus on describing how the system was designed and implemented. It must be noted
early on that the term ‘ITP Cloud Platform’ will be used in place of ‘the system’. First and foremost, the
architectural design is established. The diagrammatic representation is added, along with description of
the architectural design. The software design tools will then be outlined, both the semantic tools and
drawing tools. The system design will then be described from various viewpoints. This will be done using
the Contextual Model, Use Case Model, Sequence Diagram, State Machine Diagram, Activity Diagram,
and finally the Class Diagram. Lastly, the software development tools will be outlined and the testing
techniques.

4.2. Architectural Design


The ITP Cloud Platform is made up of mainly two subsystems. These subsystems are: the ITP Core
System and the ITP Engine System. Together these systems form the ITP Cloud Platform. Below, is a
brief Architectural Design Overview of the entire system. It shows the major subsystems making up the
whole system. It also shows the external systems that the subsystems interact with.

17
Figure 1 - Architectural Design

In figure above, ITP Core interacts with three entities: ITP Engine, a Mail Server and a Database Server.
Public users of the system will mainly interact with ITP Core. ITP Core will then interact with a Database
Server to store application and system data persistently. Occasionally, the ITP Core will send out emails
via the Mail Server using the SMTP Protocol. These emails will mainly be for authentication purposes
and any system notifications that may require the end user’s attention. Lastly, ITP Core will interact with
ITP Engine.

ITP Engine acts as a resources manager and an adapter between ITP Core and the Linux Operating
System. ITP Engine interacts mainly with ITP Core by receiving requests pertaining to resource
allocation and management. The Engine then interacts with the Linux Operating System to achieve the
tasks.

4.3. Software Design


Software design is defined as a systematic process of creating graphical representations of a software
system at different perspectives. With regards to the ITP Cloud Platform, the subsystems were designed
in isolation but with logical relationships established. The ITP Core component was designed around the
Model View Controller (MVC) Architectural design pattern. The ITP Engine component on the other
hand was designed around two architectural designs. These are: RESTful Service Oriented Architecture
and the N-Tire Architecture.

4.3.1. Software Design Tools


During the design phase of the project, two primary tools were used. The first was of a semantic nature.
This was the Unified Modelling language (UML) version 2. The second tool was Draw.io, a drawing tool,
that was used while drawing the system designs, following the UML standard.

18
4.3.2. Component Design

4.3.2.1. Contextual Model

A contextual model provides an overview of the system's interactions with external entities, helping to
identify external dependencies and data flows.

Figure 2 - Contextual Model

From the above contextual model, the ITP Cloud Platform interacts with four key entities. The Students,
the Lecturers, a Database System and finally, the Hardware along with the system software that operates
on the Hardware.

The students are able to be Authenticated by the ITP Cloud Platform and thereafter be granted access to
Resource Management. The lecturers are equally able to be authenticated and manage resources.
However, in additional to this, they are able to manage users of the platform and regulate content.

The ITP Cloud Platform interacts with a Database System so that data can be stored in a persistent form.
Since the ITP Cloud Platform is all about resource management, it communicates and coordinates with
the System Software that manages the Hardware Resources. Thus, it can be said that the ITP Cloud
Platform manages resources via the System Software that operates on the hardware.

19
4.3.2.2. Use Case Model

The use case model allows use to specify the functionality that the system will be able to offer to all
actors involved. The Use Case Models further capture the interactions between system components and
external actors, describing the system's functional requirements in a user-centred perspective.

In defining the Use Case Model, we cannot escape specifying the functional requirements of the ITP
Cloud Platform. It must be noted that though these requirements have been specified in Chapter 3, this
section focuses on the diagrammatic representation of the system functions.

Consequently, the functional requirements to follow will be grouped based on the subsystems making up
the ITP Cloud Platform. Each system feature will be preceded by a use case diagram describing the
actions that the actors will be able to perform with regard to the subsystem. In addition, primary and
secondary actors will be identified, along with the specific actions they will be allowed to perform.

4.3.2.2.1. ITP Core

ITP Core is the main website and web dashboard component of the ITP Cloud Platform. A number of
features have been made available to end users. These are described next using a use case diagram.

20
Figure 3- ITP Core Use Case Diagram

Actors

a. Primary Actors: Student, and Moderator


b. Secondary Actors: Mail Server, MariaDB, and ITP Engine
Functional Requirements - Students

The functional requirements will be described based on the category to which the requirement belongs.

A. Authentication

Students will be able to:

i. Create an account using their details


ii. Activate their newly created account using email verification

21
iii. Log into their account
iv. Log out from their account
v. Be verified and approved or rejected
B. Resource Management: Databases

Students will be able to:

i. Create a database
ii. Create a database user
iii. View the details of a selected database
iv. View the details of a selected database user
v. Delete a database
vi. Delete a database user
vii. Access phpMyAdmin
C. Resource Management: Websites

Students will be able to:

i. Create a website instance


ii. Setup and configure the website instance settings
iii. Edit an existing website instance’s configuration
iv. Delete a website instance
D. Resource Management: DevOps

Students will be able to:

i. Deploy a website using GitHub


ii. Deploy a website using an SFTP client
iii. Access their Linux account via SSH
iv. Manage files using File Browser
Functional Requirements - Moderators

The system will also allow the moderators (lecturers) to perform the following functions.

A. Authentication

i. Log into the system


ii. Log out from their account
B. User and Resource Management

i. Verify pending student account registrations

22
ii. Moderate content being published on the platform
iii. Ban users who violate the terms of use
iv. Remove websites that do not conform to the regulations set forth

4.3.2.2.2. ITP Engine

ITP Engine is the actual ITP Cloud Platform manager. It is responsible for all resource management and
allocation activities. It has one primary actor, the ITP Core subsystem. Effectively, all user requirements
prescribed for the ITP Core, are actually implemented by the ITP Engine. A number of features have
been made available to ITP Core and these correspond closely to those described under ITP Core. The
use case diagram to follow highlights the main functional requirements ITP Engine offers.

Figure 4- ITP Engine Use Case Diagram

23
Actors

i. Primary Actors: ITP Core

ii. Secondary Actors: MariaDB, Linux OS, MongoDB and Apache

Functional Requirements – ITP Core

The functional requirements will be described based on the category to which they belong.

A. Authentication

The ITP Core subsystem will be able to:

i. Authenticate using ITP Secure Session

B. Resource Management: Databases

The ITP Core subsystem will be able to:

i. Create a database

ii. Create a database user

iii. Delete a database

iv. Delete a database user

C. Resource Management: Websites

The ITP Core subsystem will be able to:

i. Create a website instance

ii. Edit an existing website instance’s configuration

iii. Delete a website instance

4.3.2.3. Sequence Diagram

Sequence diagrams depict the interactions between different components of the system over time,
illustrating the order of messages and function calls. A number of interactions are present in the ITP
Cloud Platform. However, only the key interactions will be described graphically below.

4.3.2.3.1. Authentication: Login Sequence

24
Figure 5- Login Sequence Diagram

The sequence diagram above shows the interactions between the student (Lecturer as well), and the ITP
Core component, more specifically the LoginController. The user provides their email and password. The
LoginController then passes this data to ShieldAuth, an authentication package. ShieldAuth checks to
determine if the user exists on the system or not. The subsequent response is given to the user via the
LoginController.

4.3.2.3.2. Authentication: Registration Sequence

Figure 6 - Registration Sequence Diagram

25
This sequence diagram depicts the process of signing up or registering an account with the ITP Cloud
Platform. The user begins by providing their basic information, as well as, their email and preferred
password. This information is sent to the RegisterController which then relays it to the ShieldAuth
package. ShieldAuth send the user an account activation code to their email. This serves to verify the
user’s email and activates the user’s account. ShieldAuth responds to the RegisterController, which then
directs the user to provide the code sent to their email. If the user provides the correct code, their account
is activated and they proceed to the next step, the KYC step.

4.3.2.3.3. User’s System Account Creation Sequence

Figure 7 - Create User's System Account Sequence Diagram

The sequence diagram above depicts the process of creating a user’s system account. The moderator
initiates the process by requesting that a user account be created for a user. The
UserManagementController then invokes the ITPEngineProxy library to achieve this operation. The
ITPEngineProxy makes a RESTful API call to the ITPEngine. Upon receiving the API request, the
UserAccountController calls a service method that implements the Systems calls to the Operating System
to complete the User Accounts Creation Process.

Three main user accounts are created. A Linux User Account, an FTP Account, and a Database Account.
Upon completion of these tasks, feedback is given back to the previous objects util the response is
displayed to the moderator, the initial operation initiator.

4.3.2.3.4. Database Creation Sequence

26
Figure 8 - Create Database Sequence Diagram

The sequence diagram above depicts the process of creating a database. The student initiates the process
by requesting that a database be created for a user. The DatabaseManagementController then invokes the
ITPEngineProxy library to achieve this operation. The ITPEngineProxy makes a RESTful API call to the
ITPEngine. Upon receiving the API request, the DatabaseServerController calls a service method that
implements the Systems calls to the Operating System to complete the Database Creation Process. Upon
completion of these tasks, feedback is given back to the previous objects util the response is displayed to
the student, the initial operation initiator.

4.3.2.3.5. Website Creation Sequence

27
Figure 9 - Website Creation Sequence Diagram

The sequence diagram above depicts the process of creating a website. The student initiates the process
by requesting that a website be created for a user. The WebsiteManagementController then invokes the
ITPEngineProxy library to achieve this operation. The ITPEngineProxy makes a RESTful API call to the
ITPEngine. Upon receiving the API request, the WebsiteController calls a service method that
implements the Systems calls to the Operating System to complete the Website Creation Process.

Four main tasks are executed to complete the website creation process. First, the folder structure is
created for the new website. Second, Apache is configured by creating and activating a new virtual host.
In addition, a new port is added to the port configuration. This is done so that the new website can be
accessed from that port. Thirdly, the firewall is configured to allow incoming and outgoing traffic over
the port specified in task two. Lastly, for the folders created earlier, correct file permissions are enforced
to ensure access control. Upon completion of these tasks, feedback is given back to the previous objects
util the response is displayed to the student, the initial operation initiator.

4.3.2.3.6. User’s System Account Deletion Sequence

28
Figure 10 - User's Account Deletion Sequence Diagram

The sequence diagram above depicts the process of deleting a user’s system account. The moderator
initiates the process by requesting that a user account be deleted for a user. The
UserManagementController then invokes the ITPEngineProxy library to achieve this operation. The
ITPEngineProxy makes a RESTful API call to the ITPEngine. Upon receiving the API request, the
UserAccountController calls a service method that implements the Systems calls to the Operating System
to complete the User Accounts Deletion Process.

Three main user accounts are deleted. A Linux User Account, an FTP Account, and a Database Account.
Upon completion of these tasks, feedback is given back to the previous objects util the response is
displayed to the moderator, the initial operation initiator. s

4.3.2.3.7. Database Deletion Sequence

29
Figure 11 - Database Deletion Sequence Diagram

The sequence diagram above depicts the process of deleting a database. The student initiates the process
by requesting that a database be deleted for a user. The DatabaseManagementController then invokes the
ITPEngineProxy library to achieve this operation. The ITPEngineProxy makes a RESTful API call to the
ITPEngine. Upon receiving the API request, the DatabaseServerController calls a service method that
implements the Systems calls to the Operating System to complete the Database Deletion Process. Upon
completion of these tasks, feedback is given back to the previous objects util the response is displayed to
the student, the initial operation initiator.

30
4.3.2.3.8. Website Deletion Sequence

Figure 12 - Website Deletion Sequence Diagram

The sequence diagram above depicts the process of deleting a website. The student initiates the process
by requesting that a website be deleted for a user. The WebsiteManagementController then invokes the
ITPEngineProxy library to achieve this operation. The ITPEngineProxy makes a RESTful API call to the
ITPEngine. Upon receiving the API request, the WebsiteController calls a service method that
implements the Systems calls to the Operating System to complete the Website Deletion Process.

Four main tasks are executed to complete the website creation process. First, the folder structure is
deleted for the existing website. Second, Apache is re-configured by deleting and deactivating the
existing virtual host. In addition, corresponding port is removed from the port configuration. This is done
so that the website cannot be accessed from that port anymore. Thirdly, the firewall is re-configured to
block incoming and outgoing traffic over the port specified in task two. Lastly, file permissions are
removed by virtual of deleting the folders. Upon completion of these tasks, feedback is given back to the
previous objects util the response is displayed to the student, the initial operation initiator.

4.3.2.4. Activity Diagram

Activity diagrams depict the flow of activities within a component, illustrating how processes are carried
out and in what sequence. They describe how activities are coordinated. Activity diagrams can also be
thought of as advanced versions of flow charts that model the flow of control from one activity to another
activity. The following subsections will highlight some key processes that have been modelled using
activity diagrams.

31
4.3.2.4.1. Authentication: Login

Figure 13 - User Login Activity Diagram

The above activity diagram depicts the login process. First the user provides their login credentials.
Depending on whether they exist or not, an appropriate response is given. If all is oaky, they proceed to
their developer console.

32
4.3.2.4.2. Authentication: Registration

Figure 14 - User Registration Activity Diagram

The above activity diagram depicts the user account registration process. The user begins by providing
their basic information, their email and a preferred password. The systems then checks if the provided
email exists or not. If does exist, the user is notified. Otherwise, the user account activation code is sent to
their email.

The user is then required to enter the activation code. If the code is okay, the user to sent to the KYC
page to complete the account creation process. Otherwise, the user is required to re-enter the activation
code.

33
4.3.2.4.3. User’s System Account Creation

Figure 15 - Create User's System Accounts Activity Diagram

The activity diagram above mainly highlights the parallel operations that need to be executed when
creating a system account for a specific user. Creation of a system account constitutes the creation of
three separate accounts, a Linux Account, an FTP Account and a Database Account.

4.3.2.4.4. Website Creation

34
Figure 16 - Create Website Activity Diagram

The activity diagram above mainly highlights the parallel operations that need to be executed when
creating a website for a specific user. Creation of a website constitutes the execution of three tasks. These
include: Creating the website folder structure, configuring Apache, and lastly the firewall.

4.3.2.4.5. User’s System Account Deletion

Figure 17 - User's System Account Deletion Activity Diagram

The activity diagram above mainly highlights the parallel operations that need to be executed when
deleting a system account for a specific user. Deletion of a system account constitutes the deletion of
three separate accounts, a Linux Account, an FTP Account and a Database Account.

35
4.3.2.4.6. Website Deletion

Figure 18 - Database Deletion Activity Diagram

The activity diagram above mainly highlights the parallel operations that need to be executed when
deleting a website for a specific user. Deletion of a website constitutes the execution of three tasks. These
include: Deleting the website folder structure, re-configuring Apache, and lastly the firewall.

4.3.2.5. Class Diagram

A class diagram is a type of static structure diagram that describes the structure of a system by showing
the system's classes, their attributes, operations (or methods), and the relationships among objects. The
ITP Cloud Platform, is made up of two subsystems. Each of these subsystems have class diagrams. The
sections to follow will depict and briefly explain these. Due to the size of the overall class diagrams, the
figures may not fit on the A4 sized paper. Consequently, the diagrams will be chunked or divided into
smaller portions.

4.3.2.5.1. ITP Core

The ITP Core system is architecturally structured using the Model View Controller design pattern
(MVC). This means most classes belong to two main packages, namely Models package and the
Controller package. The class diagrams to follow will group classes in packages to emphasize the
grouping.

36
i. Authentication Package
The class diagram to follow will showcase the classes concerned with authentication.

Figure 19 - ITP Core Class Diagram - Authentication Package

The class diagram above depicts the classes related to the authentication concerns. The
LoginController extends the Shield Authentication package’s LoginController. So does the
RegisterController. The KycController on the other hand extends the BaseController.

ii. Developer Console Package


The class diagram to follow depicts classes relating to the Resource Management aspects of the
ITP Cloud Platform.

37
Figure 20 - ITP Core Class Diagram - Developer Console Package

iii. Moderator Console Package


The class diagram to follow depicts classes relating to the User Management and Resource
Management aspects of the ITP Cloud Platform. These features are primarily for the moderator
user type.s

38
Figure 21 - ITP Core Class Diagram - Moderator Console Package

iv. Models Package


The Models package is a collection of shared classes. These classes are shared by the classes in
the previous packages.

39
Figure 22 - ITP Core Class Diagram – Models Package

v. Libraries Package
This package contains one custom library. It acts as a Proxy to the ITP Engine.

Figure 23 - ITP Core Class Diagram – Libraries Package

4.3.2.5.2. ITP Engine

Like the ITP Core subsystem, the ITP Engine is equally made up of classes that are divided into
packages. These packages to the main system features. Architecturally, the ITP Engine follows the N-
Tire design pattern, mixed with the RESTful Architecture.

i. Database Package

Figure 24 - ITP Engine - Database Package

40
ii. User Account Package

Figure 25 - ITP Engine - User Account Package

iii. FTP Package

Figure 26 - ITP Engine - FTP Package

iv. Websites Package

41
Figure 27 - ITP Engine - Website Package

v. OSUtils Package

42
Figure 28 - ITP Engine - OS Utils Package

The OS Utils package is a new custom library that makes it easy to interact with the terminal of
the operating system on which the application runs. It makes it possible for the application that
uses the library to interact with a Command Line Application as though it was an actual user.

4.3.2.6. Relational Data Model Diagram


The relational data model to follow was generated using phpMyAdmin after all the necessary entities and
tables. Association between tables is denoted using the connecting lines. The cardinality and participation
constraints have been omitted by the auto generation tool. However, these can be found by closely
examining the class diagrams earlier established.

Figure 29 - Relational Data Model

43
4.4. Software Development

Software development is a process programmers use to build computer programs. It is a practical activity
that produces working systems, based on the requirements specification. The next sections will describe,
in details, how the system was built.

4.4.1. Software Development Tools

During the development of the system, the following tools were used:
i. Intellij IDEA Community Edition 2023.1
ii. Visual Studio Code – Insiders Edition 1.84.0-inside
iii. Visual Studio Code
iv. Nano CLI Text Editor
v. Git
vi. GitHub
vii. Gradle
viii. Java JDK 17
ix. VMware Workstation 17 Player
x. Composer 2

4.4.2. Component Development

The various components of the system were developed in isolation. For example, since the ITP Cloud
Platform is made up of two subsystems, the ITP Core and the ITP Engine. These two were developed as
separate projects. The ITP Core was developed using the following tools and technologies:

i. HTML5
ii. CSS3
iii. Bootstrap 5
iv. PHP8
v. CodeIgniter 4
vi. Visual Studio Code – Insiders Edition 1.84.0-inside
The ITP Engine on the other hand was developed using the following tools and technologies:
i. Java 17
ii. Spring Boot
iii. Gradle (Build tool)
iv. Intellij IDEA Community Edition 2023.1

4.4.3. Evaluation and Testing Techniques

During the course of the development process, a number of software testing techniques were employed to
ensure that the system operated as expected and conformed to the earlier specified requirements. The
utilized techniques were as follow:

i. Unit Testing

44
According to [22], unit testing refers to testing program units in isolation. A unit is defined as a
piece of code, such as a function or method of a class. Units must first be tested in isolation
before determining how well they work together. During the development phase of this project,
specific methods were tested informally, that is, without the use of a testing harness or Xunit
testing kit.

Individual methods were tested using test data generated based on the requirements of each
method. For example, one method found in the ITP Engine source code was responsible for
creating databases. This method was tested by providing it with sample database names. The
outcomes of the execution were observed. Incorrect outcomes meant incorrect logic. Thus, the
author had to debug the methods, so as to identify the defect and resolve them. This process was
repeated iteratively until all methods were bug free and operated as expected.

ii. Integration Testing


As earlier defined, modules in a software system can refer to methods, classes or packages. After
successfully completing unit testing, the next phase is integration testing. According to [23] the
objective of system integration testing is to build a working version of the system by (1) putting
the modules together in an incremental manner and (2) ensuring that the additional modules work
as expected without disturbing the functionalities of the modules already integrated.

A number of approaches can be used during integration testing. [23] highlighted the following:
Incremental, Top down, Bottom up, Sandwich and Big bang. During the integration of the system,
the Bottom-Up approach was used. It basically involved integration of lowest level modules. A
module is said to be at the lowest level if it does not invoke another module. The assumption
made was that all modules had been individually tested before. To integrate a set of lower-level
modules using this approach, we needed to construct a test driver program that would invoke the
modules to be integrated. Once the integration of a desired group of lower-level modules was
found to be satisfactory, the driver was replaced with the actual module and one more test driver
was used to integrate more modules with the set of modules already integrated

With regards to the ITP Engine, the Bottom-Up approach to integration testing was used as
follows. Firstly, individual modules were tested in isolation, that is before being added to the
codebase of the final system. Upon successfully passing all the tests, the modules were integrated
into the main codebase. All modules categorised as Services were tested for interface errors with
all modules categorised as Controllers.

iii. System Testing


According to [24] the objective of system-level testing, also called system testing, is to establish
whether a software system meets the requirements specified by the customer. The objective is to

45
establish that there is sufficient evidence that a system can operate without trying to perform
thorough testing. Basic tests are performed to ensure that commonly used functions, not all of
which may directly relate to user-level functions, work to our satisfaction.

The ITP Cloud Platform was tested using the basic tests type of system testing. The objective of
this approach is to establish that the system can be installed, configured, and brought to an
operational state. This was done after the system was deployed online. A number of users were
invited to test the system to verify that the system was working.

4.5. System Snapshots


The images to follow depict screenshots of the system.

Figure 30 - Home page

Figure 31 - Websites Page

46
Figure 32 - Login Page

Figure 33 - Register Account Page

47
Figure 34 - Activate Account with Code

Figure 35 - Complete KYC Page

Figure 36 - Await Verification Page

Moderator Console Screenshots

48
Figure 37 - Moderator Dashboard Home Page

Figure 38 - KYC Approvals Page

49
Figure 39 - KYC Candidate Approval Page

Figure 40 - KYC Candidate Rejection Page

Figure 41 - Users Page

Developer Console Screenshots

50
Figure 42 - Developer Console Home Page

Figure 43 - Databases Page

51
Figure 44 - Databases Page - Credentials View

Figure 45 - Database Page - Database Connection Details View

Figure 46 - Websites Page

52
Figure 47 - New Website Page

Figure 48 - File Management Page

4.6. Deployment

Deployment is the second from last phase in the software development life cycle before the maintenance
phase. It involves publishing a software system so that it is accessible to its end users. The ITP Cloud
Platform was deployed onto the internet using the facilities provided by digital ocean. A virtual machine
(droplet) was purchased for a period of one month so that the system could be deployed and evaluated.
Deployment instructions can be found in the appendix section.

4.7. Summary

In summary, chapter focused on describing how the system was designed and implemented. First and
foremost, the architectural design was established. The diagrammatic representation was added, along
with description of the architectural design. The software design tools were then outlined, both the

53
semantic tools and drawing tools. The system design was then described from various viewpoints. This
was done using the Contextual Model, Use Case Model, Sequence Diagram, State Machine Diagram,
Activity Diagram, and finally the Class Diagram. Lastly, the software development tools were outlined
and the testing techniques as well.

CHAPTER 5: RESULTS AND DISCUSSION

5.1. Introduction
The objective of this section is to outline the specific results of the research endeavour and establish an
insightful discussion surrounding the topic at hand. It must kindly be noted that this project had a social
and technical side to it. The next section specifically focuses on the results of the social research and
marries the findings with the technical implementation of the project.

5.2. Results

The aim of the research was to determine the extent to which the knowledge-skill gap exists, and to
investigate the specific areas that make up the gap. Consequently, a questionnaire was crafted and curated
to meet this specific objective. The sections to follow outline the results of the questionnaire. This
questionnaire can be found at the end of this document, Appendix A.

The questionnaire was dispatched to the student population via WhatsApp groups, and all were invited to
participate in the questionnaire. From the invitation to participate, only 14 responses were submitted. Of
the responses, 35.7% were 4th Year students, 13.3% were 3rd Year students and 50% were 2nd Year
students. No 1st Year student participated in the questionnaire unfortunately.

Figure 49 - Questionnaire Overall Responses Statistics

The subsequent sections of the questionnaire aimed at determining the extent to which the knowledge-
skill gap exists. The main areas of interest were: Software Development, Database Systems, DevOps,
System & Server Administration, and Security. The questionnaire consisted of assessment-oriented

54
questions, which would be used to determine the knowledge level of respondents as it related to the IT
fields mentioned earlier.

Software Development: With regards to software development and familiarity with web development
frameworks, on average not more than 15% of the respondents were familiar with the top industry
frameworks like Spring Boot, Laravel and React.js. This indicated a potential skill gap because according
to [25], the top web development frameworks include: Express, Django, Ruby on Rails, Laravel, Spring,
and CodeIgniter.

Figure 50 - Statistics of familiarity with frameworks

Database Systems: With regards to database systems, on average 50% of respondents indicated that they
have sufficient knowledge with database management and administration. Though 64% indicated that
they are not familiar with SQL injection, a common security threat to web-based systems.

Figure 51 - Respondent s familiar with SQL

DevOps: With regards to system deployment and DevOps, on average about 70% of respondents
indicated that they are not familiar with how to deploy and manage application in the cloud. 71.4% said
that they do not know how to deploy application using FTP and SSH protocols. While 78.6% said that

55
they do not know how to deploy applications to the cloud using Infrastructure as a Service deployment
model. These skills are very relevant and highly needed in the industry today.

Figure 52 - Respondents familiar with clous application deployment

System & Server Administration: With regards to system administration, 92.3% of the respondents said
that they do not know how to setup and manage a LAMP stacks – normally used to deploy web
applications written in PHP. Another 57% of the respondents indicated that they are not familiar with
Linux system permissions and access control.

Figure 53 - Respondents who don't know how to setup a LAMP stack

Security: With regards to security, about 64.3% of the respondents indicated that they are not familiar
with SSL certificates. SSL certificates are a key component in security today, as they are used to secure
website traffic. Another 64.3% of respondents said that they do not know how to prevent or manage
them.

5.3. Discussion

From the results presented in the previous section, it is clearly apparent that there exists a knowledge-skill
gap between what students know and they need to thrive in industry. With reference to software
development for example, the majority of the respondents indicated that they do not know the top web
frameworks that would lead to getting a job. It is normally common to hear IT graduates complaining

56
about the scarcity of job in the field. The results above indicate one of the reasons, and that is, graduates
simply do not have the relevant skills.

Another area is database management and security. While a number of individuals are familiar with
database management and administration, there still remains a large number that are not familiar with
securing cloud-based applications and infrastructure. Added to this, is the large number of individuals
who are also not familiar with securing digital infrastructure and data. This inability to perform IT skills
hinders graduate’s ability to find jobs easily and work effectively.

This research project has aimed to create a platform that solves all the above problems to a reasonable
degree. The project would address the problems by making available a portable cloud platform, that could
easily be setup and managed by students themselves. During the process of setting up, managing and
monitoring the platform, students would acquire comprehensive knowledge into software development,
DevOps, database management, and security. This would evidently cause students to improve their skills.

This approach to addressing the knowledge-skill gap is part of an effort to administer education or
training using the project-based learning approach. This approach is very effective, as it causes learners to
engage more fully in educative practices, thus leading to more effective training. Training is deemed
effective since it causes students to acquire skills relevant to the industry.

5.4. Summary

From the above results and discussions, it is evident that truly there exists a knowledge-skill gap.
Through the research conducted and the skill assessment questionnaire administered, the research
validated the existence of the problem. Further, the researcher outlined a means of bridging the
knowledge-skill gap. This would be done by using a project-based learning approach to student training
that used an active learning platform, the one which was built during this project.

CHAPTER 6: CONCLUSION
6.1. Introduction
This chapter points out the achievements of the project, limitations of the system, the learning experience
that the developer gathered during the time he worked on this project, as well as whether the system
solved problem it was built to solve or not. It also dives into looking at the possible opportunities for
future enhancement of the system.

6.2. Success Accomplished


The author, based success of the project on whether its objectives were achieved. Just to recapitulate, the
objectives of the system were as follow:

1. To create a portable cloud platform to aid students with their project-based trainings.

57
2. To provide a portal to allow students to easily deploy web application projects on the
cloud platform.
3. To provide a platform for students to practice security skills in a controlled environment.

The above objectives were satisfied to a reasonable degree. The exact way this was accomplished will be
explained in the paragraphs to follow. Each paragraph will highlight how each objective was met.

The first objective was satisfied by creating a portable cloud platform manager. This comprised of a set of
software components that would facilitate cloud computing to some degree, though not completely. Two
key software components were developed, the Core component and the Engine. The Engine component
was responsible for resource management, while the Core provided an interface for users to access these
resources on-demand.

The second objective was met by means of the Core Component. It provided an intuitive way of allowing
students to deploy their web-based applications. Two main features of the Core component made this
possible. The first feature was the Database Management section. This section made it possible for users
to request a database on-demand. The necessary credentials would then be revealed to the user when they
needed them, including code snippets to be used when connecting to the database from code.

The second feature that contributed to the objective being met, was the Website Management section.
This section made it possible to provision a website. What this would do is, it would firstly allocate
resources on the filesystem, then open a port through the firewall to allow network traffic, and then
configure the web server to direct network traffic to the web application. Then finally index the site on
ITP search (a local website search engine) for easy accessibility by other users.

The third objective was met by: (1) making the project open source. This met that students in the security
field could explore the codebase for vulnerabilities. These could then be exploited in a controlled
environment, then formally reported. (2) the fact that the project was made open source and portable,
meant that students in the security field could easily setup the cloud environment in a virtual machine.
Upon setting up this environment, the students could then perform penetration tests and hack into the
system.

This success achieves the objectives that were set to be achieved at the end of the project implementation.

6.3. Limitations of System


Despite possessing the core features it was designed to have, the system has quite a number of
limitations. The system’s limitations are listed below:

i. Virtualization
For a computing system to be characterised as a cloud computing platform, it must implement
virtualization of computing resources like compute, memory, storage and networking. These

58
features were not implemented in the system developed. Some reasons for this were: time
constraints, hardware limitations and financing.
ii. Logging
A comprehensive logging mechanism to allow end users to view error and access logs, was not
implemented. This is an essential component of a standard cloud computing platform.
iii. Resource Usage Monitoring
Real-time resource usage monitoring was not implemented. Resource usage monitoring is a
fundamental component of cloud computing platforms. This is because it enables insights into
resource utilization, and user traffic. Thus, enabling better decision making towards how best to
scale the applications and infrastructure that end users deploy.
iv. Identity and Access Management
User access to virtualized resources was not implemented completed. At the time of writing this
report, only authentication was added as a security measure to the clous platform. Beyond that,
no further access control facilities were added to the developer console.
v. Backups
Backup mechanisms were not implemented. Backups are essential in cloud computing
environments because disasters can occur at any point, unannounced. Such disaster may be cause
by nature, hacking attacks, hardware failure and human error.

6.4. Future Enhancements


The following features listed below will be added to the application as enhancements in the
future:

i. Provisioning of virtual machines based on user requirements on demand.


ii. Provisioning of virtual storage blocks on demand.
iii. Provisioning of managed serverless functions.
iv. Facilities to deploy containerized applications using docker.
v. Provisioning of load balancing and creation of Virtual Private Networks.
vi. Provisioning of managed database instances.
vii. Facilities to create backups of virtual machines, storage blocks, managed databases and
serverless functions.
viii. Resource usage monitoring portal for all provisioned resources.
ix. Identity and access management facilities to enhance security.

59
6.5. Recommendations
For this project to impact students and narrow the knowledge-skill gap, it needs to be deployed within the
premises of the university, in this case, the Zambia University College of Technology campus. Thus, the
author strongly recommends that this cloud computing platform for student training be deployed and
continuously maintained by students themselves. Such course of action will cause students to improve in
their technical and problem-solving skills, and thus bridge the gap between what students learn and they
need for industry.

REFERENCES

[1] J. S. a. T. P. a. D. D. W. a. M. B. E. a. F. P. M. a. Y. D. Vogler, “The hard work of soft skills: augmenting


the project-based learning experience with interdisciplinary teamwork,” Instructional Science, pp.
457- 488, 1 June 2018.

[2] P. G. a. N. S. a. L. S. P. a. W. Admiraal, “A review of project-based learning in higher education:


Student outcomes and measures,” International Journal of Educational Research, vol. 102, p.
101586, 2020.

[3] B. A. a. K. S. a. P. Pons, “Design and evaluation of a microprocessor course combining three


cooperative methods: SDLA, PjBL and CnBL,” Computers & Education, vol. 57, no. 3, pp. 1876-1884,
2011.

[4] L. M. Holmes, The effects of project based learning on 21 st century skills and No Child Left Behind
accountability standards, University of Florida, 2012.

[5] S. Bell, “Project-based learning for the 21st century: Skills for the future,” Clearing House, vol. 83,
no. 2, pp. 39 - 43, 2010.

[6] J. S. a. S. N. Krajcik, Project-Based Learning, 2 ed., R. K. Sawyer, Ed., Cambridge: Cambridge


University Press, 2014, p. 275–297.

[7] R. A. Ralph, “Post secondary project-based learning in science, technology, engineering and
mathematics,” Journal of Technology and Science Education, vol. 6, no. 1, pp. 26 - 35, 2016.

60
[8] Y. A. a. K. Kültür, Improving the Transition from Higher Education to Employment: A Review of
Current Policies, Singapore: Springer Nature Singapore, 2022, pp. 103 -129.

[9] A. J.-M. M. L. P.-F. H. M.-M. J. L. SANCHEZ-ROMERO, “Design and Application of Project-Based


Learning Methodologies for Small Groups Within Computer Fundamentals Subjects,” IEEE Access,
vol. 7, pp. 12456 - 12466, 2019.

[1 Y. T. Akharraz Mohamad, “A Review of Literature on Project-Based Learning inside Language


0] Education,” Turkish Online Journal of English Language Teaching, vol. 6, no. 2, pp. 79 - 105, 2021.

[1 L. T. K. Thu, “PROJECT-BASED LEARNING IN THE 21ST CENTURY: A REVIEW OF DIMENSIONS FOR


1] IMPLEMENTATION IN UNIVERSITY-LEVEL TEACHING AND LEARNING,” in 4th ICEAC International
Conference on English Across Cultures, Ho Chi Minh City, 2018.

[1 R. a. S.-B. M. Hanney, “The problem of projects: understanding the theoretical underpinnings of


2] project-led PBL,” London Review of Education, vol. 11, pp. 7-19, March 2013.

[1 A. Intykbekov, “Teacher perceptions of project-based learning in a Kazakh-Turkish Lyceum in the


3] northern part of Kazakhstan,” Nazarbayev University Graduate School of Education, Astana, 2017.

[1 A. Kılınç, “Can project-based learning close the gap? Turkish student teachers and proenvironmental
4] behaviours,” International Journal of Environmental & Science Education, vol. 5, no. 4, pp. 495-509,
2010.

[1 T. H. M. Jason D. McKibben, “The Effect of Authenticity on Project-Based Learning: A Quasi-


5] Experimental Study ofSTEM Integrationin Agriculture,” Journal of Agricultural Education, vol. 62, no.
1, pp. 144 - 155, 2021.

[1 R. A. Ralph, “POST SECONDARY PROJECT-BASED LEARNING IN SCIENCE, TECHNOLOGY,


6] ENGINEERING AND MATHEMATICS,” Journal of Technology and Science Education , vol. 6, no. 1, pp.
26 - 36, 2015.

[1 X. J. Y. C. X. L. B. J. Bing Lia, “Project-based learning in a collaborative group can enhance student


7] skill and ability in the biochemical laboratory: a case study,” Journal of Biological Education, vol. 54,
no. 2020, pp. 404 - 418, 2020.

[1 P. a. M. P. Narang, “Software Development Methodologies: Trending from Traditional to DOSE - An


8] Empirical Study,” in 2022 IEEE Delhi Section Conference (DELCON), 2022.

[1 S. a. S. S. a. A.-N. H. Al-Saqqa, “Agile Software Development: Methodologies and Trends,”


9] International Journal of Interactive Mobile Technologies (iJIM), vol. 14, p. 246, July 2020.

[2 S. a. Q. U. a. H. T. a. W. M. Hassan, “Software Reverse Engineering to Requirement Engineering for


0] Evolution of Legacy System,” 2015.

[2 J. T. Catanio, “Requirements Analysis: A Review,” 2006.


1]

[2 P. T. KSHIRASAGAR NAIK, “Unit Testing,” in SOFTWARE TESTING AND QUALITY ASSURANCE Theory
2] and Practice, New Jersey, John Wiley & Sons, Inc, 2008, pp. 51 - 87.

[2 P. T. KSHIRASAGAR NAIK, “System Integration Testing,” in SOFTWARE TESTING AND QUALITY


3] ASSURANCE Theory and Practice, New Jersey, A JOHN WILEY & SONS, INC., PUBLICATION, 2008, pp.

61
158 - 173.

[2 P. T. KSHIRASAGAR NAIK, “System Test Categories,” in SOFTWARE TESTING AND QUALITY


4] ASSURANCE Theory and Practice, New Jersey, A JOHN WILEY & SONS, INC., PUBLICATION, 2008, pp.
192 - 194.

[2 P. Lombardi, “13 Most Popular Web Development Frameworks (With Tips),” Indeed, 13 December
5] 2022. [Online]. Available: https://www.indeed.com/career-advice/career-development/most-
popular-web-development-frameworks. [Accessed 7 12 2023].

[2 H. A. A. Salah Abdirahman Farah, “A STUDY ON THE CAUSES OF UNEMPLOYMENT AMONG


6] UNIVERSITY GRADUATES IN KENYA: A CASE OF GARISSA COUNTY, KENYA,” European Journal of
Social Science Studies, vol. 3, no. 1, pp. 182-193, 2018.

[2 B. A. a. K. S. a. P. Pons, “Design and evaluation of a microprocessor course combining three


7] cooperative methods: SDLA, PjBL and CnBL,” Computers & Education, vol. 57, no. 3, pp. 1876-1884,
2011.

[2 P. Bhandari, “Questionnaire Design | Methods, Question Types, Steps,” Scribbr, 15 July 2021.
8] [Online]. Available: https://www.scribbr.com/methodology/questionnaire/. [Accessed 25 January
2022].

[2 S. McCombes, “What Is a Literature Review | Step-by-Step Guide & Examples,” Scrbbr, 22 Feruary
9] 2019. [Online]. Available: https://www.scribbr.com/dissertation/literature-review/#:~:text=A
%20literature%20review%20is%20a%20survey%20of%20scholarly%20sources%20(such,in
%20relation%20to%20existing%20knowledge. [Accessed 25 January 2022].

Appendix
Appendix A: Questionnaire
Questionnaire Title: IT Skill & Knowledge Level Assessment
Software Development
1. Kindly specify year of study:
o 1st Year
o 2nd Year
o 3rd Year
o 4th Year
o 5th Year
2. Kindly mark the programming languages you are familiar with
o Java
o C++
o Python
o PHP
o JavaScript
o Go
o TypeScript

62
o Dart
o None
3. Which web frameworks are you familiar with?
o Spring Boot
o Laravel
o React
o Angular
o Vue
o CodeIgniter 4
o Django
o Flask
o Express.js
o Next.js
o None
4. Are you familiar with Version Control Systems like Git and GitHub?
o Yes
o No
5. Are you familiar with architectural design patterns like Model View Controller, Model View and
ViewMode Controller?
o Yes
o No
6. Are you familiar with Micro-services and the Service Oriented Architecture (RESTful APIs and
SOAP)?
o Yes
o No
7. Are you familiar with Software Testing?
o Yes
o No
8. Are you familiar with and have carried out software testing using approaches like unit testing,
integration testing and regression testing?
o Yes
o No
9. Are you familiar with the Clean Code design principles like SOLID and DRY?
o Yes
o No
10. Which software design tools are you familiar with?
o Adobe XD
o Figma
o Creately
o EdrawMax
11. Select what are you able to do and actually produce a usable product:
o Mobile App Development with Android Studio and Java
o Mobile App Development with Android Studio and Kotlin
o Mobile App Development with Flutter
o Mobile App Development with React Native
o Mobile App Development with Ionic
o iOS development with Swift
o Website Development - Backend

63
o Website Development - Frontend
o Website Development - Fullstack
o AI - Machine Learning
o AI - Data Science
o AI - NLP
o AI - Large Language Models

Database System
12. Which database technologies are you familiar with:
o MySQL
o MariaDB
o MongoDB
o Reddis
o Cassandra
13. Are you familiar with and capable of carrying out Database Normalization?
o Yes
o No
14. Are you familiar with and capable of carrying out Database De-normalization?
o Yes
o No
15. Are you familiar with user privileges in database administration?
o Yes
o No
16. Are you familiar with SQL injection?
o Yes
o No
17. Are you capable of protecting your applications against SQL injection?
o Yes
o No
18. Are you familiar with and are capable of creating backups and restoring databases?
o Yes
o No
19. Are you familiar with SQL Data Definition Language?
o Yes
o No
20. Are you familiar with SQL Data Manipulation Language?
o Yes
o No

DevOps
21. Have you deployed a website to a web hosting provider?
o Yes
o No
22. Are you familiar with the cloud computing?
o Yes
o No
23. Which of the following cloud computing providers are you familiar with?
o AWS

64
o Google Cloud
o Microsoft Azure
o Digital Ocean
o Alibaba Cloud
o IBM Cloud
24. Are you familiar with deploying applications to the cloud using Infrastructure as a Service (IaaS)
deployment model (creating and using Virtual Machines in the cloud)?
o Yes
o No
25. Are you familiar with the concept of distributed computing in cloud applications? (loading
balancing and horizontal scaling)
o Yes
o No
26. Are you familiar with remote computer control using Secure Shell (SSH)?
o Yes
o No
27. Are you familiar with remote file transfer using the ftp and sftp protocols via clients such as
FileZilla?
o Yes
o No

System & Server Administration


28. Are you familiar with the process of installing software components on a Linux system via the
terminal?
o Yes
o No
29. Are you able to configure any software given detailed instructions?
o Yes
o No
30. Have you installed a LAMP stack from start to finish on a Linux system?
o Yes
o No
31. Do you understand permissions on Linux systems?
o Yes
o No
32. Are you familiar with Linux user account management? (creating, deleting and managing user
groups and permissions)
o Yes
o No
33. Are you familiar with the concept of Virtual Hosts (Apache 2) or Server Blocks (Nginx)?
o Yes
o No
34. Are you familiar with the concept of logs and logging with regards to systems?
o Yes
o No
35. Are you familiar with domain names?
o Yes
o No
36. Are you familiar with name servers with regards to DNS?

65
o Yes
o No
37. Have you bought a domain name in the past and configured it to point to a website?
o Yes
o No
38. Have you purchased an email hosting plan in the past for an organization or for personal use?
o Yes
o No

Security
39. Are you familiar with DoS attacks and how to manage them?
o Yes
o No
40. Are you familiar with Phishing attacks and how to prevent them?
o Yes
o No
41. Are you familiar with SSL Certificates and how to get one?
o Yes
o No
42. Are you familiar with SQL injections and how to protect against them?
o Yes
o No
43. Are you familiar with Role Based Access Control?
o Yes
o No
44. Are you familiar with Multi Factor Authentication (2FA)?
o Yes
o No
45. Are you familiar with Web Scrapping and how to prevent it?
o Yes
o No

Appendix B: Gannt Chart

The diagram below depicts the schedule of activities. From Preparation of data collections and analysis
instruments to finalization of the Project Report Document.

66
Appendix C: Budget

The final budget for this project consisted of the following items:

S/N Item Name Amount


1 Internet Data ZMW 1,500.00
2 Stationery and Binding ZMW 1,050.00
3 Project Equipment:
- Digital Ocean Droplet ZMW 231.74

Total ZMW 2,781.74

Appendix D: Essential Source Code Segments

The ITP Cloud Platform was made up of two main sub systems. The are the ITP Code and the ITP
Engine. The code snippets to follows will be grouped based on sub system.

ITP Core
ITP Core was built using CodeIgniter4, which utilizes the MVC pattern. The code snippets to follow will
only highlight the controller logic and some JavaScript code that interacts with the backend.

Code Snippet 1: WebsiteMangementController.php


<?php

namespace App\Controllers\DevConsole;

use App\Controllers\BaseController;

use App\Libraries\ITPEngineProxy;

use App\Models\ManagedWebsiteModel;

use CodeIgniter\HTTP\ResponseInterface;

use Config\Services;

use ReallySimpleJWT\Token;

class WebsiteManagementController extends BaseController

private $data;

private ManagedWebsiteModel $managedWebsiteModel;

public function __construct()

$this->data = [];

67
$this->managedWebsiteModel = new ManagedWebsiteModel();

public function getWebsites()

$this->data['page'] = 'websites';

$this->data['title'] = 'Developer Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

$this->data['websites'] = $this->managedWebsiteModel->where('developer_id', auth()->user()->id)->findAll();

return view('dev_console/header', $this->data) .

view('dev_console/websites/index') .

view('dev_console/footer');

public function newWebsite()

$this->data['page'] = 'websites';

$this->data['title'] = 'Developer Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

return view('dev_console/header', $this->data) .

view('dev_console/websites/new_website') .

view('dev_console/footer');

public function newWebsiteAJAX()

if ($this->request->getPost()) {

// Step 1: Check if website name is taken

$websiteName = (string) $this->request->getPost('website_name');

$isTaken = $this->managedWebsiteModel->isNameTaken($websiteName);

if ($isTaken) {

return Services::response()

->setJSON(

'success' => false,

68
'message' => 'Message: The provided Website Name is taken 😬. Please pick a different one. <br>
Timestamp: ' . date('H:i') . ' hrs.'

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

// Step 2: Check if uploaded logo is valid

$input_logo = $this->validate([

'logo' => [

'uploaded[logo]',

'mime_in[logo,image/jpg,image/jpeg,image/png]',

'max_size[logo,2024]',

]);

if (!$input_logo) {

return Services::response()

->setJSON(

'success' => false,

'message' => 'Message: The provided Website Logo does not meet our standards. 😬. Please pick a
different one that is not more than 2MB and is a png, jpg or jpeg file.<br> Timestamp: ' . date('H:i') . ' hrs.'

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

// Step 3: Upload the logo

$websiteLogo = '';

if ($this->request->getFile('logo')->getPath() != '') {

$logo = $this->request->getFile('logo');

$websiteLogo = $logo->getRandomName();

$logo->move('../public/assets/uploads/', $websiteLogo);

69
// Step 4: Save the website

$previousSiteID = $this->managedWebsiteModel->getInsertID();

$db = \Config\Database::connect();

$db->transStart();

$userPayload = Token::getPayload(auth()->user()->username);

$websiteName = str_replace(' ', '_', strtolower($websiteName));

$websiteName = preg_replace('/[^A-Za-z0-9\-]/', '', $websiteName);

if (

$this->request->getPost('website_tech_stack') == 'codeigniter4' ||

'laravel'

){

$this->managedWebsiteModel->insert([

'developer_id' => auth()->user()->id,

'md_ws_name' => $websiteName,

'md_ws_logo' => $websiteLogo,

'md_ws_description' => $this->request->getPost('website_description'),

'md_ws_type' => 'developer-site',

'md_ws_tech_stack' => $this->request->getPost('website_tech_stack'),

'md_ws_vhost_identifier' => 'md_ws_' . $websiteName,

'md_ws_website_absolute_path' => '/home/' . $userPayload['linuxUsername'] . '/ftp/websites/md_ws_' .


$websiteName,

]);

$db->transComplete();

$this->managedWebsiteModel->save([

'md_ws_id' => $this->managedWebsiteModel->getInsertID(),

'md_ws_port_number' => $this->managedWebsiteModel->getInsertID() + 8004,

]);

// Step 5: Create the website phyically

$website = $this->managedWebsiteModel->find($this->managedWebsiteModel->getInsertID());

$has_public_folder = $this->shouldWebsiteHavePublicFolder($website['md_ws_tech_stack']);

ITPEngineProxy::createWebsite([

'linuxUser' => $userPayload['linuxUsername'],

70
'portNumber' => $website['md_ws_port_number'],

'vhostIdentifier' => $website['md_ws_vhost_identifier'],

'websiteAbsolutePath' => '/home/' . $userPayload['linuxUsername'] . '/ftp/websites/md_ws_' .


$websiteName,

'hasPublicFolder' => $has_public_folder

]);

// Final Step

return Services::response()

->setJSON(

'success' => true,

'message' => 'Message: Congratulation 🥳🥳, your website has been provisioned. Head over to the File
Management section and deploy your website. <br> Timestamp: ' . date('H:i') . ' hrs.'

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

} else {

return redirect()->back();

public function editWebsite()

$this->data['page'] = 'websites';

$this->data['title'] = 'Developer Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

return view('dev_console/header', $this->data) .

view('dev_console/websites/edit_website') .

view('dev_console/footer');

public function deleteWebsite()

$this->data['page'] = 'websites';

71
$this->data['title'] = 'Developer Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

return view('dev_console/header', $this->data) .

view('dev_console/websites/delete_website') .

view('dev_console/footer');

private function shouldWebsiteHavePublicFolder(string $website_stack = ''): bool

$has_public_folder = false;

switch ($website_stack) {

case 'codeigniter4':

$has_public_folder = true;

break;

case 'laravel':

$has_public_folder = true;

break;

default:

$has_public_folder = false;

break;

return $has_public_folder;

Code Snippet 2: DatabaseMangementController.php


<?php

namespace App\Controllers\DevConsole;

use App\Controllers\BaseController;

use App\Libraries\ITPEngineProxy;

use App\Models\ManagedDatabaseModel;

use CodeIgniter\HTTP\ResponseInterface;

use Config\Services;

use ReallySimpleJWT\Token;

72
class DatabaseManagementController extends BaseController

private array $data;

private ManagedDatabaseModel $databaseModel;

public function __construct()

$this->data = [];

$this->databaseModel = new ManagedDatabaseModel();

public function getDatabases()

$this->data['page'] = 'databases';

$this->data['title'] = 'Developer Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

$this->data['databases'] = $this->databaseModel->getAllDatabasesFor(auth()->user()->id);

$this->data['userPayload'] = Token::getPayload(auth()->user()->username);

return view('dev_console/header', $this->data) .

view('dev_console/databases/index') .

view('dev_console/footer');

public function newDatabase()

$userPayload = Token::getPayload(auth()->user()->username);

if ($this->request->is('post')) {

// Step 0: Validate input

$validation = \Config\Services::validation();

$validation->setRule('database_name', 'Database name', 'required|max_length[30]|min_length[3]|alpha');

if ($validation->withRequest($this->request)->run() == false) {

return Services::response()

->setJSON(

'success' => false,

73
'message' => 'Message: The provided Database Name is invalid 😬. Make sure that the name is
between 3 and 30 characters, and has letters only.<br> Timestamp: ' . date('H:i') . ' hrs.'

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

// Step 1: Check if database name is taken

$databaseName = (string) $this->request->getPost('database_name');

$databaseName = strtolower($databaseName);

$databaseName = $userPayload['dbUsername'] . '_' . $databaseName;

$isTaken = $this->databaseModel->isNameTaken($databaseName);

if ($isTaken) {

return Services::response()

->setJSON(

'success' => false,

'message' => 'Message: The provided Database Name is taken 😬. Please pick a different one.<br>
Timestamp: ' . date('H:i') . ' hrs.'

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

// Step 2: Index database

$this->databaseModel->insert([

'developer_id' => auth()->user()->id,

'md_db_name' => $databaseName

]);

// Step 3: Create database on Engine

ITPEngineProxy::createDatabase([

'databaseName' => $databaseName,

]);

// Final Step

return Services::response()

->setJSON(

74
[

'success' => true,

'message' => 'Message: Congratulation 🥳🥳, your database has been provisioned.<br> Timestamp: ' .
date('H:i') . ' hrs.'

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

public function synchronizeDatabases()

$db = \Config\Database::connect();

$userPayload = Token::getPayload(auth()->user()->username);

$databases = $db->query('SHOW DATABASES')->getResultArray();

foreach ($databases as $database) {

// filter by databases having the prefix of the user's username

if (strpos($database['Database'], $userPayload['dbUsername']) !== false) {

// check if the database is already indexed

$isIndexed = $this->databaseModel->isNameTaken($database['Database']);

if (!$isIndexed) {

$this->databaseModel->insert([

'developer_id' => auth()->user()->id,

'md_db_name' => $database['Database']

]);

return redirect()->to('console/databases');

Code Snippet 3: FileManagementController.php


<?php

namespace App\Controllers\DevConsole;

75
use App\Controllers\BaseController;

use ReallySimpleJWT\Token;

class FileManagementController extends BaseController

private $data;

public function __construct()

$this->data = [];

public function getManagers()

$this->data['page'] = 'file_management';

$this->data['title'] = 'Developer Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

$this->data['userPayload'] = Token::getPayload(auth()->user()->username);

return view('dev_console/header', $this->data) .

view('dev_console/file_management/index') .

view('dev_console/footer');

Code Snippet 4: DevConsoleController.php


<?php

namespace App\Controllers\DevConsole;

use App\Controllers\BaseController;

class DevConsoleController extends BaseController

private $data;

public function __construct()

$this->data = [];

76
public function index()

$this->data['page'] = 'console_home';

$this->data['title'] = 'Developer Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

return view('dev_console/header', $this->data) .

view('dev_console/index') .

view('dev_console/footer');

Code Snippet 5: UserManagementController.php

<?php

namespace App\Controllers\ModeratorConsole;

use App\Controllers\BaseController;

use App\Libraries\ITPEngineProxy;

use App\Models\UserModel;

use CodeIgniter\HTTP\ResponseInterface;

use Config\Services;

use ReallySimpleJWT\Token;

class UserManagementController extends BaseController

private $data;

public function __construct()

$this->data = [];

public function getUsers()

$this->data['page'] = 'users';

$this->data['title'] = 'Moderator Console | ITP Cloud';

77
$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

$this->data['users'] = (new UserModel())->findAll();

return view('moderator_console/header', $this->data) .

view('moderator_console/user_management/users') .

view('moderator_console/footer');

public function getUser(int $user_id = 0)

$this->data['page'] = 'users';

$this->data['title'] = 'Moderator Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

$this->data['user'] = (new UserModel())->find($user_id);

return view('moderator_console/header', $this->data) .

view('moderator_console/user_management/user') .

view('moderator_console/footer');

public function getKycApprovals()

$this->data['page'] = 'kyc';

$this->data['title'] = 'Moderator Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

$this->data['users'] = (new UserModel())->where('account_status', 'under_review')->findAll();

return view('moderator_console/header', $this->data) .

view('moderator_console/user_management/kyc_approvals') .

view('moderator_console/footer');

public function getKycUserDetails(int $user_id = 0)

$this->data['page'] = 'kyc';

$this->data['title'] = 'Moderator Console | ITP Cloud';

78
$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

$this->data['user'] = (new UserModel())->where('account_status', 'under_review')->find($user_id);

$this->data['csrf_token'] = csrf_hash();

return view('moderator_console/header', $this->data) .

view('moderator_console/user_management/kyc_candidate') .

view('moderator_console/footer');

public function approveUser()

if ($this->request->getPost()) {

// Verify Moderator Password

$credentials = [

'email' => auth()->user()->email,

'password' => $this->request->getPost('password')

];

$validCreds = auth()->check($credentials);

if (!$validCreds->isOK()) {

return Services::response()

->setJSON(

'success' => false,

'message' => 'Log: The password is <span class="text-danger">Incorrect</span> 😬. Please try


again.<br> Timestamp: ' . date('H:i') . ' hrs.'

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

// Approve User Registration

$user_id = (int) $this->request->getPost('user_id');

$secureUserPayload = $this->generateSecureUserPayloadForUser($user_id);

$db = \Config\Database::connect();

$db->transStart();

// Approve User Registration

79
$users = auth()->getProvider();

$user = $users->findById($user_id);

$user->fill([

'account_status' => 'active',

'username' => $secureUserPayload,

]);

$users->save($user);

// Create User System Account

$userPayload = Token::getPayload($secureUserPayload);

$result = ITPEngineProxy::createSystemAccounts([

"linuxUsername" => $userPayload['linuxUsername'],

"linuxPassword" => $userPayload['linuxPassword'],

"ftpUsername" => $userPayload['ftpUsername'],

"ftpPassword" => $userPayload['ftpPassword'],

"dbUsername" => $userPayload['dbUsername'],

"dbPassword" => $userPayload['dbPassword'],

"fileBrowserUsername" => $userPayload['fileBrowserUsername'],

"fileBrowserPassword" => $userPayload['fileBrowserPassword'],

"fileBrowserPort" => $userPayload['fileBrowserPort'],

"fileBrowserBasePath" => $userPayload['fileBrowserBasePath'],

]);

// Notify user about action

$email = \Config\Services::email();

$email->setFrom('[email protected]', 'ITP Cloud Moderator');

$email->setTo($user->email);

$email->setSubject('Developer Application Approved');

$email->setMessage(view('moderator_console/user_management/emails/user_approval_email'));

$email->send();

$db->transComplete();

return Services::response()

->setJSON(

'success' => true,

80
'message' => 'Log: User <span class="text-success">account successfully created</span>. The
corresponding system accounts have been initialized too.<br> Timestamp: ' . date('H:i') . ' hrs.',

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

} else {

return redirect()->back();

public function rejectUser()

if ($this->request->getPost()) {

$credentials = [

'email' => auth()->user()->email,

'password' => $this->request->getPost('password')

];

$validCreds = auth()->check($credentials);

if (!$validCreds->isOK()) {

return Services::response()

->setJSON(

'success' => false,

'message' => 'Log: The password is <span class="text-danger">Incorrect</span> 😬. Please try


again.<br> Timestamp: ' . date('H:i') . ' hrs.'

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

$db = \Config\Database::connect();

$db->transStart();

// Reject User Registration

$users = auth()->getProvider();

$user = $users->findById($this->request->getPost('user_id'));

$user->fill([

81
'account_status' => 'rejected',

]);

$users->save($user);

// Notify user about action

$email = \Config\Services::email();

$email->setFrom('[email protected]', 'ITP Cloud Moderator');

$email->setTo($user->email);

$email->setSubject('Application Declined');

$email->setMessage(view('moderator_console/user_management/emails/user_rejection_email'));

$email->send();

$db->transComplete();

return Services::response()

->setJSON(

'success' => true,

'message' => 'Log: User\'s application has been declined and notified of it.<br> Timestamp: ' .
date('H:i') . ' hrs.',

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

public function requestResubmitKyc()

if ($this->request->getPost()) {

$credentials = [

'email' => auth()->user()->email,

'password' => $this->request->getPost('password')

];

$validCreds = auth()->check($credentials);

if (!$validCreds->isOK()) {

return Services::response()

->setJSON(

82
'success' => false,

'message' => 'Log: The password is <span class="text-danger">Incorrect</span> 😬. Please try


again.<br> Timestamp: ' . date('H:i') . ' hrs.'

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

$db = \Config\Database::connect();

$db->transStart();

// Reject User Registration

$users = auth()->getProvider();

$user = $users->findById($this->request->getPost('user_id'));

try {

unlink('../public/assets/uploads/' . $user->student_id_document);

unlink('../public/assets/uploads/' . $user->avatar);

} catch (\Throwable $th) {

$user->fill([

'account_status' => 'pending',

'student_id' => '',

'student_id_document' => '',

'institution' => '',

'country' => '',

'avatar' => ''

]);

$users->save($user);

// Notify user about action

$email = \Config\Services::email();

$email->setFrom('[email protected]', 'ITP Cloud Moderator');

$email->setTo($user->email);

$email->setSubject('Resubmit KYC Information');

$email->setMessage(view('moderator_console/user_management/emails/user_kyc_submission_email'));

$email->send();

$db->transComplete();

83
return Services::response()

->setJSON(

'success' => true,

'message' => 'Log: User has been requested to resubmit KYC details.<br> Timestamp: ' . date('H:i') .
' hrs.',

->setStatusCode(ResponseInterface::HTTP_ACCEPTED);

private function generateSecurePassword()

$password = '';

$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#^()_';

for ($i = 0; $i < 16; $i++) {

$password .= $chars[rand(0, strlen($chars) - 1)];

return $password;

private function generateSecureUserPayloadForUser(int $user_id = 0): string

$linux_username = 'itp_user_' . $user_id;

$linux_password = $this->generateSecurePassword();

$ftp_username = $linux_username;

$ftp_password = $linux_password;

$db_username = $linux_username;

$db_password = $this->generateSecurePassword();

$file_browser_username = $linux_username;

$file_browser_password = $this->generateSecurePassword();

$file_browser_base_path = '/home/' . $linux_username . '/ftp/websites';

$user_payload = [

'linuxUsername' => $linux_username,

'linuxPassword' => $linux_password,

84
'ftpUsername' => $ftp_username,

'ftpPassword' => $ftp_password,

'dbUsername' => $db_username,

'dbPassword' => $db_password,

'fileBrowserUsername' => $file_browser_username,

'fileBrowserPassword' => $file_browser_password,

'fileBrowserPort' => '',

'fileBrowserBasePath' => $file_browser_base_path

];

$secret = env('userTokenSecret');

$token = Token::customPayload($user_payload, $secret);

return $token;

Code Snippet 6: UserManagementController.php

<?php

namespace App\Controllers\ModeratorConsole;

use App\Controllers\BaseController;

use App\Models\ManagedDatabaseModel;

use App\Models\ManagedWebsiteModel;

class ModeratorDashboardController extends BaseController

private array $data;

private ManagedWebsiteModel $websiteModel;

private ManagedDatabaseModel $databaseModel;

public function __construct()

$this->data = [];

$this->websiteModel = new ManagedWebsiteModel();

$this->databaseModel = new ManagedDatabaseModel();

85
public function index()

$this->data['page'] = 'moderator_console';

$this->data['title'] = 'Moderator Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

return view('moderator_console/header', $this->data) .

view('moderator_console/index') .

view('moderator_console/footer');

public function getWebsites()

$this->data['page'] = 'websites';

$this->data['title'] = 'Moderator Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

$this->data['websites'] = $this->websiteModel->getAllWebsites();

return view('moderator_console/header', $this->data) .

view('moderator_console/websites') .

view('moderator_console/footer');

public function getDatabases()

$this->data['page'] = 'databases';

$this->data['title'] = 'Moderator Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

$this->data['databases'] = $this->databaseModel->getAllDatabases();

return view('moderator_console/header', $this->data) .

view('moderator_console/databases') .

view('moderator_console/footer');

86
Code Snippet 7: ModeratorDashboardController.php

<?php

namespace App\Controllers\ModeratorConsole;

use App\Controllers\BaseController;

use App\Models\ManagedDatabaseModel;

use App\Models\ManagedWebsiteModel;

class ModeratorDashboardController extends BaseController

private array $data;

private ManagedWebsiteModel $websiteModel;

private ManagedDatabaseModel $databaseModel;

public function __construct()

$this->data = [];

$this->websiteModel = new ManagedWebsiteModel();

$this->databaseModel = new ManagedDatabaseModel();

public function index()

$this->data['page'] = 'moderator_console';

$this->data['title'] = 'Moderator Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

return view('moderator_console/header', $this->data) .

view('moderator_console/index') .

view('moderator_console/footer');

public function getWebsites()

$this->data['page'] = 'websites';

$this->data['title'] = 'Moderator Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

87
$this->data['websites'] = $this->websiteModel->getAllWebsites();

return view('moderator_console/header', $this->data) .

view('moderator_console/websites') .

view('moderator_console/footer');

public function getDatabases()

$this->data['page'] = 'databases';

$this->data['title'] = 'Moderator Console | ITP Cloud';

$this->data['description'] = 'an open source miniature cloud platform for students by students 😏';

$this->data['databases'] = $this->databaseModel->getAllDatabases();

return view('moderator_console/header', $this->data) .

view('moderator_console/databases') .

view('moderator_console/footer');

Code Snippet 8: ITPEngineProxy.php

<?php

namespace App\Libraries;

/**

* Class ITPEngineProxy

* @Author: Aaron Mkandawire

* @Date: 2023-01-18 11:00:00

* @version: v1.0

* @description: This class is used to proxy the ITP Engine

* and provide a simple interface to the ITP Engine API

* for the rest of the application.

* @package App\Libraries

*/

class ITPEngineProxy

88
{

public static function createUserAccount(array $user = null): bool

$client = \Config\Services::curlrequest();

$response = $client->request(

'POST',

env('engineUrl') . '/api/v1/user-account/new',

'headers' => [

'Content-Type' => 'application/json'

],

'body' => json_encode($user)

);

if ($response->getStatusCode() == 200) {

return true;

} else {

return false;

public static function createDatabaseUser(array $user = null)

$client = \Config\Services::curlrequest();

$response = $client->request(

'POST',

env('engineUrl') . '/api/v1/database-user/new',

'headers' => [

'Content-Type' => 'application/json'

],

'body' => json_encode($user)

);

if ($response->getStatusCode() == 200) {

89
return true;

} else {

return false;

public static function createFtpAccount(array $user = null)

$client = \Config\Services::curlrequest();

$response = $client->request(

'POST',

env('engineUrl') . '/api/v1/ftp-account/new',

'headers' => [

'Content-Type' => 'application/json'

],

'body' => json_encode($user)

);

if ($response->getStatusCode() == 200) {

return true;

} else {

return false;

public static function createSystemAccounts(array $user = null)

ITPEngineProxy::createUserAccount($user);

ITPEngineProxy::createDatabaseUser($user);

ITPEngineProxy::createFtpAccount($user);

public static function createWebsite(array $website = null)

$client = \Config\Services::curlrequest();

$response = $client->request(

90
'POST',

env('engineUrl') . '/api/v1/website/new',

'headers' => [

'Content-Type' => 'application/json'

],

'body' => json_encode($website)

);

if ($response->getStatusCode() == 200) {

return true;

} else {

return false;

public static function createDatabase(array $database = null)

$client = \Config\Services::curlrequest();

$response = $client->request(

'POST',

env('engineUrl') . '/api/v1/database/new',

'headers' => [

'Content-Type' => 'application/json'

],

'body' => json_encode($database)

);

if ($response->getStatusCode() == 200) {

return true;

} else {

return false;

91
}

ITP Engine
ITP Engine was built using Spring Boot, which utilizes the MVC pattern and the N-Tire pattern. The
code snippets to follow will only highlight the controller logic, and the services code that interacts with
the Operating System through an OS Terminal library.

Code Snippet 1: UserAccountController.java

package org.itp.engine.useraccount;

import org.itp.engine.restful.ApiResponse;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.http.HttpStatus;

import org.springframework.http.ResponseEntity;

import org.springframework.web.bind.annotation.*;

@RestController

@CrossOrigin

@RequestMapping("api/v1/")

public class UserAccountController {

private final UserAccountService service;

@Autowired

public UserAccountController(UserAccountService service){

this.service = service;

@PostMapping("user-account/new")

public ResponseEntity<ApiResponse> createUser(@RequestBody UserAccount request){

this.service.createUser(request);

ApiResponse response = new ApiResponse(

"User account successfully created",

HttpStatus.OK.value()

);

return ResponseEntity.status(HttpStatus.OK).body(response);

@PostMapping("user-account/delete")

92
public ResponseEntity<ApiResponse> deleteUser(@RequestBody UserAccount request) {

this.service.deleteUser(request);

ApiResponse response = new ApiResponse(

"User account successfully deleted",

HttpStatus.OK.value()

);

return ResponseEntity.status(HttpStatus.OK).body(response);

Code Snippet 2: UserAccountService.java

package org.itp.engine.useraccount;

import org.itp.engine.osutils.OSTerminal;

import org.itp.engine.osutils.TerminalOperationSession;

import org.itp.engine.osutils.TerminalOperationSessionFactory;

import org.springframework.stereotype.Service;

@Service

public class UserAccountService {

public boolean createUser(UserAccount user){

TerminalOperationSession session = TerminalOperationSessionFactory

.getSessionWith("adduser "+ user.getLinuxUsername());

session

.addUserInput(user.getLinuxPassword())

.addUserInput(user.getLinuxPassword())

.addUserInput("")

.addUserInput("")

.addUserInput("")

.addUserInput("")

.addUserInput("")

.addUserInput("Y");

OSTerminal terminal = new OSTerminal();

terminal.setSession(session);

String output = terminal.executeSession();

93
return output.contains("Adding user");

public boolean deleteUser(UserAccount user) {

TerminalOperationSession session = TerminalOperationSessionFactory

.getSessionWith("bash");

session

.addUserInput("groupdel " + user.getFtpUsername() + "_n_www-data")

.addUserInput("userdel -r -f " + user.getLinuxUsername())

.addUserInput("systemctl restart vsftpd")

.addUserInput("systemctl reload apache2");

OSTerminal terminal = new OSTerminal();

terminal.setSession(session);

terminal.executeSession();

return true;

Code Snippet 3: FtpServerController.java

package org.itp.engine.ftp;

import org.itp.engine.restful.ApiResponse;

import org.itp.engine.useraccount.UserAccount;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.http.HttpStatus;

import org.springframework.http.ResponseEntity;

import org.springframework.web.bind.annotation.*;

@RestController

@RequestMapping("api/v1/")

@CrossOrigin

public class FtpServerController {

private final FtpServerService service;

@Autowired

public FtpServerController(FtpServerService service){

this.service = service;

94
}

@PostMapping("ftp-account/new")

public ResponseEntity<ApiResponse> createFtpAccount(@RequestBody UserAccount user){

this.service.createFtpAccount(user);

ApiResponse response = new ApiResponse(

"FTP account successfully created",

HttpStatus.OK.value()

);

return ResponseEntity.status(HttpStatus.OK).body(response);

Code Snippet 4: FtpServerService.java

package org.itp.engine.ftp;

import org.itp.engine.osutils.OSTerminal;

import org.itp.engine.osutils.TerminalOperationSession;

import org.itp.engine.osutils.TerminalOperationSessionFactory;

import org.itp.engine.useraccount.UserAccount;

import org.springframework.stereotype.Service;

@Service

public class FtpServerService {

public boolean createFtpAccount(UserAccount user){

TerminalOperationSession session = TerminalOperationSessionFactory

.getSessionWith("bash");

session

// Step 1: Create ftp directory

.addUserInput("mkdir /home/" + user.getFtpUsername() + "/ftp")

// Step 2: Set ownership, I also don't know why, but for security stuff I guess

.addUserInput("chown nobody:nogroup /home/" + user.getFtpUsername() + "/ftp")

.addUserInput("chmod a-w /home/" + user.getFtpUsername() + "/ftp")

// Step 3: Create the websites directory

.addUserInput("mkdir /home/" + user.getFtpUsername() + "/ftp/websites")

// Step 4: Create a shared group, for the new user and www-data aka apache2

95
.addUserInput("groupadd " + user.getFtpUsername() + "_n_www-data")

// Step 5: Add apache2 to the new shared group

.addUserInput("usermod -aG " + user.getFtpUsername() + "_n_www-data www-data")

// Step 6: Add user to the new shared group

.addUserInput("usermod -aG " + user.getFtpUsername() + "_n_www-data " + user.getFtpUsername())

// Step 7: Change ownership of the user's website directory, more security stuff

// The commands below supplement the vsftp configurations. They allow the user to upload

// files with group permissions applied already. This makes it possible for

// apache to scan the folder respond to requests.

.addUserInput("chown -R www-data:" + user.getFtpUsername() + "_n_www-data /home/" +


user.getFtpUsername())

.addUserInput("chmod 770 /home/" + user.getFtpUsername() + "/ftp/websites")

.addUserInput("chgrp -R " + user.getFtpUsername() + "_n_www-data /home/" + user.getFtpUsername() +


"/ftp/websites")

.addUserInput("chmod -R g+w /home/" + user.getFtpUsername() + "/ftp/websites")

.addUserInput("find /home/" + user.getFtpUsername() + "/ftp/websites -type d -exec chmod 2770 {} \\;")

.addUserInput("find /home/" + user.getFtpUsername() + "/ftp/websites -type f -exec chmod ug+rw {} \\;")

// Allow the group to write to the websites, this is primarily for the user, since the apache2 user already
has access

.addUserInput("chmod g+w -R /home/" + user.getFtpUsername() + "/ftp/websites")

// Step 8: Grant user ftp access

.addUserInput("echo \""+user.getFtpUsername()+"\" | sudo tee -a /etc/vsftpd.userlist")

// Step 9: Limit user terminal access

.addUserInput("usermod "+user.getFtpUsername()+" -s /bin/ftponly")

// Step 10: Cleanup

.addUserInput("systemctl restart vsftpd");

OSTerminal terminal = new OSTerminal();

terminal.setSession(session);

System.out.println(terminal.executeSession());

return true;

// TODO: Implement delete ftp account

96
Code Snippet 5: WebsiteController.java

package org.itp.engine.website;

import org.itp.engine.restful.ApiResponse;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.http.HttpStatus;

import org.springframework.http.ResponseEntity;

import org.springframework.web.bind.annotation.*;

@RestController

@CrossOrigin

@RequestMapping("api/v1/")

public class WebsiteController {

private final WebsiteService service;

@Autowired

public WebsiteController(WebsiteService service) {

this.service = service;

@PostMapping("website/new")

public ResponseEntity<ApiResponse> createWebsite(@RequestBody Website website) {

this.service.createWebsite(website);

ApiResponse response = new ApiResponse(

"Website successfully created",

HttpStatus.OK.value()

);

return ResponseEntity.status(HttpStatus.OK).body(response);

Code Snippet 6: WebsiteService.java

package org.itp.engine.website;

import org.itp.engine.osutils.OSTerminal;

import org.itp.engine.osutils.TerminalOperationSession;

97
import org.itp.engine.osutils.TerminalOperationSessionFactory;

import org.springframework.stereotype.Service;

import java.io.FileWriter;

import java.io.IOException;

@Service

public class WebsiteService {

public void createWebsite(Website website) {

try {

// Step 1: Create and Add content to new vhost file

VHost newVhost = new VHost(

website.getPortNumber(),

website.getWebsiteAbsolutePath(),

website.hasPublicFolder()

);

FileWriter writer =

new FileWriter("/etc/apache2/sites-available/" + website.getVhostIdentifier() + ".conf");

writer.write(newVhost.generateVhostContent());

writer.flush();

writer.close();

} catch (IOException e) {

throw new RuntimeException(e);

TerminalOperationSession session = TerminalOperationSessionFactory

.getSessionWith("bash");

session

// Step 2: Create Website Folder

.addUserInput("mkdir " + website.getWebsiteAbsolutePath());

if (website.hasPublicFolder()) {

session.addUserInput("mkdir " + website.getWebsiteAbsolutePath() + "/public");

// Step 3: Permission and ownership

session

.addUserInput("chown www-data:" + website.getLinuxUser() + "_n_www-data -R " +


website.getWebsiteAbsolutePath())

98
.addUserInput("chmod 770 -R " + website.getWebsiteAbsolutePath());

// Step 4: Add default index page

if (website.hasPublicFolder()) {

session.addUserInput("cp /home/itp_sys_manager/index.html " + website.getWebsiteAbsolutePath() +


"/public/index.html");

} else {

session.addUserInput("cp /home/itp_sys_manager/index.html " + website.getWebsiteAbsolutePath() +


"/index.html");

// Step 5: Allow traffic through designated port

session

.addUserInput("ufw allow " + website.getPortNumber())

// Step 6: Add port to apache ports as well

.addUserInput("echo \"Listen " + website.getPortNumber() + "\" | sudo tee -a /etc/apache2/ports.conf")

// Step 7: Activate vhost

.addUserInput("a2ensite " + website.getVhostIdentifier() + ".conf")

// Step 8: Reload apache

.addUserInput("systemctl reload apache2");

OSTerminal terminal = new OSTerminal();

terminal.setSession(session);

terminal.executeSession();

// TODO: Implement delete website

// public void deleteWebsite(Website website){

// TerminalOperationSession session = TerminalOperationSessionFactory

// .getSessionWith("bash");

// session

// // Step 2: Create Website Folder

// .addUserInput("rm -r " + website.getWebsiteAbsolutePath())

//

// // Step 5: Allow traffic through designated port

// .addUserInput("ufw allow " + website.getPortNumber())

99
// // Step 6: Add port to apache ports as well

// .addUserInput("echo \"Listen " + website.getPortNumber() + "\" | sudo tee -a /etc/apache2/ports.conf")

// // Step 7: Activate vhost

// .addUserInput("a2dissite " + website.getVhostIdentifier() + ".conf")

// // Step 8: Reload apache

// .addUserInput("systemctl reload apache2");

//

// OSTerminal terminal = new OSTerminal();

// terminal.setSession(session);

// terminal.executeSession();

// }

Code Snippet 7: DatabaseServerController.java

package org.itp.engine.database;

import org.itp.engine.restful.ApiResponse;

import org.itp.engine.useraccount.UserAccount;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.http.HttpStatus;

import org.springframework.http.ResponseEntity;

import org.springframework.web.bind.annotation.*;

@RestController

@RequestMapping("api/v1/")

@CrossOrigin

public class DatabaseServerController {

private final DatabaseServerService service;

@Autowired

public DatabaseServerController(DatabaseServerService service){

this.service = service;

@PostMapping("database-user/new")

public ResponseEntity<ApiResponse> createDatabaseUser(@RequestBody UserAccount user){

this.service.createDbAccount(user);

100
ApiResponse response = new ApiResponse(

"Database user account successfully created",

HttpStatus.OK.value()

);

return ResponseEntity.status(HttpStatus.OK).body(response);

@PostMapping("database-user/update")

public ResponseEntity<ApiResponse> updateDatabaseUser(@RequestBody UserAccount user){

this.service.updateDbAccount(user);

ApiResponse response = new ApiResponse(

"Database user account successfully created",

HttpStatus.OK.value()

);

return ResponseEntity.status(HttpStatus.OK).body(response);

@PostMapping("database-user/delete")

public ResponseEntity<ApiResponse> deleteDatabaseUser(@RequestBody UserAccount user){

this.service.deleteDbAccount(user);

ApiResponse response = new ApiResponse(

"Database user account successfully deleted",

HttpStatus.OK.value()

);

return ResponseEntity.status(HttpStatus.OK).body(response);

@PostMapping("database/new")

public ResponseEntity<ApiResponse> createDatabase(@RequestBody Database database){

this.service.createDb(database);

ApiResponse response = new ApiResponse(

"Database successfully created",

HttpStatus.OK.value()

);

return ResponseEntity.status(HttpStatus.OK).body(response);

@PostMapping("database/delete")

101
public ResponseEntity<ApiResponse> deleteDatabase(@RequestBody Database database){

this.service.dropDb(database);

ApiResponse response = new ApiResponse(

"Database successfully dropped",

HttpStatus.OK.value()

);

return ResponseEntity.status(HttpStatus.OK).body(response);

Code Snippet 8: DatabaseServerService.java

package org.itp.engine.database;

import org.itp.engine.osutils.OSTerminal;

import org.itp.engine.osutils.TerminalOperationSession;

import org.itp.engine.osutils.TerminalOperationSessionFactory;

import org.itp.engine.useraccount.UserAccount;

import org.springframework.stereotype.Service;

@Service

public class DatabaseServerService {

public boolean createDbAccount(UserAccount user) {

TerminalOperationSession session = TerminalOperationSessionFactory

.getSessionWith("mysql");

session

.addUserInput("CREATE USER '" + user.getDbUsername() + "'@'localhost' IDENTIFIED WITH


caching_sha2_password BY '" + user.getDbPassword() + "'; ")

.addUserInput("GRANT ALL PRIVILEGES ON `" + user.getDbUsername() + "\\_%`.* TO '" +


user.getDbUsername() + "'@'localhost'; ")

.addUserInput("exit; ")

.addUserInput("");

OSTerminal terminal = new OSTerminal();

terminal.setSession(session);

terminal.executeSession();

return true;

102
}

public boolean updateDbAccount(UserAccount user) {

TerminalOperationSession session = TerminalOperationSessionFactory

.getSessionWith("mysql");

session

.addUserInput("ALTER USER '" + user.getDbUsername() + "'@'localhost' IDENTIFIED WITH


caching_sha2_password BY '" + user.getDbUsername() + "';")

.addUserInput("exit;");

OSTerminal terminal = new OSTerminal();

terminal.setSession(session);

terminal.executeSession();

return true;

public boolean deleteDbAccount(UserAccount user) {

TerminalOperationSession session = TerminalOperationSessionFactory

.getSessionWith("mysql");

session

// TODO: Find a query that works:

// .addUserInput("REVOKE ALL PRIVILEGES FROM ON `"+user.getDbUsername()+ "\\_%`.* FROM


'"+user.getDbUsername()+"'@'localhost';")

.addUserInput("DROP USER '" + user.getDbUsername() + "'@'localhost';")

.addUserInput("exit;");

OSTerminal terminal = new OSTerminal();

terminal.setSession(session);

System.out.println(terminal.executeSession());

return true;

public boolean createDb(Database database) {

TerminalOperationSession session = TerminalOperationSessionFactory

.getSessionWith("mysql");

session

.addUserInput("CREATE DATABASE " + database.getDatabaseName() + ";")

.addUserInput("exit; ")

.addUserInput("");

OSTerminal terminal = new OSTerminal();

103
terminal.setSession(session);

terminal.executeSession();

return true;

public boolean dropDb(Database database) {

TerminalOperationSession session = TerminalOperationSessionFactory

.getSessionWith("mysql");

session

.addUserInput("DROP DATABASE " + database.getDatabaseName() + ";")

.addUserInput("exit;");

OSTerminal terminal = new OSTerminal();

terminal.setSession(session);

terminal.executeSession();

return true;

Code Snippet 9: OSTerminal.java


package org.itp.engine.osutils;

import java.io.*;

import java.util.List;

public class OSTerminal {

private TerminalOperationSession session;

private StringBuilder sessionOutput;

public OSTerminal() {

this.sessionOutput = new StringBuilder();

public void setSession(TerminalOperationSession session) {

this.session = session;

this.sessionOutput = new StringBuilder();

public String executeSession(){

try {

String[] command = this.session.getInitialCommand().split(" ");

104
ProcessBuilder builder = new ProcessBuilder(command);

Process process = builder.start();

OutputStream stdin = process.getOutputStream();

InputStream stdout = process.getInputStream();

InputStream stderr = process.getErrorStream();

// Store the input and output streams in a buffer

BufferedReader reader = new BufferedReader(new InputStreamReader(stdout));

BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin));

BufferedReader error = new BufferedReader(new InputStreamReader(stderr));

// Send inputs

List<String> userInputs = this.session.getUserInputs();

for (String input : userInputs) {

writer.write(input + "\n");

writer.flush();

writer.close();

// Display the output

String line;

while ((line = reader.readLine()) != null) this.sessionOutput.append(line);

// Display any errors

while ((line = error.readLine()) != null) this.sessionOutput.append(line);

// Cleanup

reader.close();

writer.close();

error.close();

process.destroy();

} catch (IOException e) {

e.printStackTrace();

this.sessionOutput.append("\n\n\n Errors: \n").append(e);

return this.sessionOutput.toString();

105
Code Snippet 9: TerminalOperationSession.java

package org.itp.engine.osutils;

import java.util.ArrayList;

import java.util.List;

public class TerminalOperationSession {

private String initialCommand;

private final List<String> userInputs;

public TerminalOperationSession() {

this.initialCommand = "";

this.userInputs = new ArrayList<String>();

public TerminalOperationSession(String initialCommand) {

this.initialCommand = initialCommand;

this.userInputs = new ArrayList<String>();

public TerminalOperationSession setInitialCommand(String initialCommand) {

this.initialCommand = initialCommand;

return this;

public TerminalOperationSession addUserInput(String input) {

this.userInputs.add(input);

return this;

public String getInitialCommand() {

return initialCommand;

public List<String> getUserInputs() {

return userInputs;

106
Appendix E: System Installation Procedure

The installation procedure is a three-phase process. The first phase involves setting up the environment
where the two sub systems will operate. The second phase involves setting the ITP Core subsystem. And
lastly, setting up ITP Engine.

Phase 1: Environment Setup


On a fresh installation of Ubuntu 22.04 LTS, perform the following steps:
Step 1: LAMP Stack Installation and phpMyAdmin
Kindly refer to the two references below to setup a LAMP stack and phpMyAdmin
i. https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-
stack-on-ubuntu-20-04
ii. https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-
ubuntu-20-04
Step 2: Change the root user's password in mysql
Use the SQL query:
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '1234!
@#$ABCDabcd';
Step 3: Securing Apache Full Traffic
Follow this guide to accomplish this:
i. https://www.digitalocean.com/community/tutorials/how-to-set-up-ssl-certificates-with-
phpmyadmin-on-an-ubuntu-12-04-vps
ii. https://chat.openai.com/share/d20859f3-307f-40af-8f53-0db69aa8b7d5
iii. https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-
ubuntu-18-04
iv. https://learnubuntu.com/ufw-status-inactive/
NOTE: replace the 'default' apache config file with 'default-ssl.conf'
NOTE: in case port 443 is not opened, open it using:
sudo ufw allow 'Apache Full'
sudo ufw allow 22 & 21
Step 4: Setup an FTP server
To setup an FTP Server and initate some accounts, follow the instructions in the reference:
i. https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-for-a-user-s-directory-
on-ubuntu-20-04
ii. https://stackoverflow.com/questions/67696484/setting-up-vsftpd-user-to-have-write-access-to-
apache2s-html-directory

Note: File Permissions


Since we will disable the user's shell access, we need to specify the permissions for new files created by
the FTP server. This permission must allow apache2 to operate effectively.

107
To be added to the FTP Config file.
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=0007
anon_upload_enable=YES
anon_mkdir_write_enable=YES
file_open_mode=0777
Step 5: Install Java 17
Run the command: apt install openjdk-17-jdk openjdk-17-jre

Step 6: Install Composer

Using the instructions at: https://getcomposer.org/download/, install composer into the environment

Step 7: Final Steps


A. Administration Database Account
Create another database user account to manage all database related activities for users of the ITP
Cloud Platform. Setting up such a separate account improves security to some extent.
From the console:
$: sudo mysql
mysql > CREATE USER 'itp_db_manager'@'localhost' IDENTIFIED WITH
caching_sha2_password BY '1234!@#$ABCDabcd';
mysql > GRANT ALL PRIVILEGES ON *.* TO 'itp_db_manager'@'localhost' WITH GRANT
OPTION;
mysql > exit;
B. Administration Linux Account
Create another linux user account to manage all linux related activities for users of the ITP Cloud
Platform. Setting up such a separate account improves security to some extent.
=> sudo adduser itp_sys_manager
with password: 1234!@#$ABCDabcd
=> usermod -aG sudo itp_sys_manager
Note: create a default html page (index.html), for all new website instance creations. Place it at the
root of the itp_sys_manager user account directory.

Phase 2: ITP Core Installation

Step 1: Log into the server using the itp_sys_manager account credentials
Step 2: While in the root directory for this account, make a new directory named: itp_core, and cd into it

108
Step 3: while in the itp_core directory, clone the ITP Core project from GitHub using the URL:
https://github.com/ITP-Cloud/itp-core.git
Step 4: Satisfy the server requirements below:
PHP version 7.4 or higher is required, with the following extensions installed:
i. intl
ii. mbstring
Additionally, make sure that the following extensions are enabled in your PHP:
i. json (enabled by default - don't turn it off)
ii. mysqlnd if you plan to use MySQL
iii. libcurl if you plan to use the HTTP\CURLRequest library
iv. Configure the php.ini file to point to an updated cacert.pem file for secure curl requests.
Step 5: cd into the clone directory, and run composer install to get all the dependencies
Step 6: You may encounter some errors when installing the project dependencies, troubleshoot these
using Google.
Step 7: Setup a database
Log into the mysql server and create a database named: itp_core
Step 8: Setup environment variables
Copy the env file to .env and tailor it for the app. This file will be used to provide environment variables
for our application, i.e., database settings, CodeIgniter 4 Shield authentication changes
(changes from cookie to session-based authentication: refer to
https://codeigniter4.github.io/shield/getting_started/install/ ).
Step 9: Scaffold the project database schema by running the database migrations. Execute the command
php spark migrate --all from the terminal in the project root directory.
Step 10: Configure a new apache vitual host to direct traffic to the directory:
/home/itp_sys_manager/itp_core/itp-core/public
Step 11: Restart the apache server, and the mysql server.

Phase 3: ITP Engine Installation

Step 1: Log into the server using the itp_sys_manager account credentials
Step 2: While in the root directory for this account, make a new directory named: itp_engine, and cd into
it
Step 3: while in the itp_engine directory, get the ITP Engine release artifact from GitHub using the URL:
https://github.com/ITP-Cloud/itp-engine/releases/download/pre-release/engine-0.0.1-SNAPSHOT.jar
Use the following commands to complete the operation using wget or curl. Save the file in the itp_engine
directory.

109
Step 4: Deploy the spring boot application you’ve downloaded in the previous step using the services
facilities available on Linux. Name the service: itp_engine. Refer to the references below:
i. https://www.learnbestcoding.com/post/37/deploy-springboot-app-linux
ii. https://docs.spring.io/spring-boot/docs/1.3.2.RELEASE/reference/html/deployment-install.html
Note: make sure that the service run as root.
Step 5: Start the itp_engine service

110

You might also like