BI 4.1 Internet
For computing devices to communicate, paths are found using routers. These paths transmit packets of a piece of information like a jigsaw puzzle, and the maximum speed is measured as bits/second (aka the bandwith). The computer network as a whole is able to send and receive data.
For our website, we, the sender, are sending a request to the AWS server (the receiver) using routers to connect paths.
To manage the usage of sending/receiving data, protocols are required. The “Narrow Waist” model shows how the initial network access and messaging is processed into an IP, checked with transport (TCP or UDP), and submitted with applications such as a web server or a DNS.
BI 4.2 Fault Tolerance
To be fault-tolerant is to be flexible to move around any mistakes. If multiple devices are connected with pathways that each have more than one to each other, the network would be fault-tolerant; if one pathway goes down, the dependancy of network is able to send the data onto different routes.
When more devices are added to a fault-tolerant network, the network becomes stronger and more flexible, a network such as the Internet.
BI 4.3 Parallel and Distributed Computing
Sequential computing is when a computer does one task at a time, taking a consecutive amount of time. The tasks are dependent on the previous and has one CPU.
Parallel computing is when a computer utilizes its cores to complete the tasks at the same time. Some tasks take more than others, the longest-taking core is the total processing time.
Distributed computing is when a computer will send requests to other servers/devices to utilize their cores and CPUs. It combines both sequential and parallel computing. An example would be a Google search sending a request to thousands of servers.
For our deployment process, we are using AWS servers to deploy our backend, similarly to how we use Github to deploy our frontend.
Our Deployment Plan
Issue Link- https://github.com/nighthawkcoders/flocker_frontend/issues/247
- Secondary Deployment Admin (Prajna):
- Setup DNS endpoint
- Application Setup (find port, server, route)
- Primary Depolyment Admin (Arshia):
- Set up the new port, change in all locations
- Cerbot Config
- Mirabelle
- Prepare frontend access to port and domain
- Nginx setup
- Sanya
- Changing code in VS Code
- Zoe
- Debugging (Troubleshooting in AWS EC2)
- Claire
- Cockpit Navigation
#247 Deployment Roles
Arshia- Primary Deployment Admin
Prajna- Secondary Deployment Admin
Mirabelle- Setting up initial steps
Zoe- Debugging
Claire- Cockpit setup
Show more
https://github.com/nighthawkcoders/flocker_frontend|nighthawkcoders/flocker_frontendnighthawkcoders/flocker_frontend | Today at 9:01 AM | Added by GitHub
Note: To login to the deployment server on AWS EC2 you will use cockpit backdoor.
https://cockpit.stu.nighthawkcodingsociety.com/
First Time Install & More Detailed Steps
Only one person does this
- Login
- Clone your repo
- In your project directory, a. create a .env file with passwords b. run ./scripts/db_init.py
- In your repo run Docker commands a. docker-compose build b. docker-compose up -d
- Test your server, curl provides text response of your requested page a. docker ps # look for you application and port b. curl localhost:8087 # port 8087 is Mort’s not ours, instead use port 8205
Now you are ready for AWS and Route53 Domain Name registration. AWS Console sign-in URL https://nighthawkcodingsociety.signin.aws.amazon.com/console User name: ubuntu
After AWS Login you will register domain on Route53
https://us-east-1.console.aws.amazon.com/route53/v2/hostedzones?region=us-east-1#ListRecordSets/Z09610033A3V5NNQF4NH5
** flask in illustration is Mort’s not ours, instead use restaurant_backend
Test you DNS server in any terminal (MacOs, WSL, or AWS). Be sure it command returns IP address in answer section. (venv) johnmortensen@Mac portfolio_2025 % dig flask.stu.nighthawkcodingsociety.com # our subdomain is restaurant.stu—, frontend is restaurant_frontend
; «» DiG 9.10.6 «» flask.stu.nighthawkcodingsociety.com ;; global options: +cmd ;; Got answer: ;; -»HEADER«- opcode: QUERY, status: NOERROR, id: 58645 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;flask.stu.nighthawkcodingsociety.com. IN A
;; ANSWER SECTION: flask.stu.nighthawkcodingsociety.com. 300 IN A 3.130.255.192
;; Query time: 150 msec
;; SERVER: 2603:8001:4f00:4079::1#53(2603:8001:4f00:4079::1)
;; WHEN: Sat Feb 01 21:35:20 PST 2025
;; MSG SIZE rcvd: 81
Final steps are Nginx and Certbot. We will do these steps in a live Tech Talk. You should prep as it will be graded.