Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/lab9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀

on: [ push, workflow_dispatch ]

jobs:
Job:
runs-on: ubuntu-latest
env:
SYS_METRICS: metrics.txt
steps:
- name: Collect metrics
run: |
printf "CPU Info\n\n" >> $SYS_METRICS
cat /proc/cpuinfo >> $SYS_METRICS
printf "Memory Info\n\n" >> $SYS_METRICS
cat /proc/meminfo >> $SYS_METRICS
printf "OS Info\n\n" >> $SYS_METRICS
cat /etc/os-release >> $SYS_METRICS
- name: Subbmit metrics
uses: actions/upload-artifact@v4
with:
name: system_metrcis_report
path: ${{ env.SYS_METRICS }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ipfs*/
Binary file added submitions/lab1/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab1/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions submitions/lab1/submition1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Lab1

## Task 1

1. A brief summary explaining the benefits of signing commits.
- The main idea of signing the commits is the same as signing anything - it is done to ensure the source of data (in this case the source of the commits). It is a way to ensure that the author of changes is legitimate, ensuring the security and integrity
2. Make a signed commit
- Gen keys `ssh-keygen -t ed25519 -C "<e-mail>"`
- Add private key to repo
```bash
git config user.signingkey ~/.ssh/id_ed25519
git config commit.gpgSign true
git config gpg.format ssh
```
- Commit `git add . && git commit -S -m 'Remake keys with actual email'`
- Push `git push origin master`
- Result:
![alt text](1.png)

## Task 2

1. A brief summary comparing these merge strategies
- Merge commit - creates the merge commit that integrates all commits to the target branch and adds the m to the end of the history.
- **Pros**: default approach, keeps all necessary metadata
- **Cons**: create a banch of useless merge commits that introduce some mess to the repository.
- Squash and Merge - combines all the commits into one big commit that is added to the target brunch in the end.
- **Pros**: Clear repo in the end that shows the result of the repo evolution
- **Cons**: Deletes metadata about the authors of the commits, should not use the merged brunch us could mess up alot of things (by re-commiting the changes squashed in previous merge)
- Rebase and Merge: rewrites the git history as if all the commits had been committed to the target branch initially.
- **Pros**: one big, clear, linear git history (used in the Trunk approach, which is an alternative to git-flow)
- **Cons**: easy to mess up and rewrite changes that were done after
- Commit added to the target brunch without the signature
- Merge conflicts could not be resolved in a single commit (if 10 commits have conflicts you have to resolve it 10 time instead of one)
2.
![alt text](2.png)
53 changes: 53 additions & 0 deletions submitions/lab10/submition10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Lab10

## Task 1

Artifact registry essentially is a server that stores all the packages that you have produced in a single place. The three most popular solutions are provided by [AWS](https://docs.aws.amazon.com/codeartifact/latest/ug/welcome.html), [GCP](https://cloud.google.com/artifact-registry/docs/overview) and [Azure](https://learn.microsoft.com/en-us/azure/devops/artifacts/?view=azure-devops). They provide a similar service and differs mostly in supported packages, CLI tools and pricing. However, all of artifacts registry mentioned support generic type of packages and could substitute each other. All the supported packages are listed down below as well as tools names.

1. AWS - CodeArtifact
- Cargo
- Swift
- Maven
- npm
- NuGet
- Python
- Ruby
- generic
2. GCP - Artifact Registry
- Docker Images
- Go modules
- Helm charts
- Java Packages
- Python
- Apt
- RPM
- generic
3. Azure - Artifacts
- Maven
- npm
- NuGet
- Python
- dotnet
- Gradle
- Cargo
- generic

## Task 2

Serverless computing is basically a way to create a backend without creating it by yourself. In all cases you outsource the infrastructure part to the third-party company. And in most cases AWS, GCP and Azure provide a set of tools in order to manage you serverless computing. Down below services and short descriptions are listed for each provider

1. [AWS](https://aws.amazon.com/serverless/getting-started/?nc=sn&loc=2&serverless.sort-by=item.additionalFields.createdDate&serverless.sort-order=desc)
- Amazon API Gateway - Define you API
- Amazon EventBridge - Bus/Data channel between applications and AWS services
- Amazon Simple Notification Service - Backend for providing notifications, such as emails, messages/ push notifications, etc.,to the customers
- Amazon Simple Queue Service - queue for application scaling and load distribution
- AWS Fargate - Container runner
- AWS Lambda - A functions that executes custom code
- AWS Serverless Application Model - Framework for creating a serverless applications (form the documentation it is mostly a guidelines of how to use tools listed above)
- AWS Step Functions - coordinates the parts of serverless application
2. [GPC](https://cloud.google.com/serverless/?hl=en)
- Cloud Run - Container runner or it could use source based deployment for Go, Node.js, Python, Java, .NET Core, Ruby
- Cloud Run functions - API definition
3. [Azure](https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-serverless-overview)
- Azure Functions - A service that executes some scripts written in C#, Java, JavaScript, PowerShell, Python, and TypeScript
- Azure Logic Apps - A serverless application workflow configuration tool that defines which Azure functions would be used and what triggers would trigger the computing
Binary file added submitions/lab2/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab2/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab2/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab2/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions submitions/lab2/submition2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Lab2

## Task 1

1. Install docker and update the system:
```nix
#configuration.nix
virtualisation.docker.enable = true;
users.users.<user>.extraGroups = [ ... "docker" ];
```
```bash
#/bin/bash
sudo nixos-rebuild switch
```
2. Pull and run container:
```bash
docker run -d --name ipfs_host -v ./submitions/ipfs_export:/export -v ./submitions/ipfs_data:/data/ipfs -p 8080:8080 -p 4001:4001 -p 5001:5001 ipfs/go-ipfs
```
![alt text](1.png)

3. Upload the file:
![alt text](2.png)

4. get the file with [the link](https://ipfs.io/ipfs/QmZNCtCsiTmifuiveGgN7GSRoGc7JUpHEAuvDusi62GGgR) (hash **QmZNCtCsiTmifuiveGgN7GSRoGc7JUpHEAuvDusi62GGgR**)
![alt text](3.png)

5. Peers and bandwith
![alt text](4.png)

## Task 2

1. IPFS hash: [bafybeiczcndqwxvgv5gkam7hufozheazefkrbgnvgb6es7n3oj6qjwwj3u](http://ipfs.io/ipfs/bafybeiczcndqwxvgv5gkam7hufozheazefkrbgnvgb6es7n3oj6qjwwj3u)
2. site: [https://early-bit-deep.on-fleek.app/](https://early-bit-deep.on-fleek.app/)
Binary file added submitions/lab3/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab3/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions submitions/lab3/submition3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Lab3

## Task 1

1. try `git cat-file`
![alt text](1.png)

## Task 2

1. make all commits:
- file
```
First commit
Second commit
Third commit
```
- git status
```
On branch master
Your branch is ahead of 'origin/master' by 3 commits.
(use "git push" to publish your local commits)

Untracked files:
(use "git add <file>..." to include in what will be committed)
submitions/lab3/
```
2. Make soft reset
- File
```
First commit
Second commit
Third commit
```
- git status
```
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)

Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: file.txt

Untracked files:
(use "git add <file>..." to include in what will be committed)
submitions/lab3/
```
3. Make hard reset
- File
```
First commit
```
- git status
```
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)

Untracked files:
(use "git add <file>..." to include in what will be committed)
submitions/lab3/
```
4. make mixed reset (default)
- File
```
First commit
```
- Git status
```
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
(use "git add <file>..." to include in what will be committed)
file.txt
submitions/lab3/

nothing added to commit but untracked files present (use "git add" to track)
```
5. `git reflog` (yes it took me 3 attempts)
![alt text](2.png)

6. `git reset --hard <hash_from_reflog>`
- file
```
First commit
Second commit
Third commit
```
- git status
```
On branch master
Your branch is ahead of 'origin/master' by 3 commits.
(use "git push" to publish your local commits)

Untracked files:
(use "git add <file>..." to include in what will be committed)
submitions/lab3/
```
7. Explonation
- `git reset`: based on experience, use cases `reset` moves the head between the different commits according to the selected mode. From "GIT-RESET(1)" man and based on the output of file/git status, the modes work as follows:
- **soft**: just relocate the HEAD with no changes to git storage (index) or local fs (tree)
- **mixed** (default): move head to the target commit and update git storage (index) without updating the local fs (tree)
- **hard**: move the head to the target commit and update both fit storage (index) and local fs (tree)
- `git reflog`: this is the log changes of the current branch hash as it logs all the commits, resets, checkouts, and rebases (if it were only commits and resets, I could have assumed it was a log of all HEAD changes).
- `HEAD~<int>` commit relative to the head down (e.g. `HEAD~/HEAD~1` - 1 commit before head, `HEAD~10` 10 commits before head)
8. Hard reset to HEAD~3 (don't want to keep trash in the repo :))
Binary file added submitions/lab4/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab4/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab4/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab4/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab4/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab4/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab4/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
97 changes: 97 additions & 0 deletions submitions/lab4/submition4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Lab4

## Note from personal hands-on experience

- Pacman is mach faster than the apt since it is just faster by itself and allows for parrallel download since recently (before powerpill was used, and I'm not sure about parralel download in apt)
- Pacman is more convenient (maybe just a preference), especially since AUR package managers, such as yay and paru, provide very convenient package locations (they have search)
- So the arch/manjaro would be the distribution to install :-) if it were stable
- As a result, I end up using NixOS since it is something new and exotic :)
- Due to I refusal to use ubuntu/debian this lab was done in a Docker container

## Task 1

1. Run the container with ubuntu
```bash
docker run -it --name=devopsLab-v./submitions/lab4/ubuntuVol:/labmaterials--entrypoint/bin/bashubuntu
```
2. if required, you could access the container with `docker start -ai devopsLab`
3. Install dpkg-dev
```bash
apt update
apt-get install dpkg-dev
```
4. Generate a package index:
```bash
dpkg-scanpackages ./ /dev/null | gzip-9c > ./Packages.gz
```
5. Update package name with vim:
```
# zcat Packages.gz
Package: my-vs-code
Version: 1.91.1-1720564633
Architecture: amd64
Maintainer: Microsoft Corporation <vscode-linux@microsoft.com>
Installed-Size: 388720
Depends: ca-certificates, libasound2 (>= 1.0.17), libatk-bridge2.0-0 (>= 2.5.3), libatk1.0-0 (>= 2.2.0), libatspi2.0-0 (>= 2.9.90), libc6 (>= 2.14), libc6 (>= 2.16), libc6 (>= 2.17), libc6 (>= 2.2.5), libc6 (>= 2.28), libcairo2 (>= 1.6.0), libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3, libdbus-1-3 (>= 1.9.14), libdrm2 (>= 2.4.75), libexpat1 (>= 2.1~beta3), libgbm1 (>= 17.1.0~rc2), libglib2.0-0 (>= 2.37.3), libgssapi-krb5-2 (>= 1.17), libgtk-3-0 (>= 3.9.10), libgtk-3-0 (>= 3.9.10) | libgtk-4-1, libkrb5-3 (>= 1.6.dfsg.2), libnspr4 (>= 2:4.9-2~), libnss3 (>= 2:3.30), libnss3 (>= 3.26), libpango-1.0-0 (>= 1.14.0), libx11-6, libx11-6 (>= 2:1.4.99.1), libxcb1 (>= 1.9.2), libxcomposite1 (>= 1:0.4.4-1), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxkbcommon0 (>= 0.5.0), libxkbfile1 (>= 1:1.1.0), libxrandr2, xdg-utils (>= 1.0.2)
Recommends: libvulkan1
Conflicts: visual-studio-code
Replaces: visual-studio-code
Provides: visual-studio-code
Filename: ./code_1.91.1-1720564633_amd64.deb
Size: 100924046
MD5sum: 04821bd56f47d5fbe8bf8f621e791437
SHA1: 48d095107eeb17f256952d7a7c0bfb2045d3221d
SHA256: 31a13c05295f3349d3dc168d9c67dda4fcf30823fe3c34f215f0324d197f5479
Section: devel
Priority: optional
Homepage: https://code.visualstudio.com/
Description: Code editing. Redefined.
Visual Studio Code is a new choice of tool that combines the simplicity of
a code editor with what developers need for the core edit-build-debug cycle.
See https://code.visualstudio.com/docs/setup/linux for installation
instructions and FAQ.
```
6. Add repo to the source list
```bash
echo "deb [trusted=yes] file:/labmaterials ./" | tee/etc/apt/sources.list.d/local-apt-repo.list
sudo apt update
```

![alt text](1.png)

7. verify package exist

![alt text](2.png)

8. Install package with `apt install my-vs-code`

![alt text](3.png)

## Task 2

1. Use `apt-cache showpkg my-vs-code`
- It provides all the dependancies for vscode, as well as reverse dependancies (no in case of vscode) and providers.

![alt text](4.png)

2. simulate installation with the `-s` flag
- It provides information about the current state of the package in a system and what packages would be affected by the installation process (in the case of a custom pkg re-installation would yelld removal of code pkg and the installation of the "my-vs-code" pkg)

![alt text](5.png)

- it is actually the same as if you try to install a package and say "no" when apt ask you to proceed with installation.

![alt text](6.png)

## Task 3

1. hold the code pkg with `apt-mark hold code`
2. try to reinstall "code" with "my-vs-code"
- the result is an error due to held pkg
```
Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
```
3. unhold "code" pkg
- the installation of "my-vs-code" did not yelld an exeption anymore

![alt text](7.png)
Binary file added submitions/lab4/ubuntuVol/Packages.gz
Binary file not shown.
Binary file not shown.
Binary file added submitions/lab5/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab5/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab5/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab5/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab5/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab5/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added submitions/lab5/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading