EC2 website & project proposal init

This commit is contained in:
MasterDefault committed 2026-10-05 12:06:04 -04:00
1 parent 8af93058df
commit 916ee92f90
17 files changed
+339 -13

No files matched your search

+19
View File
@@ -81,3 +81,22 @@ figures and problem-set answers. Codex edited the documentation and checked it
against the recorded results; it did not generate substitute execution output.
The team remains responsible for reviewing the additions and compiling the
combined Overleaf project.\\
\subsection{Record 5 --- AWS Deployment and Proposal Draft}
\textbf{Dates:} October 1--5, 2026.\\
\textbf{Tool:} OpenAI Codex.\\
\textbf{Task:} Guide Victor through AWS account access, EC2 provisioning,
class-based website development, Docker installation and deployment, then draft
his chapter from the actual sources and screenshots.\\
\textbf{Human contribution:} Victor operated AWS, created the application
files, executed local and remote commands, resolved the repository-key failure
with guidance, and provided the execution screenshots. Payton is responsible
for the separate TeX Live compiler exercise and chapter. Both authors will
review the tool-comparison proposal.\\
\textbf{Output used:} Command guidance, source code, saved evidence, deployment
chapter, draft GitHub Actions/Jenkins proposal, metadata, and history updates.
Codex copied additions into the student's supplied course repository location.\\
\textbf{Review boundary:} Proposal selection requires team review. Payton's
compiler work was not present in the inspected repository. Full compilation,
combined report review, repository publication, and Canvas submission are not
claimed by this record.
+166
View File
@@ -0,0 +1,166 @@
\chapter{Digital Ocean Docker Deployment}
\ChapterLabel{CloudDockerDeployment}
\index{Docker}\index{Amazon EC2}\index{JavaScript!classes}
\section{Scope and Platform}
This chapter records Victor's deployment of the group Color Buttons website.
The assignment's chapter title is retained; Amazon EC2 replaces the DigitalOcean
Droplet in this group's implementation. Payton handles the separate TeX Live
compiler and its chapter. UML diagrams are omitted under the instructor's
clarification that deployment diagrams are encouraged but optional.
The website is available at \url{http://54.221.175.174} while the instance is
running. This is an HTTP demonstration site without TLS. Its automatically
assigned address can change after the instance is stopped and started.
\section{AWS Configuration}
Victor created the paid AWS account for the group and configured a monthly
budget alert. No credits were reported. IAM Identity Center provides separate
Victor and Payton identities in the developers group, assigned an EC2 permission
set using \texttt{AmazonEC2FullAccess}. Victor's portal and EC2-console access
were verified; Payton's independent sign-in was not captured. Root remains the
owner's administrative identity; a separate administrator role was not created
and MFA setup was deferred. The budget is an alert, not a spending cap.
\begin{tabularx}{\linewidth}{L{4cm}Y}
\toprule \textbf{Setting} & \textbf{Recorded configuration}\\ \midrule
Instance name & \texttt{ssw590-group-web}\\
Region & N. Virginia (\texttt{us-east-1})\\
Instance type & \texttt{t3.micro}\\
Operating system & Ubuntu 26.04 LTS, amd64 (verified with \texttt{/etc/os-release} and \texttt{uname -m})\\
Networking & Default VPC, public IPv4 enabled\\
Inbound SSH & TCP 22 restricted to Victor's detected IP (\texttt{100.8.28.98/32} at setup)\\
Inbound website & TCP 80 from \texttt{0.0.0.0/0}\\
Storage & Launch configuration used an 8 GiB gp3 root volume with encryption and delete-on-termination selected\\
Metadata & IMDSv2 required, confirmed in instance summary\\
Application port & Container TCP 3000 published as host TCP 80\\
\bottomrule
\end{tabularx}
\section{Class-Based Website}
The original two click handlers were reorganized into a
\texttt{ColorButtonsApp} class. Its constructor retains the background and
status elements; \texttt{setColor} changes both; \texttt{connectButton} binds
click events; and \texttt{initialize} connects Blue and Red. Express serves the
static public directory. Both outcomes were verified locally and on AWS.
\subsection{Application Sources}
\paragraph{Browser class: public/app.js}
\inputminted{javascript}{docker/color-buttons/public/app.js}
\paragraph{Page: public/index.html}
\inputminted{html}{docker/color-buttons/public/index.html}
\paragraph{Web server: server.js}
\inputminted{javascript}{docker/color-buttons/server.js}
\paragraph{Dependencies: package.json}
\inputminted{json}{docker/color-buttons/package.json}
\paragraph{Dockerfile}
\inputminted{docker}{docker/color-buttons/Dockerfile}
\paragraph{.dockerignore}
\inputminted{text}{docker/color-buttons/.dockerignore}
\section{Deployment Procedure}
The commands below reproduce the recorded setup and successful configuration.
The local folder remained under \path{HW1/HW3/Group-Project} for this assignment;
relocating it to the course root is deferred. The private SSH key is stored
outside the project and is excluded from the report and repository.
\subsection{Connect and Install Docker}
From Windows Git Bash:
\begin{minted}{bash}
ssh -i "$HOME/Documents/_SIT/_Fall2026/SSW 590 - DevOps/ssw590-victor.pem" ubuntu@54.221.175.174
\end{minted}
On the EC2 host:
\begin{minted}{bash}
cat /etc/os-release
uname -m
sudo apt update
sudo apt install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod 0644 /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources > /dev/null <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: resolute
Components: stable
Architectures: amd64
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
sudo systemctl is-active docker
sudo docker version
sudo docker run --rm hello-world
\end{minted}
Victor reported successful installation after resolving the repository-key error.
The procedure follows \url{https://docs.docker.com/engine/install/ubuntu/}.
\subsection{Transfer, Build, and Run}
In a separate local Git Bash terminal, copy the application:
\begin{minted}{bash}
scp -i "$HOME/Documents/_SIT/_Fall2026/SSW 590 - DevOps/ssw590-victor.pem" -r "$HOME/Documents/_SIT/_Fall2026/SSW 590 - DevOps/HW1/HW3/Group-Project/color-buttons" ubuntu@54.221.175.174:
\end{minted}
On EC2:
\begin{minted}{bash}
cd ~/color-buttons
sudo docker build -t ssw590-group-buttons .
sudo docker run -d --name ssw590-group-buttons --restart unless-stopped -p 80:3000 ssw590-group-buttons
sudo docker ps --filter name=ssw590-group-buttons
sudo docker logs ssw590-group-buttons
curl -I http://127.0.0.1
\end{minted}
The create command assumes the container name is unused. The restart policy
allows the running service to resume after a host restart. The application binds
to all container interfaces, and the AWS security group permits public HTTP.
\section{Verification Evidence}
The terminal screenshot shows container \texttt{70ed56f7fae8} running, the
\texttt{80->3000/tcp} mapping, the server startup message, and
\texttt{HTTP/1.1 200 OK}. Public-browser screenshots record the initial white
state and the Blue and Red outcomes. These figures are supplied execution
evidence, not generated illustrations.
\begin{figure}[p]
\centering
\includegraphics[width=\linewidth]{figures/aws-container.png}
\caption{EC2 container status, startup logs, and successful local HTTP check.}
\label{fig:aws-container}
\end{figure}
\begin{figure}[p]
\centering
\includegraphics[width=\linewidth]{figures/aws-buttons-blue.png}
\caption{Public AWS website after clicking Blue.}
\label{fig:aws-blue}
\end{figure}
\begin{figure}[p]
\centering
\includegraphics[width=\linewidth]{figures/aws-buttons-red.png}
\caption{Public AWS website after clicking Red.}
\label{fig:aws-red}
\end{figure}
\clearpage
\section{Problems and Resolution}
The first repository update failed with a missing OpenPGP signing-key error.
Victor downloaded Docker's key again, set its file permissions, checked the
\texttt{Signed-By} path, and repeated the update. Installation then succeeded.
The exact cause of the initial missing-key state was not established.
The Ubuntu image selected was 26.04 rather than the initially planned 24.04.
The actual OS and architecture were checked before using Docker's matching
\texttt{resolute} repository. A Compute Optimizer access message appeared in
the instance summary; it did not prevent the EC2 deployment and no extra
permissions were added for that optional feature.
\section{Ownership and Continued Operation}
Victor owns the AWS account and billing responsibility; both authors share the
course project. Compute, storage, and public IPv4 usage are chargeable under
this account. The instance is retained for the working assignment link and
future labs. Closing SSH does not stop the detached container. Stopping the EC2
instance takes the website offline and preserves its disk, which remains
billable; restarting can change the public address. No completed shutdown or
termination is claimed. Future cleanup and any folder relocation will be
recorded separately.
+8 -7
View File
@@ -10,18 +10,19 @@ This document records the configuration of the development environment used for
\CourseNumber\ and the working practices followed to produce it.
Each chapter covers one subject, and each assignment adds or revises chapters
as recorded in the document history. The latest revision for Assignment~\AssignmentNumber\
adds \ChapterRef{LinuxCommands}.
adds \ChapterRef{CloudDockerDeployment} and a draft \ChapterRef{ProjectProposal}.
Earlier coursework chapters are retained.
\section{Scope and Constraints}
\index{scope!constraints}
The following constraints apply to this revision.
\begin{itemize}[leftmargin=*]
\item The environment is \emph{specified} here, not provisioned. The hosts
chapter names the machines to be configured and their intended roles.
\item Command-line work was performed on a local workstation running
Ubuntu~24.04 under the \gls{wsl}, not on a course
host. Terminal listings are copied from actual executions.
\item The earlier hosts chapter records planned machines. The cloud deployment
chapter records the newly provisioned EC2 website and its actual configuration.
\item Linux Commands evidence was recorded locally under WSL. Assignment 3
deployment commands were executed on Ubuntu 26.04 on EC2. Supplied screenshots
distinguish those environments.
\item No credential, access token, private key, or account secret appears in
this document. Password rules are documented by derivation hint only, as
described in \ChapterRef{Passwords}.
@@ -39,7 +40,7 @@ Due date & \DueDate\\
Instructor & \Instructor\\
Team & \Author\\
Board & GitHub Projects, \texttt{SSW 590} (private; captured as figures in \ChapterRef{KanbanSetup})\\
Required deliverables & Compiled document; Linux Commands chapter; updated document history\\
Required deliverables & Compiled group manual; cloud deployment, LaTeX Docker exercise, tool proposal, and updated history\\
Team policy & Group submission\\ \bottomrule
\end{tabularx}
+19
View File
@@ -0,0 +1,19 @@
\chapter{Project Proposal}
\ChapterLabel{ProjectProposal}
\index{GitHub Actions}\index{Jenkins}
\section{Proposed Tool: GitHub Actions}
We propose researching GitHub Actions and comparing it with Jenkins, which
will be introduced in class. GitHub Actions interests us because our group
already uses GitHub to maintain source code and documentation. We want to
understand how repository workflows can automate the build, testing, and
deployment of our Dockerized website to AWS.
Our comparison will consider setup effort, workflow configuration, and
visibility into build and deployment results. A future demonstration could
provide a manually triggered workflow that builds and deploys the application.
For this proposal, no installation or implementation of the comparison tool
is claimed. The current proof of concept is the manually deployed EC2 website.
% Draft selection based on the earlier discussion: both authors should confirm
% GitHub Actions versus Jenkins before submitting this chapter.
+10 -6
View File
@@ -20,6 +20,8 @@
\keepXColumns
\usepackage{enumitem}
\usepackage{listings}
\usepackage{minted}
\setminted{fontsize=\footnotesize,breaklines,frame=single}
\usepackage{tcolorbox}
\usepackage{makeidx}
\usepackage[colorlinks=true,citecolor=blue,linkcolor=blue,urlcolor=blue]{hyperref}
@@ -36,17 +38,17 @@
\definecolor{devopsLightBlue}{RGB}{232,240,247}
% Replace these values for each assignment.
\newcommand{\AssignmentTitle}{Linux Commands}
\newcommand{\AssignmentNumber}{2}
\newcommand{\DocumentVersion}{2.1}
\newcommand{\DocumentStatus}{Submitted Document}
\newcommand{\AssignmentTitle}{Cloud Docker Deployment and Project Proposal}
\newcommand{\AssignmentNumber}{3}
\newcommand{\DocumentVersion}{3.0}
\newcommand{\DocumentStatus}{Group Report Draft}
\newcommand{\CourseNumber}{SSW 590}
\newcommand{\CourseName}{DevOps}
\newcommand{\Author}{Payton Bates and Victor Del Rio Foces}
\newcommand{\Instructor}{Darian Muresan, Ph.D.}
\newcommand{\Organization}{Stevens Institute of Technology}
\newcommand{\DocumentDate}{September 28, 2026}
\newcommand{\DueDate}{September 28, 2026 by 11:59pm}
\newcommand{\DocumentDate}{October 5, 2026}
\newcommand{\DueDate}{October 6, 2026 by 11:59pm}
\newcommand{\VERSION}{Version \DocumentVersion}
\hypersetup{
@@ -119,6 +121,8 @@
\include{chapters/devopsHosts}
\include{chapters/devopsPasswords}
\include{chapters/devopsLinuxCommands}
\include{chapters/devopsCloudDockerDeployment}
\include{chapters/devopsProjectProposal}
\appendix
\include{backmatter/devopsAIPromptLog}
+4
View File
@@ -0,0 +1,4 @@
node_modules
npm-debug.log
.git
.DS_Store
+13
View File
@@ -0,0 +1,13 @@
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --omit=dev
COPY server.js ./
COPY public ./public
EXPOSE 3000
CMD ["npm", "start"]
+12
View File
@@ -0,0 +1,12 @@
{
"name": "ssw590-group-buttons",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.18.2"
}
}
+27
View File
@@ -0,0 +1,27 @@
class ColorButtonsApp {
constructor(backgroundElement, statusElement) {
this.backgroundElement = backgroundElement;
this.statusElement = statusElement;
}
setColor(color) {
this.backgroundElement.style.backgroundColor = color;
this.statusElement.textContent = `Current background: ${color}`;
}
connectButton(button, color) {
button.addEventListener("click", () => this.setColor(color));
}
initialize() {
this.connectButton(document.getElementById("blueBtn"), "blue");
this.connectButton(document.getElementById("redBtn"), "red");
}
}
const application = new ColorButtonsApp(
document.body,
document.getElementById("status"),
);
application.initialize();
+43
View File
@@ -0,0 +1,43 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SSW590 Group — Color Buttons</title>
<style>
body {
margin: 0;
min-height: 100vh;
background-color: white;
font-family: Arial, sans-serif;
transition: background-color 0.3s ease;
}
main {
max-width: 600px;
margin: 50px auto;
padding: 24px;
text-align: center;
background-color: white;
border-radius: 12px;
}
button {
padding: 12px 24px;
margin: 10px;
font-size: 18px;
cursor: pointer;
}
</style>
<script src="app.js" defer></script>
</head>
<body>
<main>
<h1>Color Buttons</h1>
<p>Victor Del Rio Foces and Payton Bates — SSW590</p>
<button id="blueBtn" type="button">Blue</button>
<button id="redBtn" type="button">Red</button>
<p id="status" aria-live="polite">Current background: white</p>
</main>
</body>
</html>
+13
View File
@@ -0,0 +1,13 @@
import express from "express";
import path from "node:path";
import { fileURLToPath } from "node:url";
const directory = path.dirname(fileURLToPath(import.meta.url));
const app = express();
const port = process.env.PORT || 3000;
app.use(express.static(path.join(directory, "public")));
app.listen(port, "0.0.0.0", () => {
console.log(`Group buttons website listening on port ${port}`);
});
Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

+4
View File
@@ -4,3 +4,7 @@ identifies what each revision changed. Its chapters currently cover planning and
the work, the hosts and accounts that make up the environment, and the
command-line and operational work performed in it. Environments specified here
are plans, and the actual provisioning will be done in the future.
Assignment 3 adds the class-based Color Buttons application deployed in Docker
on Amazon EC2, with public browser and terminal verification evidence, and a
draft proposal to compare GitHub Actions with Jenkins. The TeX Live compiler
exercise is assigned to Payton and will be integrated with the final report.
+1
View File
@@ -11,6 +11,7 @@ link each entry to the changed chapter, table, figure, or controlled artifact.
\multicolumn{4}{l}{\small\itshape Document Update History (continued)}\\
\toprule \textbf{Date / Version} & \textbf{Author Initials} & \textbf{Change} & \textbf{Changed At}\\ \midrule
\endhead \bottomrule \endlastfoot
October 5, 2026 / 3.0 & VDRF & Added AWS Docker deployment, class-based website sources, execution evidence, and a draft tool-comparison proposal. Updated Assignment 3 metadata and AI log. Payton extquotesingle{}s compiler chapter remains to be integrated. & \ChapterRef{CloudDockerDeployment}, \ChapterRef{ProjectProposal}, \ChapterRef{AIPromptLog}\\
September 27, 2026 / 2.1 & VDRF & Added Victor's Q1--Q40 execution screenshots and result interpretation; distinguished the two environments and command variants. & \ChapterRef{LinuxCommands}, \ChapterRef{AIPromptLog}\\
September 26, 2026 / 2.0 & PCB, VDRF & Added the Linux Commands chapter: working-directory setup with terminal input/output figures, command explanations and interpretation of results, and solutions to the Linux problem set. Updated document metadata and authorship for Assignment 2 and the two-person team. & \ChapterRef{LinuxCommands}, \ChapterRef{Introduction}, \ChapterRef{Hosts}, \ChapterRef{AIPromptLog}\\
September 18, 2026 / 1.0 & PCB & Created this document from the \CourseNumber\ assignment template. Removed instructional/example chapters, set document metadata and authorship, and rewrote the abstract and introduction to describe this environment rather than the template. Added the Kanban Setup, Passwords, and Hosts chapters, the account and password rules, and the planned hosts. & \ChapterRef{Introduction}, \ChapterRef{KanbanSetup}, \ChapterRef{Passwords}, \ChapterRef{Hosts}, \ChapterRef{AIPromptLog}\\