diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..b05d9a43 Binary files /dev/null and b/.DS_Store differ diff --git a/submission1.md b/submission1.md new file mode 100644 index 00000000..a5dd3b22 --- /dev/null +++ b/submission1.md @@ -0,0 +1,21 @@ +# Task 1: SSH Commit Signature Verification +Signed commits help ensure the authenticity and integrity of commits. +They verify that a commit comes from a trusted source and has not been tampered with. +## Benefits of Signing Commits +1. **Author Verification**: Confirms the identity of the commit author. +2. **Data Integrity**: Ensures the commit has not been altered since it was signed. +3. **Trust in Collaboration**: Builds confidence in projects with multiple contributors. +4. **Security**: Prevents unauthorized commits or identity impersonation. +5. **Compliance**: Helps meet audit and regulatory requirements. +# Task 2: Merge Strategies in Git +## Standard Merge +- **Pros**: Retains full commit history and development context. +- **Cons**: Can create a cluttered history in busy repositories. +## Squash and Merge +- **Pros**: Combines all commits into a single commit, simplifying the history. +- **Cons**: Loses detailed history of individual commits. +## Rebase and Merge +- **Pros**: Creates a linear history, making it easier to follow. +- **Cons**: Rewrites commit history, which can cause conflicts in collaborative projects. +## Why Standard Merge is Preferred +- Standard Merge is often preferred because it maintains the full history, making it easier to track changes and collaborate without conflicts. diff --git a/submission2.md b/submission2.md new file mode 100644 index 00000000..b59a7e62 --- /dev/null +++ b/submission2.md @@ -0,0 +1,23 @@ +# IPFS Gateway Setup and File Upload Documentation +## Connected Peers and Bandwidth + +**Connected Peers**: 29 +**Bandwidth Usage**: +- Incoming: 27 KiB/s +- Outgoing: 313 KiB/s + +## Uploaded File Information + +**File Name**: +**File Hash (CID)**: QmRLLMYruhaxGFXKPUR7F1LLhXTpJgcVntH925249V1vjm + +## IPFS Gateway URLs + +[IPFS.io Gateway](https://ipfs.io/ipfs/QmRLLMYruhaxGFXKPUR7F1LLhXTpJgcVntH925249V1vjm) +[Cloudflare Gateway](https://cloudflare-ipfs.com/ipfs/QmRLLMYruhaxGFXKPUR7F1LLhXTpJgcVntH925249V1vjm) +[Infura Gateway](https://ipfs.infura.io/ipfs/QmRLLMYruhaxGFXKPUR7F1LLhXTpJgcVntH925249V1vjm) + +## Fleek Deployment + +**IPFS Link**: bafybeifkg56qjgf7dfryjgzhtwtq34qy5m5bxe7kkmr3bhyzeqpae2gzky +**Fleek Domain**: https://low-table-high.on-fleek.app/ diff --git a/submission7.md b/submission7.md new file mode 100644 index 00000000..f980997f --- /dev/null +++ b/submission7.md @@ -0,0 +1,37 @@ +# TASK 1 + +Version of the vm box: Version 7.1.0 r164728 (Qt6.5.3) +But the UTM was used because of problems with the MacOS: Version 4.5.4 (100) +![VM Running](vm_running.png) + +# TASK 2 + +## Processor Information +- **Tool Used:** `sysctl` +- **Command:** `sysctl -n machdep.cpu.brand_string` +- **Output:** `Apple M2 Pro` + + +## RAM Information +- **Tool Used:** `vm_stat` and `sysctl` +- **Command 1:** `vm_stat` +- **Output:**`Mach Virtual Memory Statistics: (page size of 16384 bytes) Pages free: 212857. Pages active: 240569. Pages inactive: 323215. Pages speculative: 45272. Pages throttled: 0. Pages wired down: 112946. Pages purgeable: 31499. "Translation faults": 670069897. Pages copy-on-write: 6787287. Pages zero filled: 374632986. Pages reactivated: 14417335. Pages purged: 9158200. File-backed pages: 392631. Anonymous pages: 216425. Pages stored in compressor: 372621. Pages occupied by compressor: 73250. Decompressions: 17749927. Compressions: 26883426. Pageins: 12206601. Pageouts: 95995. Swapins: 133049. Swapouts: 257185.` + +- **Command 2:** `sysctl hw.memsize` +- **Output:** `hw.memsize: 17179869184` + +This corresponds to 16 GB of RAM. + +## Network Information +- **Tool Used:** `ifconfig` +- **Command:** `ifconfig` +- **Output:** `lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 ... en0: flags=8863 mtu 1500 ether 6c:7e:67:d1:bb:22 inet6 fe80::84f:272:33b3:4d70%en0 prefixlen 64 secured scopeid 0xf inet 10.91.49.154 netmask 0xfffff000 broadcast 10.91.63.255 ...` + +- **Command for filtering inet addresses:** `ifconfig -a | grep inet` +- **Output:** `inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet6 fe80::6c7e:67ff:fed1 %ap1 prefixlen 64 scopeid 0xe inet6 fe80::84f:272:33b3:4d70%en0 prefixlen 64 secured scopeid 0xf inet 10.91.49.154 netmask 0xfffff000 broadcast 10.91.63.255` + + +## Operating System Specifications +- **Tool Used:** `sw_vers` +- **Command:** `sw_vers` +- **Output:** `ProductName: macOS ProductVersion: 14.5 BuildVersion: 23F79` diff --git a/submission8.md b/submission8.md new file mode 100644 index 00000000..2be2c1a8 --- /dev/null +++ b/submission8.md @@ -0,0 +1,134 @@ + +# Containers Lab - Docker + +## Task 1: Container Management + +### 1. List Containers +Command: +```bash +docker ps -a +``` +Output: +``` +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +cd64cf2242ad 195245f0c792 "/docker-entrypoint.…" 6 days ago Exited (0) 6 days ago nginx-server +0e03778e7ac3 ubuntu "/bin/bash" 2 weeks ago Exited (129) 2 weeks ago crazy_golick +f3e968633e3f debian "bash" 2 weeks ago Exited (255) 6 days ago debian-repo +10706b425200 ipfs/go-ipfs "/sbin/tini -- /usr/…" 3 weeks ago Exited (255) 2 weeks ago 0.0.0.0:4001->4001/tcp, 0.0.0.0:5001->5001/tcp, 4001/udp, 0.0.0.0:8080->8080/tcp, 8081/tcp ipfs_host +``` + +### 2. Pull Latest Ubuntu Image +Command: +```bash +docker pull ubuntu:latest +``` +Output: +``` +latest: Pulling from library/ubuntu +6e59cb05818e: Pull complete +Digest: sha256:dfc10878be8d8fc9c61cbff33166cb1d1fe44391539243703c72766894fa834a +Status: Downloaded newer image for ubuntu:latest +docker.io/library/ubuntu:latest +``` + +### 3. Run Container +Command: +```bash +docker run -it --name ubuntu_container ubuntu:latest +``` +Details: Exited the container and returned to the host terminal to execute further commands. + +### 4. Remove Image +Commands: +```bash +docker stop ubuntu_container +docker rm ubuntu_container +docker rmi ubuntu:latest +``` +Outcome: Image removed successfully. + +--- + +## Task 2: Image and Container Operations + +### 1. Create Image Archive +Command: +```bash +docker save -o ubuntu_image.tar ubuntu:latest +``` +Output: `ls -lh ubuntu_image.tar` shows: +``` +-rw------- 1 arseny0304 staff 98M Sep 26 16:42 ubuntu_image.tar +``` +The original image size was around 101MB, but the archive file might be slightly smaller due to compression. + +### 2. Run Nginx Container +Command: +```bash +docker run -d -p 80:80 --name nginx_container nginx +``` +Verification using `curl http://127.0.0.1` showed the default Nginx welcome page. + +### 3. Create HTML File and Copy to Container +Created `index.html` with the required content, then copied it to the container: +```bash +docker cp index.html nginx_container:/usr/share/nginx/html/index.html +``` +Verification using `curl http://127.0.0.1` showed the updated webpage content: +```html + + +The best + + +

website

+ + +``` + +### 4. Create Custom Image +Command: +```bash +docker commit nginx_container my_website:latest +``` +Output: +``` +sha256:06e22ad38d229d6ac8468acbef77810cf6252b29a8b7808f6636cad32799c55d +``` + +### 5. Remove Original Container +Commands: +```bash +docker stop nginx_container +docker rm nginx_container +``` +Outcome: Successfully removed the original container. + +### 6. Create New Container Using Custom Image +Command: +```bash +docker run -d -p 80:80 --name my_website_container my_website:latest +``` +Verification using `curl http://127.0.0.1` displayed the correct HTML content. + +### 7. Analyze Image Changes +Command: +```bash +docker diff my_website_container +``` +Output: +``` +C /etc +C /etc/nginx +C /etc/nginx/conf.d +C /etc/nginx/conf.d/default.conf +C /run +C /run/nginx.pid +``` +Explanation: The `C` (changed) indicates changes in the configuration files and runtime data for Nginx. + +--- + +### Conclusion + +All tasks have been completed successfully, and the custom web server is running correctly using the Docker container. diff --git a/vm_running.png b/vm_running.png new file mode 100644 index 00000000..f5829844 Binary files /dev/null and b/vm_running.png differ