devOpsManual/devopsProjectProposal.tex

207 lines
13 KiB
TeX

\chapter{Project Proposal}
\ChapterLabel{ProjectProposal}
\index{project proposal}
\index{GitHub Actions}
\index{Jenkins}
\index{DevSecOps}
This chapter proposes a project and tool comparison for the semester. All
tools, environments, pipeline stages, and dashboard features described here
are planned work rather than completed implementation.
\section{Project Title}
\textbf{One-Button DevSecOps Task Tracker}
\section{Project Description}
I propose building a small web application for a fictional DevOps startup.
The application will allow a user to create tasks, assign a status, update a
task, and view the current work queue. It will also expose a health endpoint
and display the application version so that deployments can be tested and
observed.
The starting point will be my existing Node.js and Docker work demonstrated
in \ChapterRef{LocalDocker}. Instead of stopping with a static Hello World
page, I will extend the project into a working task-tracking application with
automated testing, container packaging, security checks, deployment, and
monitoring. The automated build will produce a versioned Docker image of the
task tracker.
\section{Selected Tool and Alternative}
I propose \textbf{GitHub Actions} as the primary automation tool. Its workflows
can run from repository events or a manual trigger, making it suitable for the
planned build, test, scan, package, and release process
\cite{GitHubActionsDocs}. Docker also provides official GitHub Actions for
building and publishing container images \cite{DockerBuildActionsDocs}.
The alternative tool will be \textbf{Jenkins}. Jenkins Pipeline represents a
delivery process as code in a version-controlled \texttt{Jenkinsfile} and can
model build, test, and deployment stages \cite{JenkinsPipelineDocs}. I will
implement the main pipeline with GitHub Actions and reproduce enough of the
same workflow in Jenkins to compare setup, security, maintenance, usability,
and operational visibility.
\begin{tabularx}{\linewidth}{L{3.2cm}YY}
\caption{Proposed Automation Tool Comparison\label{Table:AutomationComparison}}\\
\toprule
\textbf{Area} & \textbf{GitHub Actions} & \textbf{Jenkins}\\ \midrule
Source-control integration & Workflow stored with the GitHub repository and triggered by repository events or manual dispatch. & Pipeline stored in a \texttt{Jenkinsfile}, with Jenkins configured to monitor the repository.\\
Hosting model & GitHub-hosted runner initially; a self-hosted runner remains an option. & A locally managed Jenkins controller and agent, preferably isolated in containers.\\
Administration & Lower initial administration for a small GitHub-hosted project. & Greater control, with added responsibility for installation, plugins, credentials, upgrades, and backups.\\
Security focus & Restrict workflow permissions, protect environments, pin trusted actions, and keep secrets outside the repository. & Restrict controller and agent access, minimize plugins, protect credentials, and maintain the Jenkins host.\\
Comparison evidence & Workflow duration, setup effort, failed-stage visibility, security configuration, and release results. & The same measures collected from an equivalent Jenkins pipeline.\\
\bottomrule
\end{tabularx}
\section{Proposed Application and DevSecOps Tools}
Table~\ref{Table:ProjectToolchain} identifies the initial toolchain. The final
selection may change as the application and course requirements become more
detailed.
\begin{tabularx}{\linewidth}{L{3.2cm}L{4.0cm}Y}
\caption{Proposed Project Toolchain\label{Table:ProjectToolchain}}\\
\toprule
\textbf{Capability} & \textbf{Proposed tool} & \textbf{Planned use}\\ \midrule
Source control & Git and GitHub & Store application code, Docker configuration, tests, pipeline definitions, documentation, and release tags.\\
Application & Node.js web application & Implement task creation, status updates, a health endpoint, and version reporting.\\
Database & PostgreSQL & Store tasks and status history in a separate development container.\\
Testing & Jest and Supertest & Run unit and API tests before an image is released.\\
Container build & Docker and Docker Compose & Package the application and run the application and database as local services.\\
Primary CI/CD & GitHub Actions & Automate build, test, security scanning, image publication, deployment, and smoke testing.\\
Alternative CI/CD & Jenkins Pipeline & Reproduce the core pipeline for a structured comparison with GitHub Actions.\\
Security & Dependency audit and Trivy & Check dependencies, scan the repository and container image, and fail the release on defined high-risk findings. Trivy supports scanning repositories, container images, secrets, and misconfiguration \cite{TrivyDocs}.\\
Image registry & GitHub Container Registry & Store versioned container images produced by successful release workflows.\\
Deployment & Local Docker Compose initially & Provide a repeatable development deployment without assuming cloud cost; a small DigitalOcean environment may be evaluated later if approved.\\
Monitoring & Prometheus and Grafana & Collect health and operational metrics and present them in a dashboard.\\
Issue tracking & Jira & Track backlog tasks, security work, defects, and release milestones on the Kanban board.\\
\bottomrule
\end{tabularx}
\section{Sample Project Tasks}
The initial backlog will contain the following tasks:
\begin{enumerate}
\item Create the Node.js application and health endpoint.
\item Add create, read, update, and status-change operations for tasks.
\item Add PostgreSQL persistence and database migration scripts.
\item Add unit tests, API tests, linting, and a repeatable local test command.
\item Create a multi-stage Dockerfile and a Docker Compose development stack.
\item Create the GitHub Actions pipeline and the comparison Jenkins pipeline.
\item Add dependency, secret, configuration, and container-image security scans.
\item Publish a versioned image only after all quality and security gates pass.
\item Deploy the approved image, run a smoke test, and document rollback.
\item Build the operational dashboard and record comparison measurements.
\end{enumerate}
\section{One-Button Build and Release}
The GitHub Actions workflow will provide a manual release trigger so that one
approved action starts the complete process. Normal pull requests will run
validation without deploying. The release workflow will execute the stages in
Table~\ref{Table:ReleasePipeline} and stop immediately when a required gate
fails.
\begin{tabularx}{\linewidth}{L{2.6cm}L{3.0cm}Y}
\caption{Proposed One-Button Release Pipeline\label{Table:ReleasePipeline}}\\
\toprule
\textbf{Stage} & \textbf{Purpose} & \textbf{Completion gate}\\ \midrule
Checkout & Retrieve the approved source revision and pipeline configuration. & The workflow records the commit identifier being built.\\
Dependencies & Install locked application dependencies. & Installation succeeds from the committed dependency lock file.\\
Quality & Run formatting, linting, unit tests, and API tests. & All required checks and tests pass.\\
Security & Audit dependencies and scan source, configuration, secrets, and the container image. & Findings remain within the documented release policy.\\
Build & Create an immutable Docker image tagged with the release and commit identifiers. & The image builds successfully and can start in a test environment.\\
Publish & Push the approved image to the container registry. & The registry contains the expected immutable image tag.\\
Deploy & Update the development environment to the approved image. & Application and database services report healthy status.\\
Verify & Run a smoke test against the health endpoint and task API. & The deployed version responds correctly and matches the requested release.\\
Record & Save test, scan, image, deployment, and timing results. & The dashboard and release record identify the outcome and deployed version.\\
\bottomrule
\end{tabularx}
If deployment verification fails, the process will redeploy the previously
known working image tag. Secrets will be stored in the automation platform's
approved secret store and injected only when required; they will not be placed
in source files, Docker images, logs, or this report.
\section{Operational Dashboard}
The proposed Grafana dashboard will present operational and delivery data in
one view. Planned panels include:
\begin{itemize}
\item application availability and health-check status;
\item request count, response time, and error rate;
\item current application version and last deployment time;
\item pipeline success rate and duration by automation tool;
\item unit and API test results;
\item open high-severity security findings;
\item container restart count and basic CPU and memory use; and
\item rollback count and recovery time after a failed deployment.
\end{itemize}
The same release will be exercised through GitHub Actions and Jenkins where
practical so that the dashboard and retained pipeline records can support a
comparison rather than relying only on personal preference.
\section{Modified SWOT Analysis}
The following SWOT tables are preliminary hypotheses. They will be updated
with measured evidence after both pipeline implementations are exercised.
\subsection{GitHub Actions}
\begin{longtable}{@{}L{2.7cm}L{10.8cm}@{}}
\caption{Preliminary Modified SWOT for GitHub Actions\label{Table:GitHubActionsSWOT}}\\
\toprule
\textbf{Category} & \textbf{Project-specific assessment}\\ \midrule
\endfirsthead
\toprule
\textbf{Category} & \textbf{Project-specific assessment}\\ \midrule
\endhead \bottomrule \endlastfoot
Strengths & Close integration with the selected source repository, workflow files reviewed with the application, accessible hosted runners, and a direct path from pull-request checks to a manual release.\\
Weaknesses & Workflow behavior depends on platform conventions and third-party actions; complex workflows may become difficult to debug without disciplined structure and logging.\\
Opportunities & Reusable workflows, automated container publication, protected release environments, and security evidence attached to every proposed release.\\
Threats / risks & Excessive workflow permissions, untrusted actions, exposed secrets, platform dependency, and uncontrolled runner or artifact usage.\\
\end{longtable}
\subsection{Jenkins}
\begin{longtable}{@{}L{2.7cm}L{10.8cm}@{}}
\caption{Preliminary Modified SWOT for Jenkins\label{Table:JenkinsSWOT}}\\
\toprule
\textbf{Category} & \textbf{Project-specific assessment}\\ \midrule
\endfirsthead
\toprule
\textbf{Category} & \textbf{Project-specific assessment}\\ \midrule
\endhead \bottomrule \endlastfoot
Strengths & Flexible pipeline design, control over the execution environment, broad integration options, and a versioned \texttt{Jenkinsfile}.\\
Weaknesses & Requires administration of the controller, agents, plugins, credentials, storage, upgrades, and backups in addition to the application itself.\\
Opportunities & Demonstrates a self-hosted automation model, supports custom agents, and provides a meaningful comparison of operational ownership against a hosted workflow service.\\
Threats / risks & Outdated plugins or controller software, excessive administrative access, credential exposure, configuration drift, unavailable agents, and loss of pipeline history without backup.\\
\end{longtable}
\section{Unique Proposal}
The unique feature will be a \textbf{release confidence score} displayed on
the dashboard. The score will combine the latest test result, security-gate
result, health-check result, deployment age, and rollback status. It will not
replace the underlying evidence; selecting the score will lead to the test,
scan, and deployment details that produced it. The experiment will evaluate
whether one concise indicator helps a small team notice release risk without
hiding failures.
\section{Rubric Alignment}
\begin{tabularx}{\linewidth}{L{4.2cm}Y}
\caption{Project Rubric Alignment\label{Table:ProjectRubricAlignment}}\\
\toprule
\textbf{Expectation} & \textbf{Proposal response}\\ \midrule
Selected tool or environment & GitHub Actions is the primary tool; Jenkins is the alternative; Docker Compose is the initial deployment environment.\\
Working sample application & A Node.js task tracker with PostgreSQL persistence, health reporting, and version reporting.\\
Specific DevOps tools & GitHub, Docker, automated tests, security scanning, a registry, deployment automation, Prometheus, and Grafana.\\
Comparable tools & GitHub Actions and Jenkins will execute equivalent build, test, scan, package, and deployment stages where practical.\\
Build environment & Local containers first, with a small approved cloud deployment considered later rather than assumed.\\
Operational dashboard & Grafana panels will report application health, delivery performance, security results, resource signals, and deployed version.\\
Modified SWOT charts & Preliminary SWOT tables are included for both automation tools and will be revised from execution evidence.\\
Unique contribution & A transparent release confidence score links a summary indicator to detailed test, security, and deployment evidence.\\
\bottomrule
\end{tabularx}
\section{Current Scope and Decisions Still Needed}
The first deliverable will remain local to avoid unapproved cloud cost. Before
implementation, I will confirm whether the final deployment must use a cloud
provider, the required hosting budget, the minimum dashboard metrics, and the
security threshold that should block a release. I will also confirm whether
the full Jenkins deployment must match GitHub Actions or whether a smaller
comparison pipeline is sufficient.