(So you don’t have to scroll too much):
Content | Link |
---|---|
College Board Videos | Click! |
Deployment Plan | Click! |
Big Idea 4: College Board Videos
4.1- The Internet
Video #1:
-
Packet: Small amounts of data that get carried to a source and destination, similar to a jigsaw puzzle.
-
Computer Network: Allows communication between two computers/users
- Uses paths and routing, routing is the pathfinder that allows for data communication.
- Bandwith: The maximum amount of data that can be sent along ONE path.
Summary: Computer devices are able to SEND information by breaking down data into packets, which are then routed into paths. Computer networks connect mulitple paths, allowing another user to RECEIVE the information sent.
Video #2:
- OSI: Open Systems Interconnect, 1 out of the 2 main communication protocols in computers created by IETF.
- TCP: Transimission Control Protocol, 2 out of the 2 main communication protcols, establishes common standard for message sending.
There are 4 layers to internet protocol:
- Network Access: Focuses on hardware (Ethernet–> NIC–>MAC)
- Every NIC card has it’s own MAC address that allows us to “hop” from one device to another.
- Every NIC card has it’s own MAC address that allows us to “hop” from one device to another.
- Internet Protocol: Packets get sender IP and receiver IP, and are now ready to transfer metadata.
- Packet jumps from router to router, changing their MAC addresses as they go.
- Packet jumps from router to router, changing their MAC addresses as they go.
- Transport Layer: Uses either Transmision Control Protocol or User Datagram Protcol
- TCP: Checks for errors, then FIXES them.
- UDP: Checks for errors, then DISCARDS them.
- Application Layer: DNS and the World Wide Web
- DNS: Translates human URLs into IP addresses, so they can be tracked
- WWW: NOT the internet, HTTP (uses URLS to link to other data)
Summary: In order to safely transmit data, there are layers to the internet. Network access sets up devices with IP addressed needed for communication, Internet protocal packages and jumps from device to device, transport checks for bugs/debugging, and application is what we see.
4.2- Fault Tolerance
Video #3:
- Redundancy: Having multiple paths in a computer network allows for Fault Tolerance (a working communication system even when one path shuts down.)
Summary: The internet is fault tolerant. This is crucial because it would be bad if the entire internet breaks down due to a single path. Redundancy, or having multiple paths for communication prevents this from happening.
Video #4:
- The Internet is able to hold and grow every day due to redundancy and paths. Multiple paths make the internet stronger, allowing it to hold more data.
4.3- Parallel and Distributed Computing
Video #5:
- Computers have System Tasks and User Tasks
- System Tasks: Internal programs running in computer (hardware managment)
- User Tasks: Operations requested by user (running apps, video games)
Computers use 3 ways to run these tasks
- Sequential Computing: One at a time!
- Limited Hardware: Only runs on one CPU, and tasks all depend on each other.
- Limited Hardware: Only runs on one CPU, and tasks all depend on each other.
- Parallel Computing: A mix of sequential and other.
- Breaks down the scheduled one task into different cores of CPU that can be run at the same time. Shorter than Sequential processing.
- Breaks down the scheduled one task into different cores of CPU that can be run at the same time. Shorter than Sequential processing.
- Distributed Computing: Sending tasks to multiple other devices.
- Can be used to solve tasks that take up too much storage or time for one computer to do on it’s own. (Ex: Google Search)
Summary: In order to schedul and manage tasks, computers use 3 different methods. Short and simple tasks can either use parallel or sequential, while large tasks use multiple devices and distributed computing.
Our Deployment Plan:
Issue Link- https://github.com/nighthawkcoders/flocker_frontend/issues/247
Overview:
-
Primary Depolyment Admin (Arshia)
-
Secondary Deployment Admin (Prajna)
In Depth:
Step 1: Configure AWS Route 53 and Create a Subdomain
Step 2: Unique Port!! 8087—>8524
- Main.py:
if __name__ == "__main__": app.run(debug=True, host="0.0.0.0", port="8524")
- Dockerfile:
ENV GUNICORN_CMD_ARGS="--workers=1 --bind=0.0.0.0:8524", EXPOSE 8524
- docker-compose.yml:
ports: - "8524:8524"
- nginx_file:
proxy_pass http://localhost:8524;
- assets/api/config.js:
pythonURI = "http://localhost:8524"
Step 3: AWS EC2 Setup
- Login to AWS Console, navigate to EC2 Instances, select CSP
Step 4: Application Deployment Through VSCode
- Find an availble port (our team will preferably use 8524) on
docker ps
- Run
make
in backend terminal and replace the localhost port with the new port:http://127.0.0.1:8524
Step 5: Deployment in AWS EC2 terminal
- Clone repo and build
docker-compose up -d --build
- Test site by replacing with personal port
Step 6: Route 53 and Nginx Setup
- Create a DNS record for the subdomain in AWS Route 53.
- Write our own config file, SAVE CHANGES
cmd x
,y
,enter
- Configure Nginx for reverse proxy
/etc/nginx/sites-available
- Validate & restart Nginx
sudo nginx -t, sudo systemctl restart nginx
Step 7: Cerbot Certificate
- Use Certbot to enable HTTPS
sudo certbot --nginx
- Redirect HTTP to HTTPS for secure access.
Step 8: Changing Code
- run
git pull
- run
main.py
- commit with just comments, not from terminal
- test locally
docker-compose up
- type
http://127.0.0.1:8524
into browser, debug and fix any errors - sync or
git push
!!
To verify and pull these changes in the AWS terminal, travel into the rep, and make sure you run docker-compose down
. Now, we can git pull
and rebuild our website using docker-compose up -d --build