diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..e5bb161 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,18 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/.github/workflows/lab9.yml b/.github/workflows/lab9.yml new file mode 100644 index 0000000..4d953c6 --- /dev/null +++ b/.github/workflows/lab9.yml @@ -0,0 +1,14 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [workflow_dispatch] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - name: "Collect information about the runner." + run: touch info.txt && lsb_release -a >> info.txt && lshw -short -sanitize >> info.txt + - name: "Upload artifact" + uses: actions/upload-artifact@v4 + with: + name: System Information + path: info.txt \ No newline at end of file diff --git a/Lab1/submission1.md b/Lab1/submission1.md new file mode 100644 index 0000000..6c62438 --- /dev/null +++ b/Lab1/submission1.md @@ -0,0 +1,68 @@ +# Lab 1: Introduction to DevOps with Git + +## Task 1: SSH Commit Signature Verification + +**Objective**: Understand the importance of commit signing using SSH keys and set up commit signature verification. + +1. **Explore the Importance of Signed Commits**: + - **Research**: Learn why commit signing is crucial for verifying the integrity and authenticity of commits. + - Commits are made to the different project of different size, value and importancy. For some local projects of one person or small group commit signing might be redundant and will only lead to spending unnecessary time on useless work. + On the other hand, there are some middle size teams and projects. In this case signing is suggested to divide responsibility for the made changes on certain people, who were making commits. With commit signing it is almost impossible (I don't like using "completely impossible" in the context of IT, since each year people prove that nothing is fully safe) to say, that someone changed their commits, even if they were made a long time ago. + The third case is the projects of huge size (like Linux kernel) projects or projects of high responsibility (autopilot for planes), where even a small mistake can lead to huge fails or critical backdoors. In this case only a small group of users can commit or appove commits into high-secured branches. In this case signiture of commits is necessary for the safety reasons. + +2. **Set Up SSH Commit Signing**: + - **Option 2: Generate a New SSH Key (Recommended: ed25519 Format)**: + - Generate a new SSH key pair using the ed25519 format. + + ```sh + ssh-keygen -t ed25519 -C "your_email@example.com" + ``` + + - Add the public key to your GitHub account. + - [GitHub Guide to Adding SSH Key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) + + - Configure Git to use your new SSH key for signing commits. + + ```sh + git config --global user.signingkey + git config --global commit.gpgSign true + git config --global gpg.format ssh + ``` + +3. **Make a Signed Commit**: + - Create and sign a commit. + + ```sh + git commit -S -m "Your signed commit message" + ``` + + - Push the commit with your submission1.md file. + +## Task 2: Merge Strategies in Git + +**Objective**: Research the differences between merge strategies in Git and modify repository settings to allow only the standard merge strategy. + +1. **Research Merge Strategies**: + - **Standard Merge**: Combines two branches by creating a merge commit. + - Pros: + - Saves full history of commits and their relationships. It makes history more understandable. + - Cons: + - Since we save the full history plus some additional merge commits, the log might be huge, making it harder to follow. + - **Squash and Merge**: Combines all commits from a feature branch into a single commit before merging. + - Pros: + - More compressed history. + - Cons: + - Losing the connection to the feature branch. + - **Rebase and Merge**: Reapplies commits from a feature branch onto the base branch. + - Pros: + - Produces very straightforward and simple history with no extra commits. + - Cons: + - It rewrites the history, which is not good. Also requires forced push, which is simply dangerous. + - **Summary**: Standard merge is prefered in collaborative environments since it saves all the history, which is crucial. + +2. **Modify Repository Settings**: + - **Disable Squash and Rebase Merge**: + - Go to the Settings page of your forked repository on GitHub. + - Navigate to the "Options" section. + + - Status: Done \ No newline at end of file diff --git a/Lab10/submission10.md b/Lab10/submission10.md new file mode 100644 index 0000000..79d6aa2 --- /dev/null +++ b/Lab10/submission10.md @@ -0,0 +1,68 @@ +# Cloud Computing Lab - Artifact Registries and Serverless Computing Platforms + +In this lab assignment, you will research and compare artifact registries and serverless computing platforms in AWS, GCP, and Azure. You will document your findings in a single Markdown file, providing information on popular artifact registries and the best serverless computing platforms in each cloud platform. Follow the tasks below to complete the lab assignment. + +## Task 1: Artifact Registries Research + +### **What is an artifact registry?**: + To begin with we need to understand what is an artifact registry and why we need them. + Artifact in IT context are some products as results of compilation, building or creation of some code base. These are the good examples of artifacts: + + - Program installers (.exe, .apk, etc) + - Docker containers + - Prebuild libraries + - Packages + + So, since we have different artifacts, we need to store them. This is the reason why we might need Artifact Registries. Their main tasks: + - Storing artifacts in the cloud + - Version control of artifacts + - Security + - Integration with CI/CD. + + And now we need to find out which Artifact Registry is better for our task by comparing their key features. To begin with, as with the whole cloud infrastructure, we have 3 main players: + - AWS (Amazon) + - Google + - Azure (Microsoft) + +### Now let's look at them closer. + +1) **AWS CodeArtifact** + - Integration with other AWS services. Which is quite important for some big companies and projects since AWS is the biggest (if I am not mistaken) Cloud ecosystem currently. + - Security through good accessibility control. + - Publishing and spreading of packages is made as simple as possible. + - Pay-as-you-go pricing + +2) **GCP Artifact Registries** + - Integration with Google Cloud services + - Centralized storage for artifacts and dependencies. It makes working with it easier due to the unified interface. + - High-level security + +3) **Azure Container Registry** + - Integration with other Microsoft products. + - Geo-replication. It makes sharing your product easier and smoother all around the world. + - Good security measures, including Private Link. + - Supports all types of files. + +## Task 2: Serverless Computing Platform Research + +### What is Serverless Computing Platforms + +Serverless computing platforms are the platforms which allow developers to run server-side tasks (like CI/CD, deployment, heavy compilation) to the cloud without the need to manage it. So, you don't need to hire special server admin. It is not the replacement of the servers, but can be applicable in some tasks. + +### Now about the big-3: +1) **AWS Lambda** + - Integration with other AWS services. + - Automatic Scaling, allowing to not think about the future scaling of a project. + - Very good resource management settings. You can set up almost everything as you want, making it very flexible for almost any task. + - Pay-as-you-go pricing + +2) **Google Cloud Functions** + - Low latency is one of the main goal the Google team tries to achieve. It can be crucial for some tasks. + - Fast deployment. This is another priority the team is seeking. Quite good for small- and middle-sized projects. + - Big variety of very useful and easy-to-use monitoring tools. + - Paying only for the resources taken for your tasks. Also free-to-use for some very liht workloa, which is basically free to implement, pay to use paying system. + +3) **Azure Functions** + - Durable Functions. This allows to create stateful workflows, which makes the service even more powerful. + - Huge variety of triggers and bindings to choose. + - Pay-as-you-go pricing \ No newline at end of file diff --git a/Lab2/lab2_1.png b/Lab2/lab2_1.png new file mode 100644 index 0000000..4ebf630 Binary files /dev/null and b/Lab2/lab2_1.png differ diff --git a/Lab2/lab2_2.png b/Lab2/lab2_2.png new file mode 100644 index 0000000..ca587a7 Binary files /dev/null and b/Lab2/lab2_2.png differ diff --git a/Lab2/lab2_3.png b/Lab2/lab2_3.png new file mode 100644 index 0000000..958b6fd Binary files /dev/null and b/Lab2/lab2_3.png differ diff --git a/Lab2/lab2_4.png b/Lab2/lab2_4.png new file mode 100644 index 0000000..deddfc4 Binary files /dev/null and b/Lab2/lab2_4.png differ diff --git a/Lab2/submission2.md b/Lab2/submission2.md new file mode 100644 index 0000000..5e857ad --- /dev/null +++ b/Lab2/submission2.md @@ -0,0 +1,84 @@ +# DevOps Tool Exploration + +In this lab, you will explore essential DevOps tools and set up a project on the Fleek service. Follow the tasks below to complete the lab assignment. + +## Task 1: Set Up an IPFS Gateway Using Docker + +**Objective**: Understand and implement an IPFS gateway using Docker, upload a file, and verify it via an IPFS cluster. + +1. **Set Up IPFS Gateway**: + - Install Docker on your machine if it's not already installed. + - It was installed + + - Pull the IPFS Docker image and run an IPFS container: + + Pull docker IPFS image + ```sh + docker pull ipfs/go-ipfs + ``` + Building container of the downloaded image. Using -v flag we create virtual volumes in our container, which are just links to some folders in the host system. -d is used to run container in background and not occupy the terminal. --name - specify a name for the container. -p - we make a mapping, that port 8080, for example, in container is working with port 8080 on the host machine. + ```sh + docker run -d --name ipfs_host -v /path/to/folder/with/file:/export -v ipfs_data:/data/ipfs -p 8080:8080 -p 4001:4001 -p 5001:5001 ipfs/go-ipfs + ``` + + - Verify the IPFS container is running: + + ```sh + docker ps + ``` + + ``` + 64c95467573c ipfs/go-ipfs "/sbin/tini -- /usr/…" 15 seconds ago Up 15 seconds (healthy) 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. **Upload a File to IPFS**: + - Open a browser and access the IPFS web UI: + + ```sh + http://127.0.0.1:5001/webui/ + ``` + + - Explore the web UI and wait for 5 minutes to sync up with the network. + - Upload any file via the web UI. + - Use the obtained hash to access the file via any public IPFS gateway. Here are a few options: + - [IPFS.io Gateway](https://ipfs.io/ipfs/) + - [Cloudflare IPFS Gateway](https://cloudflare-ipfs.com/ipfs/) + - [Infura IPFS Gateway](https://ipfs.infura.io/ipfs/) + + - Append your file hash to any of the gateway URLs to verify your file is accessible. Note that it may fail due to network overload, so don't worry if you can't reach it + + + Worked only on local for some reason. + ![image](lab2_3.png) + +3. **Documentation**: + - Create a `submission2.md` file. + - Share information about connected peers and bandwidth in your report. + ![image](lab2_1.png) + ![image](lab2_2.png) + - Provide the hash and the URLs used to verify the file on the IPFS gateways. + QmYgf7rbovaD3DK9cK3WzDwD1S4EyM4jj5efYLtr7BQuhs + http://bafybeiezwtzmzm6cj7ylsoq6matuo5l7gnns7qqcrbucmmnfwvlbv6wvji.ipfs.localhost:8080/ + https://dweb.link/ipfs/QmYgf7rbovaD3DK9cK3WzDwD1S4EyM4jj5efYLtr7BQuhs + +## Task 2: Set Up Project on Fleek.co + +**Objective**: Set up a project on the Fleek service and share the IPFS link. + +1. **Research**: + - Understand what IPFS is and its purpose. + IPFS - decentralized File System, which addresses data by its content, not location. It makes data available from any point of internet and cannot be sensored. + - Explore Fleek's features. + + +2. **Set Up**: + - Sign up for a Fleek account if you haven't already. + - Use your fork of the Labs repository as your project source. Optionally, set up your own website (notify us in advance). + - Configure the project settings on Fleek. + - Deploy the Labs repository to Fleek, ensuring it is uploaded to IPFS. + ![image](lab2_4.png) + +3. **Documentation**: + - Share the IPFS link and domain of the deployed project in the `submission2.md` file. + https://ipfs.io/ipfs/bafybeienfnnln4emucoaziqfnjrod6fhd4wenubg6ws4zezvubgprm5ltq/ + diff --git a/Lab3/lab3_1.png b/Lab3/lab3_1.png new file mode 100644 index 0000000..be7a411 Binary files /dev/null and b/Lab3/lab3_1.png differ diff --git a/Lab3/lab3_2.png b/Lab3/lab3_2.png new file mode 100644 index 0000000..d188cb0 Binary files /dev/null and b/Lab3/lab3_2.png differ diff --git a/Lab3/lab3_3.png b/Lab3/lab3_3.png new file mode 100644 index 0000000..48e6f89 Binary files /dev/null and b/Lab3/lab3_3.png differ diff --git a/Lab3/lab3_4.png b/Lab3/lab3_4.png new file mode 100644 index 0000000..d9afa20 Binary files /dev/null and b/Lab3/lab3_4.png differ diff --git a/Lab3/submission3.md b/Lab3/submission3.md new file mode 100644 index 0000000..3e24864 --- /dev/null +++ b/Lab3/submission3.md @@ -0,0 +1,136 @@ +# Version Control + +In this lab, you will learn about version control systems and their importance in collaborative software development. You will specifically focus on Git, one of the most widely used version control systems. Follow the tasks below to complete the lab assignment. + +## Task 1: Understanding Version Control Systems + +**Objective**: Understand how Git stores data. + +1. **Create and Explore a Repository**: + - Use the current repository and make a few commits. + - Use `git cat-file` to inspect the contents of blobs, trees, and commits. + + - + ```sh + git cat-file -p + ``` + ```sh + Here was printed the file content, too big to put here. + ``` + - + ```sh + git cat-file -p + ``` + ``` + 100644 blob ede183da8ef201e5f5737eea502edc77fd8a9bdc README.md + 040000 tree 0ae774b180e2f58aeec5d66d1b3407c9c9cdd5cc Solutions + 040000 tree b926a085a558de1861b03912b887736724b46292 images + 100644 blob 5738bc15a0416ad2624df13badfb235052777e79 index.html + 100644 blob 1dba99957c3bb59d40913294b83e40d5c38b6c0b lab1.md + 100644 blob bf5553698071098c4cb429db6b14811d4316e822 lab10.md + 100644 blob 1b99cc0044f93f556a0f6a599c7edf2f33f4944a lab2.md + 100644 blob 2f8463cc188ec6ca69ae7a0f98d38e132280becb lab3.md + 100644 blob d66a6867f90e48f6f44d9d80821aa1d866a24882 lab4.md + 100644 blob 2ff5995a25b74c9c02a143c09a9601ce66001a9f lab5.md + 100644 blob 793bb19cd158fae333205f524eba5adc16718c58 lab6.md + 100644 blob e3daa92d57248cbfb76d60de86f7b2e0da7e9a22 lab7.md + 100644 blob 0a88f0778b2534da7d9208198d1f2de010ca7459 lab8.md + 100644 blob 15ab5a07323c525efeda1f3ce737612852e02f2b lab9.md + ``` + - + ```sh + git cat-file -p + ``` + ```sh + tree 53fa5326dd73918edd7bfdd614c5c5725b86670e + parent 47e85d158914eee28418c250e813cb59c26f5d21 + author Stepan Kuznetsov 1731404522 +0300 + committer Stepan Kuznetsov 1731404522 +0300 + gpgsig -----BEGIN SSH SIGNATURE----- + sensored + -----END SSH SIGNATURE----- + + Lab2 + ``` + + - Create a `submission3.md` file. + - Provide the output in the `submission3.md` file. + +## Task 2: Practice with Git Reset Command + +**Objective**: Practice using different ways to use the `git reset` command. + +1. **Create a New Branch**: + - Create a new branch named "git-reset-practice" in your Git repository. + + ```sh + git checkout -b git-reset-practice + ``` + ```sh + Switched to a new branch 'git-reset-practice' + ``` + +2. **Explore Advanced Reset and Reflog Usage**: + - Create a series of commits. + + ```sh + echo "First commit" > file.txt + git add file.txt + git commit -m "First commit" + + echo "Second commit" >> file.txt + git add file.txt + git commit -m "Second commit" + + echo "Third commit" >> file.txt + git add file.txt + git commit -m "Third commit" + ``` + + ![image](lab3_1.png) + P.s.: style used by me could be found [here](https://stackoverflow.com/a/9074343) + + - Use `git reset --hard` and `git reset --soft` to navigate the commit history. + + ```sh + git reset --soft HEAD~1 + ``` + ![image](lab3_2.png) + ```sh + git reset --hard HEAD~1 + ``` + + ![image](lab3_1.png) + + - Use `git reflog` to recover commits after a reset. + + ```sh + git reflog + ``` + - ```sh + 470b1ac (HEAD -> git-reset-practice) HEAD@{0}: reset: moving to HEAD~1 + bfaeda7 HEAD@{1}: reset: moving to HEAD~1 + a02d43f HEAD@{2}: commit: Third commit + bfaeda7 HEAD@{3}: commit: Second commit + 470b1ac (HEAD -> git-reset-practice) HEAD@{4}: commit: First commit + 330e2a9 (origin/master, origin/HEAD, master) HEAD@{5}: checkout: moving from master to git-reset-practice + 330e2a9 (origin/master, origin/HEAD, master) HEAD@{6}: commit: Lab2 + 47e85d1 HEAD@{7}: commit: Lab1 + b8ca852 HEAD@{8}: clone: from https://github.com/stepan14511/Sum24-intro-labs + ``` + ```sh + git reset --hard + ``` + + ![image](lab3_4.png) + +3. **Documentation**: + + `git chekout, add, commit` seems like something that doesn't need explanation. + Next step we made was `git reset --soft/hard`. + - `git reset --soft` - moves head to other commit. `HEAD~1` is a link to 1 commit before HEAD. Changing number we can go back on any amount of commits. + - `git reset --hard` - do the same, but discards all the changes in the working directory or staging area. Should be used wisely or can lead to data loss. + + Next step was `git reflog`. This command shows the logs, which save the commits, which were referenced by HEAD, branches, tags or other pointers. Most widely used to retrieve the hash of a deleted commit to recover it. But may be also used for some other tasks. + + `git reset --hard ` - command to point the HEAD to some specified commit. In our case we retrieved the hash of our Third commit and fixed the pointer of our HEAD. \ No newline at end of file diff --git a/Lab4/submission4.md b/Lab4/submission4.md new file mode 100644 index 0000000..4025cce --- /dev/null +++ b/Lab4/submission4.md @@ -0,0 +1,225 @@ +# Software Distribution + +## Task 1: Configure and Use a Local Package Repository + +**Objective**: Set up a local package repository and use it to install packages. + +1. **Create a Local Repository**: + - Create a directory to hold your repository and place some `.deb` files in it. + + ```sh + mkdir -p ~/local-apt-repo + cp /path/to/package.deb ~/local-apt-repo/ + ``` + + This step is pretty obvious, nothing to document. + +2. **Generate the Package Index**: + - Use `dpkg-scanpackages` to create a `Packages` file. Compress this file into a `Packages.gz` archive. + + ```sh + dpkg-scanpackages ~/local-apt-repo /dev/null | gzip -9c > ~/local-apt-repo/Packages.gz + ``` + + By this command we scan all the packages in our folder and zip them into one archive (Packages.gz) + +3. **Add the Local Repository to Your Sources List**: + - Add the repository to your `sources.list`. + + ```sh + echo "deb [trusted=yes] file:/home/yourusername/local-apt-repo ./" | sudo tee /etc/apt/sources.list.d/local-apt-repo.list + sudo apt update + ``` + By the tee command we create new source of program sources for apt. Then we add our local source as trusted into apt. Using apt update we make apt update its' list of sources for the packages. + +4. **Verify the Contents of the Packages.gz File:**: + - Check that the Packages.gz file contains the correct paths and metadata for your .deb files, **it must be relative path like `./your_package.deb`**. Also you can see the package name there. Then check the repository of your package, make sure it's local one. + + ```sh + zcat Packages.gz + ``` + + Output: + ``` + Package: sdkmanager + Version: 2.1.0-11698 + Architecture: amd64 + Maintainer: NVIDIA DevTools-SDKManager Team + Installed-Size: 376632 + Depends: libcanberra-gtk-module, locales, libxshmfence1, libnss3, libatk-bridge2.0-0, libdrm2, libgtk-3-0, libgbm1, libcanberra-gtk3-module, libx11-xcb1 + Filename: /home/stepan/local-apt-repo/sdkmanager_2.1.0-11698_amd64.deb + Size: 88950632 + MD5sum: 2a8558059dabecca4225941f9a6ab112 + SHA1: b291dab5ccc2882f9221cabdd93b01293c186e41 + SHA256: 958d92eb8b7d0af9b213e14819c3d0ee8c0e09ceb8100b54e1281901e557c7a7 + Section: devel + Priority: optional + Homepage: https://developer.nvidia.com + Description: NVIDIA SDK Manager + The NVIDIA Software Development Kit (SDK) Manager is an all-in-one tool that bundles developer software and provides an end-to-end development environment setup solution for NVIDIA SDKs. + ``` + Here we can see, that apt now sees our package and it correctly knows its' location on the disk. + + ```sh + apt policy your-package-name + ``` + + ``` + sdkmanager: + Installed: 2.1.0-11698 + Candidate: 2.1.0-11698 + Version table: + *** 2.1.0-11698 100 + 100 /var/lib/dpkg/status + 0.5.1-1 500 + 500 http://ru.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages + 500 http://ru.archive.ubuntu.com/ubuntu jammy/universe i386 Packages + ``` + +5. **Install a Package from the Local Repository**: + - Install a package using `apt` from your local repository. + + ```sh + sudo apt install your-package-name + ``` + + The program was already install on the system, but we can still see, that installation process ended correctly: + ```sh + Reading package lists... Done + Building dependency tree... Done + Reading state information... Done + sdkmanager is already the newest version (2.1.0-11698). + The following packages were automatically installed and are no longer required: + cpu-checker dh-elpa-helper gazebo-common gazebo-plugin-base ipxe-qemu ipxe-qemu-256k-compat-efi-roms libaio1 libcacard0 libdaxctl1 libfdt1 libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 libiscsi7 + libndctl6 libpmem1 libpmemobj1 librados2 librbd1 librhash0 libspice-server1 liburing2 libusbredirparser1 libvirglrenderer1 libwireshark17 libwiretap14 libwsutil15 linux-headers-6.5.0-18-generic + linux-hwe-6.5-headers-6.5.0-18 linux-image-6.5.0-18-generic linux-modules-6.5.0-18-generic linux-modules-extra-6.5.0-18-generic linux-modules-nvidia-535-6.5.0-18-generic + linux-objects-nvidia-535-6.5.0-18-generic linux-signatures-nvidia-6.5.0-18-generic msr-tools ovmf pass qemu-block-extra qemu-system-common qemu-system-data qemu-system-gui qemu-system-x86 qemu-utils + qrencode seabios tree uidmap xclip + Use 'sudo apt autoremove' to remove them. + 0 upgraded, 0 newly installed, 0 to remove and 80 not upgraded. + ``` + +## Task 2: Simulate Package Installation and Identify Dependencies + +**Objective**: Use `apt` to simulate package installation and identify dependencies without actually installing the packages. + +1. **Choose a Package to Simulate**: + - Select a package to simulate its installation. + + ```sh + apt-cache showpkg your-package-name + ``` + + Output: + ```sh + Package: sdkmanager + Versions: + 2.1.0-11698 (/var/lib/dpkg/status) + Description Language: + File: /var/lib/dpkg/status + MD5: 049028167858a29a8f6c84633ed01aa7 + + 0.5.1-1 (/var/lib/apt/lists/ru.archive.ubuntu.com_ubuntu_dists_jammy_universe_binary-amd64_Packages) (/var/lib/apt/lists/ru.archive.ubuntu.com_ubuntu_dists_jammy_universe_binary-i386_Packages) + Description Language: + File: /var/lib/apt/lists/ru.archive.ubuntu.com_ubuntu_dists_jammy_universe_binary-amd64_Packages + MD5: f993bf7dd5056277c240fce64114e044 + Description Language: en + File: /var/lib/apt/lists/ru.archive.ubuntu.com_ubuntu_dists_jammy_universe_i18n_Translation-en + MD5: f993bf7dd5056277c240fce64114e044 + + + Reverse Depends: + Dependencies: + 2.1.0-11698 - libcanberra-gtk-module (0 (null)) locales (0 (null)) libxshmfence1 (0 (null)) libnss3 (0 (null)) libatk-bridge2.0-0 (0 (null)) libdrm2 (0 (null)) libgtk-3-0 (0 (null)) libgbm1 (0 (null)) libcanberra-gtk3-module (0 (null)) libx11-xcb1 (0 (null)) + 0.5.1-1 - python3-argcomplete (0 (null)) python3-requests (0 (null)) python3:any (0 (null)) + Provides: + 2.1.0-11698 - + 0.5.1-1 - + Reverse Provides: + ``` + + Here we can see, that package have 2 versions: one is local and other (quite old) is from archive.ubuntu.com. Our .deb package has multiple dependencies, all of them are necessary and for all of them NVidia decideded not to define minimal verison(if we had any we would see something like `libxshmfence1 (>= 1.0)`). + Also we can see, that Providers and Reverse Providers are clear. That means, that this package cannot be replaced by any other known and at the same time package itself cannot replace any other package fully. + +2. **Simulate the Installation**: + - Firstly we need to remove our package from system + ``` + sudo apt remove sdkmanager + ``` + + - Use the `-s` flag to simulate the installation. + + ```sh + sudo apt-get install -s your-package-name + ``` + + ``` + Reading package lists... Done + Building dependency tree... Done + Reading state information... Done + The following packages were automatically installed and are no longer required: + cpu-checker dh-elpa-helper gazebo-common gazebo-plugin-base ipxe-qemu ipxe-qemu-256k-compat-efi-roms libaio1 libcacard0 libdaxctl1 libfdt1 libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 libiscsi7 + libndctl6 libpmem1 libpmemobj1 librados2 librbd1 librhash0 libspice-server1 liburing2 libusbredirparser1 libvirglrenderer1 libwireshark17 libwiretap14 libwsutil15 linux-headers-6.5.0-18-generic + linux-hwe-6.5-headers-6.5.0-18 linux-image-6.5.0-18-generic linux-modules-6.5.0-18-generic linux-modules-extra-6.5.0-18-generic linux-modules-nvidia-535-6.5.0-18-generic + linux-objects-nvidia-535-6.5.0-18-generic linux-signatures-nvidia-6.5.0-18-generic msr-tools ovmf pass qemu-block-extra qemu-system-common qemu-system-data qemu-system-gui qemu-system-x86 qemu-utils + qrencode seabios tree uidmap xclip + Use 'sudo apt autoremove' to remove them. + The following additional packages will be installed: + python3-argcomplete + The following NEW packages will be installed: + python3-argcomplete sdkmanager + 0 upgraded, 2 newly installed, 0 to remove and 80 not upgraded. + Inst python3-argcomplete (1.8.1-1.5 Ubuntu:22.04/jammy [all]) + Inst sdkmanager (0.5.1-1 Ubuntu:22.04/jammy [all]) + Conf python3-argcomplete (1.8.1-1.5 Ubuntu:22.04/jammy [all]) + Conf sdkmanager (0.5.1-1 Ubuntu:22.04/jammy [all]) + ``` + Here we can see, that apt will install one dependency, which is not currently installed in our system and then install our package itself. + +3. **Analyze the Output**: + - Identify the dependencies and the packages that would be installed. + - Document the findings in the `submission4.md` file, including which dependencies are required and their versions. + +## Task 3: Hold and Unhold Package Versions + +**Objective**: Prevent a package from being upgraded and then allow it to be upgraded again. + +1. **Install a Package**: + - Install a package that is commonly updated. + + ```sh + sudo apt install your-package-name + ``` + +2. **Hold the Package**: + - Use `apt-mark` to hold the package. + + ```sh + sudo apt-mark hold code + ``` + + Output: + ``` + code set on hold. + ``` + +3. **Verify the Hold Status**: + - Check the status of held packages. + + ```sh + apt-mark showhold + ``` + Output: + ``` + code + ``` + +4. **Unhold the Package**: - Use `apt-mark` to unhold the package. + + ```sh + sudo apt-mark unhold your-package-name + ``` + + After this step we can check using the 3rd step, that package is no longer on hold. + + I do not really understand what to document here. We just used an apt tool which allows us to stop some packages from updating. In robotics, for example, we use ROS, which is quite hard to install and very easy to break. Usually after we install it, we do not use apt anymore on an embedded devices. Now I know, that we can just write script to make all ROS packages and their dependencies be on hold and use apt as usual. \ No newline at end of file diff --git a/Lab5/.terraform.lock.hcl b/Lab5/.terraform.lock.hcl new file mode 100644 index 0000000..b7d4d83 --- /dev/null +++ b/Lab5/.terraform.lock.hcl @@ -0,0 +1,23 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/kreuzwerker/docker" { + version = "3.0.2" + hashes = [ + "h1:DcRxJArfX6EiATluWeCBW7HoD6usz9fMoTK2U3dmyPk=", + "zh:15b0a2b2b563d8d40f62f83057d91acb02cd0096f207488d8b4298a59203d64f", + "zh:23d919de139f7cd5ebfd2ff1b94e6d9913f0977fcfc2ca02e1573be53e269f95", + "zh:38081b3fe317c7e9555b2aaad325ad3fa516a886d2dfa8605ae6a809c1072138", + "zh:4a9c5065b178082f79ad8160243369c185214d874ff5048556d48d3edd03c4da", + "zh:5438ef6afe057945f28bce43d76c4401254073de01a774760169ac1058830ac2", + "zh:60b7fadc287166e5c9873dfe53a7976d98244979e0ab66428ea0dea1ebf33e06", + "zh:61c5ec1cb94e4c4a4fb1e4a24576d5f39a955f09afb17dab982de62b70a9bdd1", + "zh:a38fe9016ace5f911ab00c88e64b156ebbbbfb72a51a44da3c13d442cd214710", + "zh:c2c4d2b1fd9ebb291c57f524b3bf9d0994ff3e815c0cd9c9bcb87166dc687005", + "zh:d567bb8ce483ab2cf0602e07eae57027a1a53994aba470fa76095912a505533d", + "zh:e83bf05ab6a19dd8c43547ce9a8a511f8c331a124d11ac64687c764ab9d5a792", + "zh:e90c934b5cd65516fbcc454c89a150bfa726e7cf1fe749790c7480bbeb19d387", + "zh:f05f167d2eaf913045d8e7b88c13757e3cf595dd5cd333057fdafc7c4b7fed62", + "zh:fcc9c1cea5ce85e8bcb593862e699a881bd36dffd29e2e367f82d15368659c3d", + ] +} diff --git a/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/CHANGELOG.md b/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/CHANGELOG.md new file mode 100644 index 0000000..37dbb71 --- /dev/null +++ b/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/CHANGELOG.md @@ -0,0 +1,655 @@ + + +## [v3.0.2](https://github.com/kreuzwerker/terraform-provider-docker/compare/v3.0.1...v3.0.2) (2023-03-17) + +### Docs + +* correct spelling of "networks_advanced" ([#517](https://github.com/kreuzwerker/terraform-provider-docker/issues/517)) + +### Fix + +* Implement proxy support. ([#529](https://github.com/kreuzwerker/terraform-provider-docker/issues/529)) + + + +## [v3.0.1](https://github.com/kreuzwerker/terraform-provider-docker/compare/v3.0.0...v3.0.1) (2023-01-13) + +### Chore + +* Prepare release v3.0.1 + +### Fix + +* Access health of container correctly. ([#506](https://github.com/kreuzwerker/terraform-provider-docker/issues/506)) + + + +## [v3.0.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.25.0...v3.0.0) (2023-01-13) + +### Chore + +* Prepare release v3.0.0 + +### Docs + +* Update documentation. +* Add migration guide and update README ([#502](https://github.com/kreuzwerker/terraform-provider-docker/issues/502)) + +### Feat + +* Prepare v3 release ([#503](https://github.com/kreuzwerker/terraform-provider-docker/issues/503)) + + + +## [v2.25.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.24.0...v2.25.0) (2023-01-05) + +### Chore + +* Prepare release v2.25.0 + +### Docs + +* Add documentation of remote hosts. ([#498](https://github.com/kreuzwerker/terraform-provider-docker/issues/498)) + +### Feat + +* Migrate build block to `docker_image` ([#501](https://github.com/kreuzwerker/terraform-provider-docker/issues/501)) +* Add platform attribute to docker_image resource ([#500](https://github.com/kreuzwerker/terraform-provider-docker/issues/500)) +* Add sysctl implementation to container of docker_service. ([#499](https://github.com/kreuzwerker/terraform-provider-docker/issues/499)) + + + +## [v2.24.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.23.1...v2.24.0) (2022-12-23) + +### Chore + +* Prepare release v2.24.0 + +### Docs + +* Fix generated website. +* Update command typo ([#487](https://github.com/kreuzwerker/terraform-provider-docker/issues/487)) + +### Feat + +* cgroupns support ([#497](https://github.com/kreuzwerker/terraform-provider-docker/issues/497)) +* Add triggers attribute to docker_registry_image ([#496](https://github.com/kreuzwerker/terraform-provider-docker/issues/496)) +* Support registries with disabled auth ([#494](https://github.com/kreuzwerker/terraform-provider-docker/issues/494)) +* add IPAM options block for docker networks ([#491](https://github.com/kreuzwerker/terraform-provider-docker/issues/491)) + +### Fix + +* Pin data source specific tag test to older tag. + +### Tests + +* Add test for parsing auth headers. + + + +## [v2.23.1](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.23.0...v2.23.1) (2022-11-23) + +### Chore + +* Prepare release v2.23.1 + +### Fix + +* Update shasum of busybox:1.35.0 tag in test. +* Handle Auth Header Scopes ([#482](https://github.com/kreuzwerker/terraform-provider-docker/issues/482)) +* Set OS_ARCH from GOHOSTOS and GOHOSTARCH ([#477](https://github.com/kreuzwerker/terraform-provider-docker/issues/477)) + + + +## [v2.23.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.22.0...v2.23.0) (2022-11-02) + +### Chore + +* Prepare release v2.23.0 + +### Feat + +* wait container healthy state ([#467](https://github.com/kreuzwerker/terraform-provider-docker/issues/467)) +* add docker logs data source ([#471](https://github.com/kreuzwerker/terraform-provider-docker/issues/471)) + +### Fix + +* Update shasum of busybox:1.35.0 tag in test. +* Update shasum of busybox:1.35.0 tag +* Correct provider name to match the public registry ([#462](https://github.com/kreuzwerker/terraform-provider-docker/issues/462)) + + + +## [v2.22.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.21.0...v2.22.0) (2022-09-20) + +### Chore + +* Prepare release v2.22.0 + +### Feat + +* Configurable timeout for docker_container resource stateChangeConf ([#454](https://github.com/kreuzwerker/terraform-provider-docker/issues/454)) + +### Fix + +* oauth authorization support for azurecr ([#451](https://github.com/kreuzwerker/terraform-provider-docker/issues/451)) + + + +## [v2.21.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.20.3...v2.21.0) (2022-09-05) + +### Chore + +* Prepare release v2.21.0 + +### Docs + +* Fix docker config example. + +### Feat + +* Add image_id attribute to docker_image resource. ([#450](https://github.com/kreuzwerker/terraform-provider-docker/issues/450)) +* Update used goversion to 1.18. ([#449](https://github.com/kreuzwerker/terraform-provider-docker/issues/449)) + +### Fix + +* Replace deprecated .latest attribute with new image_id. ([#453](https://github.com/kreuzwerker/terraform-provider-docker/issues/453)) +* Remove reading part of docker_tag resource. ([#448](https://github.com/kreuzwerker/terraform-provider-docker/issues/448)) +* Fix repo_digest value for DockerImageDatasource test. + + + +## [v2.20.3](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.20.2...v2.20.3) (2022-08-31) + +### Chore + +* Prepare release v2.20.3 + +### Fix + +* Docker Registry Image data source use HEAD request to query image digest ([#433](https://github.com/kreuzwerker/terraform-provider-docker/issues/433)) +* Adding Support for Windows Paths in Bash ([#438](https://github.com/kreuzwerker/terraform-provider-docker/issues/438)) + + + +## [v2.20.2](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.20.1...v2.20.2) (2022-08-10) + +### Chore + +* Prepare release v2.20.2 + +### Fix + +* Check the operating system for determining the default Docker socket ([#427](https://github.com/kreuzwerker/terraform-provider-docker/issues/427)) + +### Reverts + +* fix(deps): update module github.com/golangci/golangci-lint to v1.48.0 ([#423](https://github.com/kreuzwerker/terraform-provider-docker/issues/423)) + + + +## [v2.20.1](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.20.0...v2.20.1) (2022-08-10) + +### Chore + +* Prepare release v2.20.1 +* Reduce time to setup AccTests ([#430](https://github.com/kreuzwerker/terraform-provider-docker/issues/430)) + +### Docs + +* Improve docker network usage documentation [skip-ci] + +### Feat + +* Implement triggers attribute for docker_image. ([#425](https://github.com/kreuzwerker/terraform-provider-docker/issues/425)) + +### Fix + +* Add ForceTrue to docker_image name attribute. ([#421](https://github.com/kreuzwerker/terraform-provider-docker/issues/421)) + + + +## [v2.20.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.19.0...v2.20.0) (2022-07-28) + +### Chore + +* Prepare release v2.20.0 +* Fix release targets in Makefile. + +### Feat + +* Implementation of `docker_tag` resource. ([#418](https://github.com/kreuzwerker/terraform-provider-docker/issues/418)) +* Implement support for insecure registries ([#414](https://github.com/kreuzwerker/terraform-provider-docker/issues/414)) + + + +## [v2.19.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.18.1...v2.19.0) (2022-07-15) + +### Chore + +* Prepare release v2.19.0 + +### Feat + +* Add gpu flag to docker_container resource ([#405](https://github.com/kreuzwerker/terraform-provider-docker/issues/405)) + +### Fix + +* Enable authentication to multiple registries again. ([#400](https://github.com/kreuzwerker/terraform-provider-docker/issues/400)) +* ECR authentication ([#409](https://github.com/kreuzwerker/terraform-provider-docker/issues/409)) + + + +## [v2.18.1](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.18.0...v2.18.1) (2022-07-14) + +### Chore + +* Prepare release v2.18.1 +* Automate changelog generation [skip ci] + +### Fix + +* Improve searchLocalImages error handling. ([#407](https://github.com/kreuzwerker/terraform-provider-docker/issues/407)) +* Throw errors when any part of docker config file handling goes wrong. ([#406](https://github.com/kreuzwerker/terraform-provider-docker/issues/406)) +* Enables having a Dockerfile outside the context ([#402](https://github.com/kreuzwerker/terraform-provider-docker/issues/402)) + + + +## [v2.18.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.17.0...v2.18.0) (2022-07-11) + +### Chore + +* prepare release v2.18.0 + +### Feat + +* add runtime, stop_signal and stop_timeout properties to the docker_container resource ([#364](https://github.com/kreuzwerker/terraform-provider-docker/issues/364)) + +### Fix + +* Correctly handle build files and context for docker_registry_image ([#398](https://github.com/kreuzwerker/terraform-provider-docker/issues/398)) +* Switch to proper go tools mechanism to fix website-* workflows. ([#399](https://github.com/kreuzwerker/terraform-provider-docker/issues/399)) +* compare relative paths when excluding, fixes kreuzwerker[#280](https://github.com/kreuzwerker/terraform-provider-docker/issues/280) ([#397](https://github.com/kreuzwerker/terraform-provider-docker/issues/397)) + + + +## [v2.17.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.16.0...v2.17.0) (2022-06-23) + +### Chore + +* prepare release v2.17.0 +* Exclude examples directory from renovate. +* remove the workflow to close stale issues and pull requests ([#371](https://github.com/kreuzwerker/terraform-provider-docker/issues/371)) + +### Fix + +* update go package files directly on master to fix build. +* correct authentication for ghcr.io registry([#349](https://github.com/kreuzwerker/terraform-provider-docker/issues/349)) + + + +## [v2.16.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.15.0...v2.16.0) (2022-01-24) + +### Chore + +* prepare release v2.16.0 + +### Docs + +* fix service options ([#337](https://github.com/kreuzwerker/terraform-provider-docker/issues/337)) +* update registry_image.md ([#321](https://github.com/kreuzwerker/terraform-provider-docker/issues/321)) +* fix r/registry_image truncated docs ([#304](https://github.com/kreuzwerker/terraform-provider-docker/issues/304)) + +### Feat + +* add parameter for SSH options ([#335](https://github.com/kreuzwerker/terraform-provider-docker/issues/335)) + +### Fix + +* pass container rm flag ([#322](https://github.com/kreuzwerker/terraform-provider-docker/issues/322)) +* add nil check of DriverConfig ([#315](https://github.com/kreuzwerker/terraform-provider-docker/issues/315)) +* fmt of go files for go 1.17 + + + +## [v2.15.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.14.0...v2.15.0) (2021-08-11) + +### Chore + +* prepare release v2.15.0 +* re go gets terraform-plugin-docs + +### Docs + +* corrects authentication misspell. Closes [#264](https://github.com/kreuzwerker/terraform-provider-docker/issues/264) + +### Feat + +* add container storage opts ([#258](https://github.com/kreuzwerker/terraform-provider-docker/issues/258)) + +### Fix + +* add current timestamp for file upload to container ([#259](https://github.com/kreuzwerker/terraform-provider-docker/issues/259)) + + + +## [v2.14.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.13.0...v2.14.0) (2021-07-09) + +### Chore + +* prepare release v2.14.0 + +### Docs + +* update to absolute path for registry image context ([#246](https://github.com/kreuzwerker/terraform-provider-docker/issues/246)) +* update readme with logos and subsections ([#235](https://github.com/kreuzwerker/terraform-provider-docker/issues/235)) + +### Feat + +* support terraform v1 ([#242](https://github.com/kreuzwerker/terraform-provider-docker/issues/242)) + +### Fix + +* Update the URL of the docker hub registry ([#230](https://github.com/kreuzwerker/terraform-provider-docker/issues/230)) + + + +## [v2.13.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.12.2...v2.13.0) (2021-06-22) + +### Chore + +* prepare release v2.13.0 + +### Docs + +* fix a few typos ([#216](https://github.com/kreuzwerker/terraform-provider-docker/issues/216)) +* fix typos in docker_image example usage ([#213](https://github.com/kreuzwerker/terraform-provider-docker/issues/213)) + + + +## [v2.12.2](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.12.1...v2.12.2) (2021-05-26) + +### Chore + +* prepare release v2.12.2 + + + +## [v2.12.1](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.12.0...v2.12.1) (2021-05-26) + +### Chore + +* update changelog for v2.12.1 + +### Fix + +* add service host flattener with space split ([#205](https://github.com/kreuzwerker/terraform-provider-docker/issues/205)) +* service state upgradeV2 for empty auth + + + +## [v2.12.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.11.0...v2.12.0) (2021-05-23) + +### Chore + +* update changelog for v2.12.0 +* ignore dist folder +* configure actions/stale ([#157](https://github.com/kreuzwerker/terraform-provider-docker/issues/157)) +* add the guide about Terraform Configuration in Bug Report ([#139](https://github.com/kreuzwerker/terraform-provider-docker/issues/139)) +* bump docker dependency to v20.10.5 ([#119](https://github.com/kreuzwerker/terraform-provider-docker/issues/119)) + +### Ci + +* run acceptance tests with multiple Terraform versions ([#129](https://github.com/kreuzwerker/terraform-provider-docker/issues/129)) + +### Docs + +* update for v2.12.0 +* add releasing steps +* format `Guide of Bug report` ([#159](https://github.com/kreuzwerker/terraform-provider-docker/issues/159)) +* add an example to build an image with docker_image ([#158](https://github.com/kreuzwerker/terraform-provider-docker/issues/158)) +* add a guide about writing issues to CONTRIBUTING.md ([#149](https://github.com/kreuzwerker/terraform-provider-docker/issues/149)) +* fix Github repository URL in README ([#136](https://github.com/kreuzwerker/terraform-provider-docker/issues/136)) + +### Feat + +* support darwin arm builds and golang 1.16 ([#140](https://github.com/kreuzwerker/terraform-provider-docker/issues/140)) +* migrate to terraform-sdk v2 ([#102](https://github.com/kreuzwerker/terraform-provider-docker/issues/102)) + +### Fix + +* rewriting tar header fields ([#198](https://github.com/kreuzwerker/terraform-provider-docker/issues/198)) +* test spaces for windows ([#190](https://github.com/kreuzwerker/terraform-provider-docker/issues/190)) +* replace for loops with StateChangeConf ([#182](https://github.com/kreuzwerker/terraform-provider-docker/issues/182)) +* skip sign on compile action +* assign map to rawState when it is nil to prevent panic ([#180](https://github.com/kreuzwerker/terraform-provider-docker/issues/180)) +* search local images with Docker image ID ([#151](https://github.com/kreuzwerker/terraform-provider-docker/issues/151)) +* set "ForceNew: true" to labelSchema ([#152](https://github.com/kreuzwerker/terraform-provider-docker/issues/152)) + + + +## [v2.11.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.10.0...v2.11.0) (2021-01-22) + +### Chore + +* update changelog for v2.11.0 +* updates changelog for v2.10.0 + +### Docs + +* fix legacy configuration style ([#126](https://github.com/kreuzwerker/terraform-provider-docker/issues/126)) + +### Feat + +* add properties -it (tty and stdin_opn) to docker container + + + +## [v2.10.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.9.0...v2.10.0) (2021-01-08) + +### Chore + +* updates changelog for 2.10.0 +* ignores testing folders +* adds separate bug and ft req templates + +### Ci + +* bumps to docker version 20.10.1 +* pins workflows to ubuntu:20.04 image + +### Docs + +* add labels to arguments of docker_service ([#105](https://github.com/kreuzwerker/terraform-provider-docker/issues/105)) +* cleans readme +* adds coc and contributing + +### Feat + +* supports Docker plugin ([#35](https://github.com/kreuzwerker/terraform-provider-docker/issues/35)) +* support max replicas of Docker Service Task Spec ([#112](https://github.com/kreuzwerker/terraform-provider-docker/issues/112)) +* add force_remove option to r/image ([#104](https://github.com/kreuzwerker/terraform-provider-docker/issues/104)) +* add local semantic commit validation ([#99](https://github.com/kreuzwerker/terraform-provider-docker/issues/99)) +* add ability to lint/check of links in documentation locally ([#98](https://github.com/kreuzwerker/terraform-provider-docker/issues/98)) + +### Fix + +* set "latest" to tag when tag isn't specified ([#117](https://github.com/kreuzwerker/terraform-provider-docker/issues/117)) +* image label for workflows +* remove all azure cps + +### Pull Requests + +* Merge pull request [#38](https://github.com/kreuzwerker/terraform-provider-docker/issues/38) from kreuzwerker/ci-ubuntu2004-workflow +* Merge pull request [#36](https://github.com/kreuzwerker/terraform-provider-docker/issues/36) from kreuzwerker/chore-gh-issue-tpl + + + +## [v2.9.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.8.0...v2.9.0) (2020-12-25) + +### Chore + +* updates changelog for 2.9.0 +* update changelog 2.8.0 release date +* introduces golangci-lint ([#32](https://github.com/kreuzwerker/terraform-provider-docker/issues/32)) +* fix changelog links + +### Ci + +* add gofmt's '-s' option +* remove unneeded make tasks +* fix test of website + +### Doc + +* devices is a block, not a boolean + +### Feat + +* adds support for OCI manifests ([#316](https://github.com/kreuzwerker/terraform-provider-docker/issues/316)) +* adds security_opts to container config. ([#308](https://github.com/kreuzwerker/terraform-provider-docker/issues/308)) +* adds support for init process injection for containers. ([#300](https://github.com/kreuzwerker/terraform-provider-docker/issues/300)) + +### Fix + +* changing mounts requires ForceNew ([#314](https://github.com/kreuzwerker/terraform-provider-docker/issues/314)) +* allow healthcheck to be computed as container can specify ([#312](https://github.com/kreuzwerker/terraform-provider-docker/issues/312)) +* treat null user as a no-op ([#318](https://github.com/kreuzwerker/terraform-provider-docker/issues/318)) +* workdir null behavior ([#320](https://github.com/kreuzwerker/terraform-provider-docker/issues/320)) + +### Style + +* format with gofumpt + +### Pull Requests + +* Merge pull request [#33](https://github.com/kreuzwerker/terraform-provider-docker/issues/33) from brandonros/patch-1 +* Merge pull request [#11](https://github.com/kreuzwerker/terraform-provider-docker/issues/11) from suzuki-shunsuke/format-with-gofumpt +* Merge pull request [#26](https://github.com/kreuzwerker/terraform-provider-docker/issues/26) from kreuzwerker/ci/fix-website-ci +* Merge pull request [#8](https://github.com/kreuzwerker/terraform-provider-docker/issues/8) from dubo-dubon-duponey/patch1 + + + +## v2.8.0 (2020-11-11) + +### Chore + +* updates changelog for 2.8.0 +* removes travis.yml +* deactivates travis +* removes vendor dir ([#298](https://github.com/kreuzwerker/terraform-provider-docker/issues/298)) +* bump go 115 ([#297](https://github.com/kreuzwerker/terraform-provider-docker/issues/297)) +* documentation updates ([#286](https://github.com/kreuzwerker/terraform-provider-docker/issues/286)) +* updates link syntax ([#287](https://github.com/kreuzwerker/terraform-provider-docker/issues/287)) +* fix typo ([#292](https://github.com/kreuzwerker/terraform-provider-docker/issues/292)) + +### Ci + +* reactivats all workflows +* fix website +* only run website workflow +* exports gopath manually +* fix absolute gopath for website +* make website check separate workflow +* fix workflow names +* adds website test to unit test +* adds acc test +* adds compile +* adds go version and goproxy env +* enables unit tests for master branch +* adds unit test workflow +* adds goreleaser and gh action +* bumps docker and ubuntu versions ([#241](https://github.com/kreuzwerker/terraform-provider-docker/issues/241)) +* removes debug option from acc tests +* skips test which is flaky only on travis + +### Deps + +* github.com/hashicorp/terraform[@sdk](https://github.com/sdk)-v0.11-with-go-modules Updated via: go get github.com/hashicorp/terraform[@sdk](https://github.com/sdk)-v0.11-with-go-modules and go mod tidy +* use go modules for dep mgmt run go mod tidy remove govendor from makefile and travis config set appropriate env vars for go modules + +### Docker + +* improve validation of runtime constraints + +### Docs + +* update container.html.markdown ([#278](https://github.com/kreuzwerker/terraform-provider-docker/issues/278)) +* update service.html.markdown ([#281](https://github.com/kreuzwerker/terraform-provider-docker/issues/281)) +* update restart_policy for service. Closes [#228](https://github.com/kreuzwerker/terraform-provider-docker/issues/228) +* adds new label structure. Closes [#214](https://github.com/kreuzwerker/terraform-provider-docker/issues/214) +* update anchors with -1 suffix ([#178](https://github.com/kreuzwerker/terraform-provider-docker/issues/178)) +* Fix misspelled words +* Fix exported attribute name in docker_registry_image +* Fix example for docker_registry_image ([#8308](https://github.com/kreuzwerker/terraform-provider-docker/issues/8308)) +* provider/docker - network settings attrs + +### Feat + +* conditionally adding port binding ([#293](https://github.com/kreuzwerker/terraform-provider-docker/issues/293)). +* adds docker Image build feature ([#283](https://github.com/kreuzwerker/terraform-provider-docker/issues/283)) +* adds complete support for Docker credential helpers ([#253](https://github.com/kreuzwerker/terraform-provider-docker/issues/253)) +* Expose IPv6 properties as attributes +* allow use of source file instead of content / content_base64 ([#240](https://github.com/kreuzwerker/terraform-provider-docker/issues/240)) +* supports to update docker_container ([#236](https://github.com/kreuzwerker/terraform-provider-docker/issues/236)) +* support to import some docker_container's attributes ([#234](https://github.com/kreuzwerker/terraform-provider-docker/issues/234)) +* adds config file content as plain string ([#232](https://github.com/kreuzwerker/terraform-provider-docker/issues/232)) +* make UID, GID, & mode for secrets and configs configurable ([#231](https://github.com/kreuzwerker/terraform-provider-docker/issues/231)) +* adds import for resources ([#196](https://github.com/kreuzwerker/terraform-provider-docker/issues/196)) +* add container ipc mode. ([#182](https://github.com/kreuzwerker/terraform-provider-docker/issues/182)) +* adds container working dir ([#181](https://github.com/kreuzwerker/terraform-provider-docker/issues/181)) + +### Fix + +* ignores 'remove_volumes' on container import +* duplicated buildImage function +* port objects with the same internal port but different protocol trigger recreation of container ([#274](https://github.com/kreuzwerker/terraform-provider-docker/issues/274)) +* panic to migrate schema of docker_container from v1 to v2 ([#271](https://github.com/kreuzwerker/terraform-provider-docker/issues/271)). Closes [#264](https://github.com/kreuzwerker/terraform-provider-docker/issues/264) +* pins docker registry for tests to v2.7.0 +* prevent force recreate of container about some attributes ([#269](https://github.com/kreuzwerker/terraform-provider-docker/issues/269)) +* service endpoint spec flattening +* corrects IPAM config read on the data provider ([#229](https://github.com/kreuzwerker/terraform-provider-docker/issues/229)) +* replica to 0 in current schema. Closes [#221](https://github.com/kreuzwerker/terraform-provider-docker/issues/221) +* label for network and volume after improt +* binary upload as base 64 content ([#194](https://github.com/kreuzwerker/terraform-provider-docker/issues/194)) +* service env truncation for multiple delimiters ([#193](https://github.com/kreuzwerker/terraform-provider-docker/issues/193)) +* destroy_grace_seconds are considered ([#179](https://github.com/kreuzwerker/terraform-provider-docker/issues/179)) + +### Make + +* Add website + website-test targets + +### Provider + +* Ensured Go 1.11 in TravisCI and README provider: Run go fix provider: Run go fmt provider: Encode go version 1.11.5 to .go-version file +* Require Go 1.11 in TravisCI and README provider: Run go fix provider: Run go fmt + +### Tests + +* Skip test if swap limit isn't available ([#136](https://github.com/kreuzwerker/terraform-provider-docker/issues/136)) +* Simplify Dockerfile(s) + +### Vendor + +* github.com/hashicorp/terraform/...[@v0](https://github.com/v0).10.0 +* Ignore github.com/hashicorp/terraform/backend + +### Website + +* Docs sweep for lists & maps +* note on docker +* docker docs + +### Pull Requests + +* Merge pull request [#134](https://github.com/kreuzwerker/terraform-provider-docker/issues/134) from terraform-providers/go-modules-2019-03-01 +* Merge pull request [#135](https://github.com/kreuzwerker/terraform-provider-docker/issues/135) from terraform-providers/t-simplify-dockerfile +* Merge pull request [#47](https://github.com/kreuzwerker/terraform-provider-docker/issues/47) from captn3m0/docker-link-warning +* Merge pull request [#60](https://github.com/kreuzwerker/terraform-provider-docker/issues/60) from terraform-providers/f-make-website +* Merge pull request [#23](https://github.com/kreuzwerker/terraform-provider-docker/issues/23) from JamesLaverack/patch-1 +* Merge pull request [#18](https://github.com/kreuzwerker/terraform-provider-docker/issues/18) from terraform-providers/vendor-tf-0.10 +* Merge pull request [#5046](https://github.com/kreuzwerker/terraform-provider-docker/issues/5046) from tpounds/use-built-in-schema-string-hash +* Merge pull request [#3761](https://github.com/kreuzwerker/terraform-provider-docker/issues/3761) from ryane/f-provider-docker-improvements +* Merge pull request [#3383](https://github.com/kreuzwerker/terraform-provider-docker/issues/3383) from apparentlymart/docker-container-command-docs +* Merge pull request [#1564](https://github.com/kreuzwerker/terraform-provider-docker/issues/1564) from nickryand/docker_links + diff --git a/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/LICENSE b/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/LICENSE new file mode 100644 index 0000000..a612ad9 --- /dev/null +++ b/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/README.md b/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/README.md new file mode 100644 index 0000000..1f21b51 --- /dev/null +++ b/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/README.md @@ -0,0 +1,117 @@ + + Docker logo + + + Terraform logo + + + Kreuzwerker logo + + +# Terraform Provider for Docker + +[![Release](https://img.shields.io/github/v/release/kreuzwerker/terraform-provider-docker)](https://github.com/kreuzwerker/terraform-provider-docker/releases) +[![Installs](https://img.shields.io/badge/dynamic/json?logo=terraform&label=installs&query=$.data.attributes.downloads&url=https%3A%2F%2Fregistry.terraform.io%2Fv2%2Fproviders%2F713)](https://registry.terraform.io/providers/kreuzwerker/docker) +[![Registry](https://img.shields.io/badge/registry-doc%40latest-lightgrey?logo=terraform)](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kreuzwerker/terraform-provider-docker/blob/main/LICENSE) +[![Go Status](https://github.com/kreuzwerker/terraform-provider-docker/workflows/Acc%20Tests/badge.svg)](https://github.com/kreuzwerker/terraform-provider-docker/actions) +[![Lint Status](https://github.com/kreuzwerker/terraform-provider-docker/workflows/golangci-lint/badge.svg)](https://github.com/kreuzwerker/terraform-provider-docker/actions) +[![Go Report Card](https://goreportcard.com/badge/github.com/kreuzwerker/terraform-provider-docker)](https://goreportcard.com/report/github.com/kreuzwerker/terraform-provider-docker) + +## Documentation + +The documentation for the provider is available on the [Terraform Registry](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs). + +Do you want to migrate from `v2.x` to `v3.x`? Please read the [migration guide](docs/v2_v3_migration.md) + +## Example usage + +Take a look at the examples in the [documentation](https://registry.terraform.io/providers/kreuzwerker/docker/3.0.2/docs) of the registry +or use the following example: + + +```hcl +# Set the required provider and versions +terraform { + required_providers { + # We recommend pinning to the specific version of the Docker Provider you're using + # since new versions are released frequently + docker = { + source = "kreuzwerker/docker" + version = "3.0.2" + } + } +} + +# Configure the docker provider +provider "docker" { +} + +# Create a docker image resource +# -> docker pull nginx:latest +resource "docker_image" "nginx" { + name = "nginx:latest" + keep_locally = true +} + +# Create a docker container resource +# -> same as 'docker run --name nginx -p8080:80 -d nginx:latest' +resource "docker_container" "nginx" { + name = "nginx" + image = docker_image.nginx.image_id + + ports { + external = 8080 + internal = 80 + } +} + +# Or create a service resource +# -> same as 'docker service create -d -p 8081:80 --name nginx-service --replicas 2 nginx:latest' +resource "docker_service" "nginx_service" { + name = "nginx-service" + task_spec { + container_spec { + image = docker_image.nginx.repo_digest + } + } + + mode { + replicated { + replicas = 2 + } + } + + endpoint_spec { + ports { + published_port = 8081 + target_port = 80 + } + } +} +``` + +## Building The Provider + +[Go](https://golang.org/doc/install) 1.18.x (to build the provider plugin) + + +```sh +$ git clone git@github.com:kreuzwerker/terraform-provider-docker +$ make build +``` + +## Contributing + +The Terraform Docker Provider is the work of many of contributors. We appreciate your help! + +To contribute, please read the contribution guidelines: [Contributing to Terraform - Docker Provider](CONTRIBUTING.md) + +## License + +The Terraform Provider Docker is available to everyone under the terms of the Mozilla Public License Version 2.0. [Take a look the LICENSE file](LICENSE). + + +## Stargazers over time + +[![Stargazers over time](https://starchart.cc/kreuzwerker/terraform-provider-docker.svg)](https://starchart.cc/kreuzwerker/terraform-provider-docker) diff --git a/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/terraform-provider-docker_v3.0.2.exe b/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/terraform-provider-docker_v3.0.2.exe new file mode 100644 index 0000000..c97ced0 Binary files /dev/null and b/Lab5/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/windows_amd64/terraform-provider-docker_v3.0.2.exe differ diff --git a/Lab5/TerraformAndNginx.md b/Lab5/TerraformAndNginx.md new file mode 100644 index 0000000..03a7c4b --- /dev/null +++ b/Lab5/TerraformAndNginx.md @@ -0,0 +1,268 @@ +## Installation: +I had to use VPN and due to this reason I had to switch back to Windows for this task (my VPN broke several weeks ago on Ubuntu and I couldn't fix it fast). +For the Windows you can just download .exe file and put it anywhere you want. Unfortunately, I could not manage to put it into PATH, even with their guide, but placed it into this folder instead. + +## Usage +- To begin with, we create main.tf in the lab5 folder. Then we write the following in the file: +``` +terraform { + required_providers { + docker = { + source = "kreuzwerker/docker" + } + } +} + +provider "docker" {} + +resource "docker_image" "nginx" { +name = "nginx:latest" +keep_locally = false +} + +resource "docker_container" "nginx" { +image = docker_image.nginx.image_id +name = "nginx-server" +ports { + internal = 80 + external = 8080 +} +} +``` +In the first block we define the provider for the docker manipulations. Default terraform doesn't contain one, but suggests to use this one. +In the next part we setup the docker image of nginx. +In the last part we create container of the image. + +- Init of Terraform: +``` +./terraform.exe init +``` +Output: +![image](lab5_3.png) + +- Checking the plan of the terraform configuration +``` +./terraform.exe plan +``` +Output +``` +Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the +following symbols: ++ create + +Terraform will perform the following actions: + +# docker_container.nginx will be created ++ resource "docker_container" "nginx" { + + attach = false + + bridge = (known after apply) + + command = (known after apply) + + container_logs = (known after apply) + + container_read_refresh_timeout_milliseconds = 15000 + + entrypoint = (known after apply) + + env = (known after apply) + + exit_code = (known after apply) + + hostname = (known after apply) + + id = (known after apply) + + image = (known after apply) + + init = (known after apply) + + ipc_mode = (known after apply) + + log_driver = (known after apply) + + logs = false + + must_run = true + + name = "nginx-server" + + network_data = (known after apply) + + read_only = false + + remove_volumes = true + + restart = "no" + + rm = false + + runtime = (known after apply) + + security_opts = (known after apply) + + shm_size = (known after apply) + + start = true + + stdin_open = false + + stop_signal = (known after apply) + + stop_timeout = (known after apply) + + tty = false + + wait = false + + wait_timeout = 60 + + + healthcheck (known after apply) + + + labels (known after apply) + + + ports { + + external = 8080 + + internal = 80 + + ip = "0.0.0.0" + + protocol = "tcp" + } + } + +# docker_image.nginx will be created ++ resource "docker_image" "nginx" { + + id = (known after apply) + + image_id = (known after apply) + + keep_locally = false + + name = "nginx:latest" + + repo_digest = (known after apply) + } + +Plan: 2 to add, 0 to change, 0 to destroy. + +─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── + +Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if +you run "terraform apply" now. +``` + +- If we are suttisfied with the plan, we apply it: +``` +./terraform.exe apply +``` +Output: +``` +... +same as previous +: +... + +Do you want to perform these actions? +Terraform will perform the actions described above. +Only 'yes' will be accepted to approve. + +Enter a value: yes + +docker_image.nginx: Creating... +docker_image.nginx: Still creating... [10s elapsed] +docker_image.nginx: Creation complete after 10s [id=sha256:60c8a892f36faf6c9215464005ee6fb8cf0585f70b113c0b030f6cb497a41876nginx:latest] +docker_container.nginx: Creating... +docker_container.nginx: Creation complete after 1s [id=10cdd71ec517c34b7f1354ce29a7081d34de2f119ec774b4b039731f5020dacb] + +Apply complete! Resources: 2 added, 0 changed, 0 destroyed. +``` + +- Now everything works fine: +![alt text](lab5_4.png) + +- If we need to change something, we just change main.tf file and do the following: +``` +./terraform.exe plan +./terraform.exe apply +``` + +- To destroy, just simply run: +``` +./terraform.exe destroy +``` +Output: +``` +docker_image.nginx: Refreshing state... [id=sha256:60c8a892f36faf6c9215464005ee6fb8cf0585f70b113c0b030f6cb497a41876nginx:latest] +docker_container.nginx: Refreshing state... [id=10cdd71ec517c34b7f1354ce29a7081d34de2f119ec774b4b039731f5020dacb] + +Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: +- destroy + +Terraform will perform the following actions: + +# docker_container.nginx will be destroyed +- resource "docker_container" "nginx" { + - attach = false -> null + - command = [ + - "nginx", + - "-g", + - "daemon off;", + ] -> null + - container_read_refresh_timeout_milliseconds = 15000 -> null + - cpu_shares = 0 -> null + - dns = [] -> null + - dns_opts = [] -> null + - dns_search = [] -> null + - entrypoint = [ + - "/docker-entrypoint.sh", + ] -> null + - env = [] -> null + - group_add = [] -> null + - hostname = "10cdd71ec517" -> null + - id = "10cdd71ec517c34b7f1354ce29a7081d34de2f119ec774b4b039731f5020dacb" -> null + - image = "sha256:60c8a892f36faf6c9215464005ee6fb8cf0585f70b113c0b030f6cb497a41876" -> null + - init = false -> null + - ipc_mode = "private" -> null + - log_driver = "json-file" -> null + - log_opts = {} -> null + - logs = false -> null + - max_retry_count = 0 -> null + - memory = 0 -> null + - memory_swap = 0 -> null + - must_run = true -> null + - name = "nginx-server" -> null + - network_data = [ + - { + - gateway = "172.17.0.1" + - global_ipv6_prefix_length = 0 + - ip_address = "172.17.0.2" + - ip_prefix_length = 16 + - mac_address = "02:42:ac:11:00:02" + - network_name = "bridge" + # (2 unchanged attributes hidden) + }, + ] -> null + - network_mode = "bridge" -> null + - privileged = false -> null + - publish_all_ports = false -> null + - read_only = false -> null + - remove_volumes = true -> null + - restart = "no" -> null + - rm = false -> null + - runtime = "runc" -> null + - security_opts = [] -> null + - shm_size = 64 -> null + - start = true -> null + - stdin_open = false -> null + - stop_signal = "SIGQUIT" -> null + - stop_timeout = 0 -> null + - storage_opts = {} -> null + - sysctls = {} -> null + - tmpfs = {} -> null + - tty = false -> null + - wait = false -> null + - wait_timeout = 60 -> null + - working_dir = "/" -> null + # (6 unchanged attributes hidden) + + - ports { + - external = 8080 -> null + - internal = 80 -> null + - ip = "0.0.0.0" -> null + - protocol = "tcp" -> null + } + } + +# docker_image.nginx will be destroyed +- resource "docker_image" "nginx" { + - id = "sha256:60c8a892f36faf6c9215464005ee6fb8cf0585f70b113c0b030f6cb497a41876nginx:latest" -> null + - image_id = "sha256:60c8a892f36faf6c9215464005ee6fb8cf0585f70b113c0b030f6cb497a41876" -> null + - keep_locally = false -> null + - name = "nginx:latest" -> null + - repo_digest = "nginx@sha256:bc5eac5eafc581aeda3008b4b1f07ebba230de2f27d47767129a6a905c84f470" -> null + } + +Plan: 0 to add, 0 to change, 2 to destroy. + +Do you really want to destroy all resources? +Terraform will destroy all your managed infrastructure, as shown above. +There is no undo. Only 'yes' will be accepted to confirm. + +Enter a value: yes + +docker_container.nginx: Destroying... [id=10cdd71ec517c34b7f1354ce29a7081d34de2f119ec774b4b039731f5020dacb] +docker_container.nginx: Destruction complete after 0s +docker_image.nginx: Destroying... [id=sha256:60c8a892f36faf6c9215464005ee6fb8cf0585f70b113c0b030f6cb497a41876nginx:latest] +docker_image.nginx: Destruction complete after 0s + +Destroy complete! Resources: 2 destroyed. +``` + +- And, obviously, our website is not accessible anymore. + +## Sum up +Terraform is quite complicated instrument, especially for the newbies. But, as soon as all the configurations are set up properly, deploying of projects of any size and complexity becomes as easy as running several very simple command in the terminal. \ No newline at end of file diff --git a/Lab5/lab5_1.png b/Lab5/lab5_1.png new file mode 100644 index 0000000..3626f79 Binary files /dev/null and b/Lab5/lab5_1.png differ diff --git a/Lab5/lab5_2.png b/Lab5/lab5_2.png new file mode 100644 index 0000000..05b95e3 Binary files /dev/null and b/Lab5/lab5_2.png differ diff --git a/Lab5/lab5_3.png b/Lab5/lab5_3.png new file mode 100644 index 0000000..e0ebb66 Binary files /dev/null and b/Lab5/lab5_3.png differ diff --git a/Lab5/lab5_4.png b/Lab5/lab5_4.png new file mode 100644 index 0000000..63565a1 Binary files /dev/null and b/Lab5/lab5_4.png differ diff --git a/Lab5/main.tf b/Lab5/main.tf new file mode 100644 index 0000000..b3af6e0 --- /dev/null +++ b/Lab5/main.tf @@ -0,0 +1,23 @@ +terraform { + required_providers { + docker = { + source = "kreuzwerker/docker" + } + } +} + +provider "docker" {} + +resource "docker_image" "nginx" { + name = "nginx:latest" + keep_locally = false +} + +resource "docker_container" "nginx" { + image = docker_image.nginx.image_id + name = "nginx-server" + ports { + internal = 80 + external = 8080 + } +} diff --git a/Lab5/submission5.md b/Lab5/submission5.md new file mode 100644 index 0000000..1eabcb6 --- /dev/null +++ b/Lab5/submission5.md @@ -0,0 +1,58 @@ +# GitOps & SRE Lab + +## Task 1: Key Metrics for SRE and SLAs + +**Objective**: Monitor system resources and manage disk space. + +1. **Monitor System Resources**: + - Use commands like `htop` and `iostat` to monitor CPU, memory, and I/O usage. + - Identify and document the top 3 most consuming applications for CPU, memory, and I/O usage in a `submission5.md` file. + + In my case the two most consuming processes by CPU load was Chrome (there are huge amount of subprocesses, but it covers quite huge part of the screen and shell. Also htop itself was most of the time the third process by CPU) + ![image](lab5_1.png) + +2. **Disk Space Management**: + - Use `du` and `df` to manage disk space. + - Identify and log the top 3 largest files in the `/var` directory in the `submission5.md` file. + + - `du` analyzes the disk usage of a folder with all the subfolders and files. Actually, it is hard to find 3 largest files since it cannot ditinguish files from folders. In my case I changed it a bit: + ``` + find /var -type f -exec du -a {} + | sort -n -r | less + ``` + Output: + ![alt text](lab5_2.png) + + The idea is to firstly sort out only files, then execute du on this list and then sort it by the size. + + - `df` - this command shows the usage of disks. In my case the output was (i guess the output is clear and does not need an explanation): + ``` + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/nvme1n1p2 490617784 250591748 215030556 54% / + ``` + +## Task 2: Terraform Installation and Nginx Deployment + +**Objective**: Install Terraform and deploy an Nginx container. + +1. **Research and Installation**: + - Read about Terraform. + - Install Terraform on your system by following the [official instructions](https://developer.hashicorp.com/terraform/tutorials/docker-get-started). + +2. **Nginx Deployment**: + - Follow the tutorial steps to build, change, and destroy infrastructure. + - Define variables and query data with outputs. + - Document your process. + +3. **Publish Configuration Files**: + - Create a `lab5` folder in your repository. + - Include all Terraform configuration files used in the tutorial in this folder. + +4. **Documentation**: + - Create a Markdown file named `TerraformAndNginx.md` in the `lab5` folder. + - Include the following details: + - The version number of Terraform installed. + - Steps followed to install Terraform. + - Commands executed to initialize and apply the Terraform configuration. + - Observations or challenges encountered during the installation and deployment process. + + diff --git a/Lab5/terraform.tfstate b/Lab5/terraform.tfstate new file mode 100644 index 0000000..3941d86 --- /dev/null +++ b/Lab5/terraform.tfstate @@ -0,0 +1,9 @@ +{ + "version": 4, + "terraform_version": "1.9.8", + "serial": 6, + "lineage": "a781d2ad-ea3d-358d-4afa-eeb12e2f011b", + "outputs": {}, + "resources": [], + "check_results": null +} diff --git a/Lab5/terraform.tfstate.backup b/Lab5/terraform.tfstate.backup new file mode 100644 index 0000000..478c2ac --- /dev/null +++ b/Lab5/terraform.tfstate.backup @@ -0,0 +1,144 @@ +{ + "version": 4, + "terraform_version": "1.9.8", + "serial": 3, + "lineage": "a781d2ad-ea3d-358d-4afa-eeb12e2f011b", + "outputs": {}, + "resources": [ + { + "mode": "managed", + "type": "docker_container", + "name": "nginx", + "provider": "provider[\"registry.terraform.io/kreuzwerker/docker\"]", + "instances": [ + { + "schema_version": 2, + "attributes": { + "attach": false, + "bridge": "", + "capabilities": [], + "cgroupns_mode": null, + "command": [ + "nginx", + "-g", + "daemon off;" + ], + "container_logs": null, + "container_read_refresh_timeout_milliseconds": 15000, + "cpu_set": "", + "cpu_shares": 0, + "destroy_grace_seconds": null, + "devices": [], + "dns": null, + "dns_opts": null, + "dns_search": null, + "domainname": "", + "entrypoint": [ + "/docker-entrypoint.sh" + ], + "env": [], + "exit_code": null, + "gpus": null, + "group_add": null, + "healthcheck": null, + "host": [], + "hostname": "10cdd71ec517", + "id": "10cdd71ec517c34b7f1354ce29a7081d34de2f119ec774b4b039731f5020dacb", + "image": "sha256:60c8a892f36faf6c9215464005ee6fb8cf0585f70b113c0b030f6cb497a41876", + "init": false, + "ipc_mode": "private", + "labels": [], + "log_driver": "json-file", + "log_opts": null, + "logs": false, + "max_retry_count": 0, + "memory": 0, + "memory_swap": 0, + "mounts": [], + "must_run": true, + "name": "nginx-server", + "network_data": [ + { + "gateway": "172.17.0.1", + "global_ipv6_address": "", + "global_ipv6_prefix_length": 0, + "ip_address": "172.17.0.2", + "ip_prefix_length": 16, + "ipv6_gateway": "", + "mac_address": "02:42:ac:11:00:02", + "network_name": "bridge" + } + ], + "network_mode": "bridge", + "networks_advanced": [], + "pid_mode": "", + "ports": [ + { + "external": 8080, + "internal": 80, + "ip": "0.0.0.0", + "protocol": "tcp" + } + ], + "privileged": false, + "publish_all_ports": false, + "read_only": false, + "remove_volumes": true, + "restart": "no", + "rm": false, + "runtime": "runc", + "security_opts": [], + "shm_size": 64, + "start": true, + "stdin_open": false, + "stop_signal": "SIGQUIT", + "stop_timeout": 0, + "storage_opts": null, + "sysctls": null, + "tmpfs": null, + "tty": false, + "ulimit": [], + "upload": [], + "user": "", + "userns_mode": "", + "volumes": [], + "wait": false, + "wait_timeout": 60, + "working_dir": "/" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "docker_image.nginx" + ] + } + ] + }, + { + "mode": "managed", + "type": "docker_image", + "name": "nginx", + "provider": "provider[\"registry.terraform.io/kreuzwerker/docker\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "build": [], + "force_remove": null, + "id": "sha256:60c8a892f36faf6c9215464005ee6fb8cf0585f70b113c0b030f6cb497a41876nginx:latest", + "image_id": "sha256:60c8a892f36faf6c9215464005ee6fb8cf0585f70b113c0b030f6cb497a41876", + "keep_locally": false, + "name": "nginx:latest", + "platform": null, + "pull_triggers": null, + "repo_digest": "nginx@sha256:bc5eac5eafc581aeda3008b4b1f07ebba230de2f27d47767129a6a905c84f470", + "triggers": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + } + ], + "check_results": null +} diff --git a/Lab6/submission6.md b/Lab6/submission6.md new file mode 100644 index 0000000..0770b22 --- /dev/null +++ b/Lab6/submission6.md @@ -0,0 +1,173 @@ +# Operating Systems & Networking Lab + +In this lab, you will explore operating systems and networking fundamentals in a DevOps context. You will gain practical experience in working with operating systems and perform network-related tasks. Follow the tasks below to complete the lab assignment. + +## Task 1: Operating System Analysis + +**Objective**: Analyze and understand key aspects of the operating system's performance and uptime. + +1. **Analyze System Boot Time**: + - `systemd-analyze` + + Output: + ``` + Startup finished in 10.688s (firmware) + 3.268s (loader) + 2.463s (kernel) + 11.253s (userspace) = 27.673s + graphical.target reached after 11.236s in userspace + ``` + Interesting observation: I had broken VPN, which worked through stunnel4 service. This service could not start properly and continueusly restarted, making boot not finished for infinite time. On one side, OS was booted and worked properly, on the other side, it showed that it boots infinitely long. + + - `systemd-analyze blame` + Output: + ``` + stepan@stepan-ASUS:~/DO$ systemd-analyze blame + 8.174s NetworkManager-wait-online.service + 4.682s plymouth-quit-wait.service + 3.871s snap.docker.nvidia-container-toolkit.service + 1.184s gpu-manager.service + 813ms fwupd.service + 664ms docker.service + 558ms snapd.seeded.service + 460ms dev-loop4.device + 460ms dev-loop6.device + 460ms dev-loop7.device + 393ms snapd.service + 381ms dev-loop5.device + 372ms dev-loop3.device + 366ms dev-loop0.device + 359ms dev-loop2.device + 359ms dev-loop1.device + 249ms systemd-resolved.service + 237ms dev-nvme0n1p2.device + 234ms systemd-oomd.service + 228ms systemd-timesyncd.service + 148ms dpkg-db-backup.service + 147ms networkd-dispatcher.service + 141ms udisks2.service + 133ms containerd.service + 132ms apport-autoreport.service + 120ms accounts-daemon.service + 114ms qemu-kvm.service + 114ms bolt.service + 113ms bluetooth.service + 108ms apport.service + 105ms user@1000.service + 101ms systemd-logind.service + 96ms power-profiles-daemon.service + 91ms systemd-udev-trigger.service + 91ms systemd-journald.service + 84ms avahi-daemon.service + 79ms upower.service + 78ms dev-loop10.device + 78ms dev-loop15.device + ``` + Since my OS started quite quickly, I believe that `8.174s NetworkManager-wait-online.service` is the same way as stunnel in the previous step working in the background during booting and does not really affect the booting time. + +2. **Check System Load and Uptime**: + - Use `uptime` and `w` to check system load and uptime. + + ```sh + uptime + ``` + Output (pretty strightforward): + ``` + 00:03:39 up 6 min, 2 users, load average: 0,33, 0,47, 0,26 + ``` + Interesting fact: it shows 2 active users. It looks strange, but we will find the reason by the next command. + ```sh + w + ``` + Output: + ``` + 00:05:10 up 7 min, 2 users, load average: 1,06, 0,65, 0,34 + USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT + stepan :1 :1 23:57 ?xdm? 2:50 0.00s /usr/libexec/gdm-x-session --run-script env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu + stepan pts/0 :1 23:57 1.00s 0.01s 0.00s w + ``` + Here we can see, that the two users are just two instanses of one user: + 1) The GUI of our OS. + 2) The virtual terminal (GUI terminal is actually a virtual terminal) + +3. **Document the Analysis**: + - Create a `submission6.md` file. + - Provide the output of `systemd-analyze`, `uptime`, and `w` commands in the `submission6.md` file. + - Include any observations or insights regarding system boot time, load, and uptime. + +## Task 2: Networking Analysis + +**Objective**: Perform network diagnostics and analyze DNS resolution to understand network paths and latency. + +1. **Traceroute**: + - Use the appropriate command or tool to perform a traceroute to a specified website or IP address. + + ```sh + traceroute yandex.ru + ``` + Output: + ``` + 1 10.248.1.1 1,098ms 0,999ms 0,998ms + 2 10.250.0.2 0,717ms 0,611ms 0,617ms + 3 10.252.6.1 1,141ms 0,808ms 0,814ms + 4 188.170.164.34 6,040ms 4,279ms 4,150ms + 5 * * * + 6 * * * + 7 83.169.204.176 16,821ms 16,161ms 16,236ms + 8 93.158.160.149 19,531ms 19,197ms 21,078ms + 9 * * * + 10 * * * + 11 * * * + 12 * * * + 13 * * * + 14 * * * + 15 * * * + 16 * * * + 17 * * * + 18 * * * + 19 * * * + 20 * * * + 21 * ^C + ``` + For some reason, on some step of the network (after trying various amount of completely different websites, it seems like the problem is on the side of provider in the university) some middle server is not replying to ICMP. + + ``` + ping yandex.ru + ``` + Output: + ``` + PING yandex.ru (213.180.193.56) 56(84) bytes of data. + 64 bytes from familysearch.yandex.ru (213.180.193.56): icmp_seq=1 ttl=53 time=22.2 ms + 64 bytes from familysearch.yandex.ru (213.180.193.56): icmp_seq=2 ttl=53 time=21.6 ms + ``` + So, the problem is definitely not in connection. + +2. **Dig**: + - Use the appropriate command or tool to perform a DNS lookup for a specified domain name. + + ```sh + dig yandex.ru + ``` + + ``` + ; <<>> DiG 9.18.28-0ubuntu0.22.04.1-Ubuntu <<>> yandex.ru + ;; global options: +cmd + ;; Got answer: + ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55712 + ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 + + ;; OPT PSEUDOSECTION: + ; EDNS: version: 0, flags:; udp: 65494 + ;; QUESTION SECTION: + ;yandex.ru. IN A + + ;; ANSWER SECTION: + yandex.ru. 272 IN A 213.180.193.56 + + ;; Query time: 2 msec + ;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP) + ;; WHEN: Wed Nov 13 00:16:39 MSK 2024 + ;; MSG SIZE rcvd: 54 + ``` + From the answer we can find that yandex.ru is 213.180.193.56. This might be the closest (by network) ip of the yandex, not the only one. + +3. **Document the Networking Analysis**: + - Add the output of the `traceroute` and `dig` commands to the `submission6.md` file. + - Include any observations or insights regarding the network path, latency, and DNS resolution. diff --git a/Lab7/lab7_1.png b/Lab7/lab7_1.png new file mode 100644 index 0000000..46c5854 Binary files /dev/null and b/Lab7/lab7_1.png differ diff --git a/Lab7/lab7_2.png b/Lab7/lab7_2.png new file mode 100644 index 0000000..ee9e968 Binary files /dev/null and b/Lab7/lab7_2.png differ diff --git a/Lab7/lab7_3.png b/Lab7/lab7_3.png new file mode 100644 index 0000000..18f9f81 Binary files /dev/null and b/Lab7/lab7_3.png differ diff --git a/Lab7/lab7_4.png b/Lab7/lab7_4.png new file mode 100644 index 0000000..7853db9 Binary files /dev/null and b/Lab7/lab7_4.png differ diff --git a/Lab7/submission7.md b/Lab7/submission7.md new file mode 100644 index 0000000..ecb560b --- /dev/null +++ b/Lab7/submission7.md @@ -0,0 +1,44 @@ +# Virtualization Lab + +In this lab, you will learn how to deploy a Virtual Machine (VM) using VirtualBox and customize its settings. Follow the tasks below to complete the lab assignment. + +## Task 1: VM Deployment + +**Objective**: Install VirtualBox and deploy a new VM using Ubuntu. + +1. **Install VirtualBox**: + - Download and install VirtualBox from the official [VirtualBox website](https://www.virtualbox.org/). + - To install on Ubuntu(22 in my case): + ``` + sudo dpkg -i ~/Downloads/virtualbox-7.1_7.1.4-165100~Ubuntu~jammy_amd64.deb + ``` + +2. **Deploy a Virtual Machine**: + - Quite simple setup is enough due to quite powerfull laptop: + ![alt text](lab7_1.png) + + - The only problem I faced was due to quite new kernel (6.5) which can be fixed by [link](https://forums.virtualbox.org/viewtopic.php?p=545341&sid=36cd0e3ccab406f0a7b2087f34fb8585#p545341) + - Also lately I found that I had to skip Unattended install since it setups Ubuntu 20 quite badly with several problems, like not sudo user, not openable terminal and others. Had to reinstall it with skipping unattended install. +3. **Documentation**: + - Add a screenshot of the running VM in the `submission7.md` file. + ![Lab7/lab7_2.png](lab7_2.png) +## Task 2: System Information Tools + +**Objective**: Discover and use command-line tools to display system information of the VM. + +- To get the list of VMs: +``` +VBoxManage list vms +``` +Output: +``` +"Ubuntu" {257b55d3-0d0b-4386-8b8f-4a2936a3113a} +``` + +I couldn't find any usable tool to monitor VM from the host machine, so I just setted up port forwarding, hosted ssh server on VM side and connected to the VM using ssh. Since that we can just simply install any monitoring tool, like `htop` on the VM and monitor it from the host machine: +![alt text](lab7_4.png) +![alt text](lab7_3.png) + +In order to not write again the simple steps, I will just link the guide, which quite simply explains the steps, which are specific to VirtualBox in this setup: https://www.makeuseof.com/how-to-ssh-into-virtualbox-ubuntu/ + +It seems like a universal solution to any tasks we might need or not depending on the task we need to solve. That is the reason why I chose this solution for the lab. diff --git a/Lab8/index.html b/Lab8/index.html new file mode 100644 index 0000000..a20a501 --- /dev/null +++ b/Lab8/index.html @@ -0,0 +1,8 @@ + + +The best + + +

website

+ + \ No newline at end of file diff --git a/Lab8/lab8_1.png b/Lab8/lab8_1.png new file mode 100644 index 0000000..2383979 Binary files /dev/null and b/Lab8/lab8_1.png differ diff --git a/Lab8/lab8_2.png b/Lab8/lab8_2.png new file mode 100644 index 0000000..31e3d50 Binary files /dev/null and b/Lab8/lab8_2.png differ diff --git a/Lab8/lab8_3.png b/Lab8/lab8_3.png new file mode 100644 index 0000000..8d05b39 Binary files /dev/null and b/Lab8/lab8_3.png differ diff --git a/Lab8/lab8_4.png b/Lab8/lab8_4.png new file mode 100644 index 0000000..d1f7480 Binary files /dev/null and b/Lab8/lab8_4.png differ diff --git a/Lab8/lab8_5.png b/Lab8/lab8_5.png new file mode 100644 index 0000000..43b7291 Binary files /dev/null and b/Lab8/lab8_5.png differ diff --git a/Lab8/new_default.conf b/Lab8/new_default.conf new file mode 100644 index 0000000..ac54d8e --- /dev/null +++ b/Lab8/new_default.conf @@ -0,0 +1,45 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} + diff --git a/Lab8/old_default.conf b/Lab8/old_default.conf new file mode 100644 index 0000000..ac54d8e --- /dev/null +++ b/Lab8/old_default.conf @@ -0,0 +1,45 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} + diff --git a/Lab8/submission8.md b/Lab8/submission8.md new file mode 100644 index 0000000..af5ad05 --- /dev/null +++ b/Lab8/submission8.md @@ -0,0 +1,208 @@ +# Containers Lab - Docker + +In this lab, you will gain hands-on experience with Docker, a popular containerization platform. You will perform various tasks related to Docker containers, such as listing and pulling images, running containers, and creating custom images. Follow the tasks below to complete the lab assignment. + +## Task 1: Container Management + +**Objective**: Manage Docker containers and images. + +1. **List Containers**: + - Use the appropriate command to list the Docker containers present in your environment. + + ```sh + docker ps -a + ``` + Output: + ``` + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + ff1b32e28955 stunnel "stunnel" 4 days ago Up 2 hours openvpn_docker_client-master-stunnel-1 + ``` + + - Document the command used and provide the output in a Markdown file named `submission8.md` in the lab folder. + +2. **Pull Latest Ubuntu Image**: + - Use the appropriate command to pull the latest Ubuntu image from the Docker registry. + + ```sh + docker pull ubuntu:latest + ``` + ``` + latest: Pulling from library/ubuntu + ff65ddf9395b: Pull complete + Digest: sha256:99c35190e22d294cdace2783ac55effc69d32896daaa265f0bbedbcde4fbe3e5 + Status: Downloaded newer image for ubuntu:latest + docker.io/library/ubuntu:latest + ``` + + Check: + ``` + docker image ls + ``` + ``` + REPOSITORY TAG IMAGE ID CREATED SIZE + ubuntu latest 59ab366372d5 4 weeks ago 78.1MB + stunnel latest bf322d41e2d8 2 months ago 9.42MB + ovpn latest 6c8014909074 2 months ago 20.2MB + hello-world latest d2c94e258dcb 18 months ago 13.3kB + ``` + + - Document the command used in the same `submission8.md` file. + +3. **Run Container**: + - Use the appropriate command to run a container using the Ubuntu image you just pulled. + + ```sh + docker run -it --name ubuntu_container ubuntu:latest + ``` + ![image](lab8_1.png) + This is the very base of the OS to make in download and install very fast and to be set up lately for the needs. + + `-it` flag is used to open the virtual terminal to communicate with the container. + - Document the command used and any relevant details about the container in the same `submission8.md` file. + +4. **Remove Image**: + - Attempt to remove the Ubuntu image you pulled earlier. + + ```sh + docker rmi ubuntu:latest + ``` + Output: + ``` + Error response from daemon: conflict: unable to remove repository reference "ubuntu:latest" (must force) - container d6c6923e87a4 is using its referenced image 59ab366372d5 + ``` + + Remove, I usually use: + ![image](lab8_2.png) + + - Document the command used and the outcome of the removal process in the same `submission8.md` file. + +## Task 2: Image and Container Operations + +**Objective**: Perform operations on Docker images and containers. + +1. **Create Image Archive**: + - Pull the latest Ubuntu image and create an archive file from it. + + ```sh + docker save -o ubuntu_image.tar ubuntu:latest + ``` + + - Document the commands used in a Markdown file named `submission8.md` in the lab folder. + - Compare the size of the archive file with the size of the original image. Explain any differences, if present, in the same `submission8.md` file. + ![alt text](lab8_3.png) + Seems like no difference in size. 77M shown by ls is using 1MB = 1024KB. Which should be about 78.1M shown by docker, which might use 1MB = 1000KB (quite widely used in different tools for some reasons). + +2. **Run Nginx Container**: + - Use the appropriate command to run a container using the Nginx web server image: + - Bind the container's port 80 to the local port 80. + - Run the container in detached mode and name it `nginx_container`. + + ```sh + docker run -d -p 80:80 --name nginx_container nginx + ``` + + - Verify that the web server is running and accessible from the local machine. + ![image](lab8_4.png) + +3. **Create HTML File**: + - Create an HTML file with the specified content: + + ```html + + + The best + + +

website

+ + + ``` + + - Copy the HTML file to the container at the appropriate location to serve as an index file. + + ```sh + docker cp index.html nginx_container:/usr/share/nginx/html/index.html + ``` + + ![image](lab8_5.png) + +4. **Create Custom Image**: + - Create a custom Docker image from the running container and name it `my_website`. + - Tag the container with the `latest` tag. + + ```sh + docker commit nginx_container my_website:latest + ``` + +5. **Remove Original Container**: + - Remove the original container (`nginx_container`) and verify that it has been successfully removed. + + ```sh + docker rm -f nginx_container + ``` + ``` + stepan@stepan-ASUS:~/DO/Lab8$ docker ps -a + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + ff1b32e28955 stunnel "stunnel" 4 days ago Up 2 hours openvpn_docker_client-master-stunnel-1 + ``` + +6. **Create New Container**: + - Create a new container using the custom image you've created (the same way as the original container). + + ```sh + docker run -d -p 80:80 --name my_website_container my_website:latest + ``` + +7. **Test Web Server**: + - Use the `curl` command to access the web server at `127.0.0.1:80`. + + ```sh + curl http://127.0.0.1:80 + ``` + ``` + stepan@stepan-ASUS:~/DO/Lab8$ docker ps -a + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + d01b3d5455a5 my_website:latest "/docker-entrypoint.…" 13 seconds ago Up 12 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp my_website_container + ff1b32e28955 stunnel "stunnel" 4 days ago Up 2 hours openvpn_docker_client-master-stunnel-1 + stepan@stepan-ASUS:~/DO/Lab8$ curl http://127.0.0.1:80 + + + The best + + +

website

+ + + ``` + +8. **Analyze Image Changes**: + - Use the `docker diff` command to analyze the changes made to the new image. + + ```sh + docker diff my_website_container + ``` + + ``` + C /run + C /run/nginx.pid + C /etc + C /etc/nginx + C /etc/nginx/conf.d + C /etc/nginx/conf.d/default.conf + ``` + + Symbol `C` in the beginning of each line says, that the file or folder (or files inside it) was changed. In our case two files were changed: + - `/run/nginx.pid` - this is file, containing process id of nginx. Each run it might change. There is nothing to worry about. + - `/etc/nginx/conf.d/default.conf` - configuration of our server. For some reason they were changed by our change of index.html + We can check the changes by the following series of commands: + ```sh + docker cp my_website_container:/etc/nginx/conf.d/default.conf ./new_default.conf + docker cp nginx_container:/etc/nginx/conf.d/default.conf ./old_default.conf + ``` + By comparing this two files we can find out, that it is not changed. Running + ```sh + docker diff nginx_container + ``` + Shows that this two files are changed here two. To be more precised, they are added. So, we can sum up that they are just autogenerated, so there is also nothing to worry about. + + - Also important to say, that we do not see `index.html` in the list of changed files. I couldn't find any good explanation of why it happens, but it looks like docker diff only compares OS-level part of filesystem. And index.html is somewhere like /home/ part of the OS which are not being tracked by docker diff. diff --git a/Lab8/ubuntu_image.tar b/Lab8/ubuntu_image.tar new file mode 100644 index 0000000..001557f Binary files /dev/null and b/Lab8/ubuntu_image.tar differ diff --git a/Lab9/info.txt b/Lab9/info.txt new file mode 100644 index 0000000..5c2d7f5 --- /dev/null +++ b/Lab9/info.txt @@ -0,0 +1,30 @@ +Distributor ID: Ubuntu +Description: Ubuntu 22.04.5 LTS +Release: 22.04 +Codename: jammy +H/W path Device Class Description +================================================ + system Computer +/0 bus Motherboard +/0/0 memory 16GiB System memory +/0/1 processor AMD EPYC 7763 64-Core Processor +/0/100 bridge 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) +/0/100/7 bridge 82371AB/EB/MB PIIX4 ISA +/0/100/7/0 system PnP device PNP0b00 +/0/100/7/1 input PnP device PNP0303 +/0/100/7/2 input PnP device PNP0f03 +/0/100/7/3 communication PnP device PNP0501 +/0/100/7/4 communication PnP device PNP0501 +/0/100/7/5 storage PnP device PNP0700 +/0/100/7/6 system PnP device PNP0c02 +/0/100/7/7 system PnP device PNP0c02 +/0/100/7/8 system PnP device PNP0c01 +/0/100/7.1 storage 82371AB/EB/MB PIIX4 IDE +/0/100/7.3 bridge 82371AB/EB/MB PIIX4 ACPI +/0/100/8 display Hyper-V virtual VGA +/1 /dev/fb0 display hyperv_drmdrmfb +/2 input0 input Power Button +/3 input1 input AT Translated Set 2 keyboard +/4 input3 input AT Translated Set 2 keyboard +/5 input4 input Microsoft Vmbus HID-compliant Mouse +/6 eth0 network Ethernet interface diff --git a/Lab9/lab9_1.png b/Lab9/lab9_1.png new file mode 100644 index 0000000..c72f938 Binary files /dev/null and b/Lab9/lab9_1.png differ diff --git a/Lab9/submission9.md b/Lab9/submission9.md new file mode 100644 index 0000000..031b6ba --- /dev/null +++ b/Lab9/submission9.md @@ -0,0 +1,60 @@ +# CI/CD Lab - GitHub Actions + +In this lab, you will explore continuous integration and continuous deployment (CI/CD) practices using GitHub Actions. GitHub Actions provides a powerful workflow automation tool to streamline your development and deployment processes. You will perform various tasks related to setting up CI/CD pipelines and gathering system information using GitHub Actions. Follow the tasks below to complete the lab assignment. + +## Task 1: Create Your First GitHub Actions Pipeline + +**Objective**: Set up a basic GitHub Actions workflow and observe its execution. + +1. **Read the Official Guide**: + - Due to my job I have to work quite a lot with [QGroundControl](https://github.com/mavlink/qgroundcontrol) which uses GitHub Actions for the following automatization: + - Tests + - Auto generation of Documentation + - Building the app for all supported OSs (Win, Linux, MacOS, IOS, Android) + - Auto Deploy of installers (at least .apk) to the Play Market, App Store and others. + + The app building is quite hard and OS specific task and Actions really help with that. I look at them as one-time called (after each commit, for example) docker container made for automatization and standartization of routine jobs. + Actions have quite flexible settings (like when to be triggered), big set of opensource modules, which are easy to use. In most of the cases the modules are just docker containers with some pre-defined images. But sometimes they are written on JS since Windows platform does not support docker (according to GitHub documentation), which rarely, but used. + With Artifact system they are extremely convenient to use. + +2. **Observe the Workflow Execution**: + - Push some changes to your repository and observe the GitHub Actions workflow execution. + - Document the output, any errors encountered, and any observations in the same `submission9.md` file. + + I used the default action from the guide. + ![image](lab9_1.png) + Action finished successfuly. + +## Task 2: Gathering System Information and Manual Triggering + +**Objective**: Extend your workflow to include manual triggering and system information gathering. + +1. **Configure a Manual Trigger**: + - In the parameter `on` we need to replace `push` with `workflow_dispatch`: + ```yml + on: [workflow_dispatch] + ``` + +2. **Gather System Information**: + - Modify your workflow to include an additional step for gathering system information. + - Use the appropriate actions and steps to collect information about the runner, hardware specifications, and operating system details. + - Document the changes made to the workflow file and the gathered system information in the same `submission9.md` file. + + So, I removed all the steps from the previous action, and replace it with two simple steps: + - Collect system info into a info.txt file: + ``` + - name: "Collect information about the runner." + run: touch info.txt && lsb_release -a >> info.txt && lshw -short -sanitize >> info.txt + ``` + - Upload info.txt as an artifact: + ``` + - name: "Upload artifact" + uses: actions/upload-artifact@v4 + with: + name: System Information + path: info.txt + ``` + + Then I ran this action by hands (we switched from push to Manual Triggering previously) and here is the result: [link](https://github.com/stepan14511/Sum24-intro-labs/actions/runs/11807967338) + + The file also could be found in the Lab9 folder.