diff --git a/.all-contributorsrc b/.all-contributorsrc index 9e840dde..4ab11bc5 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -59,11 +59,358 @@ "contributions": [ "doc" ] + }, + { + "login": "jobintweets", + "name": "Jobin George", + "avatar_url": "https://avatars0.githubusercontent.com/u/26024383?v=4", + "profile": "https://www.linkedin.com/in/jobin-george-364bbb127/", + "contributions": [ + "doc" + ] + }, + { + "login": "tsyr2ko", + "name": "tsyr2ko", + "avatar_url": "https://avatars3.githubusercontent.com/u/344274?v=4", + "profile": "https://github.com/tsyr2ko", + "contributions": [ + "doc" + ] + }, + { + "login": "VictorNS69", + "name": "Víctor Nieves Sánchez", + "avatar_url": "https://avatars2.githubusercontent.com/u/10101065?v=4", + "profile": "https://twitter.com/VictorNS69", + "contributions": [ + "doc" + ] + }, + { + "login": "acrofrank", + "name": "Frank", + "avatar_url": "https://avatars1.githubusercontent.com/u/25024102?v=4", + "profile": "https://blog.acropanda.top/", + "contributions": [ + "doc" + ] + }, + { + "login": "asadmansr", + "name": "Asad Mansoor", + "avatar_url": "https://avatars0.githubusercontent.com/u/7865693?v=4", + "profile": "https://medium.com/@asadmansoor", + "contributions": [ + "doc" + ] + }, + { + "login": "angristan", + "name": "Stanislas", + "avatar_url": "https://avatars1.githubusercontent.com/u/11699655?v=4", + "profile": "https://angristan.xyz", + "contributions": [ + "doc" + ] + }, + { + "login": "rodrigofazenda", + "name": "Rodrigo Fazenda", + "avatar_url": "https://avatars2.githubusercontent.com/u/12849476?v=4", + "profile": "https://www.linkedin.com/in/rodrigofazenda/", + "contributions": [ + "doc" + ] + }, + { + "login": "nkstanchev", + "name": "Nikolay Stanchev", + "avatar_url": "https://avatars0.githubusercontent.com/u/22329266?v=4", + "profile": "https://github.com/nkstanchev", + "contributions": [ + "doc" + ] + }, + { + "login": "meet59patel", + "name": "Meet Patel", + "avatar_url": "https://avatars2.githubusercontent.com/u/45785817?v=4", + "profile": "https://github.com/meet59patel", + "contributions": [ + "code" + ] + }, + { + "login": "shenxianpeng", + "name": "shenxianpeng", + "avatar_url": "https://avatars1.githubusercontent.com/u/3353385?v=4", + "profile": "https://shenxianpeng.github.io", + "contributions": [ + "doc" + ] + }, + { + "login": "Umang2002", + "name": "Umang Dobariya", + "avatar_url": "https://avatars3.githubusercontent.com/u/56287922?v=4", + "profile": "https://github.com/Umang2002", + "contributions": [ + "doc" + ] + }, + { + "login": "Revenge-Rakesh", + "name": "Rakesh .B", + "avatar_url": "https://avatars2.githubusercontent.com/u/36032275?v=4", + "profile": "https://github.com/Revenge-Rakesh", + "contributions": [ + "doc" + ] + }, + { + "login": "fedGL", + "name": "Federico Garcia-Lorca", + "avatar_url": "https://avatars3.githubusercontent.com/u/30448072?v=4", + "profile": "https://github.com/fedGL", + "contributions": [ + "doc" + ] + }, + { + "login": "kawaiipantsu", + "name": "Dave", + "avatar_url": "https://avatars0.githubusercontent.com/u/12233528?v=4", + "profile": "https://github.com/kawaiipantsu", + "contributions": [ + "doc" + ] + }, + { + "login": "listout", + "name": "Brahmajit", + "avatar_url": "https://avatars1.githubusercontent.com/u/66715002?v=4", + "profile": "https://listout.github.io/mysite/", + "contributions": [ + "doc", + "code" + ] + }, + { + "login": "milindchawre", + "name": "Milind Chawre", + "avatar_url": "https://avatars0.githubusercontent.com/u/21288765?v=4", + "profile": "https://milindchawre.github.io/", + "contributions": [ + "code" + ] + }, + { + "login": "lnfnunes", + "name": "Leandro Nunes", + "avatar_url": "https://avatars1.githubusercontent.com/u/2450417?v=4", + "profile": "http://lnfnunes.com.br", + "contributions": [ + "code" + ] + }, + { + "login": "creativeyashi", + "name": "Yashika Gupta", + "avatar_url": "https://avatars2.githubusercontent.com/u/56039343?v=4", + "profile": "https://github.com/creativeyashi", + "contributions": [ + "code" + ] + }, + { + "login": "VictordaSiIva", + "name": "Victor da Silva", + "avatar_url": "https://avatars3.githubusercontent.com/u/40555247?v=4", + "profile": "https://www.linkedin.com/in/victor-da-silva-a75951138/", + "contributions": [ + "code" + ] + }, + { + "login": "errazudin", + "name": "errazudin ishak", + "avatar_url": "https://avatars2.githubusercontent.com/u/539687?v=4", + "profile": "https://github.com/errazudin", + "contributions": [ + "code" + ] + }, + { + "login": "waniniraj", + "name": "Niraj", + "avatar_url": "https://avatars0.githubusercontent.com/u/20483354?v=4", + "profile": "https://github.com/waniniraj", + "contributions": [ + "code", + "doc" + ] + }, + { + "login": "petemadis", + "name": "petemadis", + "avatar_url": "https://avatars1.githubusercontent.com/u/44151476?v=4", + "profile": "https://github.com/petemadis", + "contributions": [ + "doc" + ] + }, + { + "login": "Onaope", + "name": "Onaopemipo", + "avatar_url": "https://avatars1.githubusercontent.com/u/64684770?v=4", + "profile": "http://onaopewapo.wordpress.com", + "contributions": [ + "doc" + ] + }, + { + "login": "mygwen", + "name": "mygwen", + "avatar_url": "https://avatars2.githubusercontent.com/u/56973180?v=4", + "profile": "https://github.com/mygwen", + "contributions": [ + "doc" + ] + }, + { + "login": "cjjp-sushi", + "name": "peachybutt", + "avatar_url": "https://avatars2.githubusercontent.com/u/44535517?v=4", + "profile": "https://github.com/cjjp-sushi", + "contributions": [ + "doc" + ] + }, + { + "login": "jenistenxavier", + "name": "Jenisten Xavier", + "avatar_url": "https://avatars1.githubusercontent.com/u/43406772?v=4", + "profile": "https://github.com/jenistenxavier", + "contributions": [ + "doc" + ] + }, + { + "login": "sahid1486", + "name": "sahid1486", + "avatar_url": "https://avatars1.githubusercontent.com/u/60508279?v=4", + "profile": "https://github.com/sahid1486", + "contributions": [ + "content", + "code" + ] + }, + { + "login": "ThorstenHans", + "name": "Thorsten Hans", + "avatar_url": "https://avatars0.githubusercontent.com/u/357884?v=4", + "profile": "https://thorsten-hans.com", + "contributions": [ + "content", + "code" + ] + }, + { + "login": "yenyl", + "name": "yenyl", + "avatar_url": "https://avatars1.githubusercontent.com/u/57047995?v=4", + "profile": "https://github.com/yenyl", + "contributions": [ + "doc" + ] + }, + { + "login": "tiramisubliss", + "name": "Wasisto", + "avatar_url": "https://avatars2.githubusercontent.com/u/17046296?v=4", + "profile": "https://github.com/tiramisubliss", + "contributions": [ + "doc" + ] + }, + { + "login": "Sakura74", + "name": "Muskan Rathore", + "avatar_url": "https://avatars0.githubusercontent.com/u/62328534?v=4", + "profile": "https://github.com/Sakura74", + "contributions": [ + "doc" + ] + }, + { + "login": "Ebennetteng", + "name": "Ebennetteng", + "avatar_url": "https://avatars0.githubusercontent.com/u/60264726?v=4", + "profile": "https://github.com/Ebennetteng", + "contributions": [ + "doc" + ] + }, + { + "login": "ShvetaVasisht", + "name": "ShvetaVasisht", + "avatar_url": "https://avatars.githubusercontent.com/u/74658760?v=4", + "profile": "https://github.com/ShvetaVasisht", + "contributions": [ + "code" + ] + }, + { + "login": "franciosi", + "name": "Franciosi", + "avatar_url": "https://avatars.githubusercontent.com/u/123564?v=4", + "profile": "https://github.com/franciosi", + "contributions": [ + "code" + ] + }, + { + "login": "s403o", + "name": "Eslam Adel", + "avatar_url": "https://avatars.githubusercontent.com/u/38042656?v=4", + "profile": "https://github.com/s403o", + "contributions": [ + "doc" + ] + }, + { + "login": "mahmoodahmad100", + "name": "Mahmood Ahmad", + "avatar_url": "https://avatars.githubusercontent.com/u/24311652?v=4", + "profile": "https://github.com/mahmoodahmad100", + "contributions": [ + "doc" + ] + }, + { + "login": "darostegui", + "name": "Diego Arostegui", + "avatar_url": "https://avatars.githubusercontent.com/u/61184284?v=4", + "profile": "https://github.com/darostegui", + "contributions": [ + "code" + ] + }, + { + "login": "relativvv", + "name": "Robin Schulte", + "avatar_url": "https://avatars.githubusercontent.com/u/52501124?s=400&u=65c9b54a550063e6bd3b4fb36f0ed7c9ac80bde5&v=4", + "profile": "https://github.com/relativvv", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, "projectName": "DevOps-Guide", "projectOwner": "Tikam02", "repoType": "github", - "repoHost": "https://github.com" + "repoHost": "https://github.com", + "skipCi": true } diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..01c136bc --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: Tikam02 +patreon: Elynous +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: tikam02 +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml new file mode 100644 index 00000000..31c7f69b --- /dev/null +++ b/.github/workflows/markdownlint.yml @@ -0,0 +1,23 @@ +jobs: + lint-changelog: + name: Lint changelog file + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Lint changelog file + uses: docker://avtodev/markdown-lint:v1 + with: + rules: '/lint/rules/changelog.js' + config: '/lint/config/changelog.yml' + args: './CHANGELOG.md' + + # Or using current repository as action: + + - name: Lint changelog file + uses: avto-dev/markdown-lint@v1 + with: + rules: '/lint/rules/changelog.js' + config: '/lint/config/changelog.yml' + args: './CHANGELOG.md' diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e43b0f98 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/Books/DevOps interview questions with answers.pdf b/Books/DevOps interview questions with answers.pdf new file mode 100644 index 00000000..3f0b0e0d Binary files /dev/null and b/Books/DevOps interview questions with answers.pdf differ diff --git a/Books/Site.Reliability.Engineering.2016.3.pdf b/Books/Site.Reliability.Engineering.2016.3.pdf new file mode 100644 index 00000000..82bb7629 Binary files /dev/null and b/Books/Site.Reliability.Engineering.2016.3.pdf differ diff --git a/Books/Training_Site_Reliability_Engineers.pdf b/Books/Training_Site_Reliability_Engineers.pdf new file mode 100644 index 00000000..2842303c Binary files /dev/null and b/Books/Training_Site_Reliability_Engineers.pdf differ diff --git a/Books/building_secure_and_reliable_systems.pdf b/Books/building_secure_and_reliable_systems.pdf new file mode 100644 index 00000000..ede1187c Binary files /dev/null and b/Books/building_secure_and_reliable_systems.pdf differ diff --git a/Books/case-studies-infrastructure-change-management.pdf b/Books/case-studies-infrastructure-change-management.pdf new file mode 100644 index 00000000..b305e9e6 Binary files /dev/null and b/Books/case-studies-infrastructure-change-management.pdf differ diff --git a/Books/google-site-reliability-engineering.pdf b/Books/google-site-reliability-engineering.pdf new file mode 100644 index 00000000..24dc72bd Binary files /dev/null and b/Books/google-site-reliability-engineering.pdf differ diff --git a/Books/kubernetes sheet .pdf b/Books/kubernetes sheet .pdf new file mode 100644 index 00000000..2c7b0224 Binary files /dev/null and b/Books/kubernetes sheet .pdf differ diff --git a/Books/practical-guide-to-cloud-migration.pdf b/Books/practical-guide-to-cloud-migration.pdf new file mode 100644 index 00000000..e8636a2b Binary files /dev/null and b/Books/practical-guide-to-cloud-migration.pdf differ diff --git a/Books/progit.pdf b/Books/progit.pdf new file mode 100644 index 00000000..54aa9ff6 Binary files /dev/null and b/Books/progit.pdf differ diff --git a/Books/python sheet .pdf b/Books/python sheet .pdf new file mode 100644 index 00000000..b8c41090 Binary files /dev/null and b/Books/python sheet .pdf differ diff --git a/Books/readme.md b/Books/readme.md index c9b58d6e..87542bef 100644 --- a/Books/readme.md +++ b/Books/readme.md @@ -18,8 +18,36 @@ 16. [Research Guide Containers](research-guide-containers.pdf) 17. [Research Guide Devops](research-guide-devops.pdf) 18. [Trend Reports Kubernetes in the Enterprise](trend-report-kubernetes-in-the-enterprise.pdf) +19. [Securing DevOps](securing-devops.pdf) +20. [Agile Conversations: Transform Your Conversations, Transform Your Culture](https://www.amazon.com/Agile-Conversations-Transform-Your-Culture/dp/1942788975) +21. [The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win](https://www.amazon.com/Phoenix-Project-DevOps-Helping-Business/dp/0988262592) +22. [Cloud Native DevOps With Kubernetes](https://www.amazon.com/Cloud-Native-DevOps-Kubernetes-Applications/dp/1492040762) +23. [DevOps: A Software Architect’s Perspective](https://www.amazon.com/DevOps-Software-Architects-Perspective-Engineering/dp/0134049845) +24. [Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation](https://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/0321601912) +25. [Leading the Transformation: Applying Agile and DevOps Principles at Scale](https://www.amazon.com/Leading-Transformation-Applying-DevOps-Principles/dp/1942788010) +26. [DevOps For The Modern Enterprise: Winning Practices to Transform Legacy IT Organizations](https://www.amazon.com/DevOps-Modern-Enterprise-Practices-Organizations/dp/1942788193) +27. [Effective DevOps with AWS: Ship faster, scale better, and deliver incredible productivity](https://www.amazon.com/Effective-DevOps-AWS-incredible-productivity-ebook/dp/B01N4EREO3) +28. [Ansible for DevOps: Server and configuration management for humans](https://www.amazon.com/Ansible-DevOps-Server-configuration-management/dp/098639341X) +29. [DevOps for Developers (Expert's Voice in Web Development](https://www.amazon.com/DevOps-Developers-Experts-Voice-Development/dp/1430245697) +30. [Python sheet](python%20sheet%20.pdf) +31. [Kubernetes sheet](kubernetes%20sheet%20.pdf) +32. [DevOps interview questions with answers](DevOps%20interview%20questions%20with%20answers.pdf) +33. [Pro Git](progit.pdf) +34. [Building Secure and Reliable Systems](building_secure_and_reliable_systems.pdf) +35. [Case Studies in Infrastructure Change Management](case-studies-infrastructure-change-management.pdf) +36. [Google SRE](google-site-reliability-engineering.pdf) +37. [Practical Guide To Cloud Migration](practical-guide-to-cloud-migration.pdf) +38. [Training SRE](Training_Site_Reliability_Engineers.pdf) + ****** ## Resources : - [10+ Great Books For Aspiring DevOps & SRE Engineers](https://medium.com/faun/10-great-books-for-aspiring-devops-sre-engineers-76536c7c4909) +- [Top DevOps Books to Read in 2020](https://www.bmc.com/blogs/devops-books) +- [Effective DevOps: Building a Culture of Collaboration, Affinity, and Tooling at Scale](https://www.amazon.com/Effective-DevOps-Building-Collaboration-Affinity/dp/1491926309) +- [Practical DevOps: Harness the power of DevOps to boost your skill set and make your IT organization perform better](https://www.amazon.com/Practical-DevOps-Joakim-Verona/dp/1785882872) +- [Practice of System and Network Administration, The: Volume 1: DevOps and other Best Practices for Enterprise IT](https://www.amazon.com/Practice-System-Network-Administration-Enterprise/dp/0321919165) +- [Interactive Browser Based Labs, Courses & Playgrounds](https://www.katacoda.com/learn) + + diff --git a/Books/securing-devops.pdf b/Books/securing-devops.pdf new file mode 100644 index 00000000..72e867b0 Binary files /dev/null and b/Books/securing-devops.pdf differ diff --git a/Books/the-site-reliability-workbook-next18.pdf b/Books/the-site-reliability-workbook-next18.pdf new file mode 100644 index 00000000..6cc71dcc Binary files /dev/null and b/Books/the-site-reliability-workbook-next18.pdf differ diff --git a/CI-CD/Actions/README.md b/CI-CD/Actions/README.md new file mode 100644 index 00000000..f7120467 --- /dev/null +++ b/CI-CD/Actions/README.md @@ -0,0 +1,7 @@ +# GitHub Actions + +GitHub Actions provide a full end-to-end continuous integration (CI) and continuous deployment (CD) pipeline directly within the repository on GitHub. + +### Table of Contents: +1. [GitHub Actions Concepts](github-actions-concepts.md) +2. [GitHub Actions Tutorial](github-actions-tutorial.md) \ No newline at end of file diff --git a/CI-CD/Actions/github-actions-concepts.md b/CI-CD/Actions/github-actions-concepts.md new file mode 100644 index 00000000..91243b16 --- /dev/null +++ b/CI-CD/Actions/github-actions-concepts.md @@ -0,0 +1,37 @@ +# GitHub Actions Concepts + +## What is GitHub Actions? +GitHub Actions automates the software development life cycle workflows to build, test and deploy your projects on GitHub. GitHub Actions are made up of actions, individual tasks that you can configure, which you can combine with other tasks to build a workflow. These workflows are automated processes within the repository that can build, test, package and deploy your project on GitHub. + +With GitHub Actions, you can build a full end-to-end continuous integration (CI) and continuous deployment (CD) pipeline directly within the repository on GitHub. + + +## Workflows +A workflow is a configurable automated process that consists of one or more jobs. In order to execute a workflow, the project must contain the corresponding YAML file that defines the workflow configuration. With these workflows, you can trigger a job whenever a code has been pushed to a certain branch or pull requests. Once the workflow is running, you can configure the workflow to perform any specific commands and save the artifacts, such as reports or generated files, whenever the job is complete. GitHub Actions will provide real-time logs as well as a status check to alert whether the workflow has passed or failed. + + +## Example +```yaml +# Name of workflow +name: PR workflow for shell scripts + +# Trigger workflow on pull requests only +on: pull_request + +# Configure the jobs that the workflow must complete +jobs: + execute-script: + runs-on: ubuntu-latest + steps: + - name: Execute shell script + run: ./test_script.sh +``` + + +## GitHub Action Features +- Build, test and publish project on Linux, macOS, Windows, ARM or containers +- Save time with matrix builds +- Support for various languages in Node.js, Python, Java, Ruby, PHP, Go, RUST, .NET, and more +- Observe real-time logs for all the workflows +- Built-in secret management +- Multi-container testing \ No newline at end of file diff --git a/CI-CD/Actions/github-actions-tutorial.md b/CI-CD/Actions/github-actions-tutorial.md new file mode 100644 index 00000000..cb537a1d --- /dev/null +++ b/CI-CD/Actions/github-actions-tutorial.md @@ -0,0 +1,14 @@ +# GitHub Actions Tutorials + +The following resources will help in setting up a GitHub Actions workflow for any project on GitHub. + +## Tutorial: +* [The First GitHub Actions](https://dev.to/auvansang/the-first-github-actions-373h) +* [Configuring a Workflow](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#about-workflows) +* [Workflow Syntax for GitHub Actions](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions) + +## Resources: +* [About GitHub Actions](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-github-actions) +* [Core Concepts for GitHub Actions](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/core-concepts-for-github-actions) +* [Using Actions from GitHub Marketplace in your Workflow](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-actions-from-github-marketplace-in-your-workflow) +* [Github Actions Marketplace](https://github.com/marketplace?type=actions) \ No newline at end of file diff --git a/CI-CD/CircleCI/Readme.md b/CI-CD/CircleCI/Readme.md new file mode 100644 index 00000000..5fc29f40 --- /dev/null +++ b/CI-CD/CircleCI/Readme.md @@ -0,0 +1,7 @@ +# CircleCI + + CircleCI automates your software builds, tests, and deployments. After a software repository on GitHub or Bitbucket is authorized and added as a project to circleci.com, every code change triggers automated tests in a clean container or VM. + +### Table of Contents: +1. [CircleCI Concepts](circleci-concepts.md) +2. [CircleCI Commands](circleci-commands.md) diff --git a/CI-CD/CircleCI/circleci-commands.md b/CI-CD/CircleCI/circleci-commands.md new file mode 100644 index 00000000..c709e497 --- /dev/null +++ b/CI-CD/CircleCI/circleci-commands.md @@ -0,0 +1,29 @@ +# CircleCI Configuration File + +The following example calls an Orb named hello-build that exists in the certified circleci namespace. +``` +version: 2.1 +orbs: + hello: circleci/hello-build@0.0.5 +workflows: + "Hello Workflow": + jobs: + - hello/hello-build +``` + +# CircleCI Commands + +The CircleCI CLI is a command line interface that leverages many of CircleCI’s advanced and powerful tools from the comfort of your terminal. + +# CircleCI Local CLI + +Below are few things you can do with the CircleCI CLI : + +Debug and validate your CI config +Run jobs locally +Query CircleCI’s API +Create, publish, view and manage Orbs +Managing contexts + + + diff --git a/CI-CD/CircleCI/circleci-concepts.md b/CI-CD/CircleCI/circleci-concepts.md new file mode 100644 index 00000000..8569c07f --- /dev/null +++ b/CI-CD/CircleCI/circleci-concepts.md @@ -0,0 +1,56 @@ +# What Is Continuous Integration (CI)? +Continuous integration (CI) is a software development strategy that increases the speed of development while ensuring the quality of the code that teams deploy. Developers continually commit code in small increments (at least daily, or even several times a day), which is then automatically built and tested before it is merged with the shared repository. + +# What is Circle CI ? +With CircleCI, you can automate your software’s build, test, and deployment and your engineers can get back to work building the features that your users care about the most. + +# CircleCI Features: +Following are the most popular features CircleCI offers + +* SSH into Builds +* Parallelism +* Resource Class +* Cache +* Workflows +* Monitoring +* Nomad Cluster +* APIs + +# CircleCI Project: +A CircleCI project shares the name of the associated code repository in your VCS (GitHub or Bitbucket). Select Add Project from the CircleCI application to enter the Projects dashboard, from where you can set up and follow the projects you have access to. + +# Orbs: +Orbs are packages of config that you either import by name or configure inline to simplify your config, share, and reuse config within and across projects. + +# Jobs: +Jobs are collections of steps. All of the steps in the job are executed in a single unit, either within a fresh container or VM. +Visit the [Orbs Registry](https://circleci.com/developer/orbs) to search for orbs to help simplify your config. + +# Steps: +Steps are a collection of executable commands which are run during a job. + +# Caching: +Caching persists data between the same job in different Workflow builds, allowing you to reuse the data from expensive fetch operations from previous jobs. + +# Workspace : +When a workspace is declared in a job, files and directories can be added to it. Each addition creates a new layer in the workspace filesystem. + +# Artifacts : +Artifacts are used for longer-term storage of the outputs of your pipelines. Artifacts are stored for up to 30 days. + +# CircleCI Config : +CircleCI believes in configuration as code. As a result, the entire delivery process from build to deploy is orchestrated through a single file called config.yml. +The config.yml file is located in a folder called .circleci at the top of your project. CircleCI uses the YAML syntax for config. + +# Commands : +A command definition defines a sequence of steps as a map to be executed in a job, enabling you to reuse a single command definition across multiple jobs. + +# Executors : +Executors define the environment in which the steps of a job will be run, allowing you to reuse a single executor definition across multiple jobs. + +# Pipeline : +A CircleCI pipeline is the full set of processes you run when you trigger work on your projects. Pipelines encompass your workflows, which in turn coordinate your jobs. + +# Data Persistence : +Data persistence allows you to move data between jobs and speed up your build. There are three main methods for persisting data in CircleCI: caches, workspaces, and artifacts. + diff --git a/CI-CD/GitlabCi/gitlab-commands.md b/CI-CD/GitlabCi/gitlab-commands.md deleted file mode 100644 index 5456e6e0..00000000 --- a/CI-CD/GitlabCi/gitlab-commands.md +++ /dev/null @@ -1 +0,0 @@ -# Gitlab Commands \ No newline at end of file diff --git a/CI-CD/GitlabCi/gitlab-concepts.md b/CI-CD/GitlabCi/gitlab-concepts.md index d6fccd17..7a39fdb6 100644 --- a/CI-CD/GitlabCi/gitlab-concepts.md +++ b/CI-CD/GitlabCi/gitlab-concepts.md @@ -1 +1,2 @@ -# Gitlab Concepts \ No newline at end of file + +# Gitlab Concepts diff --git a/CI-CD/TravisCi/travis-concepts.md b/CI-CD/TravisCi/travis-concepts.md index 6f108ea7..88cb2d8d 100644 --- a/CI-CD/TravisCi/travis-concepts.md +++ b/CI-CD/TravisCi/travis-concepts.md @@ -1 +1,29 @@ -# Travis Concepts \ No newline at end of file +# Travis Concepts + +# What Is Continuous Integration (CI)? +Continuous Integration is the practice of merging in small code changes frequently - rather than merging in a large change at the end of a development cycle. The goal is to build healthier software by developing and testing in smaller increments. This is where Travis CI comes in. + +# What is Travis CI ? +Travis CI is a hosted, distributed continuous integration service used to build and test projects hosted at GitHub. Travis CI automatically detects when a commit has been made and pushed to a GitHub repository that is using Travis CI, and each time this happens, it will try to build the project and run tests. + +# What does Travis do? +Travis CI offers following benefits: +You can monitor GitHub projects +Runs Test and generate results quickly. Parallel test execution is possible. +Build artifacts & check code quality +Easy Deployment to cloud services +It can identify small as well as large code changes. +Developers can use Travis CI to watch the tests when they are running. +The tool integrates with Slack, HipChat, Email, etc. + +# Travis CI Features: +Automatic integration with GitHub +Repository access to build pull requests +Support for 21 languages like Android, C, C#, C++, Java, JavaScript (with Node.js), Perl, PHP, Python, R, Ruby, etc +Pre-installed build & test tools +Available services - databases, message queues, etc. +Deployment to multiple cloud services +Encrypt secure environment variables or files +Virtual machines recreated after every build +CLI client and API for scripting +Comes with free cloud-based hosting which does not require maintenance or administration. diff --git a/CI-CD/git/git-advanced-commands.md b/CI-CD/git/git-advanced-commands.md new file mode 100644 index 00000000..1295ca52 --- /dev/null +++ b/CI-CD/git/git-advanced-commands.md @@ -0,0 +1,26 @@ +# Git Advanced Commands + +### Branching & Rebasing & squashing + +| Command | Description | +| ------- | ----------- | +| `git checkout [branch name] --orphan` | Creates a new branch without the long repository's history. | +| `git rebase [source branch] [target branch]` | Fetch the current commits timeline from the remote branch and apply the new commits from the local branch on top of it | +| `git rebase -i [commit hash]^` | Interactively rebase starting from the parent commit, where `[commit hash]^` specifies the parent commit | +| `git pull origin [source branch] --rebase` | Pull changes from a remote repository using the `rebase` strategy. Default is `merge`. | +| `git pull origin [source branch] --rebase --autostash` | The same as above but performing automatically stash and pop your uncommitted changes when the branch is in a dirty state. | +| `git cherry-pick [commit hash]` | Apply the changes from any branche's commit to the target branch. | +| `git config branch.[branch name].rebase true` | Set a specific branch to always use the `rebase` strategy. | + +### Fixing mistakes & destructive + +| Command | Description | +| ------- | ----------- | +| `git reset --hard origin/[target branch]` | Reset the local branch to the origin branch's state. **Caution:** your local changes will be lost. | +| `git reset --soft HEAD~1` | Undo the last local commit. The `--soft` flag keeps the changes, if you don't need to keep them, you can use the `--hard` instead. **Caution**, the latter is a descructive command. | +| `git commit --amend` | Modify the most recent commit. Can be used to edit message or add more files to that commit. **Caution**, this changes the commit hash, so do this only while it was not yet pushed to a shared branch. | +| `git revert HEAD~1` | Create a new commit undoing the last commit's changes. | +| `git reflog` | List all the git actions that were executed before. Useful to find a lost commit, then you can try to recover it. | +| `git bisect start` | Useful to find the buggy commit (that possible introduces some bug). After this, you use `git bisect [good|bad]` indicating when the suggested commit is in a `good` or `bad` state. When the issue is found, use `git bisect reset` to reset back to the original state before using the git bisect command.| +| ```git branch --merged \| egrep -v "(*\|master\|dev)" \| xargs git branch -d``` | Delete already merged branches but `master` and `dev` in this example. +| `git clean -df` | Remove untracked files and directories from the working tree. Add `n` to the flags to list all files that would be removed. | diff --git a/CI-CD/git/git-basic-commands.md b/CI-CD/git/git-basic-commands.md new file mode 100644 index 00000000..7b03f2e4 --- /dev/null +++ b/CI-CD/git/git-basic-commands.md @@ -0,0 +1,70 @@ +# Git Basic Commands + +### Getting & Creating Projects + +| Command | Description | +| ------- | ----------- | +| `git init` | Initialize a local Git repository | +| `git clone ssh://git@github.com/[username]/[repository-name].git` | Create a local copy of a remote repository | + +### Basic Snapshotting + +| Command | Description | +| ------- | ----------- | +| `git status` | Check status | +| `git add [file-name.txt]` | Add a file to the staging area | +| `git add -A` | Add all new and changed files to the staging area | +| `git commit -m "[commit message]"` | Commit changes | +| `git rm -r [file-name.txt]` | Remove a file (or folder) | + +### Branching & Merging + +| Command | Description | +| ------- | ----------- | +| `git branch` | List branches (the asterisk denotes the current branch) | +| `git branch -a` | List all branches (local and remote) | +| `git branch [branch name]` | Create a new branch | +| `git branch -d [branch name]` | Delete a branch | +| `git push origin --delete [branch name]` | Delete a remote branch | +| `git checkout -b [branch name]` | Create a new branch and switch to it | +| `git checkout -b [branch name] origin/[branch name]` | Clone a remote branch and switch to it | +| `git branch -m [old branch name] [new branch name]` | Rename a local branch | +| `git checkout [branch name]` | Switch to a branch | +| `git checkout -` | Switch to the branch last checked out | +| `git checkout -- [file-name.txt]` | Discard changes to a file | +| `git merge [branch name]` | Merge a branch into the active branch | +| `git merge [source branch] [target branch]` | Merge a branch into a target branch | +| `git stash` | Stash changes in a dirty working directory | +| `git stash pop` | Apply the last stashed state on the working directory | +| `git stash apply` | Like `git stash pop`, but do not remove last state from stash list. | +| `git stash clear` | Remove all stashed entries | + +### Sharing & Updating Projects + +| Command | Description | +| ------- | ----------- | +| `git push origin [branch name]` | Push a branch to your remote repository | +| `git push -u origin [branch name]` | Push changes to remote repository (and remember the branch) | +| `git push` | Push changes to remote repository (remembered branch) | +| `git push origin --delete [branch name]` | Delete a remote branch | +| `git pull` | Update local repository to the newest commit | +| `git pull origin [branch name]` | Pull changes from remote repository | +| `git remote add origin ssh://git@github.com/[username]/[repository-name].git` | Add a remote repository | +| `git remote set-url origin ssh://git@github.com/[username]/[repository-name].git` | Set a repository's origin branch to SSH | + +### Inspection & Comparison + +| Command | Description | +| ------- | ----------- | +| `git log` | View changes | +| `git log --summary` | View changes (detailed) | +| `git log --oneline` | View changes (briefly) | +| `git diff [source branch] [target branch]` | Preview changes before merging | + +### Tagging + +| Command | Description | +| ------- | ----------- | +| `git tag` | List existing tags | +| `git tag -a [tag name] -m [tag description]` | Creating an annotated tag | +| `git push origin [tag name]` | Sharing tags to remote server | diff --git a/CI-CD/git/readme.md b/CI-CD/git/readme.md index 21fa5b4a..b7eada7e 100644 --- a/CI-CD/git/readme.md +++ b/CI-CD/git/readme.md @@ -1,6 +1,10 @@ # Version Control - Git **************************** +> _[Git](https://en.wikipedia.org/wiki/Git) is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non- +linear workflows._ - Directories - - [Git basics]() - - [Git advanced]() \ No newline at end of file + - [Git basics](git-basic-commands.md) + - [Git advanced](git-advanced-commands.md) + + Resource for practice (https://try.github.io/) diff --git a/CI-CD/jenkins/Jenkins-overview.md b/CI-CD/jenkins/Jenkins-overview.md new file mode 100644 index 00000000..631452a8 --- /dev/null +++ b/CI-CD/jenkins/Jenkins-overview.md @@ -0,0 +1,9 @@ +## What is Jenkins? + +Jenkins is an open-source automation server used to build, test, and deploy applications. +It helps implement CI/CD pipelines by automating repetitive tasks. + +### Why Jenkins? +- Automates build & deployment +- Integrates with GitHub +- Supports Docker & Kubernetes diff --git a/CI-CD/jenkins/jenkins-concepts.md b/CI-CD/jenkins/jenkins-concepts.md index 70c850c7..ad0e4128 100644 --- a/CI-CD/jenkins/jenkins-concepts.md +++ b/CI-CD/jenkins/jenkins-concepts.md @@ -1 +1,9 @@ -# Jenkins Concepts \ No newline at end of file +# Jenkins Concepts + +Jenkins Pipeline (or simply "Pipeline") is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins. + +Following are the reference links for Jenkins and Jenikns Pipelines. + +https://www.jenkins.io/doc/pipeline/tour/getting-started/ + +https://www.jenkins.io/doc/pipeline/tour/hello-world/ diff --git a/CI-CD/readme.md b/CI-CD/readme.md index ae08c3d3..ebb7e1a4 100644 --- a/CI-CD/readme.md +++ b/CI-CD/readme.md @@ -1,3 +1,39 @@ -### Continous Integration-Continous Deplyoment +### Continuous Integration-Continous Deployment ************ +## What is it? + +Continuous Integration and Continuous Delivery/Deployment (CI/CD) is a development methodology that solves typical problems found during the integration process. As multiple developers work in parallel, it becomes increasingly difficult to maintain a main branch that works and is free of bugs and errors. With CI/CD, steps in the integration process are automated and the lifecycle of the app is constantly monitored. Ideally, this methodology will avoid "integration hell", a situation where multiple developers that have been working on separate features on their own find it impossible to integrate all their code without major conflicts, and have to spend time reviewing all of their code to fix it. + +For reference, this is the definition of "integration hell" based on the [Agile glossary](https://www.solutionsiq.com/agile-glossary/integration-hell/): +> Integration Hell refers to the point in production when the members of a delivery team integrate their individual code. In traditional software development environments, this integration process is rarely smooth and seamless, instead resulting in hours or perhaps days of fixing the code so that it can finally integrate. Continuous Integration (CI) aims to avoid this completely by enabling and encouraging team members to integrate frequently (e.g., hourly, or at least daily). + + + +## Continuous Integration + +The goal of continuous integration (CI) is to quickly produce code that works. Successful CI means the changes to an app are built, tested and merged regularly. This integration can happen many times a day, and it usually involves automated test cases and a well-defined build sequence that minimizes errors. The main focus when using CI methodologies should be: +1. Smaller code: reduce the size of your contributions to the main branch, and make them instead more frequently. This will make it easy to detect bugs early and reduce conflicts with other contributions. Smaller integrations also mean test cases can run faster and your code becomes available to others that might be impacted by your feature. +2. Automated testing: Although there are CI "pipelines" that do not use automated testing, in practice automation vastly outweighs the benefits of manual testing. If a developer is integrating code several times a day, manual testing becomes troublesome, inconsistent and generally a waste of the developer's productivity. + +## Continuous Delivery + +This term is often used interchangeably with Continuous Deployment, but it can be nuanced. Usually Continuous Delivery will refer to how a developer is constantly *delivering* code that has already been tested for bugs. This does not mean the integrated code will be used in a live production environment. With Continous Delivery the process of pushing code from the developers' environment to the repository is automated, reducing the number of or eliminating the manual steps required. + +## Continuous Deployment + +Although it varies from team to team, Continuous Deployment will refer to code that, when integrated, is also deployed automatically to the live production site of the app. The reason this and Continuous Delivery are often both included in CD is because typical CI/CD pipelines will include both, and they both complement each other. + +## Elements of a CI/CD pipeline + +RedHat provides the following definitions in their article [What is a CI/CD pipeline?](https://www.redhat.com/en/topics/devops/what-cicd-pipeline): + +The steps that form a CI/CD pipeline are distinct subsets of tasks grouped into what is known as a pipeline stage. Typical pipeline stages include: + +* Build - The stage where the application is compiled. +* Test - The stage where code is tested. Automation here can save both time and effort. +* Release - The stage where the application is delivered to the repository. +* Deploy - In this stage code is deployed to production. +* Validate and check compliance - The steps to validate a build are determined by the needs of your organization. Image security scanning tools, like Clair, can ensure the quality of images by comparing them to known vulnerabilities (CVEs). + + diff --git a/Cloud_providers/AWS/aws.md b/Cloud_providers/AWS/aws.md new file mode 100644 index 00000000..8154074e --- /dev/null +++ b/Cloud_providers/AWS/aws.md @@ -0,0 +1,148 @@ +# Amazon Web Services (AWS) Concepts + +Amazon Web Services (AWS) is a leading cloud service provider that offers a wide range of cloud computing services. Below are some fundamental concepts to understand when working with AWS: + +## 1. Regions and Availability Zones + +- **Region:** A geographic area that consists of multiple Availability Zones. Each AWS region is a separate geographic area, isolated from others, and is designed to provide high availability and low latency. +- **Availability Zone (AZ):** A data center or facility within an AWS region. AZs are interconnected but physically separate from each other, providing redundancy and fault tolerance. + +## 2. EC2 (Elastic Compute Cloud) + +- **EC2 Instance:** Virtual machines that you can rent on AWS. They vary in terms of computing power, memory, and storage capacity to meet different application requirements. +- **AMI (Amazon Machine Image):** A pre-configured virtual machine image used to create EC2 instances. +- **Security Groups:** Virtual firewalls that control inbound and outbound traffic to EC2 instances. + +## 3. S3 (Simple Storage Service) + +- **S3 Bucket:** A container for storing data objects (files) in S3. Buckets have unique names and are used to organize and manage data. +- **Objects:** The data files stored in S3 buckets. Each object consists of data, a key (unique within a bucket), and metadata. + +## 4. IAM (Identity and Access Management) + +- **IAM User:** An individual or system that interacts with AWS resources. Each user has its own set of credentials and permissions. +- **IAM Role:** A set of permissions that define what actions an entity can perform on AWS resources. Roles can be assumed by EC2 instances, Lambda functions, etc. +- **Policies:** JSON documents that define permissions for users, groups, and roles. + +## 5. RDS (Relational Database Service) + +- **RDS Instance:** Managed relational database instances (e.g., MySQL, PostgreSQL, Oracle) that are scalable and highly available. +- **DB Snapshots:** Point-in-time backups of an RDS instance, used for data recovery and replication. +- **Multi-AZ Deployment:** A configuration that replicates the database across multiple Availability Zones for high availability. + +## 6. VPC (Virtual Private Cloud) + +- **VPC:** A logically isolated section of the AWS cloud where you can launch AWS resources. It provides control over network configuration and security. +- **Subnet:** A range of IP addresses in your VPC. Subnets are associated with specific Availability Zones. +- **Route Table:** A set of rules that determine where network traffic is directed within a VPC. + +## 7. Lambda + +- **AWS Lambda:** A serverless computing service that lets you run code in response to events without provisioning or managing servers. +- **Event Sources:** Triggers that invoke Lambda functions, such as API Gateway, S3, or CloudWatch Events. +- **Function:** The code you want to execute when a Lambda is triggered. + +## 8. Elastic Load Balancing (ELB) + +- **ELB:** A service that distributes incoming traffic across multiple EC2 instances for improved availability and fault tolerance. +- **Load Balancer Types:** Classic Load Balancer, Application Load Balancer (ALB), Network Load Balancer (NLB). +## 9. Amazon Route 53 + +- **Amazon Route 53:** Route 53 is a scalable domain name system (DNS) web service that allows you to register domain names and route internet traffic to the appropriate resources, such as EC2 instances, S3 buckets, or load balancers. + +- **DNS Record Types:** Route 53 supports various DNS record types, including A records (for IPv4 addresses), AAAA records (for IPv6 addresses), CNAME records (for aliasing), MX records (for mail routing), and more. + +- **Health Checks:** You can configure Route 53 to perform health checks on your resources and automatically route traffic away from unhealthy endpoints to maintain high availability. + +## 10. AWS Elastic Beanstalk + +- **AWS Elastic Beanstalk:** Elastic Beanstalk is a Platform-as-a-Service (PaaS) that simplifies the deployment and management of web applications. It automatically handles infrastructure provisioning, capacity scaling, and application monitoring. + +- **Supported Platforms:** Elastic Beanstalk supports various programming languages and web frameworks, including Java, .NET, PHP, Node.js, Python, Ruby, and more. + +- **Customization:** While Elastic Beanstalk simplifies deployment, you can still customize the environment by specifying configuration files and settings. + +## 11. ECS (Elastic Container Service) and EKS (Elastic Kubernetes Service) + +- **ECS:** ECS is a container orchestration service that allows you to run, stop, and manage Docker containers on a cluster of EC2 instances. It simplifies the deployment of containerized applications. + +- **EKS:** EKS is a managed Kubernetes service that makes it easier to deploy, manage, and scale containerized applications using Kubernetes. + +- **Containers:** Both ECS and EKS are designed for container management and can scale your applications automatically based on demand. + +## 12. Amazon CloudWatch + +- **Amazon CloudWatch:** CloudWatch is a monitoring and observability service that collects and tracks metrics and logs from various AWS resources, applications, and services. + +- **Alarms:** You can set up alarms in CloudWatch to automatically trigger actions or notifications when specified thresholds are breached. + +- **Logs and Insights:** CloudWatch Logs allows you to collect, monitor, and store log data from your applications, while CloudWatch Logs Insights helps you analyze and gain insights from log data. + +## 13. Amazon Elasticsearch Service + +- **Amazon Elasticsearch Service:** This is a managed Elasticsearch service that makes it easy to deploy, operate, and scale Elasticsearch clusters for searching, analyzing, and visualizing data in real-time. + +- **Kibana Integration:** Amazon Elasticsearch Service integrates with Kibana for data visualization and exploration. + +- **Security and Access Control:** Elasticsearch Service provides security features such as encryption, access control, and VPC support. + +## 14. AWS CloudFormation + +- **AWS CloudFormation:** CloudFormation is an Infrastructure-as-Code (IaC) service that allows you to define and provision AWS infrastructure resources in a declarative template. You can create, update, and delete resources as a single unit. + +- **Templates:** CloudFormation templates are written in JSON or YAML and can describe a wide range of AWS resources and their relationships. + +- **Stacks:** Stacks are sets of AWS resources created and managed together using CloudFormation templates. + +## 15. Serverless Application Model (SAM) + +- **AWS SAM:** SAM is an open-source framework for building serverless applications. It extends AWS CloudFormation to simplify the deployment of serverless resources like AWS Lambda functions, API Gateway, and DynamoDB tables. + +- **Local Testing:** SAM allows you to test your serverless applications locally before deploying them to the AWS cloud. + +- **Resource Definitions:** SAM templates define serverless resources using a simplified syntax, making it easier to work with serverless applications. +## 16. Amazon VPC Peering + +- **VPC Peering:** Amazon VPC Peering allows you to connect two Amazon Virtual Private Clouds (VPCs) and route traffic between them using private IP addresses. It enables communication between resources in different VPCs as if they were on the same network. + +- **Transitive Peering:** VPC peering is not transitive, meaning if VPC A is peered with VPC B and VPC B is peered with VPC C, VPC A cannot directly communicate with VPC C. Additional peering connections or a transit VPC may be required. + +## 17. Amazon EFS (Elastic File System) + +- **Amazon EFS:** EFS is a managed file storage service that provides scalable, highly available, and durable file storage for EC2 instances. It can be accessed concurrently by multiple instances, making it suitable for shared file systems. + +- **Mount Targets:** EFS uses mount targets in your VPC to make the file system available to EC2 instances. You can mount an EFS file system on multiple instances simultaneously. + +## 18. Amazon SNS (Simple Notification Service) + +- **Amazon SNS:** SNS is a fully managed messaging service that enables you to send messages or notifications to a distributed set of recipients via various communication protocols (e.g., email, SMS, HTTP, Lambda). + +- **Publish-Subscribe Model:** SNS follows a publish-subscribe model, allowing multiple subscribers to receive messages published to specific topics. It is often used for event-driven communication. + +## 19. AWS Direct Connect + +- **AWS Direct Connect:** Direct Connect provides dedicated network connections from your on-premises data centers to AWS. It offers a more reliable, lower-latency connection compared to the public internet for data transfer and accessing AWS services. + +- **Virtual Interfaces:** Direct Connect allows you to create virtual interfaces (private or public) to connect to AWS services or your VPCs. + +## 20. AWS Organizations + +- **AWS Organizations:** AWS Organizations is a service for managing multiple AWS accounts centrally. It enables you to create and manage member accounts, apply policies, and consolidate billing and cost management. + +- **Consolidated Billing:** With AWS Organizations, you can consolidate billing across multiple AWS accounts to simplify cost tracking and management. + +- **Service Control Policies (SCPs):** SCPs allow you to set fine-grained permissions and control access to AWS services and resources within member accounts. + +## 21. AWS Lambda Layers + +- **AWS Lambda Layers:** Layers are a distribution mechanism for libraries, custom runtimes, and other function dependencies in AWS Lambda. You can include common code or resources across multiple Lambda functions. + +- **Versioning and Publishing:** Layers can be versioned and published, allowing you to manage updates and share code or data consistently among your functions. + +## 22. AWS Glue + +- **AWS Glue:** AWS Glue is a fully managed ETL (Extract, Transform, Load) service that simplifies the process of preparing and loading data for analytics. It can automatically discover, catalog, and transform data from various sources. + +- **Data Catalog:** Glue Data Catalog acts as a central metadata repository, making it easier to search and discover data for analytics and reporting. + +- **ETL Jobs:** Glue allows you to create and run ETL jobs using Python or Scala, making it accessible for data engineers and analysts. diff --git a/Cloud_providers/AWS/basics.md b/Cloud_providers/AWS/basics.md new file mode 100644 index 00000000..94d17250 --- /dev/null +++ b/Cloud_providers/AWS/basics.md @@ -0,0 +1,224 @@ +## AWS + +Amazon Web Services (AWS) is a versatile cloud computing platform offering a wide array of services and tools for businesses and individuals. Here, we'll delve into fundamental concepts, troubleshooting IAM, essential commands, and valuable tips and tricks to empower your AWS journey. + +### Basic Concepts + +#### [Amazon Resource Names](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + +Amazon Resource Names (ARNs) are unique identifiers for AWS resources, essential for unambiguous resource specification. ARNs are utilized in IAM policies, Amazon RDS tags, and API calls. + +#### [Amazon EC2 (Elastic Compute Cloud ):](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) + +Amazon EC2 provides resizable compute capacity in the cloud. It allows you to run virtual servers for various purposes, ranging from web applications to complex data processing. + +#### [Amazon S3 (Simple Storage Service):](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonS3.html) + +Amazon S3 is an object storage service that offers industry-leading scalability, data availability, security, and performance. It is used to store and retrieve any amount of data from anywhere on the web. + +#### [Amazon RDS (Relational Database Service)](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html) + +Amazon RDS simplifies the setup, operation, and scaling of a relational database. It supports several database engines, including MySQL, PostgreSQL, and SQL Server, making it easier to set up, operate, and scale a relational database in the cloud. + +#### [Amazon VPC (Virtual Private Cloud)](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html) + +Amazon VPC lets you provision a logically isolated section of the AWS Cloud where you can launch AWS resources in a virtual network that you define. You have complete control over your virtual networking environment. + +#### [Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html) + +Auto Scaling allows you to automatically adjust the number of compute resources in your Auto Scaling group. It helps you ensure that you have the correct number of Amazon EC2 instances available to handle the load for your application. + +#### [Elastic Load Balancing ](https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/what-is-load-balancing.html) + +Elastic Load Balancing automatically distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, and IP addresses, within one or more availability zones. + +#### [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) + +Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. It is a key-value and document database that delivers single-digit millisecond performance at any scale. + + +#### [AWS Lambda](https://docs.aws.amazon.com/lambda/?icmpid=docs_homepage_featuredsvcs) + +AWS Lambda lets you run code without provisioning or managing servers. You can run your code in response to events and automatically manage compute resources, making it easy to build applications that respond quickly to new information. + + +#### [Amazon CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_architecture.html) + +Amazon CloudWatch monitors your AWS resources and the applications you run on the cloud. You can use CloudWatch to collect and track metrics, collect and monitor log files, set alarms, and automatically react to changes in your AWS resources. + +#### [AWS CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html) + +AWS CloudFormation provides a common language for describing and provisioning all the infrastructure resources in your cloud environment. It allows you to use a simple YAML or JSON file to model and provision, in an automated and secure manner, all the resources needed for your applications. + +#### [Identity and Access Management (IAM)](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + +IAM enables secure management of access to AWS services. Through users, groups, and roles, IAM policies define permissions, evaluated when users make requests. + +#### [IAM Policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_policies.html) + +Policies, entities within AWS, define user and resource permissions. AWS assesses policies during requests, ensuring appropriate access control. + + #### [AWS Troubleshooting IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot.html) + +Troubleshooting IAM involves meticulous policy analysis. Ensure policies grant required permissions. Use AWS Policy Simulator to simulate policy effects, aiding policy refinement. + +These concepts are fundamental to understanding how AWS services work together to build scalable, reliable, and secure cloud applications and infrastructures. + + +### Essential Commands + +1. **Configures your AWS CLI with your AWS access key, secret key, default region, and output format.** + ``` aws configure ``` + +2. **Displays information about available AWS CLI commands and their usage.** + ```aws help``` + +### Identity and Access Management (IAM) Commands: + +1. **Creates a new IAM user.** + ```aws iam create-user``` + +2. **Creates a new IAM group.** + ```aws iam create-group``` + +3. **Creates a new IAM role.** + ```aws iam create-role``` + +4. **Attaches an IAM policy to a user.** + ```aws iam attach-user-policy``` + +7. **Attaches an IAM policy to a group.** + ```aws iam attach-group-policy``` + +8. **Attaches an IAM policy to a role.** + ```aws iam attach-role-policy``` + +9. **Lists all IAM users in your account.** + ```aws iam list-users``` + +10. **List all IAM groups in your account** + ```aws iam list-groups``` + +11. **Lists all IAM roles in your account.** + ```aws iam list-roles``` + +### EC2 (Elastic Compute Cloud) Commands: + +1. **Lists all EC2 instances in your account.** + ```aws ec2 describe-instances``` + +2. **Launches a new EC2 instance.** + ```aws ec2 run-instances``` + +3. **Starts an existing EC2 instance.** + ```aws ec2 start-instances``` + +4. **Stops a running EC2 instance.** + ```aws ec2 stop-instances``` + +5. **Terminates an EC2 instance.** + ```aws ec2 terminate-instances``` + +### S3 (Simple Storage Service) Commands: + +1. **Lists all S3 buckets in your account.** + ```aws s3 ls``` + +2. **Creates a new S3 bucket.** + ```aws s3 mb``` + +3. **Copies files or directories to/from S3.** + ```aws s3 cp``` + +4. **Synchronizes files and directories to S3.** + ```aws s3 sync``` + +5. **Deletes files or objects from S3.** + ```aws s3 rm``` + +### CloudFormation Commands: + +1. **Creates a new CloudFormation stack.** + ```aws cloudformation create-stack``` + +2. **Updates an existing CloudFormation stack.** + ```aws cloudformation update-stack``` + +3. **Deletes a CloudFormation stack.** + ```aws cloudformation delete-stack``` + +### Lambda Commands: + +1. **Lists all Lambda functions in your account.** + ```aws lambda list-functions``` + +2. **Creates a new Lambda function.** + ```aws lambda create-function``` + +3. **Invokes a Lambda function.** + ```aws lambda invoke``` + +These commands are just the basics and cover a wide range of AWS services. +For specific command options and syntax, you can always refer to the official AWS CLI documentation or use the `aws help` command followed by the service name, e.g., `aws ec2 help`. + +#### Kubernetes Contexts + +Managing Kubernetes contexts is vital for multiple cluster management: + +Get available contexts: + +``` kubectl config get-contexts ``` + +Switch context: + +``` kubectl config use-context ``` + +### Updating Cluster Configuration + + Update Kubernetes configuration to connect to an AWS EKS cluster: + +Update cluster configuration: + +``` aws eks update-kubeconfig --region --name ``` + +Switch to the updated context: + +``` kubectl config use-context arn:aws:eks:::cluster/ ``` + +### Tips & Tricks + +#### 1. Cost Management: + +AWS Cost Explorer: Utilize AWS Cost Explorer to visualize and understand your AWS spending patterns. Analyze costs by service or region, enabling effective budget management. + +Billing Alerts: Set up billing alerts to receive notifications when your AWS costs exceed predefined thresholds. This proactive approach helps you stay within budget limits. + +#### 2. Security Best Practices: + +Multi-Factor Authentication (MFA): Enable MFA for enhanced security. MFA adds an extra layer of protection to your AWS account by requiring an additional verification step. + +Regular Policy Reviews: Regularly review and update IAM policies. Ensure permissions are correctly assigned and remove unnecessary access to maintain a secure environment. + +#### 3. Performance Optimization: + +Amazon CloudFront: Implement Amazon CloudFront as your Content Delivery Network (CDN) solution. CloudFront distributes content globally with low latency, ensuring faster load times for users. + +Auto Scaling: Leverage AWS Auto Scaling to automatically adjust the number of instances in your application. Scale your resources based on demand, optimizing performance and reducing costs during low traffic periods. + +#### 4. Resource Tagging: + +Tagging Strategy: Develop a consistent tagging strategy for your AWS resources. Tags help in organizing resources, managing costs, and ensuring security compliance. + +Automate Tagging: Automate resource tagging using AWS Lambda functions or AWS Config rules. Consistent tagging simplifies resource tracking and management. + +#### 5. Organize Resources with Tags: +Use tags to label and organize your AWS resources effectively. Tags are key-value pairs that can be attached to most AWS resources, allowing you to categorize and manage resources based on their purpose, owner, or any other criteria. + +#### 6. Automate Everything: +Use AWS CloudFormation templates or AWS CDK (Cloud Development Kit) to automate the provisioning of resources. Infrastructure as Code (IaC) practices help in versioning, replicability, and disaster recovery. + +#### 7. Set Up Billing Alarms: +Avoid unexpected charges by setting up billing alarms in AWS Budgets. You can receive alerts when your costs exceed a predefined threshold, helping you keep track of your expenses. + +#### 8. Plan for Disaster Recovery: +Implement disaster recovery plans using services like AWS Backup and AWS Disaster Recovery. Regularly test your recovery processes to ensure that you can quickly restore services in case of failures. diff --git a/Cloud_providers/Azure/Introduction.md b/Cloud_providers/Azure/Introduction.md new file mode 100644 index 00000000..a6020d75 --- /dev/null +++ b/Cloud_providers/Azure/Introduction.md @@ -0,0 +1,29 @@ + #Introduction +Microsoft Azure, commonly referred to as Azure, is a comprehensive cloud computing platform and infrastructure service offered by Microsoft. It provides a wide range of cloud-based services, including computing, storage, databases, networking, analytics, machine learning, and more.Microsoft Azure is widely used by businesses and developers for a variety of purposes, from hosting web applications to running large-scale data analytics. It provides a flexible and scalable cloud platform that can meet the diverse needs of both small startups and large enterprises. + + #Azure History +Microsoft unveiled Windows Azure in early October 2008 but it went to live after February 2010. Later in 2014, Microsoft changed its name from Windows Azure to Microsoft Azure. Azure provided a service platform for .NET services, SQL Services, and many Live Services. Many people were still very skeptical about “the cloud”. As an industry, we were entering a brave new world with many possibilities. Microsoft Azure is getting bigger and better in coming days. More tools and more functionalities are getting added. It has two releases as of now. It’s famous version Micorosft Azure v1 and later Microsoft Azure v2. Microsoft Azure v1 was more like JSON script driven then the new version v2, which has interactive UI for simplification and easy learning. Microsoft Azure v2 is still in the preview version. + +Some of the features of Microsoft Azure: + +-Cloud Computing Platform: Azure is a cloud computing platform that allows individuals and organizations to build, deploy, and manage applications and services through Microsoft's extensive network of data centers worldwide. + +-Infrastructure as a Service (IaaS): Azure offers IaaS capabilities, allowing users to create and manage virtual machines, storage, and networking resources. This is particularly useful for migrating existing on-premises applications to the cloud or for running custom-built virtual machines. + +-Platform as a Service (PaaS): Azure provides PaaS solutions that enable developers to build, deploy, and scale applications without managing the underlying infrastructure. This includes services like Azure App Service, Azure Functions, and Azure Kubernetes Service (AKS). + +-Software as a Service (SaaS): Microsoft offers a wide range of SaaS applications through Azure, including Office 365, Dynamics 365, and Azure DevOps, which enable businesses to use Microsoft's software products on a subscription basis. + +-Data and Analytics: Azure provides a suite of data and analytics services, such as Azure SQL Database, Azure Cosmos DB, and Azure Data Lake, allowing users to store, analyze, and gain insights from their data. + +-AI and Machine Learning: Azure offers a set of tools and services for artificial intelligence and machine learning, including Azure Machine Learning and Azure Cognitive Services, to build intelligent applications and models. + +-IoT (Internet of Things): Azure IoT Suite helps connect, monitor, and manage IoT devices and collect and analyze data from them. + +-Security and Compliance: Azure places a strong emphasis on security and compliance, offering features like Azure Security Center and Azure Policy to help organizations protect their data and meet regulatory requirements. + +-Global Reach: Azure has data centers in multiple regions worldwide, allowing users to deploy applications and services close to their target audience, improving performance and reducing latency. + +-Hybrid Cloud: Azure supports hybrid cloud scenarios, allowing organizations to seamlessly integrate their on-premises infrastructure with Azure resources, creating a more flexible and scalable environment. + +-Ecosystem and Integration: Azure integrates with a wide variety of development tools and technologies, making it easy for developers to work with familiar tools and frameworks. diff --git a/Cloud_providers/Azure/Services_Provided.md b/Cloud_providers/Azure/Services_Provided.md new file mode 100644 index 00000000..780ca412 --- /dev/null +++ b/Cloud_providers/Azure/Services_Provided.md @@ -0,0 +1,48 @@ +#Microsoft Azure Services + +Some following are the services of Microsoft Azure offers: + +1. Azure Virtual Machines (VMs): +Azure VMs provide scalable and customizable virtualized computing resources. Users can deploy Windows or Linux VMs to run applications, host websites, and perform various computing tasks. + +2. Azure App Service: +Azure App Service is a fully managed platform for building, deploying, and scaling web applications and APIs. It supports multiple programming languages and provides easy integration with databases and other Azure services. + +3. Azure SQL Database: +Azure SQL Database is a managed relational database service. It offers a highly available, secure, and scalable platform for hosting SQL Server databases in the cloud. + +4. Azure Kubernetes Service (AKS): +AKS is a managed Kubernetes container orchestration service. It simplifies the deployment, management, and scaling of containerized applications using Kubernetes. + +5. Azure Blob Storage: +Azure Blob Storage is an object storage service for storing and managing unstructured data, such as documents, images, and media files. It's highly scalable and durable. + +6. Azure Functions: +Azure Functions is a serverless compute service that allows you to run event-driven code without managing infrastructure. You pay only for the compute resources consumed. + +7. Azure Active Directory (Azure AD): +Azure AD is a comprehensive identity and access management service. It provides secure authentication, single sign-on, and identity management for applications and resources. + +8. Azure Cognitive Services: +Cognitive Services offers pre-built AI models and APIs for vision, speech, language, and search. Developers can integrate AI capabilities into their applications without extensive machine learning expertise. + +9. Azure DevOps Services: +Azure DevOps provides a set of tools for software development, including version control, build automation, release management, and project tracking, to support DevOps practices. + +10. Azure Virtual Network: +Azure Virtual Network allows you to create isolated and secure private networks in the cloud. It facilitates the connection of VMs, services, and on-premises resources. + +11. Azure Functions: +Azure Functions is a serverless compute service that lets you run code in response to events. It's ideal for microservices and event-driven applications. + +12. Azure Logic Apps: +Azure Logic Apps is a serverless workflow automation platform that enables you to create and run workflows that integrate with various services and systems. + +13. Azure Monitor: +Azure Monitor provides comprehensive insights into the performance, health, and security of your applications and infrastructure. It includes tools like Application Insights and Log Analytics. + +14. Azure Databricks: +Azure Databricks is a fast, easy, and collaborative Apache Spark-based analytics platform. It's used for big data and machine learning workloads. + +15. Azure IoT Hub: +Azure IoT Hub is a managed service for connecting, monitoring, and managing IoT devices. It enables IoT solutions with secure device-to-cloud communication. diff --git a/Cloud_providers/Azure/azure.md b/Cloud_providers/Azure/azure.md new file mode 100644 index 00000000..4a35f9a1 --- /dev/null +++ b/Cloud_providers/Azure/azure.md @@ -0,0 +1,153 @@ +# 1. Microsoft Azure Concepts + +Microsoft Azure is a comprehensive cloud computing platform provided by Microsoft. Here are some fundamental concepts to understand when working with Azure: + +## 1. **Azure Regions and Availability Zones** +- **Region:** Azure has multiple datacenter regions globally, each consisting of one or more datacenters. Regions allow you to deploy resources in specific geographic locations, taking into account data residency and latency requirements. +- **Availability Zone:** Availability Zones are unique physical locations within an Azure region. They provide high availability by hosting resources in separate datacenters with independent power, cooling, and networking. + +## 2. **Virtual Machines (VMs)** +- **Virtual Machine (VM):** Azure VMs are scalable and fully configurable virtualized computing instances. You can choose from a variety of VM sizes and operating systems to meet your application requirements. +- **Azure Marketplace:** The Azure Marketplace offers pre-configured VM images and templates for various applications and services. + +## 3. **Azure Storage** +- **Azure Storage:** Azure provides scalable and highly available cloud storage services, including Blob Storage (for unstructured data), File Storage (for file shares), Table Storage (NoSQL), and Queue Storage (messaging). +- **Azure Blob:** Blob Storage is used for storing binary and text data, such as images, videos, and backups. + +## 4. **Azure Active Directory (Azure AD)** +- **Azure Active Directory (Azure AD):** Azure AD is Microsoft's cloud-based identity and access management service. It allows you to manage user identities and enable single sign-on (SSO) to various Azure and third-party applications. +- **Azure AD Tenant:** Each Azure AD instance is known as a tenant and represents an organization's identity store in Azure. + +## 5. **Azure Resource Manager (ARM)** +- **Azure Resource Manager (ARM):** ARM is the deployment and management service for Azure. It allows you to create, update, and manage Azure resources using templates and declarative definitions. +- **ARM Templates:** ARM templates are JSON files that define the resources and their configurations in an Azure deployment. + +## 6. **Azure Functions** +- **Azure Functions:** Azure Functions is a serverless compute service that allows you to run event-driven code without managing infrastructure. You can trigger functions in response to various events. +- **Triggers:** Functions can be triggered by events such as HTTP requests, Azure Storage changes, or message queue messages. + +## 7. **Azure Load Balancer** +- **Azure Load Balancer:** Azure Load Balancer distributes incoming network traffic across multiple VM instances to ensure high availability and reliability for applications. +- **Frontend IP Configuration:** Load Balancer has frontend and backend IP configurations to route traffic to the appropriate VMs. + +## 8. **Azure SQL Database** +- **Azure SQL Database:** Azure SQL Database is a managed relational database service based on Microsoft SQL Server. It offers high availability, scalability, and automatic backups. +- **Elastic Pools:** Elastic Pools allow you to manage and scale multiple databases together for cost optimization. + +## 9. **Azure Virtual Network (VNet)** +- **Azure Virtual Network (VNet):** VNet is a network isolation and segmentation service that allows you to create private, isolated network environments for your Azure resources. +- **Subnet:** Subnets within a VNet help organize resources and define network security rules. + +## 10. **Azure DevOps** +- **Azure DevOps:** Azure DevOps provides a set of tools for software development, including version control, continuous integration, and continuous delivery (CI/CD). +- **Azure DevOps Services:** Azure DevOps Services offers cloud-based tools for collaboration and DevOps practices. +## 11. Azure Kubernetes Service (AKS) + +- **Azure Kubernetes Service (AKS):** AKS is a managed Kubernetes container orchestration service. It simplifies the deployment, management, and scaling of containerized applications using Kubernetes. + +- **Node Pools:** AKS allows you to create and manage node pools with different configurations to accommodate varying workloads. + +## 12. Azure Functions Premium Plan + +- **Azure Functions Premium Plan:** In addition to the Consumption and Dedicated (App Service) plans, Azure Functions offers a Premium Plan that provides more advanced features, including VNET integration, longer execution timeout, and enhanced performance. + +## 13. Azure Logic Apps + +- **Azure Logic Apps:** Azure Logic Apps is a serverless workflow automation service that allows you to create workflows and integrate with various Azure and external services. It's used for orchestrating complex business processes. + +- **Connectors:** Logic Apps use connectors to interact with external services and systems, making it easy to create automated workflows. + +## 14. Azure Key Vault + +- **Azure Key Vault:** Azure Key Vault is a secure, centralized service for managing and safeguarding cryptographic keys, secrets, and certificates used by cloud applications and services. It helps protect sensitive information. + +- **Managed HSM:** Azure Key Vault offers Hardware Security Module (HSM)-backed keys for enhanced security. + +## 15. Azure Synapse Analytics (formerly SQL Data Warehouse) + +- **Azure Synapse Analytics:** Azure Synapse Analytics is an analytics service that combines enterprise data warehousing and big data analytics into one unified platform. It allows you to analyze large volumes of data and perform data transformations. + +- **Data Integration:** Synapse Analytics provides data integration capabilities to ingest and prepare data from various sources for analysis. + +## 16. Azure DevTest Labs + +- **Azure DevTest Labs:** DevTest Labs is a service that enables developers and testers to create and manage environments for development, testing, and training. You can control costs and resources through policies. + +- **Artifacts:** DevTest Labs allows you to define and share artifacts (like pre-configured VM images) for quick environment setup. + +## 17. Azure Firewall + +- **Azure Firewall:** Azure Firewall is a managed network security service that provides high availability, scalability, and advanced security features to protect your Azure Virtual Network resources. + +- **Application Rules:** Azure Firewall supports application rules to allow or deny outbound traffic to specific FQDNs (Fully Qualified Domain Names). + +## 18. Azure Databricks + +- **Azure Databricks:** Azure Databricks is an Apache Spark-based analytics platform optimized for Azure. It provides a collaborative environment for data scientists, engineers, and analysts to work with big data and machine learning. + +- **Integration:** Databricks integrates with various Azure services like Azure Data Lake Storage, Azure SQL Data Warehouse, and Azure Machine Learning. + +## 19. Azure Cosmos DB + +- **Azure Cosmos DB:** Cosmos DB is a globally distributed, multi-model database service designed for high availability and low-latency access. It supports various data models, including document, key-value, graph, and column-family. + +- **Multi-Model API:** Cosmos DB allows you to choose from different APIs (e.g., SQL, MongoDB, Cassandra) to interact with your data. + +## 20. Azure Sentinel + +- **Azure Sentinel:** Azure Sentinel is a cloud-native Security Information and Event Management (SIEM) service that provides intelligent security analytics for threat detection and response across your organization's resources. + +- **Security Connectors:** Sentinel integrates with a wide range of Microsoft and third-party security solutions to collect and analyze security data. + +# 2. Basic Commands +These are only basic commands for more you can consider https://learn.microsoft.com/en-us/azure/?product=popular + +### 1. Login to Azure Account: +```az login``` + +### 2. List Subscriptions: +```az account list``` + +### 3. Set Active Subscription: +```az account set --subscription "Subscription Name or ID"``` + +### 4. List Resource Groups: +```az group list``` + +### 5. Create a Resource Group: +```az group create --name "ResourceGroupName" --location "East US"``` + +### 6. Deploy a Virtual Machine: +```az vm create --resource-group "ResourceGroupName" --name "VMName" --image "UbuntuLTS" --admin-username "azureuser" --admin-password "Password123"``` + +### 7. Start/Stop/Restart a Virtual Machine: +```az vm start --resource-group ResourceGroupName" --name "VMName" az vm stop --resource-group "ResourceGroupName" --name "VMName" az vm restart --resource-group "ResourceGroupName" --name "VMName"``` + +### 8. List Virtual Machines: +```az vm list --resource-group "ResourceGroupName"``` + +### 9. Delete a Virtual Machine: +```az vm delete --resource-group "ResourceGroupName" --name "VMName" --yes --no-wait``` + +### 10. Create a Storage Account: +```az storage account create --name "storageaccountname" --resource-group "ResourceGroupName" --location "East US" --sku "Standard_LRS"``` + +### 11. List Storage Accounts: +```az storage account list --resource-group "ResourceGroupName"``` + +### 12. Create a Blob Container: +```az storage container create --name "containername" --account-name "storageaccountname" --account-key "accountkey"``` + +### 13. List Blob Containers: +```az storage container list --account-name "storageaccountname" --account-key "accountkey"``` + +### 14. Deploy Azure Web App: +```az webapp create --resource-group "ResourceGroupName" --plan "AppServicePlanName" --name "WebAppName" --runtime "DOTNET|10.0" --deployment-local-git``` + +### 15. List Azure Web Apps: +```az webapp list --resource-group "ResourceGroupName"``` + +For more can check out : https://learn.microsoft.com/en-us/azure/?product=popular + +Happy Learning ! + diff --git a/Cloud_providers/Digital Ocean/Introduction.md b/Cloud_providers/Digital Ocean/Introduction.md new file mode 100644 index 00000000..7327561e --- /dev/null +++ b/Cloud_providers/Digital Ocean/Introduction.md @@ -0,0 +1,73 @@ +[DigitalOcean](https://www.digitalocean.com/ "DigitalOcean") is a cloud infrastructure provider that specializes in offering simple and developer-friendly cloud computing solutions. Here are some basic concepts, tips, tricks, and commands for working with DigitalOcean: + +#### **Basic Concepts:** +**[1. Droplets:](https://docs.digitalocean.com/products/compute/ "1. Droplets:")** Droplets are virtual private servers (VPS) offered by DigitalOcean. They come in various sizes and configurations and serve as the primary compute resources for hosting applications and services. + +**[2. Images:](https://docs.digitalocean.com/products/compute/ "2. Images:")** Images are snapshots of Droplets that can be used to create new instances. They allow you to save configurations and replicate them across multiple Droplets. +** +[3. Snapshots:](https://docs.digitalocean.com/products/compute/ "3. Snapshots:")** Snapshots are point-in-time backups of a Droplet's disk. They are useful for data backup and recovery. + +**[4. Regions:](https://docs.digitalocean.com/products/compute/ "4. Regions:")** DigitalOcean has data centers in various geographical regions. You can choose the region where your resources are hosted to reduce latency and improve performance. + +**[5. Databases:](https://docs.digitalocean.com/products/compute/ "5. Databases:")** DigitalOcean offers managed database services, such as managed PostgreSQL, MySQL, and Redis databases, which simplify database management tasks. + +**[6. Kubernetes:](https://docs.digitalocean.com/products/compute/ "6. Kubernetes:")** DigitalOcean Kubernetes (DOKS) is a managed Kubernetes service that allows you to deploy, manage, and scale containerized applications. + +**[7. Load Balancers: ](https://docs.digitalocean.com/products/compute/ "7. Load Balancers: ")**DigitalOcean provides load balancers to distribute incoming traffic across multiple Droplets, improving the availability and reliability of your applications. + +#### Tips & Tricks: +**1. Use One-Click Apps:** DigitalOcean offers one-click application installations for popular software like WordPress, Docker, and more. This simplifies the setup process. + +**2. Automate with Terraform:** You can use Terraform, an infrastructure-as-code tool, to automate the provisioning and management of DigitalOcean resources. + +**3. Monitor Resources:** DigitalOcean offers monitoring and alerting features to keep an eye on the performance of your Droplets and other resources. + +**4. Tagging:** Use tags to organize and categorize your resources, making it easier to manage and identify them. + +**5. Back Up Regularly:** Take regular snapshots of your Droplets and databases to ensure data recovery in case of unexpected issues. + +**6. SSH Key Management:** Use SSH keys for secure access to your Droplets. You can add SSH keys to your DigitalOcean account for easy key management. + +#### Commands: +Here are some commonly used DigitalOcean CLI (Command Line Interface) commands: + +**1. Create a Droplet:** + +`doctl compute droplet create --image --region --size --ssh-keys ` + + +**2. List Droplets:** +`doctl compute droplet list +` + +**3. Create Snapshot (for a Droplet): +** +`doctl compute droplet snapshot +` + +**4. List Snapshots: +** +`doctl compute snapshot list +` + +**5. Create a Managed Database: +** +`doctl databases create --name --engine --region --size +` + +**6. List Managed Databases: +** +`doctl databases list +` + +**7. Create a Kubernetes Cluster: +** +`doctl kubernetes cluster create --region +` + +**8. List Kubernetes Clusters: +** +`doctl kubernetes cluster list +` + +These commands are just a starting point for managing DigitalOcean resources via the CLI. Be sure to check [DigitalOcean's official documentation](https://docs.digitalocean.com/products/ "DigitalOcean's official documentation") for more detailed instructions and options. diff --git a/Cloud_providers/Digital Ocean/digitalOcean.md b/Cloud_providers/Digital Ocean/digitalOcean.md new file mode 100644 index 00000000..11a8f751 --- /dev/null +++ b/Cloud_providers/Digital Ocean/digitalOcean.md @@ -0,0 +1,151 @@ +# DigitalOcean Concepts + +DigitalOcean is a cloud infrastructure provider known for its simplicity and developer-friendly approach. Here are some fundamental concepts to understand when working with DigitalOcean: + +## 1. **Droplets** + +- **Droplets:** Droplets are virtual private servers (VPS) in DigitalOcean. They are the fundamental compute resource and can run various Linux distributions or container-based applications. + +- **Droplet Sizes:** Droplets come in different sizes, each with a specific combination of CPU, memory, and storage. Users can choose the size that suits their application's needs. + +## 2. **Images and Snapshots** + +- **Images:** Images are pre-configured virtual machine templates. DigitalOcean provides a variety of base images, including popular Linux distributions, which you can use to create Droplets. + +- **Snapshots:** Snapshots are point-in-time copies of a Droplet's disk. They allow you to create backups of your Droplets, enabling easy recovery or cloning. + +## 3. **Block Storage (Volumes)** + +- **Block Storage (Volumes):** Block Storage allows you to attach additional storage volumes to your Droplets. It provides scalable and high-performance storage for your data. + +- **Snapshots of Volumes:** Similar to Droplet snapshots, you can create snapshots of Block Storage volumes for data backup and recovery. + +## 4. **Networking** + +- **Floating IPs:** Floating IPs are static public IP addresses that can be assigned to your Droplets. They are useful for high availability configurations and load balancing. + +- **Private Networking:** DigitalOcean provides private networking between Droplets in the same datacenter, allowing secure and fast communication between them. + +## 5. **Load Balancers** + +- **Load Balancers:** DigitalOcean Load Balancers distribute incoming traffic across multiple Droplets to ensure high availability and scalability for your applications. + +- **Health Checks:** Load Balancers perform health checks on Droplets to route traffic only to healthy instances. + +## 6. **Kubernetes** + +- **Kubernetes:** DigitalOcean offers a managed Kubernetes service that simplifies the deployment, scaling, and management of containerized applications using Kubernetes. + +- **Kubernetes Clusters:** Users can create and manage Kubernetes clusters, which consist of multiple worker nodes for running containerized workloads. + +## 7. **Databases** + +- **Managed Databases:** DigitalOcean provides managed database services for popular databases like PostgreSQL, MySQL, and Redis. These services handle database maintenance tasks, backups, and scaling. + +- **Database Clusters:** Users can create and manage database clusters for high availability and performance. + +## 8. **Developer Tools** + +- **API:** DigitalOcean offers a RESTful API that allows developers to programmatically manage resources, automate tasks, and integrate DigitalOcean services into their applications. + +- **CLI:** The DigitalOcean Command-Line Interface (CLI) provides a command-line interface for managing resources and services. + +## 9. **Object Storage (Spaces)** + +- **Object Storage (Spaces):** DigitalOcean Spaces is an object storage service for storing and serving large amounts of unstructured data such as images, videos, and backups. It is compatible with the S3 API. + +- **CDN Integration:** Spaces can be integrated with Content Delivery Networks (CDNs) to distribute content globally and improve load times. + +## 10. **Virtual Private Cloud (VPC)** + +- **Virtual Private Cloud (VPC):** DigitalOcean VPC allows you to create isolated network environments for your resources, enhancing security and control over network traffic. + +- **Private Networking:** VPCs can be configured with private networking for secure communication between Droplets in different VPCs. + +## 11. **App Platform** + +- **App Platform:** DigitalOcean App Platform is a Platform-as-a-Service (PaaS) offering for building, deploying, and scaling web applications and APIs. It supports various programming languages and frameworks. + +- **Automatic Scaling:** App Platform can automatically scale your application based on traffic and load. + +## 12. **Monitoring and Alerts** + +- **Monitoring and Alerts:** DigitalOcean provides monitoring and alerting capabilities to track the performance of Droplets and other resources. Users can set up alerts based on resource metrics. + +- **Integration with Monitoring Tools:** DigitalOcean integrates with monitoring tools like Prometheus and Grafana for more advanced monitoring and visualization. + +## 13. **Marketplace** + +- **Marketplace:** DigitalOcean Marketplace offers a wide range of pre-configured one-click applications and development stacks that can be quickly deployed on Droplets. + +- **Community Contributions:** Users and developers can contribute and share their own 1-Click Apps in the marketplace. + +## 14. **Managed Kubernetes (DOKS)** + +- **Managed Kubernetes (DOKS):** DigitalOcean Kubernetes (DOKS) is a managed Kubernetes service that simplifies the deployment and management of containerized applications. It provides automated updates and scaling. + +- **Node Pools:** DOKS allows you to manage different node pools with varying resources for your Kubernetes cluster. + +## 15. **Firewalls and Security Groups** + +- **Firewalls and Security Groups:** DigitalOcean offers firewalls and security groups for controlling inbound and outbound network traffic to and from Droplets and other resources. + +- **Custom Rules:** Users can define custom rules to specify which traffic is allowed or denied. + +## 16. **Load Balancer with Let's Encrypt Integration** + +- **Load Balancer with Let's Encrypt Integration:** DigitalOcean Load Balancers can be configured to integrate with Let's Encrypt for automatic SSL/TLS certificate management, enabling secure connections to your applications. + +## 17. **Managed PostgreSQL** + +- **Managed PostgreSQL:** DigitalOcean provides a managed PostgreSQL database service that handles database maintenance tasks, automatic backups, and scaling of PostgreSQL databases. + +- **High Availability:** Managed PostgreSQL offers high availability configurations for production databases. + +## 18. **Droplet Marketplace Apps** + +- **Droplet Marketplace Apps:** DigitalOcean offers a marketplace of pre-configured applications that you can deploy on your Droplets. These apps cover a wide range of use cases, from development environments to content management systems (CMS) and more. + +- **One-Click Deployments:** You can quickly launch these applications with a single click, saving time on setup and configuration. + +## 19. **Droplet Backups and Snapshots** + +- **Droplet Backups and Snapshots:** In addition to snapshots, you can enable automatic backups for your Droplets. These backups are taken on a regular basis, providing a convenient way to restore your Droplets to previous states. + +- **Snapshots for Migrations:** Snapshots can also be used for migrating Droplets between regions or resizing them to different plans. + +## 20. **Project and Team Management** + +- **Project and Team Management:** DigitalOcean allows you to organize resources into projects and collaborate with team members by assigning roles and permissions. + +- **Resource Tagging:** You can tag resources within a project for easier organization and tracking. + +## 21. **VPC Peering** + +- **VPC Peering:** DigitalOcean supports Virtual Private Cloud (VPC) peering, allowing you to connect VPCs within the same datacenter or across different datacenters for private network communication. + +- **Transitive Peering:** Like other cloud providers, VPC peering in DigitalOcean is not transitive, so additional peering connections may be needed for full connectivity. + +## 22. **Managed Redis (Databases)** + +- **Managed Redis (Databases):** DigitalOcean provides a managed Redis database service, which is a popular choice for caching and real-time data processing. It offers high availability, scaling, and automatic failover. + +- **Data Persistence:** Managed Redis can be configured with data persistence options for backup and recovery. + +## 23. **Custom Images** + +- **Custom Images:** You can create custom images from your Droplets, allowing you to capture a specific configuration, including installed software and settings. These custom images can then be used to create new Droplets. + +- **Custom Image Marketplace:** DigitalOcean users can share custom images with the community via the Marketplace. + +## 24. **Global Block Storage Volumes** + +- **Global Block Storage Volumes:** DigitalOcean's Block Storage Volumes can be attached to Droplets in different regions. This provides a way to share data across regions and enhance redundancy. + +- **Data Transfer:** You can replicate data between regions for disaster recovery or data distribution. + +## 25. **Managed Database Backups and Scaling** + +- **Managed Database Backups and Scaling:** DigitalOcean's managed database services offer automated backups and scaling. You can easily schedule backups and adjust resources as your application's needs change. + +- **Highly Available Configurations:** Managed databases can be configured for high availability with automatic failover. diff --git a/Cloud_providers/GCP/Introduction.md b/Cloud_providers/GCP/Introduction.md new file mode 100644 index 00000000..3517a851 --- /dev/null +++ b/Cloud_providers/GCP/Introduction.md @@ -0,0 +1,187 @@ +# Introduction + +Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search, Gmail, file storage, and YouTube.Alongside a set of management tools, it provides a series of modular cloud services including computing, data storage, data analytics and machine learning. Registration requires a credit card or bank account details. + +Google Cloud Platform provides infrastructure as a service, platform as a service, and serverless computing environments. + +In April 2008, Google announced App Engine, a platform for developing and hosting web applications in Google-managed data centers, which was the first cloud computing service from the company. The service became generally available in November 2011. Since the announcement of the App Engine, Google added multiple cloud services to the platform. + +Google Cloud Platform is a part of Google Cloud, which includes the Google Cloud Platform public cloud infrastructure, as well as Google Workspace (formerly G Suite[5]), enterprise versions of Android and Chrome OS, and application programming interfaces (APIs) for machine learning and enterprise mapp + +## Accessing the Cloud Console +1. Go to this link to open cloud console [link](https://accounts.google.com/AddSession/signinchooser?service=accountsettings&continue=https%3A%2F%2Fconsole.cloud.google.com%2Fhome%2Fdashboard%3Fproject%3Dqwiklabs-gcp-00-f55253468191&flowName=GlifWebSignIn&flowEntry=AddSession) +2. This will open the Google Cloud sign in page + ![Google Login Page](https://cdn.qwiklabs.com/zET9RtU1aN7f3FhNhhUNe7%2BPbBtgwz4fTUO3E86m8m0%3D) +3. Your page should now resemble the following: +![GCP Explaination Image](https://cdn.qwiklabs.com/vPsOw690IZhUlPPxZk3asDaXQBRVZRiyr%2B6nBXCqEf4%3D) +## Projects in Google Cloud Console +A Google Cloud Project is an organizing entity for your Google Cloud resources. It often times contains resources and services—for example, it may hold a pool of virtual machines, a set of databases, and a network that connects them with one another. Projects also contain settings and permissions, which specify security rules and who has access to what resources. +If you look in the top-left side of the console, you will see a panel called Project info which should resemble the following: + +![GCP Explaination Image](https://cdn.qwiklabs.com/kaHKc2t7OyP7YUPOj4Eqw0nuUXQvt0iUypsuaeqkzKw%3D) + +As you see, your project has a name, ID, and number. These identifiers are frequently used when interacting with Google Cloud services. You are working out of one project so you can get practice with a specific service or feature of Google Cloud. +It's not uncommon for large enterprises or experienced users of Google Cloud to have dozens to thousands of Google Cloud projects. Organizations use Google Cloud in different ways, so projects are a good way to separate cloud-computing services (by team or product for example. +## Navigation Menu and Services +* In the top-left corner, you will notice a three-line icon that resembles the following: +![GCP Explaination Image](https://cdn.qwiklabs.com/jNaEVX1xXeOOasukmY%2B9mcktmn9gjkwgNAJEkBlIYbI%3D) +* Clicking on this will reveal (or hide) a Navigation menu that points to Google Cloud's core services. If the menu isn't exposed, click on the icon now and scroll through to see the types of services offered: +![GCP Explaination Image](https://cdn.qwiklabs.com/gk6CVCz3LGXvViYQ%2FZUp%2Bu1VqI0DBrDAZh7kToRN20Q%3D) + +The Navigation menu is an important component of the Cloud Console—it offers quick access to the platform's services and also outlines its offerings. If you scroll through the menu, you will see that there are seven categories of Google Cloud services: + +* Compute: houses a variety of machine types that support any type of workload. The different computing options let you decide how involved you want to be with operational details and infrastructure amongst other things. +* Storage: data storage and database options for structured or unstructured, relational or non relational data. +Networking: services that balance application traffic and provision security rules amongst other things. +* Cloud Operations: a suite of cross-cloud logging, monitoring, trace, and other service reliability tools. +* Tools: services for developers managing deployments and application build pipelines. +* Big Data: services that allow you to process and analyze large datasets. +* Artificial Intelligence: a suite of APIs that run specific artificial intelligence and machine learning tasks on Google Cloud. +This link will take you to documentation that covers each of these categories in more depth if you are interested. +## Roles and Permissions +Earlier we mentioned that besides cloud computing services, Google Cloud also houses a collection of permissions and roles that define who has access to what resources. We can use the Cloud Identity and Access Management (Cloud IAM) service to inspect and modify such roles and permissions. + +![GCP Explaination Image](https://cdn.qwiklabs.com/v5er%2BfG4yURAeD9YUOKNuDgtD9KdMi9Sg2Ph9XThkZA%3D) + +If closed, open up the navigation menu. Then near the top click IAM & admin. This will take you to a page that contains a list of users, which specifies permissions and roles granted to certain accounts. Try to sift through these and find the "@qwiklabs" username you signed in with: + + +You should find something similar: + +![GCP Explaination Image](https://cdn.qwiklabs.com/2DMzLfj5mYLyzliG6TBp9A0PoW1PHzDXVffA%2FwbL%2BiQ%3D) + +You will see that the Role field is set to "Editor", which is one of three primitive roles offered by Google Cloud. Primitive roles set project-level permissions and unless otherwise specified, they control access and management to all Google Cloud services. +The following table pulls definitions from the roles documentation, which gives a brief overview of viewer, editor, and owner role permissions: + +Role Name | Permissions +--------- | ----------- +roles/viewer | Permissions for read-only actions that do not affect state, such as viewing (but not modifying) existing resources or data. +roles/editor | All viewer permissions, plus permissions for actions that modify state, such as changing existing resources. +roles/owner | All editor permissions and permissions for the following actions: Manage roles and permissions for a project and all resources within the project; Set up billing for a project. + +So as an editor you will be able to create, modify, and delete Google Cloud resources. However, you won't be able to add or delete members from Google Cloud projects. + +## APIs and Services +Google Cloud APIs are a key part of Google Cloud. Like services, the 200+ APIs in areas that range from business administration to machine learning all easily integrate with Google Cloud projects and applications. + +Most Cloud APIs provide you with detailed information on your project’s usage of that API, including traffic levels, error rates, and even latencies, helping you to quickly triage problems with applications that use Google services. You can view this information by opening the navigation menu and clicking on APIs & Services > Library: + +![GCP Explaination Image](https://cdn.qwiklabs.com/IhN1xAfMsp0KrMIwX50LGtlzcsup%2BfK45UA1wseaaa4%3D) + +If you take a look at the left-hand menu with the header "CATEGORY", you will see all the different type of categories offered. In the API search bar, type in Dialogflow and select the Dialogflow API. You should now be on the following page: + +![GCP Explaination Image](https://cdn.qwiklabs.com/TJxda7OL7Z8mAPtAWRFkf16dH2KSGWP%2FS0cEvzofT%2Fw%3D) + +The Dialogflow API allows you to build rich conversational applications (e.g. for Google Assistant) without having to worry about the underlying machine learning and natural language understanding schema. + +Now click Enable. This will take you to a new page, hit the back button in your browser and you will see that the API is now enabled: + +![GCP Explaination Image](https://cdn.qwiklabs.com/eTgnbsNvLaqrex7qumvUuzQEc114GwncM%2FV8xL4j594%3D) + +Now click on Try this API. This will open a new tab that will reveal the documentation for the Dialogflow API and will specify the methods available to you. Examine some of these and close the tab when you're finished. + +Open the Navigation menu and click Home to go back to main page of the Cloud Console. + +## Cloud Shell +Now that you understand the key features of Google Cloud and the Cloud Console, you will get hands-on practice with Cloud Shell. Cloud Shell is an in-browser command prompt execution environment that allows you to enter commands at a terminal prompt to manage resources and services in your Google Cloud project. + +Cloud Shell lets you run all of your shell commands without leaving the console and comes with pre-installed command line tools. + +In the top-right corner of the console, click on the Activate Cloud Shell button and then click Start Cloud Shell if prompted: + +![GCP Explaination Image](https://cdn.qwiklabs.com/RuUJsmCzDpq4kWuMpt4yXLfoj6kH3MGYNcI0DE3ipB0%3D) + +A new, black window should appear at the bottom of the console with messages and prompts that resemble the following: + + +Welcome to Cloud Shell! Type "help" to get started. +Your Cloud Platform project in this session is set to qwiklabs-gcp-76ad0f1342e20013. +Use "gcloud config set project [PROJECT_ID]" to change to a different project. +gcpstaging23396_student@cloudshell:~ (qwiklabs-gcp-76ad0f1342e20013)$ + + + +You now have a Cloud Shell session up and running. Type in the following command: + + +gcloud auth list + + + +You will get an output similar to this: + + +Credentialed Accounts +ACTIVE ACCOUNT +\* gcpstaging23396_student@qwiklabs.net +To set the active account, run: + $ gcloud config set account \`ACCOUNT\` + + + +As mentioned earlier, Cloud Shell comes preinstalled with specific command line tools. The main Google Cloud toolkit is gcloud, which is used for many tasks on the platform, like resource management and user authentication. + +You just ran a gcloud command—auth list—which lists the credentialed account(s) in your Google Cloud project. + +Besides pre-installed toolkits, Cloud Shell also comes with the standard unix command line interface (CLI) tools and text editors like nano. We can use these to create and edit files right inside Cloud Shell. + +Run the following touch command to create a file called test.txt: + + +touch test.txt + + + +touch won't generate any output. Run the unix command ls to list the files in our current directory: + + +ls + + + +You should receive the following output: + + +README-cloudshell.txt test.txt + + + +We see our new test.txt file added to our working directory. Let's make some edits to it using the nano text editor that we referenced earlier. To edit a file, type in nano followed by the filename you want to edit in Cloud Shell: + + +README-cloudshell.txt test.txt + + + +This will open the blank file with the Nano text editor: + + +![GCP Explaination Image](https://cdn.qwiklabs.com/xvq7XWdjSMm7k8g3pdSchB70h3IKQtgT4frc3fBWkzU%3D) + + +Go ahead and type in a message, like the following: + + +Google Cloud is the best! + + + +Once you have that written in, hold the CNTRL+X keys. Then type in Y followed by the Enter key to save the file with the new message. + +Another helpful command is cat, which will output the contents of a file. Run the following command to make sure that our file was updated correctly: + + +cat test.txt + + + +You should see the following output in your Cloud Shell session: + + +Google Cloud is the best! + + + +And just like that, you were able to create, edit, and output the contents of a file all in Cloud Shell (all without having to leave your browser.) + +### So this ends your brief intro to the GCP diff --git a/Cloud_providers/GCP/Services.md b/Cloud_providers/GCP/Services.md new file mode 100644 index 00000000..59bd575f --- /dev/null +++ b/Cloud_providers/GCP/Services.md @@ -0,0 +1,60 @@ +1) Storage & Databases Service:- + +Cloud Storage - Object storage with integrated edge caching to store unstructured data. +Cloud SQL - Database as a Service based on MySQL and PostgreSQL. +Cloud Bigtable - Managed NoSQL database service. +Cloud Spanner - Horizontally scalable, strongly consistent, relational database service. +Cloud Datastore - NoSQL database for web and mobile applications. +Persistent Disk - Block storage for Compute Engine virtual machines. +Cloud MemoryStore - Managed in-memory data store based on Redis. +Local SSD: High-performance, transient, local block storage. +Filestore: High-performance file storage for Google Cloud users. + +2) Networking:- + +VPC - Virtual Private Cloud for managing the software defined network of cloud resources. +Cloud Load Balancing - Software-defined, managed service for load balancing the traffic. +Cloud Armor - Web application firewall to protect workloads from DDoS attacks. +Cloud CDN - Content Delivery Network based on Google's globally distributed edge points of presence. +Cloud Interconnect - Service to connect a data center with Google Cloud Platform +Cloud DNS - Managed, authoritative DNS service running on the same infrastructure as Google. +Network Service Tiers - Option to choose Premium vs Standard network tier for higher-performing network. + +3)Big Data:- + +BigQuery - Scalable, managed enterprise data warehouse for analytics. +Cloud Dataflow - Managed service based on Apache Beam for stream and batch data processing. +Cloud Dataproc - Big data platform for running Apache Hadoop and Apache Spark jobs. +Cloud Composer - Managed workflow orchestration service built on Apache Airflow. +Cloud Datalab - Tool for data exploration, analysis, visualization and machine learning. This is a fully managed Jupyter Notebook service. +Cloud Dataprep - Data service based on Trifacta to visually explore, clean, and prepare data for analysis. +Cloud Pub/Sub - Scalable event ingestion service based on message queues. +Cloud Data Studio - Business intelligence tool to visualize data through dashboards and reports. + +4)Cloud AI:- + +Cloud AutoML - Service to train and deploy custom machine, learning models. As of September 2018, the service is in Beta. +Cloud TPU - Accelerators used by Google to train machine learning models. +Cloud Machine Learning Engine - Managed service for training and building machine learning models based on mainstream frameworks. +Cloud Job Discovery - Service based on Google's search and machine learning capabilities for the recruiting ecosystem. +Dialogflow Enterprise - Development environment based on Google's machine learning for building conversational interfaces. +Cloud Natural Language - Text analysis service based on Google Deep Learning models. +Cloud Speech-to-Text - Speech to text conversion service based on machine learning. +Cloud Text-to-Speech - Text to speech conversion service based on machine learning. +Cloud Translation API - Service to dynamically translate between thousands of available language pairs +Cloud Vision API - Image analysis service based on machine learning +Cloud Video Intelligence - Video analysis service based on machine learning + +5) Identity & Security:- + +Cloud Identity - Single sign-on (SSO) service based on SAML 2.0 and OpenID. +Cloud IAM - Identity & Access Management (IAM) service for defining policies based on role-based access control. +Cloud Identity-Aware Proxy - Service to control access to cloud applications running on Google Cloud Platform without using a VPN. +Cloud Data Loss Prevention API - Service to automatically discover, classify, and redact sensitive data. +Security Key Enforcement - Two-step verification service based on a security key. +Cloud Key Management Service - Cloud-hosted key management service integrated with IAM and audit logging. +Cloud Resource Manager - Service to manage resources by project, folder, and organization based on the hierarchy. +Cloud Security Command Center - Security and data risk platform for data and services running in Google Cloud Platform. +Cloud Security Scanner - Automated vulnerability scanning service for applications deployed in App Engine. +Access Transparency - Near real-time audit logs providing visibility to Google Cloud Platform administrators. +VPC Service Controls - Service to manage security perimeters for sensitive data in Google Cloud Platform services. diff --git a/Cloud_providers/GCP/gcp.md b/Cloud_providers/GCP/gcp.md new file mode 100644 index 00000000..cb1fa27c --- /dev/null +++ b/Cloud_providers/GCP/gcp.md @@ -0,0 +1,183 @@ +# 1. Google Cloud Platform (GCP) Concepts + +Google Cloud Platform is a suite of cloud computing services offered by Google. Here are some fundamental concepts to understand when working with GCP: + +## 1. **Google Cloud Regions and Zones** + +- **Regions:** GCP is organized into multiple geographical regions, each containing multiple data centers. Regions help you deploy resources in specific geographic locations to meet data residency and latency requirements. + +- **Zones:** Zones are isolated data centers within regions. They provide high availability and redundancy for GCP resources. + +## 2. **Compute Engine** + +- **Compute Engine:** Compute Engine is GCP's Infrastructure-as-a-Service (IaaS) offering. It allows you to create and manage virtual machine instances, known as Compute Engine instances, in the cloud. + +- **Predefined and Custom Machine Types:** You can choose from predefined machine types or create custom machine types with specific CPU and memory configurations. + +## 3. **Google Cloud Storage** + +- **Google Cloud Storage:** Google Cloud Storage is an object storage service for storing and retrieving data. It provides highly durable and available storage with various storage classes. + +- **Buckets:** Data is stored in containers called buckets, and objects (files) are stored within buckets. + +## 4. **Google Kubernetes Engine (GKE)** + +- **Google Kubernetes Engine (GKE):** GKE is a managed Kubernetes service that simplifies the deployment, management, and scaling of containerized applications using Kubernetes. + +- **Node Pools:** GKE allows you to create and manage node pools with different machine types for your Kubernetes clusters. + +## 5. **Google Cloud Identity and Access Management (IAM)** + +- **Google Cloud IAM:** IAM is GCP's identity and access management service. It allows you to control access to resources by defining roles and permissions for users, groups, and service accounts. + +- **Service Accounts:** Service accounts are used to represent applications and services and can be granted permissions to access resources. + +## 6. **Google Cloud Functions** + +- **Google Cloud Functions:** Cloud Functions is GCP's serverless compute service. It enables you to run event-driven functions in response to cloud events or HTTP requests without managing servers. + +- **Triggers:** Functions can be triggered by events from various GCP services or by HTTP requests. + +## 7. **Google Cloud Pub/Sub** + +- **Google Cloud Pub/Sub:** Pub/Sub is a messaging service that allows you to asynchronously send and receive messages between independent applications. + +- **Topics and Subscriptions:** Messages are organized into topics, and subscribers receive messages from subscriptions to these topics. + +## 8. **Google Cloud BigQuery** + +- **Google Cloud BigQuery:** BigQuery is a fully managed, serverless, and highly scalable data warehouse. It allows you to analyze large datasets using SQL queries. + +- **Data Integration:** BigQuery integrates with various data sources for data ingestion and analytics. + +## 9. **Google Cloud AI and Machine Learning** + +- **Google Cloud AI and Machine Learning:** GCP provides a suite of artificial intelligence (AI) and machine learning (ML) services, including AutoML for custom model development and AI Platform for ML model deployment. + +- **Vision, Speech, and Natural Language APIs:** GCP offers APIs for computer vision, speech recognition, and natural language processing. + +## 10. **Google Cloud Firestore** + +- **Google Cloud Firestore:** Firestore is a NoSQL document database for building scalable, web, and mobile applications. It provides real-time synchronization and automatic scaling. + +- **Collections and Documents:** Data in Firestore is organized into collections, which contain documents with structured data. + +## 11. **Google Cloud VPC (Virtual Private Cloud)** + +- **Google Cloud VPC:** VPC is a global, private network that lets you securely connect GCP resources. It provides isolation, segmentation, and control over network traffic. + +- **Subnets:** VPCs can be divided into subnets, which are regional and provide IP address ranges for GCP resources. + +## 12. **Google Cloud Load Balancing** + +- **Google Cloud Load Balancing:** GCP offers various load balancing solutions, including HTTP(S) Load Balancing, Network Load Balancing, and TCP/SSL Load Balancing. They distribute incoming traffic to backend instances or services for high availability. + +- **Global Load Balancers:** Google's global load balancers distribute traffic across multiple regions for redundancy and low-latency access. + +## 13. **Google Cloud Spanner** + +- **Google Cloud Spanner:** Spanner is a globally distributed, horizontally scalable, and strongly consistent database service. It combines the benefits of traditional relational databases with the scalability of NoSQL databases. + +- **TrueTime:** Spanner uses Google's TrueTime technology for global clock synchronization. + +## 14. **Google Cloud Functions for Firebase** + +- **Google Cloud Functions for Firebase:** Firebase extends Cloud Functions by offering serverless backend capabilities for mobile and web app development. It includes features like Firestore, Authentication, and Realtime Database. + +- **Authentication Triggers:** Firebase Authentication Triggers allow you to run code in response to user authentication events. + +## 15. **Google Cloud Composer** + +- **Google Cloud Composer:** Composer is a managed workflow orchestration service built on Apache Airflow. It allows you to automate, schedule, and monitor workflows and data pipelines. + +- **DAGs (Directed Acyclic Graphs):** Workflows in Composer are defined as DAGs, making it easy to create complex data workflows. + +## 16. **Google Cloud Identity Platform** + +- **Google Cloud Identity Platform:** Identity Platform is a comprehensive identity and access management solution for apps and services. It provides features like authentication, multi-factor authentication (MFA), and user management. + +- **Customizable UI:** Identity Platform offers customizable user interfaces for login and registration. + +## 17. **Google Cloud Security Command Center** + +- **Google Cloud Security Command Center:** Security Command Center is a security and risk management platform that helps you identify, analyze, and mitigate security threats in your GCP resources. + +- **Vulnerability Scanning:** It includes vulnerability scanning for GCP assets. + +## 18. **Google Cloud AutoML** + + +- **Google Cloud AutoML:** AutoML is a suite of machine learning products that enables developers with limited ML expertise to build custom machine learning models for specific use cases. + +- **AutoML Vision, Natural Language, and Tables:** AutoML offers specialized tools for image classification, natural language understanding, and structured data analysis. + +## 19. **Google Cloud Storage Classes** + +- **Google Cloud Storage Classes:** Google Cloud Storage provides different storage classes, including Standard, Nearline, Coldline, and Archive, to optimize storage costs and access frequency. + +- **Data Lifecycle Management:** You can set up policies for data lifecycle management, which automatically transition data between storage classes. + +## 20. **Google Cloud Dataflow** + +- **Google Cloud Dataflow:** Dataflow is a fully managed stream and batch data processing service. It allows you to develop data pipelines for ETL (Extract, Transform, Load) and real-time data analytics. + +- **Apache Beam:** Dataflow is based on the Apache Beam open-source project. + +These advanced concepts and services in Google Cloud Platform expand its capabilities for building scalable, secure, and data-driven cloud solutions. + + +# 2. Basic Commands +These are only basic commands for more you can consider https://cloud.google.com/docs + +### 1. Login to GCP Account: +```gcloud auth login``` + +### 2. Set Project: (arduino) +```gcloud config set project PROJECT_ID``` + +### 3. List Projects: +```gcloud projects list``` + +### 4. Create a New VM Instance: +```gcloud compute instances create INSTANCE_NAME --machine-type MACHINE_TYPE --image IMAGE``` + +### 5. SSH into a VM Instance: +```gcloud compute ssh INSTANCE_NAME``` + +### 6. List VM Instances: +```gcloud compute instances list``` + +### 7. Create a Cloud Storage Bucket: +```gsutil mb -p PROJECT_ID gs://BUCKET_NAME/``` + +### 8. Upload a File to Cloud Storage: +```gsutil cp FILE_PATH gs://BUCKET_NAME/``` + +### 9. List Files in Cloud Storage Bucket: +```gsutil ls gs://BUCKET_NAME/``` + +### 10. Create a Pub/Sub Topic: +```gcloud pubsub topics create TOPIC_NAME``` + +### 11. Publish a Message to Pub/Sub Topic: +```gcloud pubsub topics publish TOPIC_NAME --message "MESSAGE"``` + +### 12. Create a Cloud SQL Instance (MySQL): +```gcloud sql instances create INSTANCE_NAME --database-version=MYSQL_5_7 --tier=db-n1-standard-1``` + +### 13. List Cloud SQL Instances: +```gcloud sql instances list``` + +### 14. Deploy App Engine Application: +```gcloud app deploy app.yaml``` + +### 15. List App Engine Services: +```gcloud app services list``` + +### 16. Create a Kubernetes Cluster: +```gcloud container clusters create CLUSTER_NAME --num-nodes=1 --zone=COMPUTE_ZONE``` + +### 17. List Kubernetes Clusters: +```gcloud container clusters list``` + +As said you can always official documentation for more commands and concepts https://cloud.google.com/docs \ No newline at end of file diff --git a/Cloud_providers/Readme.md b/Cloud_providers/Readme.md new file mode 100644 index 00000000..b88a419e --- /dev/null +++ b/Cloud_providers/Readme.md @@ -0,0 +1,339 @@ +# Cloud Providers +Cloud providers are like superheroes for your data, swooping in to save the day. Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP) lead the pack. AWS is the seasoned veteran, Azure seamlessly integrates with Microsoft products, and GCP boasts cutting-edge tech. Whether you're storing, computing, or hosting, these clouds have your back, rain or shine. + +# AWS +- Amazon Web Services (AWS) reigns supreme in the cloud services domain, offering a versatile suite of tools catering to businesses of all sizes. With stalwarts like Amazon S3 for storage and Amazon EC2 for computation, AWS provides a robust foundation. + +What sets AWS apart is not just its extensive services but also its scalability, global reliability, and a pay-as-you-go model. This flexibility ensures businesses pay only for what they use, making AWS an economic and potent choice. + +For a detailed exploration of AWS services, visit their official website [here](https://aws.amazon.com/). It's a one-stop hub for comprehensive documentation, case studies, and tutorials, showcasing how AWS can propel businesses into the digital future. In the cloud landscape, AWS stands as the benchmark for innovation and efficiency. + +Absolutely, diving into AWS can be an adventure! Here are some handy commands to navigate the AWS landscape: + +**1. AWS CLI Basics:** + - Install the AWS CLI and configure your credentials using `aws configure`. + - Use `aws help` to explore commands and `--help` with specific commands for detailed options. + +**2. AWS Services Management:** + - List available services: `aws help` or `aws service help`. + - Explore AWS regions with `aws ec2 describe-regions`. + +**3. EC2 Instances:** + - Launch an EC2 instance with `aws ec2 run-instances`. + - Terminate instances with `aws ec2 terminate-instances`. + +**4. S3 Commands:** + - Upload a file to S3: `aws s3 cp local-file s3://bucket/`. + - List S3 buckets: `aws s3 ls`. + - Sync local and S3 directories: `aws s3 sync . s3://bucket/path/`. + +**5. AWS Lambda:** + - Deploy a Lambda function: `aws lambda create-function`. + - Update function code: `aws lambda update-function-code`. + +**6. AWS CloudFormation:** + - Create a CloudFormation stack: `aws cloudformation create-stack`. + - Delete a stack: `aws cloudformation delete-stack`. + +**7. Security Groups:** + - List security groups: `aws ec2 describe-security-groups`. + - Modify inbound rules: `aws ec2 authorize-security-group-ingress`. + +**8. IAM Users and Roles:** + - List IAM users: `aws iam list-users`. + - Create IAM role: `aws iam create-role`. + +**9. Elastic Beanstalk:** + - Create an Elastic Beanstalk application: `aws elasticbeanstalk create-application`. + +**10. CloudWatch Logs:** + - Describe log groups: `aws logs describe-log-groups`. + - Get log events: `aws logs get-log-events`. + +**11. Cost Explorer:** + - Analyze costs with AWS Cost Explorer: `aws ce get-cost-and-usage`. + +**12. ECS (Elastic Container Service):** + - List ECS clusters: `aws ecs list-clusters`. + - Describe tasks in a cluster: `aws ecs list-tasks --cluster your-cluster-name`. + +**Tips:** + - Leverage AWS documentation and AWS forums for detailed information. + - Use AWS SDKs for specific programming languages for more complex automation. + - Create custom AMIs with pre-installed software, configurations, and security settings to speed up instance launches and ensure consistency. + +Remember to replace placeholder values like `bucket`, `path`, `your-cluster-name`, etc., with your actual resource names. And always be cautious with powerful commands, especially when it comes to resource deletion. Happy exploring in the AWS cloud! + +# GCP +Google Cloud Platform (GCP) emerges as a technological marvel in the realm of cloud services. Offering a sophisticated suite of tools, GCP is a playground for cutting-edge computing, storage, and machine learning solutions. The global network infrastructure ensures swift and low-latency access to services, providing a seamless experience for users worldwide. + +One standout service is BigQuery, a game-changer in the field of data analytics, enabling rapid and efficient analysis of massive datasets. Whether you're a nimble startup or an industry giant, GCP's agility and advanced offerings cater to a spectrum of business needs, fostering innovation and growth. + +Embark on the cloud revolution by exploring the possibilities at [Google Cloud](https://cloud.google.com/), where GCP redefines the landscape of digital transformation. Elevate your digital endeavors with the prowess of Google's cloud technologies. + +Certainly! Google Cloud Platform (GCP) offers a range of tools and services for cloud computing. Here are some handy commands to help you navigate GCP: + +**1. Google Cloud SDK:** + - Install the Google Cloud SDK to interact with GCP from your local machine. + - Use `gcloud init` to configure your account and set default settings. + +**2. Basic Commands:** + - `gcloud projects list`: Lists all GCP projects in your account. + - `gcloud config list`: Lists your current configuration settings. + +**3. Compute Engine:** + - `gcloud compute instances create`: Creates a new virtual machine instance. + - `gcloud compute instances list`: Lists all virtual machine instances. + +**4. Storage (Cloud Storage):** + - `gsutil cp local-file gs://your-bucket/`: Copies a file from your local machine to Cloud Storage. + - `gsutil ls gs://your-bucket/`: Lists objects in a Cloud Storage bucket. + +**5. Kubernetes Engine (GKE):** + - `gcloud container clusters create`: Creates a new Kubernetes cluster. + - `gcloud container clusters get-credentials`: Configures `kubectl` to use a GKE cluster. + +**6. BigQuery:** + - `bq query`: Runs a SQL-like query on BigQuery. + - `bq show dataset`: Shows information about a dataset in BigQuery. + +**7. Cloud Functions:** + - `gcloud functions deploy`: Deploys a function to Cloud Functions. + - `gcloud functions logs read`: Reads logs for a deployed function. + +**8. IAM (Identity and Access Management):** + - `gcloud projects add-iam-policy-binding`: Adds an IAM policy binding to a project. + - `gcloud iam service-accounts create`: Creates a service account. + +**9. Pub/Sub (Cloud Pub/Sub):** + - `gcloud pubsub topics create`: Creates a new Pub/Sub topic. + - `gcloud pubsub subscriptions create`: Creates a new Pub/Sub subscription. + +**10. Stackdriver:** + - `gcloud logging logs list`: Lists all log types in Stackdriver Logging. + - `gcloud monitoring dashboards create`: Creates a new Stackdriver dashboard. + +**Tips:** + - Utilize the `--help` flag with commands for detailed information on available options. + - Explore GCP's web console for a graphical interface to manage resources. + - Leverage Cloud Shell for a browser-based command-line experience. + +These commands provide a starting point for managing and interacting with various services in Google Cloud Platform. For more comprehensive details and options, refer to the [Google Cloud SDK Documentation](https://cloud.google.com/sdk/docs) and [GCP Documentation](https://cloud.google.com/docs). + +# Azure +Microsoft Azure is a dynamic force in the realm of cloud computing, offering a rich array of services across computing, storage, and AI. With seamless integration into Microsoft's ecosystem, Azure simplifies workflows and enhances collaboration. Azure DevOps streamlines development, ensuring efficiency from code to deployment. + +From startups to enterprises, Azure's global infrastructure and robust services make it a go-to for digital transformation. Security, compliance, and sustainability are ingrained, reinforcing Azure as a trusted partner in the journey to cloud excellence. + +Explore the transformative power of Azure at [Azure](https://azure.microsoft.com/) and unlock the potential for innovation and growth in your organization. + +Certainly! Microsoft Azure is a robust cloud platform with a variety of services. Here are some useful commands to help you navigate and manage resources in Azure: + +**1. Azure CLI:** + - Install the Azure CLI and use `az login` to authenticate to your Azure account. + - Use `az configure` to set default settings like subscription, output format, etc. + +**2. Basic Commands:** + - `az account list`: Lists all subscriptions for your account. + - `az account show`: Displays details of the current subscription. + +**3. Virtual Machines:** + - `az vm create`: Creates a new virtual machine. + - `az vm list`: Lists all virtual machines in a resource group or across subscriptions. + +**4. Storage (Azure Storage):** + - `az storage account create`: Creates a new storage account. + - `az storage account list`: Lists all storage accounts in a resource group or across subscriptions. + +**5. Azure Kubernetes Service (AKS):** + - `az aks create`: Creates a new AKS cluster. + - `az aks get-credentials`: Configures `kubectl` to use an AKS cluster. + +**6. Azure SQL Database:** + - `az sql server create`: Creates a new SQL server. + - `az sql db list`: Lists all SQL databases in a server. + +**7. Azure Functions:** + - `az functionapp create`: Creates a new function app. + - `az functionapp show`: Shows details of a function app. + +**8. Azure Active Directory (AAD):** + - `az ad user list`: Lists all users in the Azure AD. + - `az ad app create`: Creates a new application in Azure AD. + +**9. Azure Resource Groups:** + - `az group create`: Creates a new resource group. + - `az group list`: Lists all resource groups in a subscription. + +**10. Networking:** + - `az network vnet create`: Creates a new virtual network. + - `az network nsg rule add`: Adds a rule to a network security group. + +**Tips:** + - Use the `--help` flag with commands for detailed information on available options. + - Explore the Azure Portal for a graphical interface to manage resources. + - Take advantage of Azure PowerShell for scripting and automation. + +These commands offer a starting point for managing resources in Azure. For more detailed information, refer to the [Azure CLI Documentation](https://docs.microsoft.com/en-us/cli/azure/) and [Azure Documentation](https://docs.microsoft.com/en-us/azure/). + +# Digital Ocean +DigitalOcean is a cloud computing platform celebrated for its simplicity and developer-centric features. At its core, DigitalOcean provides "droplets," virtual machines designed to streamline application deployment. This simplicity extends to managed databases and scalable storage solutions, making it an appealing choice for developers seeking an intuitive cloud experience. + +DigitalOcean's user-friendly interfaces and transparent pricing contribute to its popularity among developers and startups. The platform's emphasis on cost-effectiveness ensures users can optimize their cloud spending without compromising on performance. Whether you're a solo developer or part of a growing startup, DigitalOcean offers a hassle-free and scalable environment for building and deploying applications in the cloud. + +For a deeper dive into DigitalOcean's offerings, you can explore detailed information on their official website: [DigitalOcean](https://www.digitalocean.com/). + +Certainly! DigitalOcean is known for its simplicity and developer-friendly features. Here are some useful commands to help you make the most of DigitalOcean: + +**1. DigitalOcean CLI:** + - Install the DigitalOcean CLI (`doctl`) and authenticate using `doctl auth init`. + +**2. Basic Commands:** + - `doctl account get`: Displays your account information. + - `doctl compute region list`: Lists available regions. + - `doctl compute size list`: Lists available droplet sizes. + +**3. Droplets (Virtual Machines):** + - `doctl compute droplet create`: Creates a new droplet (virtual machine). + - `doctl compute droplet list`: Lists all droplets. + - `doctl compute droplet delete`: Deletes a droplet. + +**4. Volumes and Snapshots:** + - `doctl compute volume create`: Creates a new block storage volume. + - `doctl compute snapshot create`: Creates a snapshot of a volume. + - `doctl compute volume list`: Lists all volumes. + +**5. Networking:** + - `doctl compute firewall create`: Creates a new firewall. + - `doctl compute load-balancer create`: Creates a new load balancer. + - `doctl compute domain create`: Creates a new domain. + +**6. Kubernetes:** + - `doctl kubernetes cluster create`: Creates a new Kubernetes cluster. + - `doctl kubernetes cluster kubeconfig save`: Configures `kubectl` to use a DigitalOcean Kubernetes cluster. + +**7. Monitoring and Alerts:** + - `doctl compute monitoring`: Displays monitoring information for a droplet. + - `doctl compute monitoring alert create`: Creates a new monitoring alert policy. + +**8. Spaces (Object Storage):** + - `doctl spaces create`: Creates a new Spaces (object storage) bucket. + - `doctl spaces list`: Lists all Spaces buckets. + - `doctl compute droplet create --size s-1vcpu-1gb --image spaces --region nyc3 --tag-name spaces`: Creates a droplet with a mounted Spaces bucket. + +**Tips:** + - Use `doctl help` for command information, and `doctl --help` for detailed options. + - Explore DigitalOcean's web dashboard for a user-friendly interface. + - Take advantage of DigitalOcean's tutorials and community resources. + +These commands provide a foundation for managing resources on DigitalOcean. For further details, refer to the [DigitalOcean CLI Documentation](https://www.digitalocean.com/docs/apis-clis/doctl/) and [DigitalOcean Documentation](https://www.digitalocean.com/docs/). + + + + +# Red Hat +Red Hat is a well-known software company that provides open-source solutions, primarily focused on enterprise-level applications and services, including Linux-based operating systems, middleware, and cloud technologies. + +Red Hat offers a cloud platform known as Red Hat OpenShift, which is a Kubernetes-based container platform. OpenShift enables developers to build, deploy, and scale applications quickly and efficiently. It supports a variety of cloud providers, including public clouds like AWS (Amazon Web Services), Azure, and Google Cloud Platform, making it easier for organizations to deploy applications on their preferred cloud infrastructure. + +**1. Red Hat CLI:** +Red Hat provides a command-line interface (CLI) tool called ```rhel-osp-director``` for managing Red Hat OpenStack Platform environments. + +## 1. General steps for installing Red Hat CLI: + +- ***Ensure You Have Red Hat Subscription:*** +To install Red Hat CLI tools, you need a valid Red Hat subscription. Make sure you have access to the Red Hat repositories. + +- ***Access the Command Line:*** +Open a terminal or command prompt on your system where you want to install the Red Hat CLI tool. + +- ***Update Your System:*** +It's always a good practice to update your system's package repository before installing new software. Run the following command: +```sudo yum update``` +If you're using a different package manager like dnf, use dnf update instead. + +- ***Install Red Hat CLI:*** +You can install the Red Hat CLI tool using the package manager (yum or dnf). The exact command can vary based on your system configuration, but it should be something like: +```sudo yum install rhel-osp-director``` +or for `dnf`: +```sudo dnf install rhel-osp-director``` + +Follow the prompts to confirm the installation. The package manager will download and install the necessary files. + +- ***Verify the Installation:*** +After installation is complete, you can verify that the CLI tool has been installed by running: +```rhel-osp-director --version``` + +This command should display the installed version of the Red Hat CLI tool, confirming a successful installation. + + + +## 2 . Commands: +Red Hat-based Linux distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Fedora use the yum package manager (and more recently dnf in newer versions of RHEL and Fedora) to manage software packages. + +- ***Update the System:*** +```sudo yum update``` + +or with `dnf`: +```sudo dnf update``` + +- ***Install a Package:*** +```sudo yum install package_name``` + +or with `dnf`: +```sudo dnf install package_name``` + +Replace package_name with the name of the package you want to install. + +- ***Remove a Package:*** +```sudo yum remove package_name``` + +or with `dnf`: +```sudo dnf remove package_name``` + +- ***Search for a Package:*** +```sudo yum search keyword``` + +or with `dnf`: +```sudo dnf search keyword``` + +- ***List Installed Packages:*** +```sudo yum list installed``` + +or with `dnf`: +```sudo dnf list installed``` + +- ***Enable a Service (Start at Boot):*** +```bash :sudo systemctl enable service_name``` + Enables a service to start automatically at boot. + +- ***Start/Stop/Restart a Service:*** +```sudo systemctl start service_name sudo systemctl stop service_name sudo systemctl restart service_name``` + Manages services (replace service_name with the actual service name). + +- ***Check System Logs:*** +```journalctl``` + Displays the system journal and logs. + +- ***Check Disk Space:*** +```bash : df -h``` + +- ***Check Memory and CPU Usage:*** +```c: free -h``` + +- ***Network Configuration:*** +```ip addr show``` + +- ***Firewall Configuration:*** +```sudo firewall-cmd --list-all``` + +## Note: +Remember to replace package_name and service_name with the actual names of packages and services you want to interact with. Always use sudo to execute administrative commands to ensure proper permissions. + Additionally, consult the man pages (```man command_name```) for more detailed information about specific commands and their options. + + + + +For further more details : +- Redhat Openshift Documentation : https://docs.openshift.com/ +- Redhat customer portal: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8 diff --git a/Container-orchestration/Docker/Dockerfile b/Container-orchestration/Docker/Dockerfile new file mode 100644 index 00000000..2e0c75bc --- /dev/null +++ b/Container-orchestration/Docker/Dockerfile @@ -0,0 +1,23 @@ +FROM centos + +RUN yum install -y python36 + +RUN yum install -y epel-release + +RUN yum groupinstall -y 'development tools' + +RUN yum install -y python36-devel + +RUN pip3 install keras + +RUN pip3 install numpy + +RUN pip3 install pandas + +RUN pip3 install pillow + +RUN pip3 install opencv-python + +RUN pip3 install tensorflow + +RUN pip3 install matplotlib diff --git a/Container-orchestration/Docker/docker-basic-commands.md b/Container-orchestration/Docker/docker-basic-commands.md new file mode 100644 index 00000000..8a939a4f --- /dev/null +++ b/Container-orchestration/Docker/docker-basic-commands.md @@ -0,0 +1,133 @@ +

Docker Basic Commands

+ +## Build Images + +- Create image using current directory’s Dockerfile
+ ``` docker build -t image-name . ``` + +- List images
+ ``` docker images ``` + +
+ +## Running Container + +- Create new container from specified image
+ ``` docker run image-name ``` + +- Assign a name to the container
+ ``` docker run --name nick-name image-name ``` + +- Run image with an entry point | override existing entrypoint
+ ```docker run image-name cmd```
+ ```docker run image-name --entrypoint cmd``` + +- Run image in interactive mode
+ ``` docker run -it image-name ``` + +- Run image in detached mode
+ ``` docker run -d image-name ``` + +- Run image mapping container's port to the host
+ ``` docker run -p host-port:container-port image-name ``` + +
+ +## Managing Containers + +- List running containers
+ ``` docker ps ``` + +- List all containers
+ ```docker ps -a``` + +- Stop one or more running containers
+ ```docker stop containerId``` + +- Start one or more stopped containers
+ ```docker start containerId``` + +- Fetch the logs of a container
+ ```docker logs containerId``` + +- Fetch and follow log output of a container
+ ```docker logs -f containerId``` + +- Run a command in a running container in interactive mode
+ ```docker exec -it containerId cmd``` + +- Copy files/folders from container to local filesystem
+ ``` docker cp containerId:/workdir/file.ext .``` + +- Copy files/folders from local filesystem to container
+ ``` docker cp file.ext containerId:/workdir/``` + +- Remove container
+ ```docker rm containerId``` + +- Remove running container
+ ```docker rm -f containerId``` + +- Remove all running and stopped containers
+ ```docker rm -f $(docker ps -a -q)``` + +
+ + +## Persistant data using Volumes + +- Creates a new volume that containers store data
+ ```docker volume create volume-name``` + +- Display detailed information on one or more volumes
+ ```docker volume inspect volume-name``` + +- List volumes
+ ```docker volume ls``` + +- Create a volume and then configure the container to use it
+ ``` docker run -v volume-name:/dir/dir container-name``` + +- Create mapping between dir in host and container
+ ``` docker run -v $(pwd):/workdir container-name``` + + + + +
+ +## Managing Images + +#### Tagging Images + +- Create tag to the image while building
+ ``` docker build -t image-name:tag . ``` + +- Create tag to the image after building
+ ``` docker image tag src-image:latest dst-image:tag ``` + +#### Saving & Loading Images + +- Save one or more images to a tar archive
+ ``` docker image save -o image-name.tar image-name:tag ``` + +- Load an image from a tar archive
+ ``` docker image load -i image-name.tar ``` + +#### Remove Images + +- Remove one or more images
+ ``` docker image rm image-name ```
+ ``` docker rmi image-name ``` + +- Remove all images
+ ``` docker system prune -a ``` + +- Remove all stopped containers
+ ``` docker container prune ``` + +- Remove all dangling images
+ ``` docker image prune ``` + +- Remove all unused containers, networks, dangling and unreferenced images
+ ``` docker system prune ``` diff --git a/Container-orchestration/Docker/docker-commands.md b/Container-orchestration/Docker/docker-commands.md new file mode 100644 index 00000000..aeed4341 --- /dev/null +++ b/Container-orchestration/Docker/docker-commands.md @@ -0,0 +1,229 @@ + +### Docker Build & Run ![Docker](https://img.shields.io/badge/Docker-Build-blue?style=for-the-badge) + +- Create image using this directory’s Dockerfile + +``` docker build -t image-name . ``` + +- Run “image-name” mapping port 8080 to 80 + +``` docker run -p 8080:80 image-name ``` + +- Run “image-name” mapping port 8080 to 80, but in detached mode + +``` docker run -d -p 8080:80 image-name ``` + +- See a list of all running containers + +``` docker ps ``` + +- Gracefully stop the specified container + +``` docker stop ``` + +- See a list of all containers, even the ones not running + +``` docker ps -a ``` + +- Force shutdown of the specified container + +``` docker kill ``` + +- Remove the specified container from this machine + + ``` docker rm ``` + +- Remove all containers from this machine + +``` docker rm $(docker ps -a -q) ``` + +- Show all images on this machine + +``` docker images -a ``` + +- LEGACY: Remove the specified image from this machine + +``` docker rmi ``` + +- LEGACY:Remove all images from this machine + +``` docker rmi $(docker images -q) ``` + +- LEGACY: Remove all images with dependencies + +``` docker images -q | xargs docker rmi –f ``` + +- Log in this CLI session using your Docker credentials + +``` docker login ``` + +- Tag for upload to registry + +``` docker tag username/repository:tag ``` + +- Upload tagged image to registry + +``` docker push username/repository:tag ``` + +- Run image from a registry + +``` docker run username/repository:tag ``` + +- List Docker volume + +``` docker volume ls ``` + +- List Docker Network + +``` docker network ls ``` + +- Access an already running container and perform operations inside it + +``` docker exec -it bash ``` + +********************************************* + +### Docker Compose ![Docker](https://img.shields.io/badge/Docker-Compose-blue?style=for-the-badge) + +- Build Docker Images using Docker Compose file + +``` docker-compose build ``` + +- Run Docker Containers + +``` docker-compose up ``` + +- Run Docker Containers in background Mode + +``` docker-compose up -d ``` + +- Build Images before starting Containers + +``` docker-compose up --build ``` + +- Recreate Containers from existing images + +``` docker-compose up --force-recreate ``` + +- Stop and Remove Containers, Volumes, Networks, and Images + +``` docker-compose down ``` + +- List Containers + +``` docker-compose ps -a ``` + +- Display Log output + +``` docker-compose logs ``` + + +****************************************************** + +### Docker Swarm ![Docker](https://img.shields.io/badge/Docker-Swarm-blue?style=for-the-badge) + +- Initialize + +``` docker swarm init ``` + +- Join Docker Cluster + +```` docker swarm join --token SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx :2377 ``` + +- List Docker Nodes in Swarm Cluster + +``` docker node ls ``` + +- List all running applications on this Docker host + +``` docker stack ls ``` + +- Run the specified Compose file + +``` docker stack deploy -c ``` + +- List the services associated with an app + +``` docker stack services ``` + +- List the running containers associated with an app + +``` docker stack ps ``` + +- Tear down an application + +``` docker stack rm alias dstr='docker stack rm' ``` + +- Docker Swarm Service list + +``` docker service ls ``` +``` alias dsls='docker service ls' ``` + +- List the tasks of one or more services + +``` docker service ps ``` +``` alias dsp='docker service ps' ``` + +- Docker Swarm Service logs + +``` alias dsl='docker service logs' ``` + +- Remove specific docker swarm service + +``` alias dsr='docker service rm' ``` + +- Remove unused Containers, Images, Network, etc. + +``` alias sprune='docker system prune' ``` + +- Remove unused Volumes + +``` alias vprune='docker volume prune' ``` + +- Create Secret + +``` docker secret create ``` + +- Create Config + +``` docker config create ``` + + + + +### To delete all containers including its volumes use, + +```docker rm -vf $(docker ps -a -q)``` + +### To delete all the images, + +```docker rmi -f $(docker images -a -q)``` + +> Remember, you should remove all the containers before removing all the images from which those containers were created. + +### In case you are working on Windows (Powershell), + +```bash +$images = docker images -a -q +foreach ($image in $images) { docker image rm $image -f } +``` +### To delete all images + +```docker rmi $(docker images -a)``` + +### To delete containers which are in exited state + +```docker rm $(docker ps -a -f status=exited -q)``` + +### To delete containers which are in created state + +```docker rm $(docker ps -a -f status=created -q)``` + +> NOTE: Remove all the containers then remove the images + + +### Docker run bash shell of image +```docker run -it --entrypoint bash ``` + +### List all docker commands +``` docker --help ``` \ No newline at end of file diff --git a/Docker/docker-concepts.md b/Container-orchestration/Docker/docker-concepts.md similarity index 99% rename from Docker/docker-concepts.md rename to Container-orchestration/Docker/docker-concepts.md index adab3628..79604b1e 100644 --- a/Docker/docker-concepts.md +++ b/Container-orchestration/Docker/docker-concepts.md @@ -183,4 +183,7 @@ - Layered systems offer two main benefits: - 1. Duplication-free: layers help avoid duplicating a complete set of files every time you use an image to create and run a new container, making instantiation of docker containers very fast and cheap. - 2. Layer segregation: Making a change is much faster — when you change an image, Docker only propagates the updates to the layer that was changed. + + + diff --git a/Docker/docker-notes.md b/Container-orchestration/Docker/docker-notes.md similarity index 73% rename from Docker/docker-notes.md rename to Container-orchestration/Docker/docker-notes.md index 0ecf66ee..efcb6966 100644 --- a/Docker/docker-notes.md +++ b/Container-orchestration/Docker/docker-notes.md @@ -4,7 +4,11 @@ * [Dockerfile Format](#docker-fileformats) -* [Docker Commands](#docker-compose) +* [Docker Commands](#docker-build--run--) + +* [Docker Compose](#docker-compose--) + +* [Docker Swarm](#docker-swarm--) @@ -284,193 +288,18 @@ Information: Each SHELL instruction overrides all previous SHELL instructions, and affects all subsequent instructions. Allows an alternate shell be used such as zsh, csh, tcsh, powershell, and others. -******************* - -### Docker Build & Run ![Docker](https://img.shields.io/badge/Docker-Build-blue?style=for-the-badge) - -- Create image using this directory’s Dockerfile - -``` docker build -t image-name . ``` - -- Run “image-name” mapping port 8080 to 80 - -``` docker run -p 8080:80 image-name ``` - -- Run “image-name” mapping port 8080 to 80, but in detached mode - -``` docker run -d -p 8080:80 image-name ``` - -- See a list of all running containers - -``` docker ps ``` - -- Gracefully stop the specified container - -``` docker stop ``` - -- See a list of all containers, even the ones not running - -``` docker ps -a ``` - -- Force shutdown of the specified container - -``` docker kill ``` - -- Remove the specified container from this machine - - ``` docker rm ``` - -- Remove all containers from this machine - -``` docker rm $(docker ps -a -q) ``` - -- Show all images on this machine - -``` docker images -a ``` - -- LEGACY: Remove the specified image from this machine - -``` docker rmi ``` - -- LEGACY:Remove all images from this machine - -``` docker rmi $(docker images -q) ``` - -- LEGACY: Remove all images with dependencies - -``` docker images -q | xargs docker rmi –f ``` - -- Log in this CLI session using your Docker credentials - -``` docker login ``` - -- Tag for upload to registry - -``` docker tag username/repository:tag ``` - -- Upload tagged image to registry - -``` docker push username/repository:tag ``` - -- Run image from a registry - -``` docker run username/repository:tag ``` - -- List Docker volume - -``` docker volume ls ``` - -- List Docker Network - -``` docker network ls ``` - - -********************************************* - -### Docker Compose ![Docker](https://img.shields.io/badge/Docker-Compose-blue?style=for-the-badge) - -- Build Docker Images using Docker Compose file - -``` docker-compose build ``` - -- Run Docker Containers - -``` docker-compose up ``` - -- Run Docker Containers in background Mode - -``` docker-compose up -d ``` - -- Build Images before starting Containers - -``` docker-compose up --build ``` - -- Recreate Containers from existing images - -``` docker-compose up --force-recreate ``` - -- Stop and Remove Containers, Volumes, Networks, and Images - -``` docker-compose down ``` - -- List Containers - -``` docker-compose ps -a ``` - -- Display Log output - -``` docker-compose logs ``` - - -****************************************************** - -### Docker Swarm ![Docker](https://img.shields.io/badge/Docker-Swarm-blue?style=for-the-badge) - -- Initialize - -``` docker swarm init ``` - -- Join Docker Cluster - -```` docker swarm join --token SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx :2377 ``` - -- List Docker Nodes in Swarm Cluster - -``` docker node ls ``` - -- List all running applications on this Docker host - -``` docker stack ls ``` - -- Run the specified Compose file - -``` docker stack deploy -c ``` - -- List the services associated with an app - -``` docker stack services ``` - -- List the running containers associated with an app - -``` docker stack ps ``` - -- Tear down an application - -``` docker stack rm alias dstr='docker stack rm' ``` - -- Docker Swarm Service list - -``` docker service ls ``` -``` alias dsls='docker service ls' ``` - -- List the tasks of one or more services - -``` docker service ps ``` -``` alias dsp='docker service ps' ``` - -- Docker Swarm Service logs - -``` alias dsl='docker service logs' ``` - -- Remove specific docker swarm service - -``` alias dsr='docker service rm' ``` - -- Remove unused Containers, Images, Network, etc. - -``` alias sprune='docker system prune' ``` - -- Remove unused Volumes - -``` alias vprune='docker volume prune' ``` - -- Create Secret - -``` docker secret create ``` -- Create Config -``` docker config create ``` +Basic Docker Commands -***************************************************************** +1) Docker run - Start a Container +2) Docker ps - List all the running Container +3) Docker ps -a - List all the running as well as stoped docker container +4) Docker stop or - to stop container +5) Docker rm or - to remove the containner +6) Docker images - show all the images find locally or downloaded +7) Docker rmi - remove the image that is specified +8) Docker pull - to pull image but not run +9) Docker exec - to see what inside running container +10) Docker run -d - run image in the background mode diff --git a/Docker/node/app.js b/Container-orchestration/Docker/node/app.js similarity index 100% rename from Docker/node/app.js rename to Container-orchestration/Docker/node/app.js diff --git a/Container-orchestration/Docker/node/node_modules/.bin/mime b/Container-orchestration/Docker/node/node_modules/.bin/mime new file mode 100644 index 00000000..fbb7ee0e --- /dev/null +++ b/Container-orchestration/Docker/node/node_modules/.bin/mime @@ -0,0 +1 @@ +../mime/cli.js \ No newline at end of file diff --git a/Docker/node/node_modules/accepts/HISTORY.md b/Container-orchestration/Docker/node/node_modules/accepts/HISTORY.md similarity index 100% rename from Docker/node/node_modules/accepts/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/accepts/HISTORY.md diff --git a/Docker/node/node_modules/accepts/LICENSE b/Container-orchestration/Docker/node/node_modules/accepts/LICENSE similarity index 100% rename from Docker/node/node_modules/accepts/LICENSE rename to Container-orchestration/Docker/node/node_modules/accepts/LICENSE diff --git a/Docker/node/node_modules/accepts/README.md b/Container-orchestration/Docker/node/node_modules/accepts/README.md similarity index 100% rename from Docker/node/node_modules/accepts/README.md rename to Container-orchestration/Docker/node/node_modules/accepts/README.md diff --git a/Docker/node/node_modules/accepts/index.js b/Container-orchestration/Docker/node/node_modules/accepts/index.js similarity index 100% rename from Docker/node/node_modules/accepts/index.js rename to Container-orchestration/Docker/node/node_modules/accepts/index.js diff --git a/Docker/node/node_modules/accepts/package.json b/Container-orchestration/Docker/node/node_modules/accepts/package.json similarity index 100% rename from Docker/node/node_modules/accepts/package.json rename to Container-orchestration/Docker/node/node_modules/accepts/package.json diff --git a/Docker/node/node_modules/array-flatten/LICENSE b/Container-orchestration/Docker/node/node_modules/array-flatten/LICENSE similarity index 100% rename from Docker/node/node_modules/array-flatten/LICENSE rename to Container-orchestration/Docker/node/node_modules/array-flatten/LICENSE diff --git a/Docker/node/node_modules/array-flatten/README.md b/Container-orchestration/Docker/node/node_modules/array-flatten/README.md similarity index 100% rename from Docker/node/node_modules/array-flatten/README.md rename to Container-orchestration/Docker/node/node_modules/array-flatten/README.md diff --git a/Docker/node/node_modules/array-flatten/array-flatten.js b/Container-orchestration/Docker/node/node_modules/array-flatten/array-flatten.js similarity index 100% rename from Docker/node/node_modules/array-flatten/array-flatten.js rename to Container-orchestration/Docker/node/node_modules/array-flatten/array-flatten.js diff --git a/Docker/node/node_modules/array-flatten/package.json b/Container-orchestration/Docker/node/node_modules/array-flatten/package.json similarity index 100% rename from Docker/node/node_modules/array-flatten/package.json rename to Container-orchestration/Docker/node/node_modules/array-flatten/package.json diff --git a/Docker/node/node_modules/body-parser/HISTORY.md b/Container-orchestration/Docker/node/node_modules/body-parser/HISTORY.md similarity index 100% rename from Docker/node/node_modules/body-parser/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/body-parser/HISTORY.md diff --git a/Docker/node/node_modules/body-parser/LICENSE b/Container-orchestration/Docker/node/node_modules/body-parser/LICENSE similarity index 100% rename from Docker/node/node_modules/body-parser/LICENSE rename to Container-orchestration/Docker/node/node_modules/body-parser/LICENSE diff --git a/Docker/node/node_modules/body-parser/README.md b/Container-orchestration/Docker/node/node_modules/body-parser/README.md similarity index 100% rename from Docker/node/node_modules/body-parser/README.md rename to Container-orchestration/Docker/node/node_modules/body-parser/README.md diff --git a/Docker/node/node_modules/body-parser/index.js b/Container-orchestration/Docker/node/node_modules/body-parser/index.js similarity index 100% rename from Docker/node/node_modules/body-parser/index.js rename to Container-orchestration/Docker/node/node_modules/body-parser/index.js diff --git a/Docker/node/node_modules/body-parser/lib/read.js b/Container-orchestration/Docker/node/node_modules/body-parser/lib/read.js similarity index 100% rename from Docker/node/node_modules/body-parser/lib/read.js rename to Container-orchestration/Docker/node/node_modules/body-parser/lib/read.js diff --git a/Docker/node/node_modules/body-parser/lib/types/json.js b/Container-orchestration/Docker/node/node_modules/body-parser/lib/types/json.js similarity index 100% rename from Docker/node/node_modules/body-parser/lib/types/json.js rename to Container-orchestration/Docker/node/node_modules/body-parser/lib/types/json.js diff --git a/Docker/node/node_modules/body-parser/lib/types/raw.js b/Container-orchestration/Docker/node/node_modules/body-parser/lib/types/raw.js similarity index 100% rename from Docker/node/node_modules/body-parser/lib/types/raw.js rename to Container-orchestration/Docker/node/node_modules/body-parser/lib/types/raw.js diff --git a/Docker/node/node_modules/body-parser/lib/types/text.js b/Container-orchestration/Docker/node/node_modules/body-parser/lib/types/text.js similarity index 100% rename from Docker/node/node_modules/body-parser/lib/types/text.js rename to Container-orchestration/Docker/node/node_modules/body-parser/lib/types/text.js diff --git a/Docker/node/node_modules/body-parser/lib/types/urlencoded.js b/Container-orchestration/Docker/node/node_modules/body-parser/lib/types/urlencoded.js similarity index 100% rename from Docker/node/node_modules/body-parser/lib/types/urlencoded.js rename to Container-orchestration/Docker/node/node_modules/body-parser/lib/types/urlencoded.js diff --git a/Docker/node/node_modules/body-parser/package.json b/Container-orchestration/Docker/node/node_modules/body-parser/package.json similarity index 100% rename from Docker/node/node_modules/body-parser/package.json rename to Container-orchestration/Docker/node/node_modules/body-parser/package.json diff --git a/Docker/node/node_modules/bytes/History.md b/Container-orchestration/Docker/node/node_modules/bytes/History.md similarity index 100% rename from Docker/node/node_modules/bytes/History.md rename to Container-orchestration/Docker/node/node_modules/bytes/History.md diff --git a/Docker/node/node_modules/bytes/LICENSE b/Container-orchestration/Docker/node/node_modules/bytes/LICENSE similarity index 100% rename from Docker/node/node_modules/bytes/LICENSE rename to Container-orchestration/Docker/node/node_modules/bytes/LICENSE diff --git a/Docker/node/node_modules/bytes/Readme.md b/Container-orchestration/Docker/node/node_modules/bytes/Readme.md similarity index 100% rename from Docker/node/node_modules/bytes/Readme.md rename to Container-orchestration/Docker/node/node_modules/bytes/Readme.md diff --git a/Docker/node/node_modules/bytes/index.js b/Container-orchestration/Docker/node/node_modules/bytes/index.js similarity index 100% rename from Docker/node/node_modules/bytes/index.js rename to Container-orchestration/Docker/node/node_modules/bytes/index.js diff --git a/Docker/node/node_modules/bytes/package.json b/Container-orchestration/Docker/node/node_modules/bytes/package.json similarity index 100% rename from Docker/node/node_modules/bytes/package.json rename to Container-orchestration/Docker/node/node_modules/bytes/package.json diff --git a/Docker/node/node_modules/content-disposition/HISTORY.md b/Container-orchestration/Docker/node/node_modules/content-disposition/HISTORY.md similarity index 100% rename from Docker/node/node_modules/content-disposition/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/content-disposition/HISTORY.md diff --git a/Docker/node/node_modules/content-disposition/LICENSE b/Container-orchestration/Docker/node/node_modules/content-disposition/LICENSE similarity index 100% rename from Docker/node/node_modules/content-disposition/LICENSE rename to Container-orchestration/Docker/node/node_modules/content-disposition/LICENSE diff --git a/Docker/node/node_modules/content-disposition/README.md b/Container-orchestration/Docker/node/node_modules/content-disposition/README.md similarity index 100% rename from Docker/node/node_modules/content-disposition/README.md rename to Container-orchestration/Docker/node/node_modules/content-disposition/README.md diff --git a/Docker/node/node_modules/content-disposition/index.js b/Container-orchestration/Docker/node/node_modules/content-disposition/index.js similarity index 100% rename from Docker/node/node_modules/content-disposition/index.js rename to Container-orchestration/Docker/node/node_modules/content-disposition/index.js diff --git a/Docker/node/node_modules/content-disposition/package.json b/Container-orchestration/Docker/node/node_modules/content-disposition/package.json similarity index 100% rename from Docker/node/node_modules/content-disposition/package.json rename to Container-orchestration/Docker/node/node_modules/content-disposition/package.json diff --git a/Docker/node/node_modules/content-type/HISTORY.md b/Container-orchestration/Docker/node/node_modules/content-type/HISTORY.md similarity index 100% rename from Docker/node/node_modules/content-type/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/content-type/HISTORY.md diff --git a/Docker/node/node_modules/content-type/LICENSE b/Container-orchestration/Docker/node/node_modules/content-type/LICENSE similarity index 100% rename from Docker/node/node_modules/content-type/LICENSE rename to Container-orchestration/Docker/node/node_modules/content-type/LICENSE diff --git a/Docker/node/node_modules/content-type/README.md b/Container-orchestration/Docker/node/node_modules/content-type/README.md similarity index 100% rename from Docker/node/node_modules/content-type/README.md rename to Container-orchestration/Docker/node/node_modules/content-type/README.md diff --git a/Docker/node/node_modules/content-type/index.js b/Container-orchestration/Docker/node/node_modules/content-type/index.js similarity index 100% rename from Docker/node/node_modules/content-type/index.js rename to Container-orchestration/Docker/node/node_modules/content-type/index.js diff --git a/Docker/node/node_modules/content-type/package.json b/Container-orchestration/Docker/node/node_modules/content-type/package.json similarity index 100% rename from Docker/node/node_modules/content-type/package.json rename to Container-orchestration/Docker/node/node_modules/content-type/package.json diff --git a/Docker/node/node_modules/cookie-signature/.npmignore b/Container-orchestration/Docker/node/node_modules/cookie-signature/.npmignore similarity index 100% rename from Docker/node/node_modules/cookie-signature/.npmignore rename to Container-orchestration/Docker/node/node_modules/cookie-signature/.npmignore diff --git a/Docker/node/node_modules/cookie-signature/History.md b/Container-orchestration/Docker/node/node_modules/cookie-signature/History.md similarity index 100% rename from Docker/node/node_modules/cookie-signature/History.md rename to Container-orchestration/Docker/node/node_modules/cookie-signature/History.md diff --git a/Docker/node/node_modules/cookie-signature/Readme.md b/Container-orchestration/Docker/node/node_modules/cookie-signature/Readme.md similarity index 100% rename from Docker/node/node_modules/cookie-signature/Readme.md rename to Container-orchestration/Docker/node/node_modules/cookie-signature/Readme.md diff --git a/Docker/node/node_modules/cookie-signature/index.js b/Container-orchestration/Docker/node/node_modules/cookie-signature/index.js similarity index 100% rename from Docker/node/node_modules/cookie-signature/index.js rename to Container-orchestration/Docker/node/node_modules/cookie-signature/index.js diff --git a/Docker/node/node_modules/cookie-signature/package.json b/Container-orchestration/Docker/node/node_modules/cookie-signature/package.json similarity index 100% rename from Docker/node/node_modules/cookie-signature/package.json rename to Container-orchestration/Docker/node/node_modules/cookie-signature/package.json diff --git a/Docker/node/node_modules/cookie/HISTORY.md b/Container-orchestration/Docker/node/node_modules/cookie/HISTORY.md similarity index 100% rename from Docker/node/node_modules/cookie/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/cookie/HISTORY.md diff --git a/Docker/node/node_modules/cookie/LICENSE b/Container-orchestration/Docker/node/node_modules/cookie/LICENSE similarity index 100% rename from Docker/node/node_modules/cookie/LICENSE rename to Container-orchestration/Docker/node/node_modules/cookie/LICENSE diff --git a/Docker/node/node_modules/cookie/README.md b/Container-orchestration/Docker/node/node_modules/cookie/README.md similarity index 100% rename from Docker/node/node_modules/cookie/README.md rename to Container-orchestration/Docker/node/node_modules/cookie/README.md diff --git a/Docker/node/node_modules/cookie/index.js b/Container-orchestration/Docker/node/node_modules/cookie/index.js similarity index 100% rename from Docker/node/node_modules/cookie/index.js rename to Container-orchestration/Docker/node/node_modules/cookie/index.js diff --git a/Docker/node/node_modules/cookie/package.json b/Container-orchestration/Docker/node/node_modules/cookie/package.json similarity index 100% rename from Docker/node/node_modules/cookie/package.json rename to Container-orchestration/Docker/node/node_modules/cookie/package.json diff --git a/Docker/node/node_modules/debug/.coveralls.yml b/Container-orchestration/Docker/node/node_modules/debug/.coveralls.yml similarity index 100% rename from Docker/node/node_modules/debug/.coveralls.yml rename to Container-orchestration/Docker/node/node_modules/debug/.coveralls.yml diff --git a/Docker/node/node_modules/debug/.eslintrc b/Container-orchestration/Docker/node/node_modules/debug/.eslintrc similarity index 100% rename from Docker/node/node_modules/debug/.eslintrc rename to Container-orchestration/Docker/node/node_modules/debug/.eslintrc diff --git a/Docker/node/node_modules/debug/.npmignore b/Container-orchestration/Docker/node/node_modules/debug/.npmignore similarity index 100% rename from Docker/node/node_modules/debug/.npmignore rename to Container-orchestration/Docker/node/node_modules/debug/.npmignore diff --git a/Docker/node/node_modules/debug/.travis.yml b/Container-orchestration/Docker/node/node_modules/debug/.travis.yml similarity index 100% rename from Docker/node/node_modules/debug/.travis.yml rename to Container-orchestration/Docker/node/node_modules/debug/.travis.yml diff --git a/Docker/node/node_modules/debug/CHANGELOG.md b/Container-orchestration/Docker/node/node_modules/debug/CHANGELOG.md similarity index 100% rename from Docker/node/node_modules/debug/CHANGELOG.md rename to Container-orchestration/Docker/node/node_modules/debug/CHANGELOG.md diff --git a/Docker/node/node_modules/debug/LICENSE b/Container-orchestration/Docker/node/node_modules/debug/LICENSE similarity index 100% rename from Docker/node/node_modules/debug/LICENSE rename to Container-orchestration/Docker/node/node_modules/debug/LICENSE diff --git a/Docker/node/node_modules/debug/Makefile b/Container-orchestration/Docker/node/node_modules/debug/Makefile similarity index 100% rename from Docker/node/node_modules/debug/Makefile rename to Container-orchestration/Docker/node/node_modules/debug/Makefile diff --git a/Docker/node/node_modules/debug/README.md b/Container-orchestration/Docker/node/node_modules/debug/README.md similarity index 100% rename from Docker/node/node_modules/debug/README.md rename to Container-orchestration/Docker/node/node_modules/debug/README.md diff --git a/Docker/node/node_modules/debug/component.json b/Container-orchestration/Docker/node/node_modules/debug/component.json similarity index 100% rename from Docker/node/node_modules/debug/component.json rename to Container-orchestration/Docker/node/node_modules/debug/component.json diff --git a/Docker/node/node_modules/debug/karma.conf.js b/Container-orchestration/Docker/node/node_modules/debug/karma.conf.js similarity index 100% rename from Docker/node/node_modules/debug/karma.conf.js rename to Container-orchestration/Docker/node/node_modules/debug/karma.conf.js diff --git a/Docker/node/node_modules/debug/node.js b/Container-orchestration/Docker/node/node_modules/debug/node.js similarity index 100% rename from Docker/node/node_modules/debug/node.js rename to Container-orchestration/Docker/node/node_modules/debug/node.js diff --git a/Docker/node/node_modules/debug/package.json b/Container-orchestration/Docker/node/node_modules/debug/package.json similarity index 100% rename from Docker/node/node_modules/debug/package.json rename to Container-orchestration/Docker/node/node_modules/debug/package.json diff --git a/Docker/node/node_modules/debug/src/browser.js b/Container-orchestration/Docker/node/node_modules/debug/src/browser.js similarity index 100% rename from Docker/node/node_modules/debug/src/browser.js rename to Container-orchestration/Docker/node/node_modules/debug/src/browser.js diff --git a/Docker/node/node_modules/debug/src/debug.js b/Container-orchestration/Docker/node/node_modules/debug/src/debug.js similarity index 100% rename from Docker/node/node_modules/debug/src/debug.js rename to Container-orchestration/Docker/node/node_modules/debug/src/debug.js diff --git a/Docker/node/node_modules/debug/src/index.js b/Container-orchestration/Docker/node/node_modules/debug/src/index.js similarity index 100% rename from Docker/node/node_modules/debug/src/index.js rename to Container-orchestration/Docker/node/node_modules/debug/src/index.js diff --git a/Docker/node/node_modules/debug/src/inspector-log.js b/Container-orchestration/Docker/node/node_modules/debug/src/inspector-log.js similarity index 100% rename from Docker/node/node_modules/debug/src/inspector-log.js rename to Container-orchestration/Docker/node/node_modules/debug/src/inspector-log.js diff --git a/Docker/node/node_modules/debug/src/node.js b/Container-orchestration/Docker/node/node_modules/debug/src/node.js similarity index 100% rename from Docker/node/node_modules/debug/src/node.js rename to Container-orchestration/Docker/node/node_modules/debug/src/node.js diff --git a/Docker/node/node_modules/depd/History.md b/Container-orchestration/Docker/node/node_modules/depd/History.md similarity index 100% rename from Docker/node/node_modules/depd/History.md rename to Container-orchestration/Docker/node/node_modules/depd/History.md diff --git a/Docker/node/node_modules/depd/LICENSE b/Container-orchestration/Docker/node/node_modules/depd/LICENSE similarity index 100% rename from Docker/node/node_modules/depd/LICENSE rename to Container-orchestration/Docker/node/node_modules/depd/LICENSE diff --git a/Docker/node/node_modules/depd/Readme.md b/Container-orchestration/Docker/node/node_modules/depd/Readme.md similarity index 100% rename from Docker/node/node_modules/depd/Readme.md rename to Container-orchestration/Docker/node/node_modules/depd/Readme.md diff --git a/Docker/node/node_modules/depd/index.js b/Container-orchestration/Docker/node/node_modules/depd/index.js similarity index 100% rename from Docker/node/node_modules/depd/index.js rename to Container-orchestration/Docker/node/node_modules/depd/index.js diff --git a/Docker/node/node_modules/depd/lib/browser/index.js b/Container-orchestration/Docker/node/node_modules/depd/lib/browser/index.js similarity index 100% rename from Docker/node/node_modules/depd/lib/browser/index.js rename to Container-orchestration/Docker/node/node_modules/depd/lib/browser/index.js diff --git a/Docker/node/node_modules/depd/lib/compat/callsite-tostring.js b/Container-orchestration/Docker/node/node_modules/depd/lib/compat/callsite-tostring.js similarity index 100% rename from Docker/node/node_modules/depd/lib/compat/callsite-tostring.js rename to Container-orchestration/Docker/node/node_modules/depd/lib/compat/callsite-tostring.js diff --git a/Docker/node/node_modules/depd/lib/compat/event-listener-count.js b/Container-orchestration/Docker/node/node_modules/depd/lib/compat/event-listener-count.js similarity index 100% rename from Docker/node/node_modules/depd/lib/compat/event-listener-count.js rename to Container-orchestration/Docker/node/node_modules/depd/lib/compat/event-listener-count.js diff --git a/Docker/node/node_modules/depd/lib/compat/index.js b/Container-orchestration/Docker/node/node_modules/depd/lib/compat/index.js similarity index 100% rename from Docker/node/node_modules/depd/lib/compat/index.js rename to Container-orchestration/Docker/node/node_modules/depd/lib/compat/index.js diff --git a/Docker/node/node_modules/depd/package.json b/Container-orchestration/Docker/node/node_modules/depd/package.json similarity index 100% rename from Docker/node/node_modules/depd/package.json rename to Container-orchestration/Docker/node/node_modules/depd/package.json diff --git a/Docker/node/node_modules/destroy/LICENSE b/Container-orchestration/Docker/node/node_modules/destroy/LICENSE similarity index 100% rename from Docker/node/node_modules/destroy/LICENSE rename to Container-orchestration/Docker/node/node_modules/destroy/LICENSE diff --git a/Docker/node/node_modules/destroy/README.md b/Container-orchestration/Docker/node/node_modules/destroy/README.md similarity index 100% rename from Docker/node/node_modules/destroy/README.md rename to Container-orchestration/Docker/node/node_modules/destroy/README.md diff --git a/Docker/node/node_modules/destroy/index.js b/Container-orchestration/Docker/node/node_modules/destroy/index.js similarity index 100% rename from Docker/node/node_modules/destroy/index.js rename to Container-orchestration/Docker/node/node_modules/destroy/index.js diff --git a/Docker/node/node_modules/destroy/package.json b/Container-orchestration/Docker/node/node_modules/destroy/package.json similarity index 100% rename from Docker/node/node_modules/destroy/package.json rename to Container-orchestration/Docker/node/node_modules/destroy/package.json diff --git a/Docker/node/node_modules/ee-first/LICENSE b/Container-orchestration/Docker/node/node_modules/ee-first/LICENSE similarity index 100% rename from Docker/node/node_modules/ee-first/LICENSE rename to Container-orchestration/Docker/node/node_modules/ee-first/LICENSE diff --git a/Docker/node/node_modules/ee-first/README.md b/Container-orchestration/Docker/node/node_modules/ee-first/README.md similarity index 100% rename from Docker/node/node_modules/ee-first/README.md rename to Container-orchestration/Docker/node/node_modules/ee-first/README.md diff --git a/Docker/node/node_modules/ee-first/index.js b/Container-orchestration/Docker/node/node_modules/ee-first/index.js similarity index 100% rename from Docker/node/node_modules/ee-first/index.js rename to Container-orchestration/Docker/node/node_modules/ee-first/index.js diff --git a/Docker/node/node_modules/ee-first/package.json b/Container-orchestration/Docker/node/node_modules/ee-first/package.json similarity index 100% rename from Docker/node/node_modules/ee-first/package.json rename to Container-orchestration/Docker/node/node_modules/ee-first/package.json diff --git a/Docker/node/node_modules/encodeurl/HISTORY.md b/Container-orchestration/Docker/node/node_modules/encodeurl/HISTORY.md similarity index 100% rename from Docker/node/node_modules/encodeurl/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/encodeurl/HISTORY.md diff --git a/Docker/node/node_modules/encodeurl/LICENSE b/Container-orchestration/Docker/node/node_modules/encodeurl/LICENSE similarity index 100% rename from Docker/node/node_modules/encodeurl/LICENSE rename to Container-orchestration/Docker/node/node_modules/encodeurl/LICENSE diff --git a/Docker/node/node_modules/encodeurl/README.md b/Container-orchestration/Docker/node/node_modules/encodeurl/README.md similarity index 100% rename from Docker/node/node_modules/encodeurl/README.md rename to Container-orchestration/Docker/node/node_modules/encodeurl/README.md diff --git a/Docker/node/node_modules/encodeurl/index.js b/Container-orchestration/Docker/node/node_modules/encodeurl/index.js similarity index 100% rename from Docker/node/node_modules/encodeurl/index.js rename to Container-orchestration/Docker/node/node_modules/encodeurl/index.js diff --git a/Docker/node/node_modules/encodeurl/package.json b/Container-orchestration/Docker/node/node_modules/encodeurl/package.json similarity index 100% rename from Docker/node/node_modules/encodeurl/package.json rename to Container-orchestration/Docker/node/node_modules/encodeurl/package.json diff --git a/Docker/node/node_modules/escape-html/LICENSE b/Container-orchestration/Docker/node/node_modules/escape-html/LICENSE similarity index 100% rename from Docker/node/node_modules/escape-html/LICENSE rename to Container-orchestration/Docker/node/node_modules/escape-html/LICENSE diff --git a/Docker/node/node_modules/escape-html/Readme.md b/Container-orchestration/Docker/node/node_modules/escape-html/Readme.md similarity index 100% rename from Docker/node/node_modules/escape-html/Readme.md rename to Container-orchestration/Docker/node/node_modules/escape-html/Readme.md diff --git a/Docker/node/node_modules/escape-html/index.js b/Container-orchestration/Docker/node/node_modules/escape-html/index.js similarity index 100% rename from Docker/node/node_modules/escape-html/index.js rename to Container-orchestration/Docker/node/node_modules/escape-html/index.js diff --git a/Docker/node/node_modules/escape-html/package.json b/Container-orchestration/Docker/node/node_modules/escape-html/package.json similarity index 100% rename from Docker/node/node_modules/escape-html/package.json rename to Container-orchestration/Docker/node/node_modules/escape-html/package.json diff --git a/Docker/node/node_modules/etag/HISTORY.md b/Container-orchestration/Docker/node/node_modules/etag/HISTORY.md similarity index 100% rename from Docker/node/node_modules/etag/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/etag/HISTORY.md diff --git a/Docker/node/node_modules/etag/LICENSE b/Container-orchestration/Docker/node/node_modules/etag/LICENSE similarity index 100% rename from Docker/node/node_modules/etag/LICENSE rename to Container-orchestration/Docker/node/node_modules/etag/LICENSE diff --git a/Docker/node/node_modules/etag/README.md b/Container-orchestration/Docker/node/node_modules/etag/README.md similarity index 100% rename from Docker/node/node_modules/etag/README.md rename to Container-orchestration/Docker/node/node_modules/etag/README.md diff --git a/Docker/node/node_modules/etag/index.js b/Container-orchestration/Docker/node/node_modules/etag/index.js similarity index 100% rename from Docker/node/node_modules/etag/index.js rename to Container-orchestration/Docker/node/node_modules/etag/index.js diff --git a/Docker/node/node_modules/etag/package.json b/Container-orchestration/Docker/node/node_modules/etag/package.json similarity index 100% rename from Docker/node/node_modules/etag/package.json rename to Container-orchestration/Docker/node/node_modules/etag/package.json diff --git a/Docker/node/node_modules/express/History.md b/Container-orchestration/Docker/node/node_modules/express/History.md similarity index 100% rename from Docker/node/node_modules/express/History.md rename to Container-orchestration/Docker/node/node_modules/express/History.md diff --git a/Docker/node/node_modules/express/LICENSE b/Container-orchestration/Docker/node/node_modules/express/LICENSE similarity index 100% rename from Docker/node/node_modules/express/LICENSE rename to Container-orchestration/Docker/node/node_modules/express/LICENSE diff --git a/Docker/node/node_modules/express/Readme.md b/Container-orchestration/Docker/node/node_modules/express/Readme.md similarity index 100% rename from Docker/node/node_modules/express/Readme.md rename to Container-orchestration/Docker/node/node_modules/express/Readme.md diff --git a/Docker/node/node_modules/express/index.js b/Container-orchestration/Docker/node/node_modules/express/index.js similarity index 100% rename from Docker/node/node_modules/express/index.js rename to Container-orchestration/Docker/node/node_modules/express/index.js diff --git a/Docker/node/node_modules/express/lib/application.js b/Container-orchestration/Docker/node/node_modules/express/lib/application.js similarity index 100% rename from Docker/node/node_modules/express/lib/application.js rename to Container-orchestration/Docker/node/node_modules/express/lib/application.js diff --git a/Docker/node/node_modules/express/lib/express.js b/Container-orchestration/Docker/node/node_modules/express/lib/express.js similarity index 100% rename from Docker/node/node_modules/express/lib/express.js rename to Container-orchestration/Docker/node/node_modules/express/lib/express.js diff --git a/Docker/node/node_modules/express/lib/middleware/init.js b/Container-orchestration/Docker/node/node_modules/express/lib/middleware/init.js similarity index 100% rename from Docker/node/node_modules/express/lib/middleware/init.js rename to Container-orchestration/Docker/node/node_modules/express/lib/middleware/init.js diff --git a/Docker/node/node_modules/express/lib/middleware/query.js b/Container-orchestration/Docker/node/node_modules/express/lib/middleware/query.js similarity index 100% rename from Docker/node/node_modules/express/lib/middleware/query.js rename to Container-orchestration/Docker/node/node_modules/express/lib/middleware/query.js diff --git a/Docker/node/node_modules/express/lib/request.js b/Container-orchestration/Docker/node/node_modules/express/lib/request.js similarity index 100% rename from Docker/node/node_modules/express/lib/request.js rename to Container-orchestration/Docker/node/node_modules/express/lib/request.js diff --git a/Docker/node/node_modules/express/lib/response.js b/Container-orchestration/Docker/node/node_modules/express/lib/response.js similarity index 100% rename from Docker/node/node_modules/express/lib/response.js rename to Container-orchestration/Docker/node/node_modules/express/lib/response.js diff --git a/Docker/node/node_modules/express/lib/router/index.js b/Container-orchestration/Docker/node/node_modules/express/lib/router/index.js similarity index 100% rename from Docker/node/node_modules/express/lib/router/index.js rename to Container-orchestration/Docker/node/node_modules/express/lib/router/index.js diff --git a/Docker/node/node_modules/express/lib/router/layer.js b/Container-orchestration/Docker/node/node_modules/express/lib/router/layer.js similarity index 100% rename from Docker/node/node_modules/express/lib/router/layer.js rename to Container-orchestration/Docker/node/node_modules/express/lib/router/layer.js diff --git a/Docker/node/node_modules/express/lib/router/route.js b/Container-orchestration/Docker/node/node_modules/express/lib/router/route.js similarity index 100% rename from Docker/node/node_modules/express/lib/router/route.js rename to Container-orchestration/Docker/node/node_modules/express/lib/router/route.js diff --git a/Docker/node/node_modules/express/lib/utils.js b/Container-orchestration/Docker/node/node_modules/express/lib/utils.js similarity index 100% rename from Docker/node/node_modules/express/lib/utils.js rename to Container-orchestration/Docker/node/node_modules/express/lib/utils.js diff --git a/Docker/node/node_modules/express/lib/view.js b/Container-orchestration/Docker/node/node_modules/express/lib/view.js similarity index 100% rename from Docker/node/node_modules/express/lib/view.js rename to Container-orchestration/Docker/node/node_modules/express/lib/view.js diff --git a/Docker/node/node_modules/express/package.json b/Container-orchestration/Docker/node/node_modules/express/package.json similarity index 100% rename from Docker/node/node_modules/express/package.json rename to Container-orchestration/Docker/node/node_modules/express/package.json diff --git a/Docker/node/node_modules/finalhandler/HISTORY.md b/Container-orchestration/Docker/node/node_modules/finalhandler/HISTORY.md similarity index 100% rename from Docker/node/node_modules/finalhandler/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/finalhandler/HISTORY.md diff --git a/Docker/node/node_modules/finalhandler/LICENSE b/Container-orchestration/Docker/node/node_modules/finalhandler/LICENSE similarity index 100% rename from Docker/node/node_modules/finalhandler/LICENSE rename to Container-orchestration/Docker/node/node_modules/finalhandler/LICENSE diff --git a/Docker/node/node_modules/finalhandler/README.md b/Container-orchestration/Docker/node/node_modules/finalhandler/README.md similarity index 100% rename from Docker/node/node_modules/finalhandler/README.md rename to Container-orchestration/Docker/node/node_modules/finalhandler/README.md diff --git a/Docker/node/node_modules/finalhandler/index.js b/Container-orchestration/Docker/node/node_modules/finalhandler/index.js similarity index 100% rename from Docker/node/node_modules/finalhandler/index.js rename to Container-orchestration/Docker/node/node_modules/finalhandler/index.js diff --git a/Docker/node/node_modules/finalhandler/package.json b/Container-orchestration/Docker/node/node_modules/finalhandler/package.json similarity index 100% rename from Docker/node/node_modules/finalhandler/package.json rename to Container-orchestration/Docker/node/node_modules/finalhandler/package.json diff --git a/Docker/node/node_modules/forwarded/HISTORY.md b/Container-orchestration/Docker/node/node_modules/forwarded/HISTORY.md similarity index 100% rename from Docker/node/node_modules/forwarded/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/forwarded/HISTORY.md diff --git a/Docker/node/node_modules/forwarded/LICENSE b/Container-orchestration/Docker/node/node_modules/forwarded/LICENSE similarity index 100% rename from Docker/node/node_modules/forwarded/LICENSE rename to Container-orchestration/Docker/node/node_modules/forwarded/LICENSE diff --git a/Docker/node/node_modules/forwarded/README.md b/Container-orchestration/Docker/node/node_modules/forwarded/README.md similarity index 100% rename from Docker/node/node_modules/forwarded/README.md rename to Container-orchestration/Docker/node/node_modules/forwarded/README.md diff --git a/Docker/node/node_modules/forwarded/index.js b/Container-orchestration/Docker/node/node_modules/forwarded/index.js similarity index 100% rename from Docker/node/node_modules/forwarded/index.js rename to Container-orchestration/Docker/node/node_modules/forwarded/index.js diff --git a/Docker/node/node_modules/forwarded/package.json b/Container-orchestration/Docker/node/node_modules/forwarded/package.json similarity index 100% rename from Docker/node/node_modules/forwarded/package.json rename to Container-orchestration/Docker/node/node_modules/forwarded/package.json diff --git a/Docker/node/node_modules/fresh/HISTORY.md b/Container-orchestration/Docker/node/node_modules/fresh/HISTORY.md similarity index 100% rename from Docker/node/node_modules/fresh/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/fresh/HISTORY.md diff --git a/Docker/node/node_modules/fresh/LICENSE b/Container-orchestration/Docker/node/node_modules/fresh/LICENSE similarity index 100% rename from Docker/node/node_modules/fresh/LICENSE rename to Container-orchestration/Docker/node/node_modules/fresh/LICENSE diff --git a/Docker/node/node_modules/fresh/README.md b/Container-orchestration/Docker/node/node_modules/fresh/README.md similarity index 100% rename from Docker/node/node_modules/fresh/README.md rename to Container-orchestration/Docker/node/node_modules/fresh/README.md diff --git a/Docker/node/node_modules/fresh/index.js b/Container-orchestration/Docker/node/node_modules/fresh/index.js similarity index 100% rename from Docker/node/node_modules/fresh/index.js rename to Container-orchestration/Docker/node/node_modules/fresh/index.js diff --git a/Docker/node/node_modules/fresh/package.json b/Container-orchestration/Docker/node/node_modules/fresh/package.json similarity index 100% rename from Docker/node/node_modules/fresh/package.json rename to Container-orchestration/Docker/node/node_modules/fresh/package.json diff --git a/Docker/node/node_modules/http-errors/HISTORY.md b/Container-orchestration/Docker/node/node_modules/http-errors/HISTORY.md similarity index 100% rename from Docker/node/node_modules/http-errors/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/http-errors/HISTORY.md diff --git a/Docker/node/node_modules/http-errors/LICENSE b/Container-orchestration/Docker/node/node_modules/http-errors/LICENSE similarity index 100% rename from Docker/node/node_modules/http-errors/LICENSE rename to Container-orchestration/Docker/node/node_modules/http-errors/LICENSE diff --git a/Docker/node/node_modules/http-errors/README.md b/Container-orchestration/Docker/node/node_modules/http-errors/README.md similarity index 100% rename from Docker/node/node_modules/http-errors/README.md rename to Container-orchestration/Docker/node/node_modules/http-errors/README.md diff --git a/Docker/node/node_modules/http-errors/index.js b/Container-orchestration/Docker/node/node_modules/http-errors/index.js similarity index 100% rename from Docker/node/node_modules/http-errors/index.js rename to Container-orchestration/Docker/node/node_modules/http-errors/index.js diff --git a/Docker/node/node_modules/http-errors/package.json b/Container-orchestration/Docker/node/node_modules/http-errors/package.json similarity index 100% rename from Docker/node/node_modules/http-errors/package.json rename to Container-orchestration/Docker/node/node_modules/http-errors/package.json diff --git a/Docker/node/node_modules/iconv-lite/Changelog.md b/Container-orchestration/Docker/node/node_modules/iconv-lite/Changelog.md similarity index 100% rename from Docker/node/node_modules/iconv-lite/Changelog.md rename to Container-orchestration/Docker/node/node_modules/iconv-lite/Changelog.md diff --git a/Docker/node/node_modules/iconv-lite/LICENSE b/Container-orchestration/Docker/node/node_modules/iconv-lite/LICENSE similarity index 100% rename from Docker/node/node_modules/iconv-lite/LICENSE rename to Container-orchestration/Docker/node/node_modules/iconv-lite/LICENSE diff --git a/Docker/node/node_modules/iconv-lite/README.md b/Container-orchestration/Docker/node/node_modules/iconv-lite/README.md similarity index 100% rename from Docker/node/node_modules/iconv-lite/README.md rename to Container-orchestration/Docker/node/node_modules/iconv-lite/README.md diff --git a/Docker/node/node_modules/iconv-lite/encodings/dbcs-codec.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/dbcs-codec.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/dbcs-codec.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/dbcs-codec.js diff --git a/Docker/node/node_modules/iconv-lite/encodings/dbcs-data.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/dbcs-data.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/dbcs-data.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/dbcs-data.js diff --git a/Docker/node/node_modules/iconv-lite/encodings/index.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/index.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/index.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/index.js diff --git a/Docker/node/node_modules/iconv-lite/encodings/internal.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/internal.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/internal.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/internal.js diff --git a/Docker/node/node_modules/iconv-lite/encodings/sbcs-codec.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/sbcs-codec.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/sbcs-codec.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/sbcs-codec.js diff --git a/Docker/node/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/sbcs-data-generated.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/sbcs-data-generated.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/sbcs-data-generated.js diff --git a/Docker/node/node_modules/iconv-lite/encodings/sbcs-data.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/sbcs-data.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/sbcs-data.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/sbcs-data.js diff --git a/Docker/node/node_modules/iconv-lite/encodings/tables/big5-added.json b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/big5-added.json similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/tables/big5-added.json rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/big5-added.json diff --git a/Docker/node/node_modules/iconv-lite/encodings/tables/cp936.json b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/cp936.json similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/tables/cp936.json rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/cp936.json diff --git a/Docker/node/node_modules/iconv-lite/encodings/tables/cp949.json b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/cp949.json similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/tables/cp949.json rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/cp949.json diff --git a/Docker/node/node_modules/iconv-lite/encodings/tables/cp950.json b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/cp950.json similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/tables/cp950.json rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/cp950.json diff --git a/Docker/node/node_modules/iconv-lite/encodings/tables/eucjp.json b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/eucjp.json similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/tables/eucjp.json rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/eucjp.json diff --git a/Docker/node/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json diff --git a/Docker/node/node_modules/iconv-lite/encodings/tables/gbk-added.json b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/gbk-added.json similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/tables/gbk-added.json rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/gbk-added.json diff --git a/Docker/node/node_modules/iconv-lite/encodings/tables/shiftjis.json b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/shiftjis.json similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/tables/shiftjis.json rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/tables/shiftjis.json diff --git a/Docker/node/node_modules/iconv-lite/encodings/utf16.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/utf16.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/utf16.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/utf16.js diff --git a/Docker/node/node_modules/iconv-lite/encodings/utf7.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/utf7.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/encodings/utf7.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/encodings/utf7.js diff --git a/Docker/node/node_modules/iconv-lite/lib/bom-handling.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/lib/bom-handling.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/lib/bom-handling.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/lib/bom-handling.js diff --git a/Docker/node/node_modules/iconv-lite/lib/extend-node.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/lib/extend-node.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/lib/extend-node.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/lib/extend-node.js diff --git a/Docker/node/node_modules/iconv-lite/lib/index.d.ts b/Container-orchestration/Docker/node/node_modules/iconv-lite/lib/index.d.ts similarity index 100% rename from Docker/node/node_modules/iconv-lite/lib/index.d.ts rename to Container-orchestration/Docker/node/node_modules/iconv-lite/lib/index.d.ts diff --git a/Docker/node/node_modules/iconv-lite/lib/index.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/lib/index.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/lib/index.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/lib/index.js diff --git a/Docker/node/node_modules/iconv-lite/lib/streams.js b/Container-orchestration/Docker/node/node_modules/iconv-lite/lib/streams.js similarity index 100% rename from Docker/node/node_modules/iconv-lite/lib/streams.js rename to Container-orchestration/Docker/node/node_modules/iconv-lite/lib/streams.js diff --git a/Docker/node/node_modules/iconv-lite/package.json b/Container-orchestration/Docker/node/node_modules/iconv-lite/package.json similarity index 100% rename from Docker/node/node_modules/iconv-lite/package.json rename to Container-orchestration/Docker/node/node_modules/iconv-lite/package.json diff --git a/Docker/node/node_modules/inherits/LICENSE b/Container-orchestration/Docker/node/node_modules/inherits/LICENSE similarity index 100% rename from Docker/node/node_modules/inherits/LICENSE rename to Container-orchestration/Docker/node/node_modules/inherits/LICENSE diff --git a/Docker/node/node_modules/inherits/README.md b/Container-orchestration/Docker/node/node_modules/inherits/README.md similarity index 100% rename from Docker/node/node_modules/inherits/README.md rename to Container-orchestration/Docker/node/node_modules/inherits/README.md diff --git a/Docker/node/node_modules/inherits/inherits.js b/Container-orchestration/Docker/node/node_modules/inherits/inherits.js similarity index 100% rename from Docker/node/node_modules/inherits/inherits.js rename to Container-orchestration/Docker/node/node_modules/inherits/inherits.js diff --git a/Docker/node/node_modules/inherits/inherits_browser.js b/Container-orchestration/Docker/node/node_modules/inherits/inherits_browser.js similarity index 100% rename from Docker/node/node_modules/inherits/inherits_browser.js rename to Container-orchestration/Docker/node/node_modules/inherits/inherits_browser.js diff --git a/Docker/node/node_modules/inherits/package.json b/Container-orchestration/Docker/node/node_modules/inherits/package.json similarity index 100% rename from Docker/node/node_modules/inherits/package.json rename to Container-orchestration/Docker/node/node_modules/inherits/package.json diff --git a/Docker/node/node_modules/ipaddr.js/LICENSE b/Container-orchestration/Docker/node/node_modules/ipaddr.js/LICENSE similarity index 100% rename from Docker/node/node_modules/ipaddr.js/LICENSE rename to Container-orchestration/Docker/node/node_modules/ipaddr.js/LICENSE diff --git a/Docker/node/node_modules/ipaddr.js/README.md b/Container-orchestration/Docker/node/node_modules/ipaddr.js/README.md similarity index 100% rename from Docker/node/node_modules/ipaddr.js/README.md rename to Container-orchestration/Docker/node/node_modules/ipaddr.js/README.md diff --git a/Docker/node/node_modules/ipaddr.js/ipaddr.min.js b/Container-orchestration/Docker/node/node_modules/ipaddr.js/ipaddr.min.js similarity index 100% rename from Docker/node/node_modules/ipaddr.js/ipaddr.min.js rename to Container-orchestration/Docker/node/node_modules/ipaddr.js/ipaddr.min.js diff --git a/Docker/node/node_modules/ipaddr.js/lib/ipaddr.js b/Container-orchestration/Docker/node/node_modules/ipaddr.js/lib/ipaddr.js similarity index 100% rename from Docker/node/node_modules/ipaddr.js/lib/ipaddr.js rename to Container-orchestration/Docker/node/node_modules/ipaddr.js/lib/ipaddr.js diff --git a/Docker/node/node_modules/ipaddr.js/lib/ipaddr.js.d.ts b/Container-orchestration/Docker/node/node_modules/ipaddr.js/lib/ipaddr.js.d.ts similarity index 100% rename from Docker/node/node_modules/ipaddr.js/lib/ipaddr.js.d.ts rename to Container-orchestration/Docker/node/node_modules/ipaddr.js/lib/ipaddr.js.d.ts diff --git a/Docker/node/node_modules/ipaddr.js/package.json b/Container-orchestration/Docker/node/node_modules/ipaddr.js/package.json similarity index 100% rename from Docker/node/node_modules/ipaddr.js/package.json rename to Container-orchestration/Docker/node/node_modules/ipaddr.js/package.json diff --git a/Docker/node/node_modules/media-typer/HISTORY.md b/Container-orchestration/Docker/node/node_modules/media-typer/HISTORY.md similarity index 100% rename from Docker/node/node_modules/media-typer/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/media-typer/HISTORY.md diff --git a/Docker/node/node_modules/media-typer/LICENSE b/Container-orchestration/Docker/node/node_modules/media-typer/LICENSE similarity index 100% rename from Docker/node/node_modules/media-typer/LICENSE rename to Container-orchestration/Docker/node/node_modules/media-typer/LICENSE diff --git a/Docker/node/node_modules/media-typer/README.md b/Container-orchestration/Docker/node/node_modules/media-typer/README.md similarity index 100% rename from Docker/node/node_modules/media-typer/README.md rename to Container-orchestration/Docker/node/node_modules/media-typer/README.md diff --git a/Docker/node/node_modules/media-typer/index.js b/Container-orchestration/Docker/node/node_modules/media-typer/index.js similarity index 100% rename from Docker/node/node_modules/media-typer/index.js rename to Container-orchestration/Docker/node/node_modules/media-typer/index.js diff --git a/Docker/node/node_modules/media-typer/package.json b/Container-orchestration/Docker/node/node_modules/media-typer/package.json similarity index 100% rename from Docker/node/node_modules/media-typer/package.json rename to Container-orchestration/Docker/node/node_modules/media-typer/package.json diff --git a/Docker/node/node_modules/merge-descriptors/HISTORY.md b/Container-orchestration/Docker/node/node_modules/merge-descriptors/HISTORY.md similarity index 100% rename from Docker/node/node_modules/merge-descriptors/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/merge-descriptors/HISTORY.md diff --git a/Docker/node/node_modules/merge-descriptors/LICENSE b/Container-orchestration/Docker/node/node_modules/merge-descriptors/LICENSE similarity index 100% rename from Docker/node/node_modules/merge-descriptors/LICENSE rename to Container-orchestration/Docker/node/node_modules/merge-descriptors/LICENSE diff --git a/Docker/node/node_modules/merge-descriptors/README.md b/Container-orchestration/Docker/node/node_modules/merge-descriptors/README.md similarity index 100% rename from Docker/node/node_modules/merge-descriptors/README.md rename to Container-orchestration/Docker/node/node_modules/merge-descriptors/README.md diff --git a/Docker/node/node_modules/merge-descriptors/index.js b/Container-orchestration/Docker/node/node_modules/merge-descriptors/index.js similarity index 100% rename from Docker/node/node_modules/merge-descriptors/index.js rename to Container-orchestration/Docker/node/node_modules/merge-descriptors/index.js diff --git a/Docker/node/node_modules/merge-descriptors/package.json b/Container-orchestration/Docker/node/node_modules/merge-descriptors/package.json similarity index 100% rename from Docker/node/node_modules/merge-descriptors/package.json rename to Container-orchestration/Docker/node/node_modules/merge-descriptors/package.json diff --git a/Docker/node/node_modules/methods/HISTORY.md b/Container-orchestration/Docker/node/node_modules/methods/HISTORY.md similarity index 100% rename from Docker/node/node_modules/methods/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/methods/HISTORY.md diff --git a/Docker/node/node_modules/methods/LICENSE b/Container-orchestration/Docker/node/node_modules/methods/LICENSE similarity index 100% rename from Docker/node/node_modules/methods/LICENSE rename to Container-orchestration/Docker/node/node_modules/methods/LICENSE diff --git a/Docker/node/node_modules/methods/README.md b/Container-orchestration/Docker/node/node_modules/methods/README.md similarity index 100% rename from Docker/node/node_modules/methods/README.md rename to Container-orchestration/Docker/node/node_modules/methods/README.md diff --git a/Docker/node/node_modules/methods/index.js b/Container-orchestration/Docker/node/node_modules/methods/index.js similarity index 100% rename from Docker/node/node_modules/methods/index.js rename to Container-orchestration/Docker/node/node_modules/methods/index.js diff --git a/Docker/node/node_modules/methods/package.json b/Container-orchestration/Docker/node/node_modules/methods/package.json similarity index 100% rename from Docker/node/node_modules/methods/package.json rename to Container-orchestration/Docker/node/node_modules/methods/package.json diff --git a/Docker/node/node_modules/mime-db/HISTORY.md b/Container-orchestration/Docker/node/node_modules/mime-db/HISTORY.md similarity index 100% rename from Docker/node/node_modules/mime-db/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/mime-db/HISTORY.md diff --git a/Docker/node/node_modules/mime-db/LICENSE b/Container-orchestration/Docker/node/node_modules/mime-db/LICENSE similarity index 100% rename from Docker/node/node_modules/mime-db/LICENSE rename to Container-orchestration/Docker/node/node_modules/mime-db/LICENSE diff --git a/Docker/node/node_modules/mime-db/README.md b/Container-orchestration/Docker/node/node_modules/mime-db/README.md similarity index 100% rename from Docker/node/node_modules/mime-db/README.md rename to Container-orchestration/Docker/node/node_modules/mime-db/README.md diff --git a/Docker/node/node_modules/mime-db/db.json b/Container-orchestration/Docker/node/node_modules/mime-db/db.json similarity index 100% rename from Docker/node/node_modules/mime-db/db.json rename to Container-orchestration/Docker/node/node_modules/mime-db/db.json diff --git a/Docker/node/node_modules/mime-db/index.js b/Container-orchestration/Docker/node/node_modules/mime-db/index.js similarity index 100% rename from Docker/node/node_modules/mime-db/index.js rename to Container-orchestration/Docker/node/node_modules/mime-db/index.js diff --git a/Docker/node/node_modules/mime-db/package.json b/Container-orchestration/Docker/node/node_modules/mime-db/package.json similarity index 100% rename from Docker/node/node_modules/mime-db/package.json rename to Container-orchestration/Docker/node/node_modules/mime-db/package.json diff --git a/Docker/node/node_modules/mime-types/HISTORY.md b/Container-orchestration/Docker/node/node_modules/mime-types/HISTORY.md similarity index 100% rename from Docker/node/node_modules/mime-types/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/mime-types/HISTORY.md diff --git a/Docker/node/node_modules/mime-types/LICENSE b/Container-orchestration/Docker/node/node_modules/mime-types/LICENSE similarity index 100% rename from Docker/node/node_modules/mime-types/LICENSE rename to Container-orchestration/Docker/node/node_modules/mime-types/LICENSE diff --git a/Docker/node/node_modules/mime-types/README.md b/Container-orchestration/Docker/node/node_modules/mime-types/README.md similarity index 100% rename from Docker/node/node_modules/mime-types/README.md rename to Container-orchestration/Docker/node/node_modules/mime-types/README.md diff --git a/Docker/node/node_modules/mime-types/index.js b/Container-orchestration/Docker/node/node_modules/mime-types/index.js similarity index 100% rename from Docker/node/node_modules/mime-types/index.js rename to Container-orchestration/Docker/node/node_modules/mime-types/index.js diff --git a/Docker/node/node_modules/mime-types/package.json b/Container-orchestration/Docker/node/node_modules/mime-types/package.json similarity index 100% rename from Docker/node/node_modules/mime-types/package.json rename to Container-orchestration/Docker/node/node_modules/mime-types/package.json diff --git a/Docker/node/node_modules/mime/.npmignore b/Container-orchestration/Docker/node/node_modules/mime/.npmignore similarity index 100% rename from Docker/node/node_modules/mime/.npmignore rename to Container-orchestration/Docker/node/node_modules/mime/.npmignore diff --git a/Docker/node/node_modules/mime/CHANGELOG.md b/Container-orchestration/Docker/node/node_modules/mime/CHANGELOG.md similarity index 100% rename from Docker/node/node_modules/mime/CHANGELOG.md rename to Container-orchestration/Docker/node/node_modules/mime/CHANGELOG.md diff --git a/Docker/node/node_modules/mime/LICENSE b/Container-orchestration/Docker/node/node_modules/mime/LICENSE similarity index 100% rename from Docker/node/node_modules/mime/LICENSE rename to Container-orchestration/Docker/node/node_modules/mime/LICENSE diff --git a/Docker/node/node_modules/mime/README.md b/Container-orchestration/Docker/node/node_modules/mime/README.md similarity index 100% rename from Docker/node/node_modules/mime/README.md rename to Container-orchestration/Docker/node/node_modules/mime/README.md diff --git a/Docker/node/node_modules/mime/cli.js b/Container-orchestration/Docker/node/node_modules/mime/cli.js old mode 100755 new mode 100644 similarity index 100% rename from Docker/node/node_modules/mime/cli.js rename to Container-orchestration/Docker/node/node_modules/mime/cli.js diff --git a/Docker/node/node_modules/mime/mime.js b/Container-orchestration/Docker/node/node_modules/mime/mime.js similarity index 100% rename from Docker/node/node_modules/mime/mime.js rename to Container-orchestration/Docker/node/node_modules/mime/mime.js diff --git a/Docker/node/node_modules/mime/package.json b/Container-orchestration/Docker/node/node_modules/mime/package.json similarity index 100% rename from Docker/node/node_modules/mime/package.json rename to Container-orchestration/Docker/node/node_modules/mime/package.json diff --git a/Docker/node/node_modules/mime/src/build.js b/Container-orchestration/Docker/node/node_modules/mime/src/build.js old mode 100755 new mode 100644 similarity index 100% rename from Docker/node/node_modules/mime/src/build.js rename to Container-orchestration/Docker/node/node_modules/mime/src/build.js diff --git a/Docker/node/node_modules/mime/src/test.js b/Container-orchestration/Docker/node/node_modules/mime/src/test.js similarity index 100% rename from Docker/node/node_modules/mime/src/test.js rename to Container-orchestration/Docker/node/node_modules/mime/src/test.js diff --git a/Docker/node/node_modules/mime/types.json b/Container-orchestration/Docker/node/node_modules/mime/types.json similarity index 100% rename from Docker/node/node_modules/mime/types.json rename to Container-orchestration/Docker/node/node_modules/mime/types.json diff --git a/Docker/node/node_modules/ms/index.js b/Container-orchestration/Docker/node/node_modules/ms/index.js similarity index 100% rename from Docker/node/node_modules/ms/index.js rename to Container-orchestration/Docker/node/node_modules/ms/index.js diff --git a/Docker/node/node_modules/ms/license.md b/Container-orchestration/Docker/node/node_modules/ms/license.md similarity index 100% rename from Docker/node/node_modules/ms/license.md rename to Container-orchestration/Docker/node/node_modules/ms/license.md diff --git a/Docker/node/node_modules/ms/package.json b/Container-orchestration/Docker/node/node_modules/ms/package.json similarity index 100% rename from Docker/node/node_modules/ms/package.json rename to Container-orchestration/Docker/node/node_modules/ms/package.json diff --git a/Docker/node/node_modules/ms/readme.md b/Container-orchestration/Docker/node/node_modules/ms/readme.md similarity index 100% rename from Docker/node/node_modules/ms/readme.md rename to Container-orchestration/Docker/node/node_modules/ms/readme.md diff --git a/Docker/node/node_modules/negotiator/HISTORY.md b/Container-orchestration/Docker/node/node_modules/negotiator/HISTORY.md similarity index 100% rename from Docker/node/node_modules/negotiator/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/negotiator/HISTORY.md diff --git a/Docker/node/node_modules/negotiator/LICENSE b/Container-orchestration/Docker/node/node_modules/negotiator/LICENSE similarity index 100% rename from Docker/node/node_modules/negotiator/LICENSE rename to Container-orchestration/Docker/node/node_modules/negotiator/LICENSE diff --git a/Docker/node/node_modules/negotiator/README.md b/Container-orchestration/Docker/node/node_modules/negotiator/README.md similarity index 100% rename from Docker/node/node_modules/negotiator/README.md rename to Container-orchestration/Docker/node/node_modules/negotiator/README.md diff --git a/Docker/node/node_modules/negotiator/index.js b/Container-orchestration/Docker/node/node_modules/negotiator/index.js similarity index 100% rename from Docker/node/node_modules/negotiator/index.js rename to Container-orchestration/Docker/node/node_modules/negotiator/index.js diff --git a/Docker/node/node_modules/negotiator/lib/charset.js b/Container-orchestration/Docker/node/node_modules/negotiator/lib/charset.js similarity index 100% rename from Docker/node/node_modules/negotiator/lib/charset.js rename to Container-orchestration/Docker/node/node_modules/negotiator/lib/charset.js diff --git a/Docker/node/node_modules/negotiator/lib/encoding.js b/Container-orchestration/Docker/node/node_modules/negotiator/lib/encoding.js similarity index 100% rename from Docker/node/node_modules/negotiator/lib/encoding.js rename to Container-orchestration/Docker/node/node_modules/negotiator/lib/encoding.js diff --git a/Docker/node/node_modules/negotiator/lib/language.js b/Container-orchestration/Docker/node/node_modules/negotiator/lib/language.js similarity index 100% rename from Docker/node/node_modules/negotiator/lib/language.js rename to Container-orchestration/Docker/node/node_modules/negotiator/lib/language.js diff --git a/Docker/node/node_modules/negotiator/lib/mediaType.js b/Container-orchestration/Docker/node/node_modules/negotiator/lib/mediaType.js similarity index 100% rename from Docker/node/node_modules/negotiator/lib/mediaType.js rename to Container-orchestration/Docker/node/node_modules/negotiator/lib/mediaType.js diff --git a/Docker/node/node_modules/negotiator/package.json b/Container-orchestration/Docker/node/node_modules/negotiator/package.json similarity index 100% rename from Docker/node/node_modules/negotiator/package.json rename to Container-orchestration/Docker/node/node_modules/negotiator/package.json diff --git a/Docker/node/node_modules/on-finished/HISTORY.md b/Container-orchestration/Docker/node/node_modules/on-finished/HISTORY.md similarity index 100% rename from Docker/node/node_modules/on-finished/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/on-finished/HISTORY.md diff --git a/Docker/node/node_modules/on-finished/LICENSE b/Container-orchestration/Docker/node/node_modules/on-finished/LICENSE similarity index 100% rename from Docker/node/node_modules/on-finished/LICENSE rename to Container-orchestration/Docker/node/node_modules/on-finished/LICENSE diff --git a/Docker/node/node_modules/on-finished/README.md b/Container-orchestration/Docker/node/node_modules/on-finished/README.md similarity index 100% rename from Docker/node/node_modules/on-finished/README.md rename to Container-orchestration/Docker/node/node_modules/on-finished/README.md diff --git a/Docker/node/node_modules/on-finished/index.js b/Container-orchestration/Docker/node/node_modules/on-finished/index.js similarity index 100% rename from Docker/node/node_modules/on-finished/index.js rename to Container-orchestration/Docker/node/node_modules/on-finished/index.js diff --git a/Docker/node/node_modules/on-finished/package.json b/Container-orchestration/Docker/node/node_modules/on-finished/package.json similarity index 100% rename from Docker/node/node_modules/on-finished/package.json rename to Container-orchestration/Docker/node/node_modules/on-finished/package.json diff --git a/Docker/node/node_modules/parseurl/HISTORY.md b/Container-orchestration/Docker/node/node_modules/parseurl/HISTORY.md similarity index 100% rename from Docker/node/node_modules/parseurl/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/parseurl/HISTORY.md diff --git a/Docker/node/node_modules/parseurl/LICENSE b/Container-orchestration/Docker/node/node_modules/parseurl/LICENSE similarity index 100% rename from Docker/node/node_modules/parseurl/LICENSE rename to Container-orchestration/Docker/node/node_modules/parseurl/LICENSE diff --git a/Docker/node/node_modules/parseurl/README.md b/Container-orchestration/Docker/node/node_modules/parseurl/README.md similarity index 100% rename from Docker/node/node_modules/parseurl/README.md rename to Container-orchestration/Docker/node/node_modules/parseurl/README.md diff --git a/Docker/node/node_modules/parseurl/index.js b/Container-orchestration/Docker/node/node_modules/parseurl/index.js similarity index 100% rename from Docker/node/node_modules/parseurl/index.js rename to Container-orchestration/Docker/node/node_modules/parseurl/index.js diff --git a/Docker/node/node_modules/parseurl/package.json b/Container-orchestration/Docker/node/node_modules/parseurl/package.json similarity index 100% rename from Docker/node/node_modules/parseurl/package.json rename to Container-orchestration/Docker/node/node_modules/parseurl/package.json diff --git a/Docker/node/node_modules/path-to-regexp/History.md b/Container-orchestration/Docker/node/node_modules/path-to-regexp/History.md similarity index 100% rename from Docker/node/node_modules/path-to-regexp/History.md rename to Container-orchestration/Docker/node/node_modules/path-to-regexp/History.md diff --git a/Docker/node/node_modules/path-to-regexp/LICENSE b/Container-orchestration/Docker/node/node_modules/path-to-regexp/LICENSE similarity index 100% rename from Docker/node/node_modules/path-to-regexp/LICENSE rename to Container-orchestration/Docker/node/node_modules/path-to-regexp/LICENSE diff --git a/Docker/node/node_modules/path-to-regexp/Readme.md b/Container-orchestration/Docker/node/node_modules/path-to-regexp/Readme.md similarity index 100% rename from Docker/node/node_modules/path-to-regexp/Readme.md rename to Container-orchestration/Docker/node/node_modules/path-to-regexp/Readme.md diff --git a/Docker/node/node_modules/path-to-regexp/index.js b/Container-orchestration/Docker/node/node_modules/path-to-regexp/index.js similarity index 100% rename from Docker/node/node_modules/path-to-regexp/index.js rename to Container-orchestration/Docker/node/node_modules/path-to-regexp/index.js diff --git a/Docker/node/node_modules/path-to-regexp/package.json b/Container-orchestration/Docker/node/node_modules/path-to-regexp/package.json similarity index 100% rename from Docker/node/node_modules/path-to-regexp/package.json rename to Container-orchestration/Docker/node/node_modules/path-to-regexp/package.json diff --git a/Docker/node/node_modules/proxy-addr/HISTORY.md b/Container-orchestration/Docker/node/node_modules/proxy-addr/HISTORY.md similarity index 100% rename from Docker/node/node_modules/proxy-addr/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/proxy-addr/HISTORY.md diff --git a/Docker/node/node_modules/proxy-addr/LICENSE b/Container-orchestration/Docker/node/node_modules/proxy-addr/LICENSE similarity index 100% rename from Docker/node/node_modules/proxy-addr/LICENSE rename to Container-orchestration/Docker/node/node_modules/proxy-addr/LICENSE diff --git a/Docker/node/node_modules/proxy-addr/README.md b/Container-orchestration/Docker/node/node_modules/proxy-addr/README.md similarity index 100% rename from Docker/node/node_modules/proxy-addr/README.md rename to Container-orchestration/Docker/node/node_modules/proxy-addr/README.md diff --git a/Docker/node/node_modules/proxy-addr/index.js b/Container-orchestration/Docker/node/node_modules/proxy-addr/index.js similarity index 100% rename from Docker/node/node_modules/proxy-addr/index.js rename to Container-orchestration/Docker/node/node_modules/proxy-addr/index.js diff --git a/Docker/node/node_modules/proxy-addr/package.json b/Container-orchestration/Docker/node/node_modules/proxy-addr/package.json similarity index 100% rename from Docker/node/node_modules/proxy-addr/package.json rename to Container-orchestration/Docker/node/node_modules/proxy-addr/package.json diff --git a/Docker/node/node_modules/qs/.editorconfig b/Container-orchestration/Docker/node/node_modules/qs/.editorconfig similarity index 100% rename from Docker/node/node_modules/qs/.editorconfig rename to Container-orchestration/Docker/node/node_modules/qs/.editorconfig diff --git a/Docker/node/node_modules/qs/.eslintignore b/Container-orchestration/Docker/node/node_modules/qs/.eslintignore similarity index 100% rename from Docker/node/node_modules/qs/.eslintignore rename to Container-orchestration/Docker/node/node_modules/qs/.eslintignore diff --git a/Docker/node/node_modules/qs/.eslintrc b/Container-orchestration/Docker/node/node_modules/qs/.eslintrc similarity index 100% rename from Docker/node/node_modules/qs/.eslintrc rename to Container-orchestration/Docker/node/node_modules/qs/.eslintrc diff --git a/Docker/node/node_modules/qs/CHANGELOG.md b/Container-orchestration/Docker/node/node_modules/qs/CHANGELOG.md similarity index 100% rename from Docker/node/node_modules/qs/CHANGELOG.md rename to Container-orchestration/Docker/node/node_modules/qs/CHANGELOG.md diff --git a/Docker/node/node_modules/qs/LICENSE b/Container-orchestration/Docker/node/node_modules/qs/LICENSE similarity index 100% rename from Docker/node/node_modules/qs/LICENSE rename to Container-orchestration/Docker/node/node_modules/qs/LICENSE diff --git a/Docker/node/node_modules/qs/README.md b/Container-orchestration/Docker/node/node_modules/qs/README.md similarity index 100% rename from Docker/node/node_modules/qs/README.md rename to Container-orchestration/Docker/node/node_modules/qs/README.md diff --git a/Docker/node/node_modules/qs/dist/qs.js b/Container-orchestration/Docker/node/node_modules/qs/dist/qs.js similarity index 100% rename from Docker/node/node_modules/qs/dist/qs.js rename to Container-orchestration/Docker/node/node_modules/qs/dist/qs.js diff --git a/Docker/node/node_modules/qs/lib/formats.js b/Container-orchestration/Docker/node/node_modules/qs/lib/formats.js similarity index 100% rename from Docker/node/node_modules/qs/lib/formats.js rename to Container-orchestration/Docker/node/node_modules/qs/lib/formats.js diff --git a/Docker/node/node_modules/qs/lib/index.js b/Container-orchestration/Docker/node/node_modules/qs/lib/index.js similarity index 100% rename from Docker/node/node_modules/qs/lib/index.js rename to Container-orchestration/Docker/node/node_modules/qs/lib/index.js diff --git a/Docker/node/node_modules/qs/lib/parse.js b/Container-orchestration/Docker/node/node_modules/qs/lib/parse.js similarity index 100% rename from Docker/node/node_modules/qs/lib/parse.js rename to Container-orchestration/Docker/node/node_modules/qs/lib/parse.js diff --git a/Docker/node/node_modules/qs/lib/stringify.js b/Container-orchestration/Docker/node/node_modules/qs/lib/stringify.js similarity index 100% rename from Docker/node/node_modules/qs/lib/stringify.js rename to Container-orchestration/Docker/node/node_modules/qs/lib/stringify.js diff --git a/Docker/node/node_modules/qs/lib/utils.js b/Container-orchestration/Docker/node/node_modules/qs/lib/utils.js similarity index 100% rename from Docker/node/node_modules/qs/lib/utils.js rename to Container-orchestration/Docker/node/node_modules/qs/lib/utils.js diff --git a/Docker/node/node_modules/qs/package.json b/Container-orchestration/Docker/node/node_modules/qs/package.json similarity index 100% rename from Docker/node/node_modules/qs/package.json rename to Container-orchestration/Docker/node/node_modules/qs/package.json diff --git a/Docker/node/node_modules/qs/test/.eslintrc b/Container-orchestration/Docker/node/node_modules/qs/test/.eslintrc similarity index 100% rename from Docker/node/node_modules/qs/test/.eslintrc rename to Container-orchestration/Docker/node/node_modules/qs/test/.eslintrc diff --git a/Docker/node/node_modules/qs/test/index.js b/Container-orchestration/Docker/node/node_modules/qs/test/index.js similarity index 100% rename from Docker/node/node_modules/qs/test/index.js rename to Container-orchestration/Docker/node/node_modules/qs/test/index.js diff --git a/Docker/node/node_modules/qs/test/parse.js b/Container-orchestration/Docker/node/node_modules/qs/test/parse.js similarity index 100% rename from Docker/node/node_modules/qs/test/parse.js rename to Container-orchestration/Docker/node/node_modules/qs/test/parse.js diff --git a/Docker/node/node_modules/qs/test/stringify.js b/Container-orchestration/Docker/node/node_modules/qs/test/stringify.js similarity index 100% rename from Docker/node/node_modules/qs/test/stringify.js rename to Container-orchestration/Docker/node/node_modules/qs/test/stringify.js diff --git a/Docker/node/node_modules/qs/test/utils.js b/Container-orchestration/Docker/node/node_modules/qs/test/utils.js similarity index 100% rename from Docker/node/node_modules/qs/test/utils.js rename to Container-orchestration/Docker/node/node_modules/qs/test/utils.js diff --git a/Docker/node/node_modules/range-parser/HISTORY.md b/Container-orchestration/Docker/node/node_modules/range-parser/HISTORY.md similarity index 100% rename from Docker/node/node_modules/range-parser/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/range-parser/HISTORY.md diff --git a/Docker/node/node_modules/range-parser/LICENSE b/Container-orchestration/Docker/node/node_modules/range-parser/LICENSE similarity index 100% rename from Docker/node/node_modules/range-parser/LICENSE rename to Container-orchestration/Docker/node/node_modules/range-parser/LICENSE diff --git a/Docker/node/node_modules/range-parser/README.md b/Container-orchestration/Docker/node/node_modules/range-parser/README.md similarity index 100% rename from Docker/node/node_modules/range-parser/README.md rename to Container-orchestration/Docker/node/node_modules/range-parser/README.md diff --git a/Docker/node/node_modules/range-parser/index.js b/Container-orchestration/Docker/node/node_modules/range-parser/index.js similarity index 100% rename from Docker/node/node_modules/range-parser/index.js rename to Container-orchestration/Docker/node/node_modules/range-parser/index.js diff --git a/Docker/node/node_modules/range-parser/package.json b/Container-orchestration/Docker/node/node_modules/range-parser/package.json similarity index 100% rename from Docker/node/node_modules/range-parser/package.json rename to Container-orchestration/Docker/node/node_modules/range-parser/package.json diff --git a/Docker/node/node_modules/raw-body/HISTORY.md b/Container-orchestration/Docker/node/node_modules/raw-body/HISTORY.md similarity index 100% rename from Docker/node/node_modules/raw-body/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/raw-body/HISTORY.md diff --git a/Docker/node/node_modules/raw-body/LICENSE b/Container-orchestration/Docker/node/node_modules/raw-body/LICENSE similarity index 100% rename from Docker/node/node_modules/raw-body/LICENSE rename to Container-orchestration/Docker/node/node_modules/raw-body/LICENSE diff --git a/Docker/node/node_modules/raw-body/README.md b/Container-orchestration/Docker/node/node_modules/raw-body/README.md similarity index 100% rename from Docker/node/node_modules/raw-body/README.md rename to Container-orchestration/Docker/node/node_modules/raw-body/README.md diff --git a/Docker/node/node_modules/raw-body/index.d.ts b/Container-orchestration/Docker/node/node_modules/raw-body/index.d.ts similarity index 100% rename from Docker/node/node_modules/raw-body/index.d.ts rename to Container-orchestration/Docker/node/node_modules/raw-body/index.d.ts diff --git a/Docker/node/node_modules/raw-body/index.js b/Container-orchestration/Docker/node/node_modules/raw-body/index.js similarity index 100% rename from Docker/node/node_modules/raw-body/index.js rename to Container-orchestration/Docker/node/node_modules/raw-body/index.js diff --git a/Docker/node/node_modules/raw-body/package.json b/Container-orchestration/Docker/node/node_modules/raw-body/package.json similarity index 100% rename from Docker/node/node_modules/raw-body/package.json rename to Container-orchestration/Docker/node/node_modules/raw-body/package.json diff --git a/Docker/node/node_modules/safe-buffer/LICENSE b/Container-orchestration/Docker/node/node_modules/safe-buffer/LICENSE similarity index 100% rename from Docker/node/node_modules/safe-buffer/LICENSE rename to Container-orchestration/Docker/node/node_modules/safe-buffer/LICENSE diff --git a/Docker/node/node_modules/safe-buffer/README.md b/Container-orchestration/Docker/node/node_modules/safe-buffer/README.md similarity index 100% rename from Docker/node/node_modules/safe-buffer/README.md rename to Container-orchestration/Docker/node/node_modules/safe-buffer/README.md diff --git a/Docker/node/node_modules/safe-buffer/index.d.ts b/Container-orchestration/Docker/node/node_modules/safe-buffer/index.d.ts similarity index 100% rename from Docker/node/node_modules/safe-buffer/index.d.ts rename to Container-orchestration/Docker/node/node_modules/safe-buffer/index.d.ts diff --git a/Docker/node/node_modules/safe-buffer/index.js b/Container-orchestration/Docker/node/node_modules/safe-buffer/index.js similarity index 100% rename from Docker/node/node_modules/safe-buffer/index.js rename to Container-orchestration/Docker/node/node_modules/safe-buffer/index.js diff --git a/Docker/node/node_modules/safe-buffer/package.json b/Container-orchestration/Docker/node/node_modules/safe-buffer/package.json similarity index 100% rename from Docker/node/node_modules/safe-buffer/package.json rename to Container-orchestration/Docker/node/node_modules/safe-buffer/package.json diff --git a/Docker/node/node_modules/safer-buffer/LICENSE b/Container-orchestration/Docker/node/node_modules/safer-buffer/LICENSE similarity index 100% rename from Docker/node/node_modules/safer-buffer/LICENSE rename to Container-orchestration/Docker/node/node_modules/safer-buffer/LICENSE diff --git a/Docker/node/node_modules/safer-buffer/Porting-Buffer.md b/Container-orchestration/Docker/node/node_modules/safer-buffer/Porting-Buffer.md similarity index 100% rename from Docker/node/node_modules/safer-buffer/Porting-Buffer.md rename to Container-orchestration/Docker/node/node_modules/safer-buffer/Porting-Buffer.md diff --git a/Docker/node/node_modules/safer-buffer/Readme.md b/Container-orchestration/Docker/node/node_modules/safer-buffer/Readme.md similarity index 100% rename from Docker/node/node_modules/safer-buffer/Readme.md rename to Container-orchestration/Docker/node/node_modules/safer-buffer/Readme.md diff --git a/Docker/node/node_modules/safer-buffer/dangerous.js b/Container-orchestration/Docker/node/node_modules/safer-buffer/dangerous.js similarity index 100% rename from Docker/node/node_modules/safer-buffer/dangerous.js rename to Container-orchestration/Docker/node/node_modules/safer-buffer/dangerous.js diff --git a/Docker/node/node_modules/safer-buffer/package.json b/Container-orchestration/Docker/node/node_modules/safer-buffer/package.json similarity index 100% rename from Docker/node/node_modules/safer-buffer/package.json rename to Container-orchestration/Docker/node/node_modules/safer-buffer/package.json diff --git a/Docker/node/node_modules/safer-buffer/safer.js b/Container-orchestration/Docker/node/node_modules/safer-buffer/safer.js similarity index 100% rename from Docker/node/node_modules/safer-buffer/safer.js rename to Container-orchestration/Docker/node/node_modules/safer-buffer/safer.js diff --git a/Docker/node/node_modules/safer-buffer/tests.js b/Container-orchestration/Docker/node/node_modules/safer-buffer/tests.js similarity index 100% rename from Docker/node/node_modules/safer-buffer/tests.js rename to Container-orchestration/Docker/node/node_modules/safer-buffer/tests.js diff --git a/Docker/node/node_modules/send/HISTORY.md b/Container-orchestration/Docker/node/node_modules/send/HISTORY.md similarity index 100% rename from Docker/node/node_modules/send/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/send/HISTORY.md diff --git a/Docker/node/node_modules/send/LICENSE b/Container-orchestration/Docker/node/node_modules/send/LICENSE similarity index 100% rename from Docker/node/node_modules/send/LICENSE rename to Container-orchestration/Docker/node/node_modules/send/LICENSE diff --git a/Docker/node/node_modules/send/README.md b/Container-orchestration/Docker/node/node_modules/send/README.md similarity index 100% rename from Docker/node/node_modules/send/README.md rename to Container-orchestration/Docker/node/node_modules/send/README.md diff --git a/Docker/node/node_modules/send/index.js b/Container-orchestration/Docker/node/node_modules/send/index.js similarity index 100% rename from Docker/node/node_modules/send/index.js rename to Container-orchestration/Docker/node/node_modules/send/index.js diff --git a/Docker/node/node_modules/send/node_modules/ms/index.js b/Container-orchestration/Docker/node/node_modules/send/node_modules/ms/index.js similarity index 100% rename from Docker/node/node_modules/send/node_modules/ms/index.js rename to Container-orchestration/Docker/node/node_modules/send/node_modules/ms/index.js diff --git a/Docker/node/node_modules/send/node_modules/ms/license.md b/Container-orchestration/Docker/node/node_modules/send/node_modules/ms/license.md similarity index 100% rename from Docker/node/node_modules/send/node_modules/ms/license.md rename to Container-orchestration/Docker/node/node_modules/send/node_modules/ms/license.md diff --git a/Docker/node/node_modules/send/node_modules/ms/package.json b/Container-orchestration/Docker/node/node_modules/send/node_modules/ms/package.json similarity index 100% rename from Docker/node/node_modules/send/node_modules/ms/package.json rename to Container-orchestration/Docker/node/node_modules/send/node_modules/ms/package.json diff --git a/Docker/node/node_modules/send/node_modules/ms/readme.md b/Container-orchestration/Docker/node/node_modules/send/node_modules/ms/readme.md similarity index 100% rename from Docker/node/node_modules/send/node_modules/ms/readme.md rename to Container-orchestration/Docker/node/node_modules/send/node_modules/ms/readme.md diff --git a/Docker/node/node_modules/send/package.json b/Container-orchestration/Docker/node/node_modules/send/package.json similarity index 100% rename from Docker/node/node_modules/send/package.json rename to Container-orchestration/Docker/node/node_modules/send/package.json diff --git a/Docker/node/node_modules/serve-static/HISTORY.md b/Container-orchestration/Docker/node/node_modules/serve-static/HISTORY.md similarity index 100% rename from Docker/node/node_modules/serve-static/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/serve-static/HISTORY.md diff --git a/Docker/node/node_modules/serve-static/LICENSE b/Container-orchestration/Docker/node/node_modules/serve-static/LICENSE similarity index 100% rename from Docker/node/node_modules/serve-static/LICENSE rename to Container-orchestration/Docker/node/node_modules/serve-static/LICENSE diff --git a/Docker/node/node_modules/serve-static/README.md b/Container-orchestration/Docker/node/node_modules/serve-static/README.md similarity index 100% rename from Docker/node/node_modules/serve-static/README.md rename to Container-orchestration/Docker/node/node_modules/serve-static/README.md diff --git a/Docker/node/node_modules/serve-static/index.js b/Container-orchestration/Docker/node/node_modules/serve-static/index.js similarity index 100% rename from Docker/node/node_modules/serve-static/index.js rename to Container-orchestration/Docker/node/node_modules/serve-static/index.js diff --git a/Docker/node/node_modules/serve-static/package.json b/Container-orchestration/Docker/node/node_modules/serve-static/package.json similarity index 100% rename from Docker/node/node_modules/serve-static/package.json rename to Container-orchestration/Docker/node/node_modules/serve-static/package.json diff --git a/Docker/node/node_modules/setprototypeof/LICENSE b/Container-orchestration/Docker/node/node_modules/setprototypeof/LICENSE similarity index 100% rename from Docker/node/node_modules/setprototypeof/LICENSE rename to Container-orchestration/Docker/node/node_modules/setprototypeof/LICENSE diff --git a/Docker/node/node_modules/setprototypeof/README.md b/Container-orchestration/Docker/node/node_modules/setprototypeof/README.md similarity index 100% rename from Docker/node/node_modules/setprototypeof/README.md rename to Container-orchestration/Docker/node/node_modules/setprototypeof/README.md diff --git a/Docker/node/node_modules/setprototypeof/index.d.ts b/Container-orchestration/Docker/node/node_modules/setprototypeof/index.d.ts similarity index 100% rename from Docker/node/node_modules/setprototypeof/index.d.ts rename to Container-orchestration/Docker/node/node_modules/setprototypeof/index.d.ts diff --git a/Docker/node/node_modules/setprototypeof/index.js b/Container-orchestration/Docker/node/node_modules/setprototypeof/index.js similarity index 100% rename from Docker/node/node_modules/setprototypeof/index.js rename to Container-orchestration/Docker/node/node_modules/setprototypeof/index.js diff --git a/Docker/node/node_modules/setprototypeof/package.json b/Container-orchestration/Docker/node/node_modules/setprototypeof/package.json similarity index 100% rename from Docker/node/node_modules/setprototypeof/package.json rename to Container-orchestration/Docker/node/node_modules/setprototypeof/package.json diff --git a/Docker/node/node_modules/setprototypeof/test/index.js b/Container-orchestration/Docker/node/node_modules/setprototypeof/test/index.js similarity index 100% rename from Docker/node/node_modules/setprototypeof/test/index.js rename to Container-orchestration/Docker/node/node_modules/setprototypeof/test/index.js diff --git a/Docker/node/node_modules/statuses/HISTORY.md b/Container-orchestration/Docker/node/node_modules/statuses/HISTORY.md similarity index 100% rename from Docker/node/node_modules/statuses/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/statuses/HISTORY.md diff --git a/Docker/node/node_modules/statuses/LICENSE b/Container-orchestration/Docker/node/node_modules/statuses/LICENSE similarity index 100% rename from Docker/node/node_modules/statuses/LICENSE rename to Container-orchestration/Docker/node/node_modules/statuses/LICENSE diff --git a/Docker/node/node_modules/statuses/README.md b/Container-orchestration/Docker/node/node_modules/statuses/README.md similarity index 100% rename from Docker/node/node_modules/statuses/README.md rename to Container-orchestration/Docker/node/node_modules/statuses/README.md diff --git a/Docker/node/node_modules/statuses/codes.json b/Container-orchestration/Docker/node/node_modules/statuses/codes.json similarity index 100% rename from Docker/node/node_modules/statuses/codes.json rename to Container-orchestration/Docker/node/node_modules/statuses/codes.json diff --git a/Docker/node/node_modules/statuses/index.js b/Container-orchestration/Docker/node/node_modules/statuses/index.js similarity index 100% rename from Docker/node/node_modules/statuses/index.js rename to Container-orchestration/Docker/node/node_modules/statuses/index.js diff --git a/Docker/node/node_modules/statuses/package.json b/Container-orchestration/Docker/node/node_modules/statuses/package.json similarity index 100% rename from Docker/node/node_modules/statuses/package.json rename to Container-orchestration/Docker/node/node_modules/statuses/package.json diff --git a/Docker/node/node_modules/toidentifier/LICENSE b/Container-orchestration/Docker/node/node_modules/toidentifier/LICENSE similarity index 100% rename from Docker/node/node_modules/toidentifier/LICENSE rename to Container-orchestration/Docker/node/node_modules/toidentifier/LICENSE diff --git a/Docker/node/node_modules/toidentifier/README.md b/Container-orchestration/Docker/node/node_modules/toidentifier/README.md similarity index 100% rename from Docker/node/node_modules/toidentifier/README.md rename to Container-orchestration/Docker/node/node_modules/toidentifier/README.md diff --git a/Docker/node/node_modules/toidentifier/index.js b/Container-orchestration/Docker/node/node_modules/toidentifier/index.js similarity index 100% rename from Docker/node/node_modules/toidentifier/index.js rename to Container-orchestration/Docker/node/node_modules/toidentifier/index.js diff --git a/Docker/node/node_modules/toidentifier/package.json b/Container-orchestration/Docker/node/node_modules/toidentifier/package.json similarity index 100% rename from Docker/node/node_modules/toidentifier/package.json rename to Container-orchestration/Docker/node/node_modules/toidentifier/package.json diff --git a/Docker/node/node_modules/type-is/HISTORY.md b/Container-orchestration/Docker/node/node_modules/type-is/HISTORY.md similarity index 100% rename from Docker/node/node_modules/type-is/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/type-is/HISTORY.md diff --git a/Docker/node/node_modules/type-is/LICENSE b/Container-orchestration/Docker/node/node_modules/type-is/LICENSE similarity index 100% rename from Docker/node/node_modules/type-is/LICENSE rename to Container-orchestration/Docker/node/node_modules/type-is/LICENSE diff --git a/Docker/node/node_modules/type-is/README.md b/Container-orchestration/Docker/node/node_modules/type-is/README.md similarity index 100% rename from Docker/node/node_modules/type-is/README.md rename to Container-orchestration/Docker/node/node_modules/type-is/README.md diff --git a/Docker/node/node_modules/type-is/index.js b/Container-orchestration/Docker/node/node_modules/type-is/index.js similarity index 100% rename from Docker/node/node_modules/type-is/index.js rename to Container-orchestration/Docker/node/node_modules/type-is/index.js diff --git a/Docker/node/node_modules/type-is/package.json b/Container-orchestration/Docker/node/node_modules/type-is/package.json similarity index 100% rename from Docker/node/node_modules/type-is/package.json rename to Container-orchestration/Docker/node/node_modules/type-is/package.json diff --git a/Docker/node/node_modules/unpipe/HISTORY.md b/Container-orchestration/Docker/node/node_modules/unpipe/HISTORY.md similarity index 100% rename from Docker/node/node_modules/unpipe/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/unpipe/HISTORY.md diff --git a/Docker/node/node_modules/unpipe/LICENSE b/Container-orchestration/Docker/node/node_modules/unpipe/LICENSE similarity index 100% rename from Docker/node/node_modules/unpipe/LICENSE rename to Container-orchestration/Docker/node/node_modules/unpipe/LICENSE diff --git a/Docker/node/node_modules/unpipe/README.md b/Container-orchestration/Docker/node/node_modules/unpipe/README.md similarity index 100% rename from Docker/node/node_modules/unpipe/README.md rename to Container-orchestration/Docker/node/node_modules/unpipe/README.md diff --git a/Docker/node/node_modules/unpipe/index.js b/Container-orchestration/Docker/node/node_modules/unpipe/index.js similarity index 100% rename from Docker/node/node_modules/unpipe/index.js rename to Container-orchestration/Docker/node/node_modules/unpipe/index.js diff --git a/Docker/node/node_modules/unpipe/package.json b/Container-orchestration/Docker/node/node_modules/unpipe/package.json similarity index 100% rename from Docker/node/node_modules/unpipe/package.json rename to Container-orchestration/Docker/node/node_modules/unpipe/package.json diff --git a/Docker/node/node_modules/utils-merge/.npmignore b/Container-orchestration/Docker/node/node_modules/utils-merge/.npmignore similarity index 100% rename from Docker/node/node_modules/utils-merge/.npmignore rename to Container-orchestration/Docker/node/node_modules/utils-merge/.npmignore diff --git a/Docker/node/node_modules/utils-merge/LICENSE b/Container-orchestration/Docker/node/node_modules/utils-merge/LICENSE similarity index 100% rename from Docker/node/node_modules/utils-merge/LICENSE rename to Container-orchestration/Docker/node/node_modules/utils-merge/LICENSE diff --git a/Docker/node/node_modules/utils-merge/README.md b/Container-orchestration/Docker/node/node_modules/utils-merge/README.md similarity index 100% rename from Docker/node/node_modules/utils-merge/README.md rename to Container-orchestration/Docker/node/node_modules/utils-merge/README.md diff --git a/Docker/node/node_modules/utils-merge/index.js b/Container-orchestration/Docker/node/node_modules/utils-merge/index.js similarity index 100% rename from Docker/node/node_modules/utils-merge/index.js rename to Container-orchestration/Docker/node/node_modules/utils-merge/index.js diff --git a/Docker/node/node_modules/utils-merge/package.json b/Container-orchestration/Docker/node/node_modules/utils-merge/package.json similarity index 100% rename from Docker/node/node_modules/utils-merge/package.json rename to Container-orchestration/Docker/node/node_modules/utils-merge/package.json diff --git a/Docker/node/node_modules/vary/HISTORY.md b/Container-orchestration/Docker/node/node_modules/vary/HISTORY.md similarity index 100% rename from Docker/node/node_modules/vary/HISTORY.md rename to Container-orchestration/Docker/node/node_modules/vary/HISTORY.md diff --git a/Docker/node/node_modules/vary/LICENSE b/Container-orchestration/Docker/node/node_modules/vary/LICENSE similarity index 100% rename from Docker/node/node_modules/vary/LICENSE rename to Container-orchestration/Docker/node/node_modules/vary/LICENSE diff --git a/Docker/node/node_modules/vary/README.md b/Container-orchestration/Docker/node/node_modules/vary/README.md similarity index 100% rename from Docker/node/node_modules/vary/README.md rename to Container-orchestration/Docker/node/node_modules/vary/README.md diff --git a/Docker/node/node_modules/vary/index.js b/Container-orchestration/Docker/node/node_modules/vary/index.js similarity index 100% rename from Docker/node/node_modules/vary/index.js rename to Container-orchestration/Docker/node/node_modules/vary/index.js diff --git a/Docker/node/node_modules/vary/package.json b/Container-orchestration/Docker/node/node_modules/vary/package.json similarity index 100% rename from Docker/node/node_modules/vary/package.json rename to Container-orchestration/Docker/node/node_modules/vary/package.json diff --git a/Container-orchestration/Docker/node/package-lock.json b/Container-orchestration/Docker/node/package-lock.json new file mode 100644 index 00000000..303b18ed --- /dev/null +++ b/Container-orchestration/Docker/node/package-lock.json @@ -0,0 +1,799 @@ +{ + "name": "nodejs-image-demo", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "express": "^4.22.1" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", + "content-type": "~1.0.4", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "~0.1.12", + "proxy-addr": "~2.0.7", + "qs": "~6.14.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "~0.19.0", + "serve-static": "~1.16.2", + "setprototypeof": "1.2.0", + "statuses": "~2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/qs": { + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/Docker/node/package.json b/Container-orchestration/Docker/node/package.json similarity index 90% rename from Docker/node/package.json rename to Container-orchestration/Docker/node/package.json index ad2cf37c..e455cb96 100644 --- a/Docker/node/package.json +++ b/Container-orchestration/Docker/node/package.json @@ -11,6 +11,6 @@ "express" ], "dependencies": { - "express": "^4.16.4" + "express": "^4.22.1" } } diff --git a/Docker/node/views/css/styles.css b/Container-orchestration/Docker/node/views/css/styles.css similarity index 95% rename from Docker/node/views/css/styles.css rename to Container-orchestration/Docker/node/views/css/styles.css index c3a7c845..a318424b 100644 --- a/Docker/node/views/css/styles.css +++ b/Container-orchestration/Docker/node/views/css/styles.css @@ -3,7 +3,7 @@ } body { - background: #020A1B; + background: green; color: #ffffff; font-family: 'Merriweather', sans-serif; } diff --git a/Docker/node/views/index.html b/Container-orchestration/Docker/node/views/index.html similarity index 100% rename from Docker/node/views/index.html rename to Container-orchestration/Docker/node/views/index.html diff --git a/Docker/node/views/sharks.html b/Container-orchestration/Docker/node/views/sharks.html similarity index 100% rename from Docker/node/views/sharks.html rename to Container-orchestration/Docker/node/views/sharks.html diff --git a/Docker/readme.md b/Container-orchestration/Docker/readme.md similarity index 79% rename from Docker/readme.md rename to Container-orchestration/Docker/readme.md index 004c253e..32c18762 100644 --- a/Docker/readme.md +++ b/Container-orchestration/Docker/readme.md @@ -1,19 +1,23 @@ ## Docker Tutorial ********** ### Table of Contents: -1. [Basic Concept of Images and Containers](https://github.com/Tikam02/DevOps-Guide/blob/master/Docker/docker-concepts.md) +1. [Basic Concept of Images and Containers](https://github.com/Tikam02/DevOps-Guide/blob/master/Container-orchestration/Docker/docker-concepts.md) 2. [Docker Setup](#2-setting-up-docker) 3. [Developing Fullstack WebApp With Node-js](#3-flask-web-app) 4. [Writing Dockerfile](#4-writing-dockerfile) 5. [Running Docker Image](#5-runnig-up-the-docker-image) 6. [Push to Docker-hub](#6-pushing-image-to-dockerhub) +7. [Use multi-stage builds](#7-Use-multi-stage-builds) ***************** +[`Docker Basic Commands`](docker-basic-commands.md) +[`Docker Complete Commands`](docker-commands.md) +***************** ## 1. Basic concepts of docker - Containers and Images -- Detailed Docker concepts and notes from here - [Docker Concepts](https://github.com/Tikam02/DevOps-Guide/blob/master/Docker/docker-concepts.md) +- Detailed Docker concepts and notes from here - [Docker Concepts](https://github.com/Tikam02/DevOps-Guide/blob/master/Container-orchestration/Docker/docker-concepts.md) - Introduction to Docker: @@ -42,6 +46,32 @@ sudo apt-get install docker.io ``` +--- + +- As an alternative you can install the official Docker CE (Community-Edition) like the following + + ``` +# Install Prerequisites +sudo apt-get install ca-certificates curl gnupg lsb-release + +# Add dockers official gpg key +sudo mkdir -p /etc/apt/keyrings + +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + + +# Setup repository +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + + +# Install Docker Engine +sudo apt-get update + +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin + ``` + - Check for installed version ``` $ docker version ``` @@ -64,7 +94,7 @@ sudo apt-get install docker.io ``` cd node``` - ``` npm insall ``` + ``` npm install ``` ```node app.js``` @@ -244,4 +274,44 @@ sudo apt-get install docker.io ``` $ docker run --name nodejs-image-demo -p 80:8080 -d your_dockerhub_username/nodejs-image-demo ``` +## 7 Use multi-stage builds + - With multi-stage builds, you use multiple ``` FROM ``` statements in your Dockerfile. Each ``` FROM ``` instruction can use a different base, and each of them begins a new stage of the build. You can selectively copy artifacts from one stage to another, leaving behind everything you don’t want in the final image, also you can name your stages, by adding an ```AS ``` to the ```FROM``` instruction To show how this works, let’s adapt the Dockerfile to use multi-stage builds. + + +[Dockerfile](https://github.com/s403o/GoViolin/blob/master/Dockerfile): +``` +### stage 1 (build) ### +FROM golang:alpine3.15 as build + +# set working directory +RUN mkdir -p /app +WORKDIR /app + +# install app dependencies +RUN go mod init github.com/Rosalita/GoViolin + +# add app +COPY . /app + +# listener port at runtime +EXPOSE 3000 + +# build +RUN go build -o go + +# test +HEALTHCHECK --interval=1m --timeout=20s --start-period=30s --retries=3 \ + CMD go test || exit 1 + +### stage 2 (run) ### +FROM alpine as production + +WORKDIR /app +COPY --from=build /app . +# run +ENTRYPOINT [ "./go" ] +``` + - The end result is the same tiny production image as before, with a significant reduction in complexity. +How does it work? The second ```FROM``` instruction starts a new build stage with the ```alpine as production``` image as its base. The ```COPY --from=build /app .``` line copies just the built artifact from the previous stage into this new stage. The Go SDK and any intermediate artifacts are left behind, and not saved in the final image. + - You can check the final image from this link [s403o/goapp](https://hub.docker.com/r/s403o/goapp/tags) the final size is 50MB! :) diff --git a/Container-orchestration/Python-cgi for launching the docker b/Container-orchestration/Python-cgi for launching the docker new file mode 100644 index 00000000..94fccfe4 --- /dev/null +++ b/Container-orchestration/Python-cgi for launching the docker @@ -0,0 +1,21 @@ +#!/usr/bin/python3 +import subprocess +import cgi + +print("content-type: text/plain") +print() + +form = cgi.FieldStorage() + +cname = form.getvalue("d1") +cimage = form.getvalue("d2") + +cmd = "sudo docker run -dit --name {0} {1}".format(cname,cimage) +output = subprocess.getstatusoutput(cmd) +status = output[0] +out = output[1] + +if status == 0: + print("Container {0} launched successfully".format(cname)) +else: + print("Error launching Container: {0}".format(cname)) diff --git a/kubernetes/Readme.md b/Container-orchestration/kubernetes/Readme.md similarity index 100% rename from kubernetes/Readme.md rename to Container-orchestration/kubernetes/Readme.md diff --git a/Container-orchestration/kubernetes/cronjobs.md b/Container-orchestration/kubernetes/cronjobs.md new file mode 100644 index 00000000..16c6005c --- /dev/null +++ b/Container-orchestration/kubernetes/cronjobs.md @@ -0,0 +1,11 @@ + +## Kuberenets cronjobs + +- [cronjobs](https://medium.com/better-programming/tutorial-how-to-use-kubernetes-job-and-cronjob-1ef4ffbc8e84) +- [Cronjob 101](https://medium.com/jobteaser-dev-team/kubernetes-cronjob-101-56f0a8ea7ca2) +-[kube crons](https://medium.com/@ManagedKube/kubernetes-cron-jobs-9ec2ff36223a) +- [kube crons 02](https://medium.com/tensult/how-to-run-jobs-and-cronjobs-in-kubernetes-8661183a5b1a) +- [How To Create Kubernetes Jobs/Cron Jobs – Getting Started Guide](https://devopscube.com/create-kubernetes-jobs-cron-jobs/) +- [Sentry tutorial](https://medium.com/@gino.busok/azure-k8s-and-sentry-part-1-c70259508d50) +- [sentry helm](https://github.com/ginocbjr/sentry-helm) +- [Learning Kubernetes: persistent storage with Minikube](https://martincarstenbach.wordpress.com/2019/06/07/learning-kubernetes-persistent-storage-with-minikube/) diff --git a/kubernetes/kube-advanced.md b/Container-orchestration/kubernetes/kube-advanced.md similarity index 100% rename from kubernetes/kube-advanced.md rename to Container-orchestration/kubernetes/kube-advanced.md diff --git a/kubernetes/kuber-concepts.md b/Container-orchestration/kubernetes/kuber-concepts.md similarity index 64% rename from kubernetes/kuber-concepts.md rename to Container-orchestration/kubernetes/kuber-concepts.md index f9948a0c..38abb7fb 100644 --- a/kubernetes/kuber-concepts.md +++ b/Container-orchestration/kubernetes/kuber-concepts.md @@ -11,7 +11,7 @@ ***************** -## Introdution +## Introduction - What is Kubernetes? - Kubernetes, at its basic level, is a system for running and coordinating containerized applications across a cluster of machines. It is a platform designed to completely manage the life cycle of containerized applications and services using methods that provide predictability, scalability, and high availability. @@ -55,6 +55,75 @@ - Presistent Volume Claim is the abstruction of the Persistent Volume. Persistent Volume is physical resources of inflastructure. Kubernetes want to hide the detail from developers. Using Persistent Volume Claim, you can hide the physical declaration defined by Persistent Volume or Storage Class. Pod can mount the Volume using Persistent Volume Claim object. + - ## Difference Between Daemonset and deployment + - Kubernetes deployments manage stateless services running on your cluster (as opposed to for example StatefulSets which do manage stateful services). Their purpose is to keep a set of identical pods running and upgrade them in a controlled way. For example, you define how many replicas(pods) you want to run of your app in deployment definition and kubernetes will make that many replicas of your application spread over nodes. If you say 5 replica's over 3 node then some nodes have more than one replica of your app running. + + - DaemonSets manage groups of replicated Pods. However, DaemonSets attempt to adhere to a one-Pod-per-node model, either across the entire cluster or a subset of nodes. Daemonset will not run more than one replica per node. Another advantage of using Daemonset is, If you add a node to the cluster then Daemonset will automatically spawn pod on that node, which deployment will not do. + + - DaemonSets are useful for deploying ongoing background tasks that you need to run on all or certain nodes, and which do not require user intervention. Examples of such tasks include storage daemons like ceph, log collection daemons like fluentd, and node monitoring daemons like collected + + > Lets take example you mentioned in question, why kube-dns is deployment and kube-proxy is daemonset? + + The reason behind that is kube-proxy is needed on every node in cluster to run IP tables so that every node can access every pod no matter on which node it resides. Hence, when we make kube-proxy a daemonset and another node is added to cluster at later time kube-proxy is automatically spawned on that node. + + Kube-dns responsibility is to discover the service IP using its name and even one replica of kube-dns is enough to resolve the service name to its IP and hence we make kube-dns a deployment because we don't need kube-dns on every node. + + - ## Target Port + + - Target ports allows us to separate the port the service is available on from the port the application is listening on. TargetPort is the Port which the application is configured to listen on. Port is how the application will be accessed from the outside. + + - ## Cluster IP + + - Cluster IP is the default approach when creating a Kubernetes Service. The service is allocated an internal IP that other components can use to access the pods.By having a single IP address it enables the service to be load balanced across multiple Pods. + + - ## Nodeport + + - While TargetPort and ClusterIP make it available to inside the cluster, the NodePort exposes the service on each Node’s IP via the defined static port. No matter which Node within the cluster is accessed, the service will be reachable based on the port number defined. + + - ## External IP + + - Another approach to making a service available outside of the cluster is via External IP addresses. + + - ## Loadbalancer + + - When running in the cloud, such as EC2 or Azure, it's possible to configure and assign a Public IP address issued via the cloud provider. This will be issued via a Load Balancer such as ELB. This allows additional public IP addresses to be allocated to a Kubernetes cluster without interacting directly with the cloud provider. + + - ## Ingress + + - Ingress enables externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting for a Kubernetes cluster. + - Ingress rules are an object type with Kubernetes. The rules can be based on a request host (domain), or the path of the request, or a combination of both + - Kubernetes ingress is a collection of routing rules that govern how external users access services running in a Kubernetes cluster. + + - ## In Kubernetes, there are three general approaches to exposing your application. + + - Using a Kubernetes service of type NodePort, which exposes the application on a port across each of your nodes + - Use a Kubernetes service of type LoadBalancer, which creates an external load balancer that points to a Kubernetes service in your cluster + - Use a Kubernetes Ingress Resource + + - ## Kubernetes Persistent Volume + + - PersistentVolumes are consumed by something called a PersistentVolumeClaim (PVC). A PVC is a request for storage by a user. It is similar to a Pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). PVCs can request specific size and access modes (e.g. read-write or read-only). + + - ## Readiness and Liveness + + + + - ## kubernetes size + + - The kibibyte was designed to replace the kilobyte in those computer science contexts in which the term kilobyte is used to mean 1024 bytes. The interpretation of kilobyte to denote 1024 bytes, conflicting with the SI definition of the prefix kilo (1000), used to be common. + + - So, as you can see, 5G means 5 Gigabytes while 5Gi means 5 Gibibytes. They amount to: + + - 5 G = 5000000 KB / 5000 MB + - 5 Gi = 5368709.12 KB / 5368.70 MB + + - Exactly, one of them (G) is power of ten, while the other one (Gi) is power of two. So, + + - 10^3 is power of ten. the result is 1000, or 1G + - 2^10 is power of two. the result is 1024, or 1Gi + + + ![alt text](https://github.com/Tikam02/DevOps-Guide/blob/master/img/kuber-objects.jpeg) @@ -117,4 +186,4 @@ ### References - [Kubernetes in three diagrams](https://medium.com/@tsuyoshiushio/kubernetes-in-three-diagrams-6aba8432541c) -- [The Best Kubernetes Tutorials](https://www.magalix.com/blog/the-best-kubernetes-tutorials) \ No newline at end of file +- [The Best Kubernetes Tutorials](https://www.magalix.com/blog/the-best-kubernetes-tutorials) diff --git a/Container-orchestration/kubernetes/kubernetes-commands.md b/Container-orchestration/kubernetes/kubernetes-commands.md new file mode 100644 index 00000000..5c5d9094 --- /dev/null +++ b/Container-orchestration/kubernetes/kubernetes-commands.md @@ -0,0 +1,397 @@ +## Kubernetes - Commands ![kubernetes](https://img.shields.io/badge/kubernetes-Commands-blue?style=for-the-badge) +************************** +### Kubectl? + +* "Kubectl is a command-line interface that lets you run commands on Kubernetes clusters." This is how we will be able to perform various operations on our cluster. + +* Kubectl depends on a kubeconfig. This is a configuration file for access to one or more clusters, to know which cluster is configured our Kubectl command, we can use: + + + ``` Kubectl config current-context ``` + +* Or if we want to change clusters in our config, we can use: + + ``` Kubectl config use-context ``` + + +*************************** +### CLIENT CONFIGURATION + + +- Setup autocomplete in bash; bash-completion package should be installed first + +``` source <(kubectl completion bash) ``` + +- View Kubernetes config + +``` kubectl config view``` + +- View specific config items by json path + +``` kubectl config view -o jsonpath='{.users[?(@.name == "k8s")].user.password}' ``` + +- Set credentials for foo.kuberntes.com + +``` kubectl config set-credentials kubeuser/foo.kubernetes.com --username=kubeuser --password=kubepassword ``` + +************************************ + +### VIEWING, FINDING RESOURCES + + +- List all services in the namespace + +``` kubectl get services ``` + +- List all pods in all namespaces in wide format + +``` kubectl get pods -o wide --all-namespaces ``` + +- List all pods in json (or yaml) format + +``` kubectl get pods -o json ``` + +- Describe resource details (node, pod, svc) + +``` kubectl describe nodes my-node ``` + +- List services sorted by name + +``` kubectl get services --sort-by=.metadata.name ``` + +- List pods sorted by restart count + +```kubectl get pods --sort-by='.status.containerStatuses[0].restartCount'``` + +- Rolling update pods for frontend-v1 + +``` kubectl rolling-update frontend-v1 -f frontend-v2.json ``` + +- Scale a replicaset named 'foo' to 3 + +``` kubectl scale --replicas=3 rs/foo ``` + +- Scale a resource specified in "foo.yaml" to 3 + +``` kubectl scale --replicas=3 -f foo.yaml ``` + +- Execute a command in every pod / replica + +``` for i in 0 1; do kubectl exec foo-$i -- sh -c 'echo $(hostname) > /usr/share/nginx/html/index.html'; done ``` + + + +### Explain a resource + +``` kubectl explain hpa ``` + + +```kubectl explain svc``` + +### Get nodes region and zone + +### kubectl get nodes +```--label-columns failure-domain.beta.kubernetes.io/region,failure-domain.beta.kubernetes.io/zone``` + +### Get Arch, OS, Instance type and node type if kops + +```kubectl get nodes -o wide -L beta.kubernetes.io/arch -L beta.kubernetes.io/os -L beta.kubernetes.io/instance-type -L kops.k8s.io/instancegroupkubectl get nodes -L beta.kubernetes.io/arch -L beta.kubernetes.io/os -L beta.kubernetes.io/instance-type -L kops.k8s.io/instancegroup``` + +### Get node version and name only + +```kubectl get nodes -o custom-columns=NAME:.metadata.name,VER:.status.nodeInfo.kubeletVersion``` + +### Get scheduleable nodes + +```kubectl get nodes --output 'jsonpath={range $.items[*]}{.metadata.name} {.spec.taints[*].effect}{"\n"}{end}' | awk '!/NoSchedule/{print $1}'``` + +### Get all deployments nameonly + +```kubectl get deployment -o=jsonpath={.items[*].metadata.name}``` + +### Get one deployment only (first one) + +```kubectl get deployment -o=jsonpath={.items[0].metadata.name}``` + +### Get all pods statuses only + +```kubectl get pods -o=jsonpath=‘{.items[*].status.phase}’ --all-namespaces``` + +### Get pods qos + +```kubectl get pods --all-namespaces -o custom-columns=NAME:.metadata.name,NAMESPACE:.metadata.namespace,QOS-CLASS:.status.qosClass``` + +### Get images running + +```kubectl get pod -o=jsonpath='{.spec.containers[*].image}' --all-namespaces``` + +```kubectl get pod -o=custom-columns=NAME:.metadata.name,IMAGE:.spec.containers[*].image --all-namespaces``` + +### Where is my pod running + +```kubectl get pods -n sock-shop -l name=carts -o wide``` + +### Check node/pod usage memory and cpu + +```kubectl top nodes``` +```kubectl top pods``` + +### Check health of etcd + +```kubectl get --raw=/healthz/etcd``` + +### Check status of node autoscaler + +```kubectl describe configmap cluster-autoscaler-status -n kube-system``` + +### Get where pods are running from nodenames + +```kubectl get pod -o=custom-columns=NAME:.metadata.name,STATUS:.status.phase,NODE:.spec.nodeName --all-namespaceskubectl get pod -o=custom-columns=NODE:.spec.nodeName,NAME:.metadata.name --all-namespaces``` + +### Example sorting pods by nodeName: + +```kubectl get pods -o wide --sort-by="{.spec.nodeName}"``` + +### Example of getting pods on nodes using label filter: + +```bash +for n in $(kubectl get nodes -l your_label_key=your_label_value --no-headers | cut -d " " -f1); do + kubectl get pods --all-namespaces --no-headers --field-selector spec.nodeName=${n} + done +``` + +- or by number of restarts + +```kubectl get pods --sort-by="{.status.containerStatuses[:1].restartCount}"``` + + +### get containers name inside pod + +```kubectl get pods prometheus-prometheus-operator-prometheus-0 -o jsonpath='{.spec.containers[*].name}'``` + +### get disk space +```kubectl exec -i -t prometheus-prometheus-operator-prometheus-0 -c thanos-sidecar -n monitoring -- df -h``` + +### Example filtering by nodeName using — template flag: + +```bash +$ kubectl get nodes NAME STATUS AGE + ip-254-0-90-30.ec2.internal Ready 2d + ip-254-0-90-35.ec2.internal Ready 2d + ip-254-0-90-50.ec2.internal Ready,SchedulingDisabled 2d + ip-254-0-91-60.ec2.internal Ready 2d + ip-254-0-91-65.ec2.internal Ready 2d + $ kubectl get pods --template '{{range .items}}{{if eq .spec.nodeName "ip-254-0-90-30.ec2.internal"}}{{.metadata.name}}{{"\n"}}{{end}}}{{end}}' filebeat-000 + app-0000 + node-exporter-0000 + prometheus-000 +``` + +### Check pods which are not Runnning + +```kubectl get pods --field-selector=status.phase!=Running --all-namespaces``` + +### Sort Nodes by Role, Age and kubelet version + +```kubectl get nodes --sort-by={.metadata.labels."kubernetes\.io\/role"}kubectl get node --sort-by={.status.nodeInfo.kubeletVersion}watch kubectl get node --sort-by={.status.nodeInfo.kubeletVersion} watch "kubectl get nodes --sort-by={.metadata.labels.\"kubernetes\.io\/role\"}"kubectl get nodes --sort-by=".status.conditions[?(@.reason == 'KubeletReady' )].lastTransitionTime"``` + +### Query apiservers + +```kubectl get --raw=/apis``` +```kubectl get --raw=/logs/kube-apiserver.log``` + +### Setup a deployment with limits and requests + +```kubectl run ken-test --image=kenichishibata/docker-curl -i --tty --limits='cpu=50m,memory=128Mi' --requests='cpu=50m,memory=128Mi'``` +```kubectl delete deployment ken-test``` + +### Get events for an individual resource + +```kubectl get event --field-selector=involvedObject.name =foo -w``` + +### Get apiresources + +#### Check for an api resources available, this should show your crd api endpoints as well + +```kubectl api-resources``` +```kubectl api-versions``` + +#### Check apiservices added (registered) + +```kubectl get apiservices.apiregistration.k8s.io``` +```kubectl get apiservices.apiregistration.k8s.io v1beta1.metrics.k8s.io -o yaml``` + +### Check hpa (maybe because you have custom metrics enabled in prometheus)? +```kubectl get hpa``` +```kubectl get hpa --all-namespaces kubectl get --raw /apis/metrics.k8s.io``` + +### Kube Diff + +```kubectl alpha diff -h``` + + + +### Run pod shell + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: testing + namespace: monitoring +spec: + serviceAccountName: build-robot + automountServiceAccountToken: false + containers: + - image: alpine:3.2 + command: + - /bin/sh + - "-c" + - "sleep 60m" + imagePullPolicy: IfNotPresent + name: alpine + restartPolicy: Always +``` + +> kubectl apply -f testing.yaml --namespace=monitoring + +> kubectl exec -ti testing --namespace=monitoring -- sh + +or + +> kubectl run -it testing --image testing --namespace monitoring /bin/sh +**************************************************** + +### MANAGE RESOURCES +* Create one or more resources from your file or folder. + + + ```kubectl create -f FILE ``` + +* Applies a configuration change to a resource from your file. + + + ```kubectl apply -f FILE ``` + + +* Deletes one or more Kubernetes resources from a configuration file or directly from resource names. +* e.g. Kubectl delete my_pod (destroy the pod on the cluster named my_pod) + + + ```kubectl delete (-f FILE | TYPE [PREFIX_NAME | NAME]) ``` + + + - Lets you expose a local port to the port of a POD that is running on the Kubernetes cluster. Useful to debug. + - e.g. Kubectl port-forward my_pod 80:3000 (exposes the port 3000 of the pod my_pod on our local port 80) + + ```kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT ``` + +- Run a resource in the Kubernetes cluster. + - e.g.kKubectl run -i --tty busybox --image=busybox -- sh + - -> Run a pod as an interactive shell + + + ```kubectl run NAME --image=image [--env=”key=value”] [--port=port] [--replicas=replicas] ``` + + +- Get documentation for pod or service + +``` kubectl explain pods,svc ``` + +- Create resource(s) like pods, services or daemonsets + +``` kubectl create -f ./my-manifest.yaml ``` + +- Apply a configuration to a resource + +``` kubectl apply -f ./my-manifest.yaml ``` + +- Start a single instance of Nginx + +``` kubectl run nginx --image=nginx ``` + +- Create a secret with several keys +```yml +cat < Stream the logs of the container my_app on the my_pod pod. + + + + ```kubectl top pod POD_NAME --containers ``` + +Displays the metrics for a given pod and its containers within a Kubernetes cluster. + +- Deploy Heapster from Github repository + +``` kubectl create -f deploy/kube-config/standalone/ ``` + +- Show metrics for nodes + +``` kubectl top node ``` + +- Show metrics for pods + +``` kubectl top pod ``` + +- Show metrics for a given pod and its containers + +``` kubectl top pod pod_name --containers ``` + +- Dump pod logs (stdout) + +``` kubectl logs pod_name ``` + +- Stream pod container logs (stdout, multi-container case) + +``` kubectl logs -f pod_name -c my-container ``` + diff --git a/Container-orchestration/kubernetes/pv-pvc.md b/Container-orchestration/kubernetes/pv-pvc.md new file mode 100644 index 00000000..20ca6a28 --- /dev/null +++ b/Container-orchestration/kubernetes/pv-pvc.md @@ -0,0 +1,107 @@ +# Persistent Volume + +> Phase + +- A volume will be in one of the following phases: + + - Available -- a free resource that is not yet bound to a claim + - Bound -- the volume is bound to a claim + - Released -- the claim has been deleted, but the resource is not yet reclaimed by the cluster + - Failed -- the volume has failed its automatic reclamation + + +- Persistent Volume ON NFS + +```yaml +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pv-name +spec: + capacity: + storage: 5Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Recycle + storageClassName: slow + mountOptions: + - hard + - nfsvers=4.0 + nfs: + path: /dir/path/on/nfs/server + server: nfs-server-ip-address +``` + +- Persistent Volume on Google Cloud + +```yaml +apiVersion: v1 +kind: PersistentVolume +metadata: + name: test-volume + labels: + failure-domain.beta.kuberentes.io/zone: us-central1-a__us_central1-b +spec: + capacity: + storage: 400Gi + accessModes: + - ReadWriteOnce + gcePersistentDisk: + pdName: my-data-disk + fsType: ext4 +``` + +- Depending on storage type, spec attributes differ + + +##### Persistent Volume claim + +- Application has to claim the Persistent volume + +```yaml +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: pvc-name +spec: + storageClassName: manual + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi +``` + +- Use that PVC in Pods configuration + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: mypod +spec: + containers: ## Where to mount volume in the container + - name: myfrontend + image: nginx + volumeMounts: + - mountPath: "/var/www/html" + name: mypd + volume: ## What volume to provide + - name: mypd + persistentVolumeClaim: + claimName: pvc-name +``` + +### Refrences + +- [ Kubernetes Volume Basics: emptyDir and PersistentVolume ](https://www.alibabacloud.com/blog/kubernetes-volume-basics-emptydir-and-persistentvolume_594834) + +- [Kubernetes: Persistent Volume For Beginners:](https://medium.com/@muneeburrehman2610/kubernetes-persistent-volume-for-beginners-a13cbe5bdeea) + +- [ Persistent Volume Claim for StatefulSet](https://medium.com/@zhimin.wen/persistent-volume-claim-for-statefulset-8050e396cc51) + +- [Kubernetes Storage 101](https://www.magalix.com/blog/kubernetes-storage-101) + +- [ Configuring Persistent Storage](https://access.redhat.com/documentation/en-us/openshift_container_platform/3.4/html/installation_and_configuration/configuring-persistent-storage) \ No newline at end of file diff --git a/Container-orchestration/minikube/minikube-commands.md b/Container-orchestration/minikube/minikube-commands.md new file mode 100644 index 00000000..2f7611d1 --- /dev/null +++ b/Container-orchestration/minikube/minikube-commands.md @@ -0,0 +1,181 @@ + +## Setup Minikube + +### Requirements + +>Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run: + +```sysctl -a | grep machdep.cpu.features | grep VMX``` + +>If there's output, you're good! + +### Prerequisites + +- kubectl +- docker (for Mac) +- minikube +- virtualbox + +```brew update && brew install kubectl && brew cask install docker virtualbox && brew install minikube``` + +### Verify +```yaml + docker --version # Docker version 17.09.0-ce, build afdb6d4 + docker-compose --version # docker-compose version 1.16.1, build 6d1ac21 + docker-machine --version # docker-machine version 0.12.2, build 9371605 + minikube version # minikube version: v0.22.3 + kubectl version --client # Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.1", GitCommit:"f38e43b221d08850172a9a4ea785a86a3ffa3b3a", GitTreeState:"clean", BuildDate:"2017-10-12T00:45:05Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"darwin/amd64"} +``` +### Start + +```minikube start``` + +- This can take a while, expected output: + +Starting local Kubernetes cluster... +Kubectl is now configured to use the cluster. + +Great! You now have a running Kubernetes cluster locally. Minikube started a virtual machine for you, and a Kubernetes cluster is now running in that VM. + +### Check k8s + +- kubectl get nodes + +> Should output something like: +```yaml + NAME STATUS ROLES AGE VERSION + minikube Ready 40s v1.7.5 +``` + +### Use minikube's built-in docker daemon: + +```eval $(minikube docker-env)``` + +>Add this line to `.bash_profile` or `.zshrc` or ... if you want to use minikube's daemon by default (or if you do not want to set this every time you open a new terminal). + +- You can revert back to the host docker daemon by running: + +```eval $(docker-machine env -u)``` + +- If you now run `docker ps`, it should now output something like: + +```yaml +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +e97128790bf9 gcr.io/google-containers/kube-addon-manager "/opt/kube-addons.sh" 22 seconds ago Up 22 seconds k8s_kube-addon-manager_kube-addon-manager-minikube_kube-system_c654b2f084cf26941c334a2c3d6db53d_0 +69707e54d1d0 gcr.io/google_containers/pause-amd64:3.0 "/pause" 33 seconds ago Up 33 seconds k8s_POD_kube-addon-manager-minikube_kube-system_c654b2f084cf26941c334a2c3d6db53d_0 +``` + +## Build, deploy and run an image on your local k8s setup + +- First setup a local registry, so Kubernetes can pull the image(s) from there: + +```docker run -d -p 5000:5000 --restart=always --name registry registry:2``` + +### Build + +- First of, store all files (Dockerfile, my-app.yml, index.html) in this gist locally in some new (empty) directory. + +- You can build the Dockerfile below locally if you want to follow this guide to the letter. Store the Dockerfile locally, preferably in an empty directory and run: + +```docker build . --tag my-app``` + +>You should now have an image named 'my-app' locally, check by using `docker images` (or your own image of course). You can then publish it to your local docker registry: + +```docker tag my-app localhost:5000/my-app:0.1.0``` + +>Running `docker images` should now output the following: + +```yaml +REPOSITORY TAG IMAGE ID CREATED SIZE +my-app latest cc949ad8c8d3 44 seconds ago 89.3MB +localhost:5000/my-app 0.1.0 cc949ad8c8d3 44 seconds ago 89.3MB +httpd 2.4-alpine fe26194c0b94 7 days ago 89.3MB +``` + +### Deploy and run + +- Store the file below `my-app.yml` on your system and run the following: + +```kubectl create -f my-app.yml``` + +- You should now see your pod and your service: + +```kubectl get all``` + +- The configuration exposes `my-app` outside of the cluster, you can get the address to access it by running: + +```minikube service my-app --url``` + +- This should give an output like `http://192.168.99.100:30304` (the port will most likely differ). Go there with your favorite browser, you should see "Hello world!". You just accessed your application from outside of your local Kubernetes cluster! + +### Kubernetes GUI Dashboard + +```minikube dashboard``` + +### Delete deployment of my-app + +```kubectl delete deploy my-app``` + +```kubectl delete service my-app``` + +You're now good to go and deploy other images! + +### Reset everything +```minikube stop;``` +```minikube delete;``` +```rm -rf ~/.minikube ~/.kube;`` +```brew uninstall kubectl;``` +```brew cask uninstall docker virtualbox minikube;``` +### kubernetes dashboard + +> The Dashboard UI is not deployed by default. To deploy it, run the following command: + +```kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml``` + +>You can access Dashboard using the kubectl command-line tool by running the following command: + +```kubectl proxy``` + + +> Kubectl will make Dashboard available at http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/. + + +- sign-in + +> To get the token in a single oneliner: + +```kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^deployment-controller-token-/{print $1}') | awk '$1=="token:"{print $2}'``` + + + + +## Run docker image in minikube + ``` + kubectl run --image= --env="PORT=8080" --port=8080 --expose --namespace= +``` + +## Run and deploy docker image directly to kubectl + +The following command will launch a deployment called http which will start a container based on the Docker Image katacoda/docker-http-server:latest. + +```kubectl run http --image=katacoda/docker-http-server:latest --replicas=1``` + + +Use the following command to expose the container port 80 on the host 8000 binding to the external-ip of the host. + +```kubectl expose deployment http --external-ip="172.17.0.57" --port=8000 --target-port=80``` + +You will then be able to ping the host and see the result from the HTTP service. + +```curl http://172.17.0.57:8000``` + + +Use the command command to create a second http service exposed on port 8001. + +```kubectl run httpexposed --image=katacoda/docker-http-server:latest --replicas=1 --port=80 --hostport=8001``` + +You should be able to access it using curl http://172.17.0.57:8001 + +Under the covers, this exposes the Pod via Docker Port Mapping. As a result, you will not see the service listed using kubectl get svc + +To find the details you can use ```docker ps | grep httpexposed``` \ No newline at end of file diff --git a/Data-streaming/amazon-kinesis.md b/Data-streaming/amazon-kinesis.md new file mode 100644 index 00000000..25345584 --- /dev/null +++ b/Data-streaming/amazon-kinesis.md @@ -0,0 +1,17 @@ +## Amazon Kinesis + +Amazon Kinesis makes it easy to collect, process, and analyze real-time, streaming data so you can get timely insights and react quickly to new information. Amazon Kinesis offers key capabilities to cost-effectively process streaming data at any scale, along with the flexibility to choose the tools that best suit the requirements of your application. With Amazon Kinesis, you can ingest real-time data such as video, audio, application logs, website clickstreams, and IoT telemetry data for machine learning, analytics, and other applications. Amazon Kinesis enables you to process and analyze data as it arrives and respond instantly instead of having to wait until all your data is collected before the processing can begin. + +Benefits: +- Real-time: Amazon Kinesis enables you to ingest, buffer, and process streaming data in real-time, so you can derive insights in seconds or minutes instead of hours or days. +- Fully Managed: Amazon Kinesis is fully managed and runs your streaming applications without requiring you to manage any infrastructure. +- Scalable: Amazon Kinesis can handle any amount of streaming data and process data from hundreds of thousands of sources with very low latencies + +Capabilities: +- Amazon Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for analytics, machine learning (ML), and other processing. +- Amazon Kinesis Data Streams is a scalable and durable real-time data streaming service that can continuously capture gigabytes of data per second from hundreds of thousands of sources. +- Amazon Kinesis Data Firehose is the easiest way to capture, transform, and load data streams into AWS data stores for near real-time analytics with existing business intelligence tools. +- Amazon Kinesis Data Analytics is the easiest way to process data streams in real time with SQL or Apache Flink without having to learn new programming languages or processing frameworks. + + +For more info: [https://aws.amazon.com/kinesis/](https://aws.amazon.com/kinesis/) diff --git a/Data-streaming/apache-kafka.md b/Data-streaming/apache-kafka.md new file mode 100644 index 00000000..eaa93f6d --- /dev/null +++ b/Data-streaming/apache-kafka.md @@ -0,0 +1,19 @@ +## Apache Kafka + +Apache Kafka is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications. + +Core Capabilities: +- Deliver messages at network limited throughput using a cluster of machines with latencies as low as 2ms. +- Scale production clusters up to a thousand brokers, trillions of messages per day, petabytes of data, hundreds of thousands of partitions. Elastically expand and contract storage and processing. +- Store streams of data safely in a distributed, durable, fault-tolerant cluster. +- Stretch clusters efficiently over availability zones or connect separate clusters across geographic regions. + + +Ecosystem: +- Process streams of events with joins, aggregations, filters, transformations, and more, using event-time and exactly-once processing. +- Kafka’s out-of-the-box Connect interface integrates with hundreds of event sources and event sinks including Postgres, JMS, Elasticsearch, AWS S3, and more. +- Read, write, and process streams of events in a vast array of programming languages. +- Large ecosystem of open source tools: Leverage a vast array of community-driven tooling. + + +For more info: [https://kafka.apache.org/](https://kafka.apache.org/) diff --git a/Data-streaming/apache-storm.md b/Data-streaming/apache-storm.md new file mode 100644 index 00000000..f967e7ef --- /dev/null +++ b/Data-streaming/apache-storm.md @@ -0,0 +1,11 @@ +## Apache Storm + +Apache Storm is a free and open source distributed realtime computation system. Apache Storm makes it easy to reliably process unbounded streams of data, doing for realtime processing what Hadoop did for batch processing. Apache Storm is simple, can be used with any programming language, and is a lot of fun to use! + +Apache Storm has many use cases: realtime analytics, online machine learning, continuous computation, distributed RPC, ETL, and more. Apache Storm is fast: a benchmark clocked it at over a million tuples processed per second per node. It is scalable, fault-tolerant, guarantees your data will be processed, and is easy to set up and operate. + +Apache Storm integrates with the queueing and database technologies you already use. An Apache Storm topology consumes streams of data and processes those streams in arbitrarily complex ways, repartitioning the streams between each stage of the computation however needed. + +Apache Storm integrates with any queueing system and any database system. Apache Storm's spout abstraction makes it easy to integrate a new queuing system. Likewise, integrating Apache Storm with database systems is easy. + +For more info: [https://storm.apache.org/](https://storm.apache.org/) diff --git a/Data-streaming/azure-stream-analytics.md b/Data-streaming/azure-stream-analytics.md new file mode 100644 index 00000000..0074ac65 --- /dev/null +++ b/Data-streaming/azure-stream-analytics.md @@ -0,0 +1,11 @@ +## Azure Stream Analytics + +Azure Stream Analytics is a fully managed stream processing engine that is designed to analyze and process large volumes of streaming data with sub-millisecond latencies. Patterns and relationships can be identified in data that originates from a variety of input sources including applications, devices, sensors, clickstreams, and social media feeds. These patterns can be used to trigger actions and initiate workflows such as creating alerts, feeding information to a reporting tool, or storing transformed data for later use. Stream Analytics is also available on the Azure IoT Edge runtime, enabling to process data directly on IoT devices. + +Features: +- End-to-end analytics pipeline that is production-ready in minutes with familiar SQL syntax and extensible with JavaScript and C# custom code +- Rapid scalability with elastic capacity to build robust streaming data pipelines and analyze millions of events at subsecond latencies +- Hybrid architectures for stream processing with the ability to run the same queries in the cloud and on the edge +- Enterprise-grade reliability with built-in recovery and built-in machine learning capabilities for advanced scenarios + +For more info: [https://learn.microsoft.com/en-us/azure/stream-analytics/stream-analytics-introduction](https://learn.microsoft.com/en-us/azure/stream-analytics/stream-analytics-introduction) diff --git a/Data-streaming/gcloud-dataflow.md b/Data-streaming/gcloud-dataflow.md new file mode 100644 index 00000000..d6eb4489 --- /dev/null +++ b/Data-streaming/gcloud-dataflow.md @@ -0,0 +1,16 @@ +## Google Cloud Dataflow + +Google Cloud Dataflow is a fully managed service for executing Apache Beam pipelines within the Google Cloud Platform ecosystem. + +Benefits: +- Streaming data analytics with speed: Dataflow enables fast, simplified streaming data pipeline development with lower data latency. +- Simplify operations and management: Allow teams to focus on programming instead of managing server clusters as Dataflow’s serverless approach removes operational overhead from data engineering workloads. +- Reduce total cost of ownership: Resource autoscaling paired with cost-optimized batch processing capabilities means Dataflow offers virtually limitless capacity to manage your seasonal and spiky workloads without overspending. + +Features: +- Autoscaling of resources and dynamic work rebalancing: Minimize pipeline latency, maximize resource utilization, and reduce processing cost per data record with data-aware resource autoscaling. Data inputs are partitioned automatically and constantly rebalanced to even out worker resource utilization and reduce the effect of “hot keys” on pipeline performance. +- Flexible scheduling and pricing for batch processing: For processing with flexibility in job scheduling time, such as overnight jobs, flexible resource scheduling (FlexRS) offers a lower price for batch processing. These flexible jobs are placed into a queue with a guarantee that they will be retrieved for execution within a six-hour window. +- Ready-to-use real-time AI patterns: Enabled through ready-to-use patterns, Dataflow’s real-time AI capabilities allow for real-time reactions with near-human intelligence to large torrents of events. Customers can build intelligent solutions ranging from predictive analytics and anomaly detection to real-time personalization and other advanced analytics use cases. + + +For more info: [https://cloud.google.com/dataflow](https://cloud.google.com/dataflow) diff --git a/Data-streaming/ibm-stream-analytics.md b/Data-streaming/ibm-stream-analytics.md new file mode 100644 index 00000000..27892357 --- /dev/null +++ b/Data-streaming/ibm-stream-analytics.md @@ -0,0 +1,11 @@ +## IBM Stream Analytics + +IBM Streaming Analytics for IBM Cloud evaluates a broad range of streaming data — unstructured text, video, audio, geospatial and sensor — helping organizations spot opportunities and risks and make decisions in real time. + +Features: +- Development support: Rich Eclipse-based, visual IDE lets solution architects visually build applications or use familiar programming languages like Java™, Scala or Python. +- Rich data connections: Data engineers can connect with virtually any data source — whether structured, unstructured or streaming — and integrate with Hadoop, Spark and other data infrastructures. +- Analysis and visualization: Built-in domain analytics — like machine learning, natural language, spatial-temporal, text, acoustics and more — to create adaptive streams applications. + + +For more info: [https://www.ibm.com/in-en/cloud/streaming-analytics](https://www.ibm.com/in-en/cloud/streaming-analytics) diff --git a/Data-streaming/readme.md b/Data-streaming/readme.md new file mode 100644 index 00000000..18255520 --- /dev/null +++ b/Data-streaming/readme.md @@ -0,0 +1,16 @@ +# Data Streaming +***** + +The term "streaming" is used to describe continuous, never-ending data streams with no beginning or end, that provide a constant feed of data that can be utilized/acted upon without needing to be downloaded first. + + +**** +Following are some of the renowned services used for Data Streaming: + +- [Amazon Kinesis](amazon-kinesis.md) +- [Apache Kafka](apache-kafka.md) +- [Apache Storm](apache-storm.md) +- [Spark streaming](spark-streaming.md) +- [IBM Stream analytics](ibm-stream-analytics.md) +- [Azure Stream Analytics](azure-stream-analytics.md) +- [Google Cloud DataFlow](gcloud-dataflow.md) diff --git a/Database/readme.md b/Database/readme.md new file mode 100644 index 00000000..4da83acb --- /dev/null +++ b/Database/readme.md @@ -0,0 +1,42 @@ +# Everything Database + +A ***database*** is an organized collection of structured information, or data, typically stored electronically in a computer system. It is usually controlled by a database management system (DBMS). Together, the data and the DBMS, along with the applications that are associated with them, are referred to as a database system, often shortened to just database.
+Most databases use ***Structured Query Language (SQL)*** for writing and querying data. + +## Structured Query Language (SQL) + +**SQL** is a standard language for storing, manipulating and retrieving data in relational databases. SQL was first developed at IBM in the 1970s with Oracle as a major contributor, which led to implementation of the SQL ANSI standard, SQL has spurred many extensions from companies such as IBM, Oracle, and Microsoft. Although SQL is still widely used today, new programming languages are beginning to appear + +## Evolution Of Database + + **1.Flat Files (1970s-1990s)** : Flat files database is a database that stores information in a single file or table. In text file, every line contains one record where fields either have fixed length or they are separated by commas, whitespaces, tabs or any records and they cannot contain multiple tables as well. + + **2.Hierarchical (1970s-1990s)** : As the name indicates, hierarchical database contains data in a hierarchically-arranged data. More Perceptively it can parent can have many children but one child can only have one parent i. e.,; one-to-many relationship. Its hierarchical structure contains levels or segments which are equivalent to the file system’s record type. + + **3.Network database (1970s -1990s)** : The inventor of network model is Charles Bachmann. Unlike hierarchical database model, network database allows multiple parent and child relationships i. e., it maintains many-to many relationship. Network database is basically a graph structure. The network database model was created to achieve three main objectives:
+
    + a. To represent complex data relationship more effectively
    + b. To improve the performance of the database.
    + c. To improve a database standard. +
+ + **4.Realationl database (1980s-present)** : Relationship database model was proposed by E. F. Codd. After the hierarchical and network model the birth of this model was huge step ahead. It allows the entities to be related through a common attribute. In the table there are alternative keys. This property makes this model extremely flexible. + + **5.Object – oriented database (1990s -present)** : Object-Oriented database management system is that database system in which the data or information is presented in the form of objects, much like in object-Oriented programming language. Furthermore, object oriented DBMS also facilitate the user by offering transportation support, language for various queries, and indexing options. + + **6. Object- relationship database (1990s-present)** : Defined in simple teams, an object relationship database management system displays a modified object- oriented user- display over the already implemented relationship database management system. When various software interact with this modified- database management system, they will customarily operate in a manner such that data is assumed to be saved as objects. + +## Types of databases +There are many different types of databases. The best database for a specific organization depends on how the organization intends to use the data. + +- **Relational databases:** Relational databases became dominant in the 1980s. Items in a relational database are organized as a set of tables with columns and rows. Relational database technology provides the most efficient and flexible way to access structured information. +- **Object-oriented databases:** Information in an object-oriented database is represented in the form of objects, as in object-oriented programming. +- **Distributed databases:** A distributed database consists of two or more files located in different sites. The database may be stored on multiple computers, located in the same physical location, or scattered over different networks. +- **Data warehouses:** A central repository for data, a data warehouse is a type of database specifically designed for fast query and analysis. +- **NoSQL databases:** A NoSQL, or nonrelational database, allows unstructured and semistructured data to be stored and manipulated (in contrast to a relational database, which defines how all data inserted into the database must be composed). NoSQL databases grew popular as web applications became more common and more complex. +- **Graph databases:** A graph database stores data in terms of entities and the relationships between entities. +- **OLTP databases:** An OLTP database is a speedy, analytic database designed for large numbers of transactions performed by multiple users. + + +For more info: [https://www.oracle.com/in/database/what-is-database/#relational](https://www.oracle.com/in/database/what-is-database/#relational) + diff --git a/DevOps/CNCF.md b/DevOps/CNCF.md new file mode 100644 index 00000000..f103f7bd --- /dev/null +++ b/DevOps/CNCF.md @@ -0,0 +1,9 @@ +# CNCF DevOps + + + +![](./../img/CNCF_TrailMap_latest.png) + +![](../img/cncf_serverless.png) + +![](../img/cncf_landscape.png) \ No newline at end of file diff --git a/DevOps/README.md b/DevOps/README.md new file mode 100644 index 00000000..edaab4f2 --- /dev/null +++ b/DevOps/README.md @@ -0,0 +1,130 @@ +## DevOps Guide Topic Wise: + +### 1 Programming Language + +- Python : Scripting for web +- Shell : Scripting for servers +- Yml : For Configuration of Cloud files +- Golang : Servers and Cloud Architectures +- Javascript : Good to know for any web-development works +- Markdown : For documentation + + +### 2 OS-Concepts + +- Process Management +- Threads and Concurrency +- Sockets +- POSIX Basics +- Networking concepts +- Cron Jobs +- I/O Management +- Vitualization +- Memory Processes and Management +- File Systems +- Scheduling + +### 3 Maintaining Servers +- Networking Concepts +- Security Concepts - OWASP-Top 10 +- Protocols +- Reverse Proxy | Proxy | Forward Proxy +- Caching Servers +- Load Balancer +- Firewall +- Webservers + - Python : WSGI | uWSGI | Tornado + - Nginx + - Apache + - Caddy + - IIS + - Tomcat + - Node.js + + +### 4 Terminal Commands + +- Text Manipulation +- Process Monitoring +- Networking Processes +- Bash scripting +- Performance Management +- vim +- AWS CLI +- Kubernetes CLI +- Docker CLI +- Cloud CLIs + +### 5 Infrastructure as Code + +- CI/CD + - Travis CI + - Circle CI + - Gitlab + - Jenkins + - Azure + +- Configuration Management + - Ansible + - Chef + - Puppet + - salt + +- Containers + - Docker + - LXC + +- Container Orchestration + - Kubernetes + - Mesos + - Docker SWARM + - Nomad + - Minikube + - Openshift + - Amazon ECS + - Google Kuberenetes Engine (GKE) + +- Infrsatructure Provisioning + - Hashicorp Terraform + - AWS Cloudformation + - Pulmi + - Redhat Ansible + - Azure Automation + +### 7 Infrastructure Monitoring + +- Prometheus +- Grafana +- Nagios +- Zabbix + +### 6 Application Monitoring + +- Jaegar +- New Relic +- Open Tracing +- Traceview + +### 8 Cloud Providers + +- Amazon AWS +- Google GCP +- Microsoft Azure +- Digital Ocean +- Linode +- Vultr + +### 9 Log Management + +- Elastic Stack +- Graylog +- Splunk +- Papertrail + +### 10 Version Control + +- Github +- Bitbucket +- Mercurial + +*************** diff --git a/Docker/node/node_modules/.bin/mime b/Docker/node/node_modules/.bin/mime deleted file mode 120000 index fbb7ee0e..00000000 --- a/Docker/node/node_modules/.bin/mime +++ /dev/null @@ -1 +0,0 @@ -../mime/cli.js \ No newline at end of file diff --git a/Docker/node/package-lock.json b/Docker/node/package-lock.json deleted file mode 100644 index e85f701c..00000000 --- a/Docker/node/package-lock.json +++ /dev/null @@ -1,374 +0,0 @@ -{ - "name": "nodejs-image-demo", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - } - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "requires": { - "safe-buffer": "5.1.2" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" - }, - "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", - "requires": { - "mime-db": "1.40.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" - } - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - } - } -} diff --git a/IaC/Ansible/ansible-concepts.md b/IaC/Ansible/ansible-concepts.md deleted file mode 100644 index 7364e466..00000000 --- a/IaC/Ansible/ansible-concepts.md +++ /dev/null @@ -1 +0,0 @@ -# Ansible \ No newline at end of file diff --git a/IaC/Chef/chef-commands.md b/IaC/Chef/chef-commands.md deleted file mode 100644 index c6bf49c4..00000000 --- a/IaC/Chef/chef-commands.md +++ /dev/null @@ -1 +0,0 @@ -# Chef Commands \ No newline at end of file diff --git a/IaC/Prometheus/prometheus-concepts.md b/IaC/Prometheus/prometheus-concepts.md deleted file mode 100644 index 0a5263f4..00000000 --- a/IaC/Prometheus/prometheus-concepts.md +++ /dev/null @@ -1 +0,0 @@ -# Prometheus Concepts \ No newline at end of file diff --git a/IaC/Puppet/puppet-commands.md b/IaC/Puppet/puppet-commands.md deleted file mode 100644 index d4456a68..00000000 --- a/IaC/Puppet/puppet-commands.md +++ /dev/null @@ -1 +0,0 @@ -# Puppet Commands \ No newline at end of file diff --git a/IaC/Terraform/readme.md b/IaC/Terraform/readme.md deleted file mode 100644 index 4d08f8cf..00000000 --- a/IaC/Terraform/readme.md +++ /dev/null @@ -1,34 +0,0 @@ -# Terraform - -*************************** -## Table Of Contents: - - [Introduction](#introdution) - - [Tutorial Resources](#tutorial-resources) - - [References](#reference) - - -***************** - -## Introdution - - What is Terraform? - - - Terraform is an open source tool that allows you to define infrastructure for a variety of providers (e.g. AWS, Azure, Google Cloud, DigitalOcean, DataDog, VMWare, GitHub, etc) using a simple, declarative programming language and to deploy and manage that infrastructure using a few CLI commands. - -## Usage - - Terraform Workflow - - 1. Scope - Confirm what resources need to be created for a given project. - 2. Author - Create the configuration file in Terraform template files based on the scoped parameters - 3. Initialize - Run `terraform init` in the project directory with the configuration files. This will download the correct provider plug-ins for the project. - 4. Plan & Apply - Run `terraform plan` to verify creation process and then `terraform apply` to create real resources as well as state file that compares future changes in your configuration files to what actually exists in your deployment environment. - -**************************** - -## Tutorial Resources - - [Hashicorp Learn](https://learn.hashicorp.com/terraform) - -************ - -## References - - [Getting started with Terraform](https://learn.hashicorp.com/terraform/getting-started/intro) - - [An Introduction to Terraform](https://blog.gruntwork.io/an-introduction-to-terraform-f17df9c6d180) diff --git a/IaC/readme.md b/IaC/readme.md deleted file mode 100644 index f9db6e77..00000000 --- a/IaC/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -# Infrastructure as Code - - -- Puppet runs the data centers for several significant companies like Reddit, Dell, and Google and runs on all OS systems. It also has one of the most advanced interfaces on this list. It has been on the market for a long time and uses Ruby-based DSL as the primary language for defining the desired end state of the infrastructure. I said “end state” because that is what you need to define. -- Puppet will then figure out the best way to achieve that end state for you. It also monitors the infrastructure for changes that deviate away from the defined end state and automatically corrects those changes too. This is a tool developed specifically for system administrators thanks to considerable enterprise and community support provided. - -- Choosing the best IaC tool is a matter of finding one that suits your personal preference and specific needs best. Two of the most important things to make an IaC system easy to use for you are consistency in both how you utilize it and environmental awareness. Also, find the programming language that works the best for you and your team. As you will spend a lot of time—at least to begin with—writing content, choose what your team can best communicate in. What makes you most productive? \ No newline at end of file diff --git a/Infrastructure-provisioning/Ansible/Ansible Commands.md b/Infrastructure-provisioning/Ansible/Ansible Commands.md new file mode 100644 index 00000000..265cd040 --- /dev/null +++ b/Infrastructure-provisioning/Ansible/Ansible Commands.md @@ -0,0 +1,1030 @@ +## Ansible Commands +## installation +```sh +yum install ansible +apt install ansible +``` +```sh +pip3 install ansible +# for python2 - default installation +pip install ansible +``` +remote machine should have 'python' - 'gather_facts: False' or 'gather_facts: no' otherwise + +## uninstall +```sh +rm -rf $HOME/.ansible +rm -rf $HOME/.ansible.cfg +sudo rm -rf /usr/local/lib/python2.7/dist-packages/ansible +sudo rm -rf /usr/local/lib/python2.7/dist-packages/ansible-2.5.4.dist-info +sudo rm -rf /usr/local/bin/ansible +sudo rm -rf /usr/local/bin/ansible-config +sudo rm -rf /usr/local/bin/ansible-connection +sudo rm -rf /usr/local/bin/ansible-console +sudo rm -rf /usr/local/bin/ansible-doc +sudo rm -rf /usr/local/bin/ansible-galaxy +sudo rm -rf /usr/local/bin/ansible-inventory +sudo rm -rf /usr/local/bin/ansible-playbook +sudo rm -rf /usr/local/bin/ansible-pull +sudo rm -rf /usr/local/bin/ansible-vault +sudo rm -rf /usr/lib/python2.7/dist-packages/ansible +sudo rm -rf /usr/local/lib/python2.7/dist-packages/ansible +``` + +## ansible configuration places +* path variable $Ansible_Config +* ~/.ansible.cfg +* /etc/ansible/ansible.cfg +```sh +ansible-config view +# list of possible environment variables +ansible-config dump +``` + +### configuration for external roles +filename: ~/.ansible.cfg +```properties +[defaults] +roles_path = ~/repos/project1/roles:~/repos/project2/roles +``` + +### check configuration +```sh +ansible-config view +``` + +## inventory +### without inventory inline host ip +``` +ansible all -i desp000111.vantage.zur, --user=my_user -m "ping" -vvv +``` + +### without inventory with pem ssh private ssh key +generate PEM file +```sh +ssh-keygen -t rsa -b 4096 -m PEM -f my_ssh_key.pem +ll my_ssh_key.pem + +ansible all -i desp000111.vantage.zur, --user=vitalii.cherkashyn -e ansible_ssh_private_key_file=my_ssh_key.pem -m "ping" -vvv +``` + +### ini file +```properties +# example cfg file +[web] +host1 +host2 ansible_port=222 # defined inline, interpreted as an integer + +[web:vars] +http_port=8080 # all members of 'web' will inherit these +myvar=23 # defined in a :vars section, interpreted as a string +``` + +## execute with specific remote python version, remote python, rewrite default variables, rewrite variables, override variable +``` +--extra-vars "remote_folder=$REMOTE_FOLDER ansible_python_interpreter=/usr/bin/python" +``` + +## execute ansible for one host only, one host, one remove server, verbosity +```sh +ansible-playbook -i "ubs000015.vantage.org , " mkdir.yaml + +ansible-playbook welcome-message.yaml -i airflow-test-account-01.ini --limit worker --extra-vars="ACCOUNT_ID=QA01" --user=ubuntu --ssh-extra-args="-i $EC2_KEY" -vvv + +ansible all -i airflow-test-account-01.ini --user=ubuntu --ssh-extra-args="-i $EC2_KEY" -m "ping" -vvv +ansible main,worker -i airflow-test-account-01.ini --user=ubuntu --ssh-extra-args="-i $EC2_KEY" -m "ping" +``` +simple file for creating one folder +```yaml +- hosts: all + tasks: + - name: Creates directory + file: + path: ~/spark-submit/trafficsigns + state: directory + mode: 0775 + - name: copy all files from folder + copy: + src: "/home/projects/ubs/current-task/nodes/ansible/files" + dest: ~/spark-submit/trafficsigns + mode: 0775 + + - debug: msg='folder was amazoncreated for host {{ ansible_host }}' +``` + +## execute ansible locally, local execution +```sh +# --extra-vars="mapr_stream_path={{ some_variable_from_previous_files }}/some-argument" \ + +ansible localhost \ + --extra-vars="deploy_application=1" \ + --extra-vars=@group_vars/all/vars/all.yml \ + --extra-vars=@group_vars/ubs-staging/vars/ubs-staging.yml \ + -m include_role \ + -a name="roles/labeler" +``` + + +## execute ansible-playbook with external paramters, bash script ansible-playbook with parameters, extra variables, external variables, env var +```j2 +# variable from env +{{ lookup('env','DB_VARIANT_USERNAME') }} +``` +```sh +ansible-playbook -i inventory.ini playbook.yml --extra-vars "$*" +``` +with path to file for external parameters, additional variables from external file +```sh +ansible-playbook -i inventory.ini playbook.yml --extra-vars @/path/to/var.properties +ansible-playbook playbook.yml --extra-vars=@/path/to/var.properties +``` + +## external variables inline +```sh +ansible-playbook playbook.yml --extra-vars="oc_project=scenario-test mapr_stream_path=/mapr/prod.zurich/vantage/scenario-test" +``` + +## check is it working, ad-hoc command +```sh +ansible remote* -i inventory.ini -m "ping" +ansible remote* -i inventory.ini --module-name "ping" +``` +```sh +ansible remote* -i inventory.ini -a "hostname" +``` + +## loop example +```sh + - name: scripts {{ item }} + template: + mode: 0777 + src: "templates/{{ item }}" + dest: "{{ root_folder }}/{{ item }}" + loop: + - "start-all.sh" + - "status.sh" + - "stop-all.sh" +``` + +## repeat execution +```sh +--limit {playbookfile}.retry +``` + +## start with task, execute from task, begin with task, skip previous tasks +```sh +ansible-playbook playbook.yml --start-at-task="name of the start to be started from" +``` + +## replace variables inside file to dedicated file, move vars to separate file +* before +```yaml + vars: + db_user: my_user + db_password: my_password + ansible_ssh_pass: my_ssh_password + ansible_host: 192.168.1.14 +``` +* after +*( 'vars' block is empty )* +filepath: +```sh +./host_vars/id_of_the_server +``` +or groupvars: +```sh +./group_vars/id_of_the_group_into_square_brakets +``` +code +```yaml +db_user: my_user +db_password: my_password +ansible_ssh_pass: my_ssh_password +ansible_host: 192.168.1.14 +``` + +## move code to separate file, tasks into file +cut code from original file and paste it into separate file ( with appropriate alignment !!! ), +write instead of the code: +```yaml + - include: path_to_folder/path_to_file +``` +approprate file should be created: +```sh +./path_to_folder/path_to_file +``` + +## skip/activate some tasks with labeling, tagging +```yaml +tasks: +- template + src: template/activation.sh.j2 + dest: /usr/bin/activation.sh + tags: + - flag_activation +``` +multitag, multi-tag +```yaml +tasks: +- template + src: template/activation.sh.j2 + dest: /usr/bin/activation.sh + tags: + - flag_activation + - flag_skip +``` + +```sh +ansible-playbook previous-block.yml --skip-tags "flag_activation" +# ansible-playbook previous-block.yml --skip-tags=flag_activation +# ansible-playbook previous-block.yml --tags "flag_activation" +# ansible-playbook previous-block.yml --tags=flag_activation +``` +# Debug +## [debug playbook](https://docs.ansible.com/ansible/latest/user_guide/playbooks_debugger.html) +```bash +export ANSIBLE_STRATEGY=debug +# revert it afterwards ( avoid "ERROR! Invalid play strategy specified: "): +# export ANSIBLE_STRATEGY=linear +``` +print variables +```python +task.args +task.args['src'] +vars() +``` +change variables +```python +del(task.args['src']) +task.args['src']="/new path to file" +``` +set variable +``` +- name: Set Apache URL + set_fact: + apache_url: 'http://example.com/apache' + +- name: Download Apache + shell: wget {{ apache_url }} +``` +shell == ansible.builtin.shell + +manage palying +``` +redo +continue +quit +``` + +```yaml +- name: airflow setup for main (web server) and workers + hosts: all + tasks: + - name: airflow hostname + debug: msg="{{ lookup('vars', 'ansible_host') }}" + - name: all variables from host + debug: msg="{{ vars }}" + when: run_mode == "debug" +``` + +## debug command +``` + - debug: + msg: "print variable: {{ my_own_var }}" +``` +``` + - shell: /usr/bin/uptime + register: result + + - debug: + var: result +``` + +## env variables bashrc +```sh +- name: source bashrc + sudo: no + shell: . /home/username/.bashrc && [the actual command you want run] +``` + +## rsync copy files +``` + - name: copy source code + synchronize: + src: '{{ item.src }}' + dest: '{{ item.dest }}' + delete: yes + recursive: yes + rsync_opts: + - "--exclude=.git" + - "-avz" + - '-e ssh -i {{ key }} ' + with_items: + - { src: '{{ path_to_repo }}/airflow-dag/airflow_shopify/', dest: '/home/ubuntu/airflow/airflow-dag/airflow_shopify/' } + +``` + +## ec2 managing airflow ec2 +``` +export PATH=$PATH:/home/ubuntu/.local/bin +nohup airflow webserver +``` + +## debug module +argument file ( args.json ) +```json +{ + "ANSIBLE_MODULE_ARGS": { + "task_parameter_1": "just a string", + "task_parameter_2": 50 + } +} +``` +execute file +```bash +python3 -m pdb library/oc_collaboration.py args.json +``` +set breakpoint +```python +import pdb +... +pdb.set_trace() +``` +run until breakpoint +```sh +until 9999 +next +``` + +## debug module inline, execute module inline, adhoc module check +```sh +ansible localhost -m debug --args msg="my custom message" +# collect facts +ansible localhost -m setup +``` + +## task print all variables +```yaml +- name: "Ansible | List all known variables and facts" + debug: + var: hostvars[inventory_hostname] +``` + +## ansible-console +```sh +ansible-console +debug msg="my custom message" +shell pwd +``` + +# error handling, try catch +## stop execution of steps (of playbook) when at least one server will throw error +```yaml + any_errors_fatal:true +``` +## not to throw error for one certain task +```yaml + - mail: + to: 1@yahoo.com + subject: info + body: das ist information + ignore_errors: yes +``` +## fail when, fail by condition, parse log file for errors +```yaml + - command: cat /var/log/server.log + register: server_log_file + failed_when : "'ERROR' in server_log_file.stdout" +``` + +# template, Jinja2 templating, pipes, [ansible filtering](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html) +default value +``` +default path is {{ my_custom_path | default("/opt/program/script.sh") }} +``` +escape special characters +``` +{{ '{{ filename }}.log' }} +``` + +operation with list +``` +{{ [1,2,3] | min }} +{{ [1,2,3] | max }} +{{ [1,2,3] | first }} +{{ [1,2,3] | last }} +{{ [1,2,3,2,3,] | unique }} +{{ [1,2,3] | union([1,2]) }} +{{ [1,2,3] | intersect([3]) }} +{{ 100 | random }} +{{ ["space", "separated", "value"] | join(" ") }} +{{'latest' if (my_own_value is defined) else 'local-build'}} +``` +file name from path (return 'script.sh') +``` +{{ "/etc/program/script.sh" | basename }} +``` +## copy file and rename it, pipe replace suffix +```yaml +- name: Create DAG config + template: src={{ item }} dest={{ airflow_dag_dir }}/config/{{ item | basename | regex_replace('\.j2','') }} + with_fileglob: + - ../airflow_dags/airflow_dags_gt/config/*.py.j2 +``` + +## copy reverse copy from destination machine +``` +- name: Fetch template + fetch: + src: '{{ only_file_name }}' + dest: '{{ destination_folder }}' + flat: yes + tags: deploy +``` + +## directives for Jinja +for improving indentation globally in file, add one of next line in the beginning +```yaml +#jinja2: lstrip_blocks: True +#jinja2: trim_blocks:False +#jinja2: lstrip_blocks: True, trim_blocks: True +``` +for improving indentation only for the block +```j2 +
+ {%+ if something %}hello{% endif %} +
+``` +condition example +```j2 +{% if lookup('env','DEBUG') == "true" %} + CMD ["java", "start-debug"] +{% else %} + CMD ["java", "start"] +{% endif %} +``` + +### directives for loop, for last, loop last +``` +[ +{% for stream in deployment.streams %} + { + "stream": "{{ stream.stream_name }}", + "classN": "{{ stream.class_name }}", + "script": "{{ stream.script_name }}", + "sibFolders": [ + {% for folder in stream.sub_folders %} + "{{ folder }}"{% if not loop.last %},{% endif %} + {% endfor %} + ] + }{% if not loop.last %},{% endif %} +{% endfor %} +] +``` + +## escaping +just a symbol +``` +{{ '{{' }} +``` +bigger piece of code +``` +{% raw %} +
    + {% for item in seq %} +
  • {{ item }}
  • + {% endfor %} +
+{% endraw %} +``` + + +## template with tempfile +``` +- hosts: localhost + gather_facts: no + tasks: + - tempfile: + state: file + suffix: config + register: temp_config + + - template: + src: templates/configfile.j2 + dest: "{{ temp_config.path }}" +``` +# [modules](https://github.com/ansible/ansible/tree/devel/lib/ansible/modules) +* [create custom module](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html) +## settings for modules +also need to 'notify' ansible about module giving one of the next option: +* add your folder with module to environment variable ANSIBLE_LIBRARY +* update $HOME/.ansible.cfg + ```properties + library=/path/to/module/library + ``` + +## module documentation +``` +ansible-doc -t module {name of the module} +``` + +## minimal module +``` +from ansible.module_utils.basic import AnsibleModule +def main(): + input_fields = { + "operation": {"required": True, "type": "str"}, + "file": {"required": True, "type": "str"}, + "timeout": {"required": False, "type": "int", "default": "120"} + } + module = AnsibleModule(argument_spec=input_fields) + operation = module.params["operation"] + file = module.params["file"] + timeout = module.params["timeout"] + # module.fail_json(msg="you must be logged in into OpenShift") + module.exit_json(changed=True, meta={operation: "create"}) +``` + +# [plugins](https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/) +example of plugin +``` +{{ list_of_values | average }} +``` +python code for plugin +``` +dev average(list): + return sum(list) / float(len(list)) + +class AverageModule(object): + def filters(self): + return {'average': average} +``` +execution +``` +export ANSIBLE_FILTER_PLUGINS=/full/path/to/folder/with/plugin +ansible-playbook playbook.yml +``` + +## lookups +```sh +# documentation +ansible-doc -t lookup -l +ansible-doc -t lookup csvfile +``` + +replace value from file with special format +```python +{{ lookup('csvfile', 'web_server file=credentials.csv delimiter=,') }} +{{ lookup('ini', 'password section=web_server file=credentials.ini') }} +{{ lookup('env','DESTINATION') }} +{{ lookup('file','/tmp/version.txt') }} +``` +lookups variables +``` +{{ hostvars[inventory_hostname]['somevar_' + other_var] }} + +For ‘non host vars’ you can use the vars lookup plugin: +{{ lookup('vars', 'somevar_' + other_var) }} +``` + +```yaml +- name: airflow setup for main (web server) and workers + hosts: all + tasks: + - name: airflow hostname + debug: msg="{{ lookup('vars', 'ansible_host') }}" + - name: variable lookup + debug: msg="lookup data {{ lookup('vars', 'ansible_host')+lookup('vars', 'ansible_host') }}" + - name: read from ini, set variable + set_fact: + queues: "{{ lookup('ini', lookup('vars', 'ansible_host')+' section=queue file=airflow-'+lookup('vars', 'account_id')+'-workers.ini') }}" + - name: airflow lookup + debug: msg=" {{ '--queues '+lookup('vars', 'queues') if lookup('vars', 'queues') else '' }}" +``` + +# inventory file +--- +## inventory file, inventory file with variables, [rules](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html) +``` +[remote_ssh] +172.28.128.3 ansible_connection=ssh ansible_port=22 ansible_user=tc ansible_password=tc +``` +## dynamic inventory +python inventory.py (with 'py' extension) instead of txt +``` +import json +data = {"databases": {"hosts": ["host1", "host2"], "vars": {"ansible_ssh_host":"192.168.10.12", "ansible_ssh_pass":"Passw0rd"} }} +print(json.dumps(data)) +``` +also next logic should be present +``` +inventory.py --list +inventory.py --host databases +``` +[prepared scripts](https://github.com/ansible/ansible/tree/devel/contrib/inventory) + +## inventory file with variables ( python Jinja templating) +``` +[remote_ssh] +172.28.128.3 ansible_connection=ssh ansible_port=22 ansible_user=tc ansible_password=tc http_port=8090 +``` +playbook usage: +``` +'{{http_port}}' +``` + +## execution with inventory examples +for one specific host without inventory file +```sh +ansible-playbook playbook.yml -i 10.10.10.10 +``` +with inventory file +```sh +ansible-playbook -i inventory.ini playbook.yml +``` +issue with execution playbook for localhost only, local execution +```text +Note that the implicit localhost does not match 'all' +... +skipping: no hosts matched +``` +solution +```sh +ansible-playbook --inventory="localhost," --connection=local --limit=localhost --skip-tag="python-script" playbook.yaml + +# example with external variables +ansible-playbook --inventory="localhost," --connection=local --limit=localhost \ +--extra-vars="oc_project=scenario-test mapr_stream_path=/mapr/prod.zurich/vantage/scenario-test" \ +--tag="scenario-service" deploy-scenario-pipeline.yaml +``` + +solution2 +```sh +#vim /etc/ansible/hosts +localhost ansible_connection=local +``` + + +# strategy +--- +``` + strategy: linear +``` +* linear ( default ) +*after each step waiting for all servers* +* free +*independently for all servers - someone can finish installation significantly earlier than others* + +additional parameter - specify amount of servers to be executed at the time ( for default strategy only ) +``` + serial: 3 +``` +``` + serial: 20% +``` +``` + serial: [5,15,20] +``` + +default value "serial" into configuration **ansible.cfg** +``` +forks = 5 +``` + +# async execution, nowait task, command execution +**not all modules support this operation** +execute command in asynchronous mode ( with preliminary estimation 120 sec ), +with default poll result of the command - 10 ( seconds ) +``` + async: 120 +``` +execute command in asynchronous mode ( with preliminary estimation 120 sec ), +with poll result of the command - 60 ( seconds ) +``` + async: 120 + poll: 60 +``` +execute command and forget, not to wait for execution +``` + async: 120 + poll: 0 +``` +execute command in asynchronous mode, +register result +checking result at the end of the file +``` +- command: /opt/my_personal_long_run_command.sh + async: 120 + poll: 0 + register: custom_command_result + +- name: check status result + async_status: jid={{ custom_command_result.ansible_job_id }} + register: command_result + until: command_result.finished + retries: 20 +``` + + +# roles +--- +## init project ansible-galaxy, create new role, init role +execute code into your project folder './roles' +``` +ansible-galaxy init {project/role name} +``` +result: +``` +./roles/{project/role name} + /defaults + /handlers + /meta + /tasks + /tests + /vars +``` +insert into code +``` + roles: + - {project/role name} +``` +all folders of the created project will be applied to your project ( tasks, vars, defaults ) +*in case of manual creation - only necessary folders can be created* + +## ansible search for existing role +``` +ansible-galaxy search {project/role name} +``` + +## import existing roles from [ansible galaxy](https://galaxy.ansible.com/list) +``` +cd roles +ansible-galaxy import {name of the project/role} +``` +insert into code +``` + roles: + - {project/role name} +``` +all folders of the imported project will be applied to your project ( tasks, vars, defaults ) + +## import task from role, role.task, task inside role +```yaml +- hosts: localhost + # hosts: all + # hosts: + tasks: + - name: first step + include_role: + name: mapr-kafka + tasks_from: cluster-login +``` + +## export +create/update file: +``` +./roles/{project/role name}/meta/main.yml +``` + +## local run local start playbook +```yaml +- hosts: localhost + tasks: + - name: Ansible create file with content example + copy: + dest: "/tmp/remote_server.txt" + content: | + dog + tiger +``` +### minimal playbook +```yaml +- hosts: localhost + tasks: + - name: Ansible create file with content example + copy: + dest: "/tmp/remote_server.txt" + content: | + {{ lookup('env','TEST_1') }} + {{ lookup('env','TEST_2') }} +``` + +```sh +ansible-playbook ansible-example.yml +``` + +## execute role, role execution, start role locally, local start, role local execution +```sh +ansible localhost \ + --extra-vars="deploy_application=1" \ + --extra-vars=@group_vars/all/defaults/all.yaml \ + --extra-vars=@group_vars/all/vars/all.yaml \ + --extra-vars="mapr_stream_path={{ some_variable_from_previous_files }}/some-argument" \ + -m include_role \ + -a name="new_application/new_role" +``` +where "include_role" - module to run ( magic word ) +where "new_application/new_role" - subfolder to role +where @group_vars/all/default/all.yaml - sub-path to yaml file with additional variables + +## console output with applied roles should looks like +``` +TASK [{project/role name}: {task name}] *********************************** +``` +for example +``` +TASK [java : install java with jdbc libraries] *********************************** +``` + +# file encryption, vault +``` +ansible-vault encrypt inventory.txt +ansible-vault view inventory.txt +ansible-vault create inventory.txt +``` +ask password via command line +``` +ansible-playbook playbook.yml -i inventory.txt -ask-vault-pass +``` +file should contain the password +``` +ansible-playbook playbook.yml -i inventory.txt -vault-password-file ./file_with_pass.txt +``` +script should return password +``` +ansible-playbook playbook.yml -i inventory.txt -vault-password-file ./file_with_pass.py +``` + +# modules +[list of all modules](https://docs.ansible.com/ansible/devel/modules/list_of_all_modules.html) +[custom module playground](https://ansible-playable.com) +[custom module creation doc](docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html) + +### [apt](https://docs.ansible.com/ansible/latest/modules/apt_module.html), python installation +``` +- name: example of apt install + apt: name='{{ item }}' state=installed + with_items: + - python + - python-setuptools + - python-dev + - build-essential + - python-pip +``` + +### [service](https://docs.ansible.com/ansible/latest/modules/service_module.html) +``` +- name: example of start unix service + service: + name: mysql + state: started + enabled: yes +``` + +### [pip](https://docs.ansible.com/ansible/latest/modules/pip_module.html) +``` +- name: manage python packages via pip + pip: + name: flask +``` + +### include variables import variables +```json +- name: External variables + include_vars: roles/marker-table/defaults/main.yaml + tags: deploy +``` + +### echo +add flag for ```ansible``` or ```ansible-playbook```:-vvv(3) -vv (2) or -v (1) +``` +- debug: + msg: ">>> {{ data_portal_deploy_folder }}/data-portal.jar" + var: src + verbosity: 2 +``` + +### [copy](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/copy_module.html?extIdCarryOver=true&sc_cid=701f2000001OH7nAAG#ansible-collections-ansible-builtin-copy-module) +``` +- name: Ensure MOTD file is in place + copy: + src: files/motd + dest: /etc/motd + owner: root + group: root + mode: 0644 + +- name: Ensure MOTD file is in place + copy: + content: "Welcome to this system." + dest: /etc/motd + owner: root + group: root + mode: 0644 +``` + +### [template](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html#ansible-collections-ansible-builtin-template-module) +```json +- name: Ensure MOTD file is in place + template: + src: templates/motd.j2 + dest: /etc/motd + owner: root + group: root + mode: 0644 +``` + +### [user](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/user_module.html) +```json +- name: Ensure user1 exists + user: + name: user1 + group: users + groups: wheel + uid: 2001 + password: "{{ 'mypassword' | password_hash('sha512') }}" + state: present +``` + +### [package](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/package_module.html) +```json +- name: Ensure Apache package is installed + package: + name: httpd + state: present +``` + +### [firewalld](https://docs.ansible.com/ansible/latest/collections/ansible/posix/firewalld_module.html) +```json +- name: Ensure port 80 (http) is open + firewalld: + service: http + state: enabled + permanent: yes + immediate: yes +``` + +### [file](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html) +```json +- name: Ensure directory /app exists + file: + path: /app + state: directory + owner: user1 + group: docker + mode: 0770 +``` + +### [lineinfile](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html) +```json +- name: Ensure host my-own-host in hosts file + lineinfile: + path: /etc/hosts + line: 192.168.0.36 my-own-host + state: present + +- name: Ensure root cannot login via ssh + lineinfile: + path: /etc/ssh/sshd_config + regexp: '^PermitRootLogin' + line: PermitRootLogin no + state: present +``` + +### [unarchive](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/unarchive_module.html) +```json +- name: Extract content from archive + unarchive: + src: /home/user1/Download/app.tar.gz + dest: /app + remote_src: yes +``` + +### [command](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/command_module.html) +```json +- name: Run bash script + command: "/home/user1/install-package.sh" +``` + +### TBD +* system +* commands +* database +* cloud +* windows + + +# [ansible awx](https://github.com/ansible/awx) + +# issues + +## fingerprint checking +``` +fatal: [172.28.128.4]: FAILED! => {"msg": "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host's fingerprint to your known_hosts file to manage this host."} +``` +resolution +``` +export ANSIBLE_HOST_KEY_CHECKING=False +ansible-playbook -i inventory.ini playbook-directory.yml +``` + diff --git a/Infrastructure-provisioning/Ansible/ansible-concepts.md b/Infrastructure-provisioning/Ansible/ansible-concepts.md new file mode 100644 index 00000000..f7bac622 --- /dev/null +++ b/Infrastructure-provisioning/Ansible/ansible-concepts.md @@ -0,0 +1,37 @@ +# Ansible + +*************************** +## Table Of Contents: + - [Introduction](#introdution) + - [Terminology](#terminology) + - [References](#reference) + +## Introdution: +- What is Ansible? + - Ansible allows you to achieve "Simple IT Automation". You describe the desired state of your machines, and Ansible manipulates them to achieve this state. The file in which you describe the desired state is called **Playbook**, which is written in **YAML**. + +### Terminology: +- **Control Node**: the machine where Ansible is installed, responsible for running the provisioning on the servers you are managing. +- **Inventory**: an `INI` file that contains information about the servers you are managing. +- **Playbook**: a `YAML` file containing a series of procedures that should be automated. +- **Task**: a block that defines a single procedure to be executed, e.g.: install a package. +- **Module**: a module typically abstracts a system task, like dealing with packages or creating and changing files. Ansible has a multitude of built-in modules, but you can also create custom ones. +- **Role**: a set of related playbooks, templates and other files, organized in a pre-defined way to facilitate reuse and sharing. +- **Play**: a provisioning executed from start to finish is called a play. +- **Facts**: global variables containing information about the system, like network interfaces or operating system. +- **Handlers**: used to trigger service status changes, like restarting or reloading a service. + +### Getting Started: +- A basic Ansible command or playbook: + - selects machines to execute against from inventory + - connects to those machines (or network devices, or other managed nodes), usually over SSH + - copies one or more modules to the remote machines and starts execution there +- Working with Modules + - Ansible ships with a number of modules (called the ‘module library’) that can be executed directly on remote hosts or through Playbooks. + - Users can also write their own modules. These modules can control system resources, like services, packages, or files (anything really), or handle executing system commands. + +### Resources: +- [Ansible Documentation](https://docs.ansible.com/) +- [Configuration Management 101: Writing Ansible Playbooks](https://www.digitalocean.com/community/tutorials/configuration-management-101-writing-ansible-playbooks) +- [Why you might need Ansible and not even know it](https://www.freecodecamp.org/news/why-you-might-need-ansible-and-not-even-know-it-d33b6e4b2ebe/) +- [Learning Ansible basics](https://www.redhat.com/en/topics/automation/learning-ansible-tutorial) diff --git a/IaC/Ansible/ansible-tutorials.md b/Infrastructure-provisioning/Ansible/ansible-tutorials.md similarity index 100% rename from IaC/Ansible/ansible-tutorials.md rename to Infrastructure-provisioning/Ansible/ansible-tutorials.md diff --git a/IaC/Ansible/readme.md b/Infrastructure-provisioning/Ansible/readme.md similarity index 69% rename from IaC/Ansible/readme.md rename to Infrastructure-provisioning/Ansible/readme.md index cdc4054d..b48f2592 100644 --- a/IaC/Ansible/readme.md +++ b/Infrastructure-provisioning/Ansible/readme.md @@ -1,3 +1,5 @@ # Ansible -- It is a tool designed with automation in mind from the start. Ansible focuses on providing “radically simple” configuration language as well as being able to manage cloud instances immediately with no modifications. It is also great for performing arbitrary IT orchestration (e.g., zero downtime rolling updates, hotfixes, etc.) as opposed to being configuration management specific. Rather than managing systems as individual units, you simply describe how components—and the system in general—interact with each other and Ansible will handle the rest. \ No newline at end of file +- It is a tool designed with automation in mind from the start. Ansible focuses on providing “radically simple” configuration language as well as being able to manage cloud instances immediately with no modifications. It is also great for performing arbitrary IT orchestration (e.g., zero downtime rolling updates, hotfixes, etc.) as opposed to being configuration management specific. Rather than managing systems as individual units, you simply describe how components—and the system in general—interact with each other and Ansible will handle the rest. + +- It allows you to organize your servers into groups, describe how those groups should be configured, and what actions should be taken on them, all from a central location. \ No newline at end of file diff --git a/Infrastructure-provisioning/Chef/chef-commands.md b/Infrastructure-provisioning/Chef/chef-commands.md new file mode 100644 index 00000000..01e4df89 --- /dev/null +++ b/Infrastructure-provisioning/Chef/chef-commands.md @@ -0,0 +1,99 @@ +### Install + +In your server: + +```bash +$ sudo apt-get install curl + +``` + +```bash +$ curl -L https://omnitruck.chef.io/install.sh | sudo bash +Thank you for installing Chef! + +``` + +```bash +$ chef-solo -v +... +Chef: 14.5.33 +``` + +### Start the cookbook + +```bash + wget http://github.com/chef-cookbooks/chef-repo/tarball/master -O - | tar xzf - --strip-components=1 + +``` + +### Knife + +```bash +$ knife supermarket download mysql + +``` + +### Invoking chef-solo + +```bash +$ chef-solo -c solo.rb -j web.json +``` +## [](https://devhints.io/chef#examples)Examples + +### Simple compile-from-source + +```ruby +execute "tar --no-same-owner -zxf hi.tar.gz" do + cwd "/usr/local/src" + creates "/usr/local/src/node-v#{version}" +end + +``` + +```ruby +bash "compile" do + cwd "/usr/local/src/node-v#{version}" + code %[ + PATH=/usr/local/bin:$PATH + ./configure + make + ] + creates "/usr/local/src/node-v#{version}/node" +end +``` +### Execute + +```ruby +execute "name" do + cwd "..." + environment({ "PATH" => "..." }) + command "make install" + creates "..." +end +``` +### remote file + +```ruby +remote_file "/usr/local/src/hi.tar.gz" do + source "http://..." + checksum "ab83be..." + mode 0644 + action :create_if_missing +end +``` + +### ruby_block + +```ruby +ruby_block "name" do + block { File.read ... } + not_if { File.exists?(...) } +end +``` +### Conditions + +```ruby + creates "/usr/local/src/node-v#{version}/node" + not_if { File.exists?('...') } +``` + diff --git a/IaC/Chef/chef-concepts.md b/Infrastructure-provisioning/Chef/chef-concepts.md similarity index 100% rename from IaC/Chef/chef-concepts.md rename to Infrastructure-provisioning/Chef/chef-concepts.md diff --git a/IaC/Chef/readme.md b/Infrastructure-provisioning/Chef/readme.md similarity index 100% rename from IaC/Chef/readme.md rename to Infrastructure-provisioning/Chef/readme.md diff --git a/IaC/Cloudformation/cloudformation-concepts.md b/Infrastructure-provisioning/Cloudformation/cloudformation-concepts.md similarity index 100% rename from IaC/Cloudformation/cloudformation-concepts.md rename to Infrastructure-provisioning/Cloudformation/cloudformation-concepts.md diff --git a/IaC/Cloudformation/cloudformation-tutorials.md b/Infrastructure-provisioning/Cloudformation/cloudformation-tutorials.md similarity index 100% rename from IaC/Cloudformation/cloudformation-tutorials.md rename to Infrastructure-provisioning/Cloudformation/cloudformation-tutorials.md diff --git a/IaC/Cloudformation/readme.md b/Infrastructure-provisioning/Cloudformation/readme.md similarity index 100% rename from IaC/Cloudformation/readme.md rename to Infrastructure-provisioning/Cloudformation/readme.md diff --git a/Infrastructure-provisioning/Puppet/puppet-commands.md b/Infrastructure-provisioning/Puppet/puppet-commands.md new file mode 100644 index 00000000..903c25ae --- /dev/null +++ b/Infrastructure-provisioning/Puppet/puppet-commands.md @@ -0,0 +1,79 @@ +# Puppet Commands + +### FACTER + +| Command | Description | +| ------- | ----------- | +| `facter` | show all facters | +| `facter osfamily` | show OS Family facter | +| `facter -y` | show facters in YAML| +| `facter -j` | show facters in JSON | +| `notify { "OS is ${::facts['operatingsystem']}": }` | use fact inside a manifest using 'facter' function | +| `notify { "OS is $::operatingsystem": }` | use fact inside manifest directly | +| `$::operatingsystemmajrelease` | get OS major release from manifest | + +### PUPPET AGENT + +| Command | Description | +| ------- | ----------- | +| `puppet agent --test (or -t)` |Apply catalog using -verbose, -ignorecache, -no-daemonize -detailed-exit-codes, -show_diff | +| `puppet agent -t --debug` |Run in debug mode with more output | +| `puppet agent -t --noop ` | Run simulation (no changes to system)| +| `puppet agent -t --environment development` | Run catalog for different environment than whats configured in Puppet Agent's conf file | +| `puppet agent --disable` | Disable puppet agent from running on node| +| `puppet agent --enable` | Enable puppet agent to run on node | +| `puppet resource package` | show all installed packages | +| `puppet resource package apache ensure=present/absent` | install or remove package | +| `puppet resource` | show all managed resources | +| `puppet agent -t --graph` |show a graph of all dependencies found in a catalog, stored in a .dot image | + +### Mcollective + +| Command | Description | +| ------- | ----------- | +| `sudo -i -u peadmin` |Run MCollective as 'peadmin'| +| `mco ping` |check connection to nodes | +| `mco facts timezone` |get nodes by Facter name| +| `mco puppet count` |check how many MCO nodes are running| +| `mco rpc service restart service=httpd` | restart apache service| +| `mco package status puppet` | check status of a package | +| `mco inventory ––list-collectives` | list all subcollectives | +| `mco puppet disable -I nodename` |disable puppet agent on node | +| `mco ping -F architecture=x86_64` | find all nodes that are x64 | +| `mco find ––with-identity /nyc/` |find all nodes containing NYC in hostname | +| `mco find ––with-class nginx` |find all nodes with nginx class| +| `mco puppet runall -F osfamily=Redhat 5` |kick off 'puppet agent -t' on your nodes | +| `mco ping -T us_collective` |run command against a subcollective | +| `mco service ntp start -I ny14.nyc` |start/stop service on a node | +| `mco plugin doc` |show all available MCO plugins | +| `mco rpc puppet last_run_summary` |show last run statistics for all nodes | +| `/var/lib/peadmin/.mcollective.d/client.log` |mco client logs (on PE Master) | + +### Modules + +| Command | Description | +| ------- | ----------- | +| `puppet config print modulepath`|print modulepath| +| `puppet help module` |modules help| +| `puppet module search 'nginx'`|search available modules: (PuppetForge)| +| `puppet module install author/module`|install a module| +| `puppet module generate author/module`|build new module with full skeleton| +| `puppet module list`| list installed modules | +| `puppet module list --tree`| check for missing module dependencies| +| `puppet module build author/module`|build a module release package (.tar.gz)| +| `puppet module changes`| show modified files of an installed module| + + +### Puppet Server + +| Command | Description | +| ------- | ----------- | +| `puppet cert list --all`|List all certs| +| `puppet cert sign 'certname'` |sign certificate| +| `puppet cert clean 'certname'`|remove client cert| +| `puppet apply -e "class { 'my_super_module': version => '1.2'}"`|apply config directly from command line and pass parameter| +| `/var/log/puppetlabs/puppetserver/puppetserver.log`|Puppet Server log| +| `/var/log/puppetlabs/puppetdb/puppetdb.log`|PuppetDB log| +| `/etc/puppetlabs/puppet/ssl`|SSL certs location| +| `/etc/puppetlabs/puppet/puppet.conf`|Master Configuration file| +| `puppet config print all`|Print all configuration settings| diff --git a/IaC/Puppet/puppet-concepts.md b/Infrastructure-provisioning/Puppet/puppet-concepts.md similarity index 100% rename from IaC/Puppet/puppet-concepts.md rename to Infrastructure-provisioning/Puppet/puppet-concepts.md diff --git a/IaC/Puppet/readme.md b/Infrastructure-provisioning/Puppet/readme.md similarity index 100% rename from IaC/Puppet/readme.md rename to Infrastructure-provisioning/Puppet/readme.md diff --git a/Infrastructure-provisioning/Terraform/Terraform Commands.md b/Infrastructure-provisioning/Terraform/Terraform Commands.md new file mode 100644 index 00000000..b76846a8 --- /dev/null +++ b/Infrastructure-provisioning/Terraform/Terraform Commands.md @@ -0,0 +1,181 @@ +## Get Help[](https://spacelift.io/blog/terraform-commands-cheat-sheet#get-help) + +`terraform -help` — Get a list of available commands for execution with descriptions. Can be used with any other subcommand to get more information. + +`terraform fmt -help` — Display help options for the [`fmt` command](https://spacelift.io/blog/terraform-fmt). + +## Show Your Terraform Version[](https://spacelift.io/blog/terraform-commands-cheat-sheet#show-your-terraform-version) + +`terraform version` — Shows the current version of your Terraform and notifies you if there is a newer version available for download. + +## Format Your Terraform Code[](https://spacelift.io/blog/terraform-commands-cheat-sheet#format-your-terraform-code) + +This should be the first command you run after creating your configuration files to ensure your code is formatted using the HCL standards. This makes it easier to follow and aids collaboration. + +`terraform fmt` — Format your Terraform configuration files using the HCL language standard. + +`terraform fmt --recursive` — Also formats files in subdirectories + +`terraform fmt --diff` — Display differences between original configuration files and formatting changes. + +`terraform fmt --check` — Useful in automation [CI/CD pipelines](https://spacelift.io/blog/terraform-in-ci-cd), the check flag can be used to ensure the configuration files are formatted correctly, if not the exit status will be non-zero. If files are formatted correctly, the exit status will be zero. + +## Initialize Your Directory[](https://spacelift.io/blog/terraform-commands-cheat-sheet#initialize-your-directory) + +`terraform init` — In order to prepare the working directory for use with Terraform, the `terraform init` command performs Backend Initialization, Child Module Installation, and Plugin Installation. + +`terraform init -get-plugins=false` — Initialize the working directory, do not download plugins. + +`terraform init -lock=false` — Initialize the working directory, don’t hold a state lock during backend migration. + +`terraform init -input=false` — Initialize the working directory, and disable interactive prompts. + +`terraform init -migrate-state` — Reconfigure a backend, and attempt to migrate any existing state. + +`terraform init -verify-plugins=false` — Initialize the working directory, do not verify plugins for Hashicorp signature + +See our [detailed rundown of the `terraform init` command](https://spacelift.io/blog/terraform-init)! + +## Download and Install Modules[](https://spacelift.io/blog/terraform-commands-cheat-sheet#download-and-install-modules) + +Note this is usually not required as this is part of the `terraform init` command. + +`terraform get` — Downloads and installs [modules](https://spacelift.io/blog/what-are-terraform-modules-and-how-do-they-work) needed for the configuration. + +`terraform get -update` — Checks the versions of the already installed modules against the available modules and installs the newer versions if available. + +## Validate Your Terraform Code[](https://spacelift.io/blog/terraform-commands-cheat-sheet#validate-your-terraform-code) + +`terraform validate` — Validates the configuration files in your directory, and does not access any remote state or services. `terraform init` should be run before this command. + +## Plan Your Infrastructure[](https://spacelift.io/blog/terraform-commands-cheat-sheet#plan-your-infrastructure) + +`terraform plan` — Plan will generate an execution plan, showing you what actions will be taken without actually performing the planned actions. + +`terraform plan -out=` — Save the plan file to a given path. Can then be passed to the `terraform apply` command. + +`terraform plan -destroy` — Creates a plan to destroy all objects, rather than the usual actions. + +## Deploy Your Infrastructure[](https://spacelift.io/blog/terraform-commands-cheat-sheet#deploy-your-infrastructure) + +`terraform apply` — Creates or updates infrastructure depending on the configuration files. By default, a plan will be generated first and will need to be approved before it is applied. + +`terraform apply -auto-approve` — Apply changes without having to interactively type ‘yes’ to the plan. Useful in automation CI/CD pipelines. + +`terraform apply ` — Provide the file generated using the `terraform plan -out` command. If provided, Terraform will take the actions in the plan without any confirmation prompts. + +`terraform apply -lock=false` — Do not hold a state lock during the Terraform apply operation. Use with caution if other engineers might run concurrent commands against the same workspace. + +`terraform apply -parallelism=` — Specify the number of operations run in parallel. + +`terraform apply -var="domainpassword=password123"` — Pass in a variable value. + +`terraform apply -var-file="varfile.tfvars"` — Pass in variables contained in a file. + +`terraform apply -target=”module.appgw.0"` — Apply changes only to the targeted resource. + +## Destroy Your Infrastructure[](https://spacelift.io/blog/terraform-commands-cheat-sheet#destroy-your-infrastructure) + +`terraform destroy` — [Destroys](https://spacelift.io/blog/how-to-destroy-terraform-resources) the infrastructure managed by Terraform. + +`terraform destroy -target=”module.appgw.0"` — Destroy only the targeted resource. + +`terraform destroy -auto-approve` — Destroys the infrastructure without having to interactively type ‘yes’ to the plan. Useful in automation CI/CD pipelines. + +## ‘Taint’ or ‘Untaint’ Your Resources[](https://spacelift.io/blog/terraform-commands-cheat-sheet#taint-or-untaint-your-resources) + +Use the [`taint` command](https://spacelift.io/blog/terraform-taint) to mark a resource as not fully functional. It will be deleted and re-created. + +`terraform taint vm1.name` — Taint a specified resource instance. + +`terraform untaint vm1.name` — Untaint the already tainted resource instance. + +## Refresh the State File[](https://spacelift.io/blog/terraform-commands-cheat-sheet#refresh-the-state-file) + +`terraform refresh` — Modifies the state file with updated metadata containing information on the resources being managed in Terraform. Will not modify your infrastructure. + +## View Your State File[](https://spacelift.io/blog/terraform-commands-cheat-sheet#viewyour-state-file) + +`terraform show` — Shows the state file in a human-readable format. + +`terraform show ` — If you want to read a specific state file, you can provide the path to it. If no path is provided, the current state file is shown. + +## Manipulate Your State File[](https://spacelift.io/blog/terraform-commands-cheat-sheet#manipulate-your-state-file) + +`terraform state` — One of the following subcommands must be used with this command in order to manipulate the state file. + +`terraform state list` — Lists out all the resources that are tracked in the current state file. + +`terraform state mv` — Moves an item in the state, for example, this is useful when you need to tell Terraform that an item has been renamed, e.g. `terraform state mv vm1.oldname vm1.newname` + +`terraform state pull > state.tfstate` — Gets the current state and outputs it to a local file. + +`terraform state push` — Update remote state from the local state file. + +`terraform state replace-provider hashicorp/azurerm customproviderregistry/azurerm` — Replace a provider, useful when switching to using a custom provider registry. + +`terraform state rm` — Remove the specified instance from the state file. Useful when a resource has been manually deleted outside of Terraform. + +`terraform state show ` — Show the specified resource in the state file. + +## Import Existing Infrastructure into Your Terraform State[](https://spacelift.io/blog/terraform-commands-cheat-sheet#import-existing-infrastructure-into-your-terraform-state) + +`terraform import vm1.name -i id123` — Import a VM with id123 into the configuration defined in the configuration files under vm1.name. + +`terraform import vm1.name -i id123 -allow-missing-config` — Import and allow if the configuration block does not exist. + +See our [terraform import tutorial](https://spacelift.io/blog/importing-exisiting-infrastructure-into-terraform) for more details. + +## Get Provider Information[](https://spacelift.io/blog/terraform-commands-cheat-sheet#get-provider-information) + +`terraform providers` — Displays a tree of providers used in the configuration files and their requirements. + +## Manage Your Workspaces[](https://spacelift.io/blog/terraform-commands-cheat-sheet#manage-your-workspaces) + +`terraform workspace` — One of the following subcommands must be used with the workspace command. Workspaces can be useful when an engineer wants to test a slightly different version of the code. It is not recommended to use Workspaces to isolate or separate the same infrastructure between different development stages, e.g. Dev / UAT / Production, or different internal teams. + +`terraform workspace show` — Show the name of the current workspace. + +`terraform workspace list` — List your workspaces. + +`terraform workspace select ` — Select a specified workspace. + +`terraform workspace new ` — Create a new workspace with a specified name. + +`terraform workspace delete ` — Delete a specified workspace. + +## View Your Outputs[](https://spacelift.io/blog/terraform-commands-cheat-sheet#view-your-outputs) + +`terraform output` — Lists all the [outputs](https://spacelift.io/blog/terraform-output) currently held in your state file. These are displayed by default at the end of a `terraform apply`, this command can be useful if you want to view them independently. + +`terraform output -state=` — Lists the outputs held in the specified state file. + +`terraform output -json` — Lists the outputs held in your state file in JSON format to make them machine-readable. + +`terraform output vm1_public_ip` — List a specific output held in your state file. + +## Release a Lock on Your Workspace[](https://spacelift.io/blog/terraform-commands-cheat-sheet#release-a-lock-on-your-workspace) + +`terraform force-unlock ` — Remove the lock with the specified lock ID from your workspace. Useful when a lock has become ‘stuck’, usually after an incomplete Terraform run. + +## Log In and Out to a Remote Host (Terraform Cloud)[](https://spacelift.io/blog/terraform-commands-cheat-sheet#log-in-and-out-to-a-remote-host-terraform-cloud) + +`terraform login` — Grabs an API token for Terraform cloud (app.terraform.io) using your browser. + +`terraform login ` — Log in to a specified host. + +`terraform logout` — Removes the credentials that are stored locally after logging in, by default for Terraform Cloud (app.terraform.io). + +`terraform logout ` — Removes the credentials that are stored locally after logging in for the specified hostname. + +## Produce a Dependency Diagram[](https://spacelift.io/blog/terraform-commands-cheat-sheet#produce-a-dependency-diagram) + +`terraform graph` — Produces a graph in DOT language showing the dependencies between objects in the state file. This can then be rendered by a program called Graphwiz (amongst others). + +`terraform graph -plan=tfplan` — Produces a dependency graph using a specified plan file (generated using `terraform plan -out=tfplan`). + +`terraform graph -type=plan` — Specifies the type of graph to output, either `plan, plan-refresh-only, plan-destroy,` or `apply`. + +## Test Your Expressions[](https://spacelift.io/blog/terraform-commands-cheat-sheet#test-your-expressions) + +`terraform console` — Allows testing and exploration of expressions on the interactive console using the command line. e.g. 1+2 🙂 diff --git a/Infrastructure-provisioning/Terraform/readme.md b/Infrastructure-provisioning/Terraform/readme.md new file mode 100644 index 00000000..df5e53da --- /dev/null +++ b/Infrastructure-provisioning/Terraform/readme.md @@ -0,0 +1,122 @@ +# Terraform + +*************************** + +## Table Of Contents: + +- [Introduction](#introdution) +- [Tutorial Resources](#tutorial-resources) +- [References](#reference) + +***************** + +## Introdution + +- What is Terraform? + - Terraform is an open source tool that allows you to define infrastructure for a variety of providers (e.g. AWS, Azure, Google Cloud, DigitalOcean, DataDog, VMWare, GitHub, etc) using a simple, declarative programming language and to deploy and manage that infrastructure using a few CLI commands. + +- Terraform Cloud is an application that helps teams use Terraform together. It manages Terraform runs in a consistent and reliable environment, and includes easy access to shared state and secret data, access controls for approving changes to infrastructure, a private registry for sharing Terraform modules, detailed policy controls for governing the contents of Terraform configurations, and more. + +Terraform Cloud is available as a hosted service at [https://app.terraform.io](https://app.terraform.io). We offer free accounts for small teams, and paid plans with additional feature sets for medium-sized businesses. + +Large enterprises can purchase Terraform Enterprise, our self-hosted distribution of Terraform Cloud. It offers enterprises a private instance of the Terraform Cloud application, with no resource limits and with additional enterprise-grade architectural features like audit logging and SAML single sign-on. + +## Why Terraform? + +- Terraform is an "orchestration" tool, not an "automation tool:" Automation is a task completed without human intervention, while Orchestration means, taking a task and creating a workflow, or running several automated tasks called as processes. For example, orchestration is a way of combining multiple automation tasks to create IP or creating a security group + +- Terraform is "Declarative" not "Procedural/Imperative:" These are contrasting programming patterns. Declarative programming does not control the flow of the program, you just say what you want and not say how to do it. Procedural programming, on the other hand, you define the whole process and provide the steps how to do it. + +- Terraform follows Client Only Architecture, not Client/Server Architecture: Chef, Ansible all follow client/server architecture. You issue commands on a client system and it executes your commands and stores the state of your system. The server talks to agents, which must installed on every instance you want to configure. With this architecture, moving parts coming as a perk and may cause new failure modes. While Terraform uses the cloud provider API's to configure your infrastructure. + +- Terraform has Multi-Provider Support: Terraform provides convenience to switch between different cloud providers like Google, AWS, Open Stack, Azure. Terraform allows you to write code specific to each provider. + +- Terraform gives Immutable Infrastructure: This means once you instantiate your server, you do not change it. Instances are redeployed, instead of restoring from previous versions. Components are replaced rather than being updated with newer versions. This reduces the potential of Configuration Drift and uptime is improved. + +## Installation + +- Install Through curl + +```bash +# download terraform as zip for your architecture (linux here) +curl -O https://releases.hashicorp.com/terraform/0.11.10/terraform_0.11.10_linux_amd64.zip + +# extract the archive and move the binary to /usr/local/bin +sudo unzip terraform_0.11.10_linux_amd64.zip -d /usr/local/bin/ + +# remove archive +rm terraform_0.11.10_linux_amd64.zip + +``` + +Second method to install Through `tfenv`, a Terraform Version Manager + +Download the `tfenv` binary and put it in your PATH. + +```bash +git clone https://github.com/tfutils/tfenv.git ~/.tfenv + +# add ~/.tfenv to PATH for Bash Users (modifies .bashrc) +echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> $HOME/.bashrc + +# add ~/.tfnev to PATH for ZSH Users (modifes .zshrc) +echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> $HOME/.zshrc + +``` + +Then, you can install the desired version of Terraform: + +```bash +# list all available terraform versions +tfenv list-remote + +# install a terraform version +tfenv install 0.13.5 + +# list installed terraform versions +tfenv list + +# use a certain terraform version +tfenv use 0.13.5 + +# uninstall a terraform version +tfenv uninstall 0.13.5 + +``` + +## Usage + +### The Terraform Workflow + +The Terraform workflow allows you to create and mutate infrastructure over time, by relying on four simple steps: + +1. Scope - Confirm what resources need to be created for a given project. +2. Author - Create the configuration file in Terraform template files based on the scoped parameters +3. Initialize - Run `terraform init` in the project directory with the configuration files. This will download the correct provider plug-ins for the project. +4. Plan & Apply - Run `terraform plan` to verify creation process and then `terraform apply` to create real resources as well as state file that compares future changes in your configuration files to what actually exists in your deployment environment. + +### (optionally) delete infrastructure resources + +Terraform is also able to delete infrastructures, previously created by Terraform. To delete infrastructure resources, you use the `terraform destroy` command. + +### Code Formatting + +Terraform provides a built-in code formatter. Execute `terraform fmt` within a Terraform project folder and all `.tf` files will be formatted by Terraform itself. + +### Validating + +Use `terraform validate` to execute basic consistency and syntax verification. + +*************************** + +## Tutorial Resources + +- [Hashicorp Learn](https://learn.hashicorp.com/terraform) + +************ + +## References + +- [Getting started with Terraform](https://learn.hashicorp.com/terraform/getting-started/intro) +- [An Introduction to Terraform](https://blog.gruntwork.io/an-introduction-to-terraform-f17df9c6d180) +- [Terraform Official site](https://www.terraform.io/docs) diff --git a/IaC/Terraform/terraform-concepts.md b/Infrastructure-provisioning/Terraform/terraform-concepts.md similarity index 100% rename from IaC/Terraform/terraform-concepts.md rename to Infrastructure-provisioning/Terraform/terraform-concepts.md diff --git a/IaC/Terraform/terraform-tutorials.md b/Infrastructure-provisioning/Terraform/terraform-tutorials.md similarity index 100% rename from IaC/Terraform/terraform-tutorials.md rename to Infrastructure-provisioning/Terraform/terraform-tutorials.md diff --git a/Infrastructure-provisioning/readme.md b/Infrastructure-provisioning/readme.md new file mode 100644 index 00000000..faa65cdf --- /dev/null +++ b/Infrastructure-provisioning/readme.md @@ -0,0 +1,32 @@ +# Infrastructure as Code + + +Infrastruce as code - Infrastructure as code (IaC) is the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools.[1] The IT infrastructure managed by this comprises both physical equipment such as bare-metal servers as well as virtual machines and associated configuration resources. The definitions may be in a version control system. It can use either scripts or declarative definitions, rather than manual processes, but the term is more often used to promote declarative approaches. + +Simply code your infrastructure configuration files with combination of different cloud providers. + + +- What is Terraform? + - With Terraform, you describe your complete infrastructure as code, even as it spans multiple service providers. Your servers may come from AWS, your DNS may come from CloudFlare, and your database may come from Heroku. Terraform will build all these resources across all these providers in parallel. + + - Terraform was developed by Hashicorp, the company behind Vagrant, Consul, Vault, Nomad and other tools from HashiStack. This is a configuration orchestration tool that is incredible for provisioning, adjusting and destroying the virtual server environments. It is available both as a DevOps-as-a-Service enterprise-grade offer from Hashicorp and as an open-source solution able to work with a variety of Cloud Service Providers to create multi-cloud ecosystems. + + + - Infrastructure as Code: Infrastructure is described using a high-level configuration syntax. This allows a blueprint of your datacenter to be versioned and treated as you would any other code. Additionally, infrastructure can be shared and re-used. + + - Execution Plans: Terraform has a "planning" step where it generates an execution plan. The execution plan shows what Terraform will do when you call apply. This lets you avoid any surprises when Terraform manipulates infrastructure. + + - Resource Graph: Terraform builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, Terraform builds infrastructure as efficiently as possible, and operators get insight into dependencies in their infrastructure. + + +- What is Ansible? + - Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates. Ansible’s goals are foremost those of simplicity and maximum ease of use. + +- Puppet Labs + - Puppet is an automated administrative engine for your Linux, Unix, and Windows systems and performs administrative tasks (such as adding users, installing packages, and updating server configurations) based on a centralized specification. + +- Chef + - Chef enables you to manage and scale cloud infrastructure with no downtime or interruptions. Freely move applications and configurations from one cloud to another. Chef is integrated with all major cloud providers including Amazon EC2, VMWare, IBM Smartcloud, Rackspace, OpenStack, Windows Azure, HP Cloud, Google Compute Engine, Joyent Cloud and others. + +- AWS CloudFormation + - You can use AWS CloudFormation’s sample templates or create your own templates to describe the AWS resources, and any associated dependencies or runtime parameters, required to run your application. You don’t need to figure out the order in which AWS services need to be provisioned or the subtleties of how to make those dependencies work. diff --git a/Interview/Dev-ops-Interview.md b/Interview/Dev-ops-Interview.md index 466a3f3a..341ea391 100644 --- a/Interview/Dev-ops-Interview.md +++ b/Interview/Dev-ops-Interview.md @@ -20,7 +20,7 @@ - Q1) Can you tell us the fundamental differences between DevOps & Agile? - A: Although DevOps shares some similarities with the Agile methodology, which is one of the most popular SDLC methodologies, both are fundamentally different approaches to software development. Following are the various fundamental differences between the two: - - Agile Approach – The agile approach is only meant for development in Agile while the agile approach is meant for both development and operations in DevOps. + - Agile Approach – The agile approach is only meant for development in Agile while the Devops approach is meant for both development and operations in DevOps. - Practices and Processes – While agile involves practices such as Agile Scrum and Agile Kanban, DevOps involves processes such as CD (Continuous Delivery), CI (Continuous Integration), and CT (Continuous Testing). @@ -126,7 +126,7 @@ - To shift left in DevOps simply means the necessity of taking as many tasks on the right i.e. that typically happens toward the end of the application development process and incorporate them into earlier stages of a DevOps methodology. - - There are several ways of accomplishing a shit left in DevOps, most notably: + - There are several ways of accomplishing a shift left in DevOps, most notably: - Create production-ready artifacts at the end of every Agile sprint - Incorporating static code analysis routines in every build @@ -197,7 +197,7 @@ - Q18) Draw a comparison between Asset Management and Configuration Management. - A: The process of monitoring as well as maintaining things of value to an entity or group is called an Asset Management. - - Configuration Management refers to the process of controlling, identifying, planning for, and verifying the configuration items within service in support of Change Management. + - Configuration Management refers to the process of controlling, identifying, planning for, and verifying the configuration items within service in support of Change Management. - Q19) Can you state and explain various key elements of continuous testing? - A: Various key elements of continuous testing are: @@ -210,17 +210,17 @@ - Test optimization – Improve the overall testing process - Q20) Please explain the core operations of DevOps in terms of development and infrastructure. -- A: Core operations of DevOps in terms of development and infrastructure are: - - - Application development – Developing a product that is able to meet all customer requirements and offers a remarkable level of quality - - Code coverage – Measurement of the total number of blocks or lines or arcs of the code executed while the automated tests are running - - Code developing – Prepare the code base required for the product development - - Configuration – Allowing the product to be used in an optimum way - - Deployment – Installing the software to be used by the end-user - - Orchestration – Arrangement of several automated tasks - - Packaging – Activities involved when the release is ready for deployment - - Provisioning – Ensuring that the infrastructure changes arrive just-in-time with the code that requires it - - Unit testing – Meant for testing individual units or components + - A: Core operations of DevOps in terms of development and infrastructure are: + + - Application development – Developing a product that is able to meet all customer requirements and offers a remarkable level of quality + - Code coverage – Measurement of the total number of blocks or lines or arcs of the code executed while the automated tests are running + - Code developing – Prepare the code base required for the product development + - Configuration – Allowing the product to be used in an optimum way + - Deployment – Installing the software to be used by the end-user + - Orchestration – Arrangement of several automated tasks + - Packaging – Activities involved when the release is ready for deployment + - Provisioning – Ensuring that the infrastructure changes arrive just-in-time with the code that requires it + - Unit testing – Meant for testing individual units or components - Q21) What Do You Know about DevOps? @@ -290,9 +290,6 @@ - Start by talking about the age-old mechanisms of writing commands onto script files and testing them in a separate environment before deployment and how this approach is being replaced by IaC. Similar to the codes written for other services, with the help of AWS, IaC allows developers to write, test, and maintain infrastructure entities in a descriptive manner, using formats such as JSON or YAML. This enables easier development and faster deployment of infrastructure changes. - - Go through this Simplilearn video on “DevOps Interview Questions” delivered by our DevOps certification expert that will help you crack any interview. - - - Q32) What are the success factors for Continuous Integration? - Examples of answers: @@ -309,17 +306,17 @@ - Q33) How would you implement CI (continuous delivery) - end to end, including source control, branches, tools, etc. ? -- Q34) What is Continious Delivery? Continious Deployment? +- Q34) What is Continuous Delivery? Continuous Deployment? -- Q35) What is the difference between Continuous Integration, Continious Delivery and Continious Deployment? +- Q35) What is the difference between Continuous Integration, Continuous Delivery and Continuous Deployment? -- Q36) What’s the difference between git and github ? What about git and SVN ? +- Q36) What is the difference between git and github ? What about git and SVN ? - Q37) What is git rebase? - Q38) In Git how do you revert a commit that has already been pushed and made public? -- Q39) What is puppet/chef/ansible used for? What are the advantages over shell scripts ? +- Q39) What is puppet/chef/ansible used for? What are the advantages over shell scripts ? - Q40) What do you understand by “Infrastructure as code”? How does it fit into the DevOps methodology? What purpose does it achieve? @@ -373,7 +370,6 @@ - Feature branching vs trunk based development - Advantages of requiring pull requests and approvals -- Q11) More on Front-end Developer Job Interview Questions *********** @@ -390,7 +386,7 @@ - Q3) How do you start/stop services? - (deprecated) service start/stop service_name - - systemctl strat/stop service_name + - systemctl start/stop service_name - Q4) How do you display the shell’s environment variables? - env @@ -488,250 +484,6 @@ - What’s an ELB ? - What’s S3 ? What are the features supported on S3 ? -- Q38) What is your experience with Linux? When you can set up an application on multiple operating systems, on which one would you prefer to set it up and why? - -- Q39) Explain what each of the following commands does and give an example on how to use it: - - - ls - - rm - - rmdir (can you achieve the same result by using rm?) - - grep - - wc - - curl - - touch - - man - - nslookup or dig - - df - -- Q40) Running the command df you get "command not found". What could be wrong and how to fix it? - -- Q41) How to make sure a service will start on a OS of your choice? - -- Q42) How do you schedule tasks periodically? - - with cron - -- Q43) Have you scheduled tasks in the past? What kind of tasks? - -- Permissions -- Q44) How to change the permissions of a file? - -- Q45) What does the following permissions mean?: - - - 777 - - 644 - - 750 - -- Q46) Explain what is setgid, setuid and sticky bit?You try to delete a file but it fails. Name at least three different reason as to why it could happen. - -- Q47) What is systemd?On a system which uses systemd, how would display the logs? - -- Debugging - -- Q48) What are you using for troubleshooting and debugging network issues? - -- Q49) What are you using for troubleshooting and debugging disk & file system issues? - -- Q50) What are you using for troubleshooting and debugging process issues? - -- Q51) What are you using for debugging CPU related issues? - -- Q52) You get a call saying "my system is slow" - how would you deal with it? - -- Q53) How to debug binaries? - -- Q54) What is a Linux kernel module and how do you load a new module? - -- Q55) What is KVM? - -- Q56) What is the difference between SSH and SSL? - -- Q57) What is SSH port forwarding? - -- Q58)Explain redirection - -- Q59) What are wildcards? Can you give an example of how to use them? - -- Q60) What do we grep for in each of the following commands?: - - - grep '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' some_file - - grep -E "error|failure" some_file - - grep '[0-9]$' some_file - -- Q61) Tell me everything you know about Linux boot process? - -- Q63) What is an exit code? What exit codes are you familiar with? - - -- Q64) What is the difference between a soft link and hard link? - -- Q65) What happens when you delete the original file in case of soft link and hard link? - -- Q66) What is a swap partition? What is it used for? - -- Q67) You are trying to create a new file but you get "File system is full". You check with df for free space and you see you used only 20% of the space. What could be the problem? - -- Q68) What do you know about LVM? - -- Q69) Explain the following in regards to LVM: - - - PV - - VG - - LV - - -- Q70) What is NFS? What is it used for? - -- Q71) What RAID is used for? Can you explain the differences between RAID 0, 1, 5 and 10? - -- Q72) What is lazy umount? - -- Q73) Fix the following commands: - - - ```sed "s/1/2/g' /tmp/myFile``` - - ```find . -iname *.yaml -exec sed -i "s/1/2/g" {} ;``` - -- Q74) Explain what is stored in each of the following paths and if there is anything unique about it: - -- Q75) What is chroot? - -- Processes - -- Q76) How to run a process in the background and why to do that in the first place? - -- Q77) How can you find how much memory a specific process consumes? - -- Q78) What signal is used when you run 'kill '? - -- Q79) What signals are you familiar with? - -- Q80) What is a trap? - -- Q81) What happens when you press ctrl + c? - -- Q82) What are daemons? - -- Q83) What are the possible states of a process in Linux? - -- Q84) What is a zombie process? How do you get rid of it? - -- Q85) What is the init process? - -- Q86) How to change the priority of a process? Why would you want to do that? - -- Q87) Can you explain how network process/connection is established and how it's terminated?> - -- Q88) What are system calls? What system calls are you familiar with? - -- Q89) What strace does? - -- Q90) Find all the files which end with '.yml' and replace the number 1 in 2 in each file - -- Q91) How to check how much free memory a system has? How to check memory consumption by each process? - -- Q92) How would you split a 50 lines file into 2 files of 25 lines each? - -- Q92) What is a file descriptor? What file descriptors are you familiar with? - -- Q93) What's an inode? - -- Q94) How to list active connections? - -- Q95) What is NTP? What is it used for? - -- Q96) Explain Kernel OOM - -- Q97) What is SELiunx? - -- Q98) What is Kerberos? - -- Q99) What is nftables? - -- Q100) What firewalld daemon is responsible for? - -- Network - -- Q101) What is a network namespace? What is it used for? - -- Q102) How can you turn your Linux server into a router? - -- Q103) What is a virtual IP? In what situation would you use it? - -- Q104) Which port is used in each of the following protocols?: - - - SSH - - HTTP - - DNS - - HTTPS - - -- Q105) What is the routing table? How do you view it? - -- Q106) What are packet sniffers? Have you used one in the past? If yes, which packet sniffers have you used and for what purpose? - -- DNS - -- Q107) What is DNS? Why do we need it? - -- Q108) What the file /etc/resolv.conf is used for? What does it include? - -- Q109) What is a "A record"? - -- Q110) What is a PTR record? - -- Q111) What is a MX record? - -- Q112) Is DNS using TCP or UDP? - -- Packaging - -- Q113) Do you have experience with packaging? Can you explain how it works? - - RPM: explain the spec format(what it should and can include) - -- Q114) How do you list the content of a package without actually installing it? - -- Applications and Services -- Q115) What is a load balancer? - -- Q116) What load balancer algorithms are you familiar with? - -- Q117) What is a proxy? - -- Q118) What is a reverse proxy? - -- Q119)What can you find in /etc/services - -- Q120) You run ssh 127.0.0.1 but it fails with "connection refused". What could be the problem? - -- Q121) What happens when you execute ls?. Provide a detailed answer - -- Q122) Can you describe how processes are being created? - - -- Q123) What is the difference between a process and a thread? - -- Q124) When you run ip a you see there is a device called 'lo'. What is it and why do we need it? - -- Q125) What traceroute command does? How it works? - -- Q126) What is network bonding? What types are you familiar with? - -- Q127) How to link two separate network namespaces so you can ping an interface on one namespace from the second one? - -- Q128) What are cgroups? In what scenario would you use them? - -- Q129) How to create a file of a certain size? - -- Q130) What are the differences between the following system calls?: exec(), fork(), vfork() and clone()? - -- Q131) Explain Process Descriptor and Task Structure? - -- Q132) What are the differences between threads and processes? - -- Q133) Explain Kernel Threads - -- Q134What happens when socket system call is used? - -- Q135) You executed a script and while still running, it got accidentally removed. Is it possible to restore the script while it's still running? ****************** @@ -763,94 +515,6 @@ -- Q11) What is Ethernet? - -- Q12) What is a MAC address? What is it used for? - -- Q13) When this MAC address is used?: ff:ff:ff:ff:ff:ff - -- Q14) What is an IP address? - -- Q15) Explain subnet mask and given an example - -- Q16) What is a private IP address? What do we need it for? - -- Q17) Explain the OSI model. What layers there are? What each layer is responsible for? - -- Q18) For each of the following determine to which OSI layer it belongs: - - - Error correction - - Packets routing - - Cables and electrical signals - - MAC address - - IP address - - Sessions between applications - - 3 way handshake - -- Q19) What delivery schemes are you familiar with? - -- Q20)What is CSMA/CD? Is it used in modern ethernet networks? - -- Q21) Describe the following network devices and the difference between them: - - - router - - switch - - hub - -- Q22) What is NAT? - -- Q23) What is a proxy? How it works? What do we need it for? - -- Q24) What is the difference between TCP and UDP? - -- Q25) Explain "default gateway" - -- Q26) How TCP works? What is the 3 way handshake? - -- Q27) What is ARP? How it works? - -- Q28) What is TTL? - -- Q29) What is DHCP? How it works? - -- Q30) What is SSL tunneling? How it works? - -- Q31) What is a socket? Where can you see the list of sockets in your system? - -- Q32) What is IPv6? Why should we consider using it if we have IPv4? - -- Q33) What is VLAN? - -- Q34) What is MTU? - -- Q35) True or False?. Ping is using UDP because it doesn't care about reliable connection - -- Q36) What is SDN? - -- Q37) What is ICMP? What is it used for? - -- Q38) What is NAT? How it works? - -- Q39) Explain Spanning Tree Protocol (STP) - -- Q40) What is link aggregation? Why is it used? - -- Q41) What is Asymmetric Routing? How do deal with it? - -- Q42) What overlay (tunnel) protocols are you familiar with? - -- Q43) What is GRE? How it works? - -- Q44) What is VXLAN? How it works? - -- Q45) What is SNAT? - -- Q46) Explain OSPF - -- Q47) Explain Spine & Leaf - -- Q48) Using Hamming code, what would be the code word for the following data word 100111010001101? - ******************* @@ -858,11 +522,18 @@ - Q1) What is the importance of SSL? + - A: Using SSL ensure the security of the communication between server and client by encrypting the messages going bothways making sure even if the message are intercepted the attacker wouldn't be able to decrypt the messages. - Q2) What is a SQL injection? + - A: an attack that targets SQL database management systems by injecting SQL queries in a way that they are executed by the database. The goal is to manipulate the application's SQL query logic to gain unauthorized access to the database or retrieve, modify, or delete data. - Q3) What is cross-site scripting (XSS)? - + - A: a web security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. It occurs when a web application allows user input to be included in a web page without proper validation or escaping. + - Stored XSS: +Malicious scripts are permanently stored on the target server, and every user who views the affected page is exposed to the attack. + - Reflected XSS: +The injected script is reflected off a web server, such as in a URL, and executed immediately when the victim opens a manipulated link. + - Q4) Why shouldn’t you roll your own crypto? - Q5) How are passwords stored on databases? @@ -881,21 +552,29 @@ ## Docker -- Q1) What is docker for? +- Q1) What is docker used for? +- A: Docker is a tool that allows the creation, deletion, running and storing containers. -- Q2) How to ask docker cli to show all containers& +- Q2) How to show all containers on your system using docker? + - A: `docker ps -a` -- Q3) How to delete image with container, who use this image? +- Q3) How to delete an image that is already being used by a container? + - A: `docker rmi -f` - Q4) What command help you to delete all old unused images? + - A: `docker image prune -f` - Q5) What is docker-compose? What is docker-compose.yml? - Q6) How to expose ports in docker-compose file? - Q7) How to reduce docker images? + - Using Multistage builds + - using minimal base images + - use as few layers as possible by reducing/combining Dockerfile commands - Q8) Where you can store docker images? + - A: using a container registry like AWS ECR - Q9) What is alpine and why we need it? @@ -904,13 +583,125 @@ ## kubernetes +- Q1) What is Kubernetes? + - A: Kubernetes is an open-source container management tool that holds the responsibilities of container deployment, scaling & descaling of containers & load balancing. Being Google’s brainchild, it offers excellent community and works brilliantly with all the cloud providers. So, we can say that Kubernetes is not a containerization platform, but it is a multi-container management solution. + +- Q2) How is Kubernetes related to Docker? + - A: It’s a known fact that Docker provides the lifecycle management of containers and a Docker image builds the runtime containers. But, since these individual containers have to communicate, Kubernetes is used. So, Docker builds the containers and these containers communicate with each other via Kubernetes. So, containers running on multiple hosts can be manually linked and orchestrated using Kubernetes. + +- Q3) What is Container Orchestration? + - A: Consider a scenario where you have 5-6 microservices for an application. Now, these microservices are put in individual containers, but won’t be able to communicate without container orchestration. So, as orchestration means the amalgamation of all instruments playing together in harmony in music, similarly container orchestration means all the services in individual containers working together to fulfill the needs of a single server.\ + +- Q4) What do you know about clusters in Kubernetes? + - A: The fundamental behind Kubernetes is that we can enforce the desired state management, by which I mean that we can feed the cluster services of a specific configuration, and it will be up to the cluster services to go out and run that configuration in the infrastructure. + So, as you can see in the above diagram, the deployment file will have all the configurations required to be fed into the cluster services. Now, the deployment file will be fed to the API and then it will be up to the cluster services to figure out how to schedule these pods in the environment and make sure that the right number of pods are running. + +So, the API which sits in front of services, the worker nodes & the Kubelet process that the nodes run, all together make up the Kubernetes Cluster. + +- Q5) How to do maintenance activity on the K8s node? + - A: Whenever there are security patches available the Kubernetes administrator has to perform the maintenance task to apply the security patch to the running container in order to prevent it from vulnerability, which is often an unavoidable part of the administration. The following two commands are useful to safely drain the K8s node. +`kubectl cordon` +`kubectl drain –ignore-daemon set` +The first command moves the node to maintenance mode or makes the node unavailable, followed by kubectl drain which will finally discard the pod from the node. After the drain command is a success you can perform maintenance. + +Note: If you wish to perform maintenance on a single pod following two commands can be issued in order: + +`kubectl get nodes` to list all the nodes +`kubectl drain ` drain a particular node + +- Q6) What is the role of Load Balance in Kubernetes? + - A: Load balancing is a way to distribute the incoming traffic into multiple backend servers, which is useful to ensure the application available to the users. + In Kubernetes, as shown in the above figure all the incoming traffic lands to a single IP address on the load balancer which is a way to expose your service to outside the internet which routes the incoming traffic to a particular pod (via service) using an algorithm known as round-robin. Even if any pod goes down load balances are notified so that the traffic is not routed to that particular unavailable node. Thus load balancers in Kubernetes are responsible for distributing a set of tasks (incoming traffic) to the pods + +- Q7) How to monitor the Kubernetes cluster? + - A: Prometheus is used for Kubernetes monitoring. The Prometheus ecosystem consists of multiple components. + +Mainly Prometheus server which scrapes and stores time-series data. +Client libraries for instrumenting application code. +Push gateway for supporting short-lived jobs. +Special-purpose exporters for services like StatsD, HAProxy, Graphite, etc. +An alert manager to handle alerts on various support tools + +- Q8) Can you explain the differences between Docker Swarm and Kubernetes? + - A: Below are the main difference between Kubernetes and Docker: + +The installation procedure of the K8s is very complicated but if it is once installed then the cluster is robust. On the other hand, the Docker swarm installation process is very simple but the cluster is not at all robust. +Kubernetes can process the auto-scaling but the Docker swarm cannot process the auto-scaling of the pods based on incoming load. +Kubernetes is a full-fledged Framework. Since it maintains the cluster states more consistently so autoscaling is not as fast as Docker Swarm. + +- Q9) How can containers within a pod communicate with each other? + - A: Containers within a pod share networking space and can reach other on localhost. For instance, if you have two containers within a pod, a MySQL container running on port 3306, and a PHP container running on port 80, the PHP container could access the MySQL one through localhost:3306. + +- Q10) Explain what is a Master Node and what component does it consist of? + - A: The master node is the most vital component responsible for Kubernetes architecture + It is the central controlling unit of Kubernetes and manages workload and communications across the clusters + The master node has various components, each having its process. They are: + -ETCD + -Controller Manager + -Scheduler + -API Server + + - ETCD (Cluster store): + -This component stores the configuration details and essential values + -It communicates with all other components to receive the commands and work in order to perform an action + -It also manages network rules and posts forwarding activity + + - Controller Manager + -It is responsible for most of the controllers and performs a task + -It is a daemon which runs in a continuous loop and is responsible for collecting and sending information to API server + -The key controllers handle nodes, endpoints, etc. + + - Scheduler: + -It is one of the key components of the master node associated with the distribution of workload + -The scheduler is responsible for workload utilization and allocating pod to a new node + -The scheduler should have an idea of the total resources available as well as resources allocated to existing workloads on each node + ********************** ## Architecture: +-1. Question: Explain the components of Kubernetes architecture and their roles. +Solution: +Kubernetes architecture consists of several key components: + +Master Node: Manages the cluster and its components. +API Server: Exposes the Kubernetes API. +Controller Manager: Ensures the desired state of the cluster. +Scheduler: Assigns nodes to newly created pods. +etcd: Consistent and highly-available key-value store used as Kubernetes' backing store. +Node (Minion) Nodes: Where containers are launched. +Kubelet: Ensures that containers are running in a Pod. +Kube Proxy: Maintains network rules for Pod communication. +Container Runtime: Software responsible for running containers. + +-2. Question: What is a Kubernetes Pod and how does it work in a cluster? +Solution: +A Pod is the smallest deployable unit in Kubernetes, representing a single instance of a running process in a cluster. Pods can contain multiple containers that share the same network namespace, allowing them to communicate with each other using localhost. Pods are scheduled to run on nodes and can be horizontally scaled by creating multiple replicas managed by Controllers like Deployments. + +-3. Question: How does Kubernetes ensure high availability and fault tolerance? +Solution: +Kubernetes achieves high availability through: + +Replication: Replicating applications across multiple nodes. +Self-healing: Automatically replaces failed containers or reschedules Pods. +Load Balancing: Distributes network traffic across multiple Pods. +Additionally, Kubernetes ensures fault tolerance through features like node monitoring, automatic scaling, and rolling updates, which allow applications to be updated without downtime. + +-4. Question: Explain the concept of Kubernetes Services and their types. +Solution: +Kubernetes Services provide stable endpoints for Pods. There are several types of Services: + +ClusterIP: Exposes the Service on a cluster-internal IP. +NodePort: Exposes the Service on each Node's IP at a static port. +LoadBalancer: Exposes the Service externally using a cloud provider's load balancer. +ExternalName: Maps the Service to the contents of the externalName field (e.g., a DNS name). + +-5. Question: What are Kubernetes Deployments, and how do they manage application updates? +Solution: +Deployments in Kubernetes describe an application’s life cycle, enabling declarative updates for Pods and ReplicaSets. They provide a way to describe an application’s desired state. When a Deployment’s Pod template (e.g., container image version) is updated, it triggers a rolling update, ensuring zero-downtime updates. Old Pods are replaced by new ones gradually, minimizing disruptions. ****************** diff --git a/Interview/devops interview que.md b/Interview/devops interview que.md new file mode 100644 index 00000000..09280d26 --- /dev/null +++ b/Interview/devops interview que.md @@ -0,0 +1,363 @@ + + +DevOps Interview Questions + +1. List the essential DevOps tools? +Answer: + +Git +Jenkins +Selenium +Puppet +Chef +Ansible +Nagios +Docker +Monit +ELK –Elasticsearch, Logstash, Kibana +Collected/Collect +Git(GitHub) + +2. Why Hybrid Clouds are so important? +Answer: Cloud Bursting: +Access capacity or specialized software is available in the public cloud and not in a private cloud +Examples: Virtual Amazon and Dynamo +Leverage the best of both worlds: +VCloud: +It is VM Ware cloud +It is Expensive +Enterprise quality +Open stack: +It has commodity servers and storage. +It is less reliable. +We can run Web servers on OpenStack. +The database is built on VCloud. + +3. Explain how can I vertically scale an Amazon instance? +Answer: This is one of the essential features of AWS and cloud virtualization. SpinUp a newly developed large instance where we pause that instance and detach the root Ebs volume from the server and discard. Later stop your live instance, detach its root volume connected. Note down the unique device ID and attach the same root volume to the new server. And restart it again. This results in a vertically scaled Amazon instance. + +Server group provides 80 and 443 from around the world, but only port 22 are vital among the jump box group. Database group allows port 3306 from the webserver group and port 22 from the jump box group. Addition of any machines to the webserver group can store in the database. No one can directly ssh to any of your boxes. + +4. What are the building blocks in cloud architecture? +Answer: + +Reference architecture +Technical architecture +Deployment operation architecture +Reference architecture +Technical architecture +Deployment operation architecture + +5. DevOps Toolchain? +Answer: DevOps Toolchain: + +Code: code development and review, source code management tools, code merging +Build: continuous integration tools, build status +Test: continuous testing tools that provide feedback on business risks +Package: artifact repository, application pre-deployment staging +Release: change management, release approvals, release automation +Configure: infrastructure configuration and management, Infrastructure as Code tools +Monitor: applications performance monitoring, end-user experience +Some categories are more essential in a DevOps toolchain than others; especially continuous integration (e.g. Jenkins) and infrastructure as code (e.g. Puppet). +Source: Wikipedia +We have the comprehensive DevOps Training Courses to give you a head start in your career. + +6. Mention some important features of Memcached? +Answer: Important features of Memcached includes: +CAS Tokens: A CAS token is attached to any object retrieved from cache. You can use that token to save your updated object. +Callbacks: It simplifies the code +Get Delayed: It reduces the delay time of your script which is waiting for results to come back from the server +Binary protocol: You can use binary protocol instead of ASCII with the newer client + +In binary: Previously, the client always used to do serialization of the value with complex data, but with Memcached, you can use the binary option. + +7. How is DevOps different from Agile / SDLC? +Answer: I would advise you to go with the below explanation: +Agile is a set of values and principles about how to produce i.e. develop software. Example: if you have some ideas and you want to turn those ideas into working software, you can use the Agile values and principles as a way to do that. But, that software might only be working on a developer’s laptop or in a test environment. You want a way to quickly, easily and repeatably move that software into production infrastructure, in a safe and simple way. To do that you need DevOps tools and techniques. + +You can summarize by saying Agile software development methodology focuses on the development of software but DevOps, on the other hand, is responsible for development as well as the deployment of the software in the safest and most reliable way possible. Here’s a blog that will give you more information on the evolution of DevOps. + +8. List the major difference between the Agile and DevOps? +Agile: +Agile is about software development +Devops: +DevOps is about software deployment and management. +DevOps does not replace Agile or Lean. It does this by killing waste, removing handovers, and streamlining deployments to allow faster and more continuous deployments to PRODUCTION. + +9. What are the core roles of DevOps Engineers in terms of development and Infrastructure? +Answer: + +The core job roles of DevOps Engineer +Application development +Code developing +Code coverage +Unit testing +Packaging +Deployment With infrastructure +Continuous Integration +Continuous Testing +Continuous Deployment +Provisioning +Configuration +Orchestration +Deployment + +10. What is Version control? +Answer: This is probably the easiest question you will face in the interview. My suggestion is to first give a definition of Version control. It is a system that records changes to a file or set of files over time so that you can recall specific versions later. Version control systems consist of a central shared repository where teammates can commit changes to a file or set of file. Then you can mention the uses of version control. + +Revert files back to a previous state. +Revert the entire project back to a previous state. +Compare changes over time. +See who last modified something that might be causing a problem. +Who introduced an issue and when. + +11. How would you prepare for migration? +Answer: This question evaluates your experience of real projects with all the awkwardness and complexity they bring. Include terms like cut-over, dress rehearsals, roll-back and roll-forward, DNS solutions, feature toggles, branch by abstraction, and automation in your answer. Developing greenfield systems with little or no existing technology in place is always easier than having to deal with legacy components. + +12. Explain Security management in terms of Cloud Computing? +Answer: Identity management access provides the authorization of application services. +Access control permission is given to the users to have complete controlling access of another user who is entering into the cloud environment. +Authentication and Authorization provide access to only the authorized and authenticated users only to access the data and applications. + +13. What are the anti-patterns of DevOps? +Answer: A pattern is a common usage usually followed. If a pattern commonly adopted by others does not work for your organization and you continue to blindly follow it, you are essentially adopting an anti-pattern. There are myths about DevOps. (oracle apex training online ) + +14. How do all these tools work together? +Answer: +Given below is a generic logical flow where everything gets automated for seamless delivery. However, this flow may vary from organization to organization as per the requirement. +Developers develop the code and this source code is managed by Version Control System tools like Git etc. +Developers send this code to the Git repository and any changes made in the code is committed to this Repository. +Jenkins pulls this code from the repository using the Git plugin and builds it using tools like Ant or Maven. +Configuration management tools like puppet deploys & provisions testing environment and then Jenkins releases this code on the test environment on which testing is done using tools like selenium. +Once the code is tested, Jenkins send it for deployment on the production server (even production server is provisioned & maintained by tools like a puppet). +After deployment, It is continuously monitored by tools like Nagios. +Docker containers provide a testing environment to test the build features. + +15. What is the difference between Active and Passive check in Nagios? +Answer: For this answer, first, point out the basic difference Active and Passive checks. The major difference between Active and Passive checks is that Active checks are initiated and performed by Nagios, while passive checks are performed by external applications. +If your interviewer is looking unconvinced with the above explanation then you can also mention some key features of both Active and Passive. + +16. Mention what are the key aspects or principle behind DevOps? +Answer: The key aspects or principle behind DevOps is + +Infrastructure as code +Continuous deployment +Automation +Monitoring +Security + +17. What DevOps tools have you worked with? +Answer: Software configuration management and build/release (version control) tools, including Apache Subversion, Mercurial, Fossil and others, help document change requests. Developers can more easily follow the company’s best practices and policies while software changes. +Continuous integration (CI) tools such as Rational Build Forge, Jenkins and Semaphore merge all developer copies of the working code into a central version. These tools are important for larger groups where teams of developers work on the same codebase simultaneously. QA experts use code analyzers to test software for bugs, security, and performance. If you’ve used HP’s Fortify Static Code Analyzer, talk about how it identified security vulnerabilities in coding languages. Also speak about tools like Gramma Tech’s Code Sonar that you used to identify memory leaks, buffer underruns and other defects for C/C++ and Java code. It is essential that you have an adequate command of the principal languages like Ruby, C#, .NET, Perl, Python, Java, PHP, Windows Power Shell, and are comfortable with the associated OS environments Windows, Linux, and Unix. + +18. What testing is necessary to ensure a new service is ready for production? +Answer: DevOps is all about continuous testing throughout the process, starting with development through to production. Everyone shares the testing responsibility. This ensures that developers are delivering code that doesn’t have any errors and is of high quality, and it also helps everyone leverage their time most effectively. ( oracle apex training online ) + +19. What is State Stalking in Nagios? +Answer: I will advise you to first give a small introduction on State Stalking. It is used for logging purposes. When Stalking is enabled for a particular host or service, Nagios will watch that host or service very carefully and log any changes it sees in the output of check results. +Depending on the discussion between you and interviewer you can also add, “It can be very helpful in later analysis of the log files. Under normal circumstances, the result of a host or service check is only logged if the host or service has changed state since it was last checked. + +20. What is meant by Continuous Integration? +Answer: +I will advise you to begin this answer by giving a small definition of Continuous Integration (CI). It is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. +I suggest that you explain how you have implemented it in your previous job. You can refer to the below-given example: +Developers check out code into their private workspaces. +When they are done with it they commit the changes to the shared repository (Version Control Repository). +The CI server monitors the repository and checks out changes when they occur. +The CI server then pulls these changes and builds the system and also runs unit and integration tests. +The CI server will now inform the team of the successful build. +If the build or tests fail, the CI server will alert the team. +The team will try to fix the issue at the earliest opportunity. +This process keeps on repeating. + +21. Why do you need a Continuous Integration of Dev & Testing? +Answer: For this answer, you should focus on the need for Continuous Integration. My suggestion would be to mention the below explanation in your answer: +Continuous Integration of Dev and Testing improves the quality of software and reduces the time taken to deliver it, by replacing the traditional practice of testing after completing all development. It allows the Dev team to easily detect and locate problems early because developers need to integrate code into a shared repository several times a day (more frequently). Each check-in is then automatically tested. ( data science training ) + +22. What is Git? +Answer: I will suggest that you attempt this question by first explaining the architecture of git as shown in the below diagram. You can refer to the explanation given below: + +Git is a Distributed Version Control system (DVCS). It can track changes to a file and allows you to revert back to any particular change. +Its distributed architecture provides many advantages over other Version Control Systems (VCS) like SVN one major advantage is that it does not rely on a central server to store all the versions of a project’s files. Instead, every developer “clones” a copy of a repository I have shown in the diagram below with “Local repository” and has the full history of the project on his hard drive so that when there is a server outage, all you need for recovery is one of your teammate’s local Git repository. + +There is a central cloud repository as well where developers can commit changes and share it with other teammates as you can see in the diagram where all collaborators are committing changes “Remote repository”. () + +23. Explain what is Memcached? +Answer: Memcached is a free and open-source, high-performance, distributed memory object caching system. The primary objective of Memcached is to enhance the response time for data that can otherwise be recovered or constructed from some other source or database. It is used to avoid the need to operate SQL database or another source repetitively to fetch data for the concurrent request. +Memcached can be used for + +Social Networking -> Profile Caching +Content Aggregation -> HTML/ Page Caching +Ad targeting -> Cookie/profile tracking +Relationship -> Session caching +E-commerce -> Session and HTML caching +Location-based services -> Database query scaling +Gaming and entertainment -> Session caching +Memcache helps in +Speed up application processes +It determines what to store and what not to +Reduce the number of retrieval requests to the database +Cuts down the I/O ( Input/Output) access (hard disk) +The drawback of Memcached is +It is not a persistent data store +Not a database +It is not an application-specific +It cannot cache large object + +24. What is Automation Testing? +Answer: Automation testing or Test Automation is a process of automating the manual process to test the application/system under test. Automation testing involves the use of separate testing tools which lets you create test scripts which can be executed repeatedly and doesn’t require any manual intervention. + +25. How to launch the Browser using WebDriver? +Answer: +The following syntax can be used to launch Browser: + +WebDriver driver = new FirefoxDriver(); +WebDriver driver = new ChromeDriver(); +WebDriver driver = new InternetExplorerDriver(); + +26. What are the goals of Configuration management processes? +Answer: The purpose of Configuration Management (CM) is to ensure the integrity of a product or system throughout its life-cycle by making the development or deployment process controllable and repeatable, therefore creating a higher quality product or system. The CM process allows orderly management of system information and system changes for purposes such as to: + +Revise capability, +Improve performance, +Reliability or maintainability, +Extend life, +Reduce cost, +Reduce risk and +Liability, or correct defects. + +27. What is Chef? +Answer: Begin this answer by defining Chef. It is a powerful automation platform that transforms infrastructure into code. A chef is a tool for which you write scripts that are used to automate processes. What processes? Pretty much anything related to IT. +Now you can explain the architecture of Chef, it consists of: + +Chef Server: The Chef Server is the central store of your infrastructure’s configuration data. The Chef Server stores the data necessary to configure your nodes and provides search, a powerful tool that allows you to dynamically drive node configuration based on data. + +Chef Node: A Node is any host that is configured using Chef-client. Chef-client runs on your nodes, contacting the Chef Server for the information necessary to configure the node. Since a Node is a machine that runs the Chef-client software, nodes are sometimes referred to as “clients”. + +Chef Workstation: A Chef Workstation is a host you use to modify your cookbooks and other configuration data. + +28. What is Continuous Testing? +Answer: I will advise you to follow the below-mentioned explanation: +Continuous Testing is the process of executing automated tests as part of the software delivery pipeline to obtain immediate feedback on the business risks associated with the latest build. In this way, each build is tested continuously, allowing Development teams to get fast feedback so that they can prevent those problems from progressing to the next stage of Software delivery life-cycle. This dramatically speeds up a developer’s workflow as there’s no need to manually rebuild the project and re-run all tests after making changes. + +29. What are the success factors for Continuous Integration? +Answer: Here you have to mention the requirements for Continuous Integration. You could include the following points in your answer: + +Maintain a code repository +Automate the build +Make the build self-testing +Everyone commits to the baseline every day +Every commit (to baseline) should be built +Keep the build fast +Test in a clone of the production environment +Make it easy to get the latest deliverables +Everyone can see the results of the latest build +Automate deployment. + +30. What is Puppet? +Answer: I will advise you to first give a small definition of Puppet. It is a Configuration Management tool which is used to automate administration tasks. + +Now you should describe its architecture and how Puppet manages its Agents. Puppet has a Master-Slave architecture in which the Slave has to first send a Certificate signing request to Master and Master has to sign that Certificate in order to establish a secure connection between Puppet Master and Puppet Slave as shown in the diagram below. Puppet Slave sends a request to Puppet Master and Puppet Master then pushes configuration on Slave. + +31. What is the Puppet Manifests? +Answer: It is a very important question so make sure you go in the correct flow. According to me, you should first define Manifests. Every node (or Puppet Agent) has got its configuration details in Puppet Master, written in the native Puppet language. These details are written in the language which Puppet can understand and are termed as Manifests. They are composed of Puppet code and their filenames use the .pp extension. + +Now give an example. You can write a manifest in Puppet Master that creates a file and installs apache on all Puppet Agents (Slaves) connected to the Puppet Master. + +32. What testing is necessary to ensure that a new service is ready for production? +Answer: DevOps is all about continuous testing throughout the process, starting with development through to production. Everyone shares the testing responsibility. This ensures that developers are delivering code that doesn’t have any errors and is of high quality, and it also helps everyone leverage their time most effectively. + +33. Explain how Memcached should not be used? +Answer: +Memcached common misuse is to use it as a data store, and not as a cache Never use Memcached as the only source of the information you need to run your application. Data should always be available through another source as well. Memcached is just a key or value store and cannot perform query over the data or iterate over the contents to extract information. Memcached does not offer any form of security either in encryption or authentication + +34. Explain your understanding and expertise on both the software development side and the technical operations side of an organization you’ve worked for in the past? +Answer: DevOps engineers almost always work in a 24/7 business-critical online environment. I was adaptable to on-call duties and able to take up real-time, live-system responsibility. I successfully automated processes to support continuous software deployments. I have experience with public/private clouds, tools like Chef or Puppet, scripting and automation with tools like Python and PHP, and a background in AGILE. + +35. Explain whether it is possible to share a single instance of a Memcache between multiple projects? +Answer: Yes, it is possible to share a single instance of Memcache between multiple projects. Memcache is a memory store space, and you can run Memcache on one or more servers. You can also configure your client to speak to a particular set of instances. So, you can run two different Memcache processes on the same host and yet they are completely independent. Unless, if you have partitioned your data, then it becomes necessary to know from which instance to get the data from or to put into. + +36. Explain how you can minimize the Memcached server outages? +Answer: +When one instance fails, several of them goes down, this will put a larger load on the database server when lost data is reloaded as the client make a request. To avoid this, if your code has been written to minimize cache stampedes then it will leave a minimal impact +Another way is to bring up an instance of Memcached on a new machine using the lost machines IP address +Code is another option to minimize server outages as it gives you the liberty to change the Memcached server list with minimal work +Setting timeout value is another option that some Memcached clients implement for Memcached server outage. When your Memcached server goes down, the client will keep trying to send a request till the time-out limit is reached + +37. Is continuous delivery related to the dev-ops movement? How so? +Answer: Absolutely. In any organization where there is a separate operations department, and especially where there is an independent QA or testing function, we see that much of the pain in getting software delivered is caused by poor communication between these groups, exacerbated by an underlying cultural divide. Apps are measured according to throughput, and ops are measured according to stability. Testing gets it in the neck from both sides, and like release management, is often a political pawn in the fight between apps and ops. The point of dev-ops is that developers need to learn how to create high-quality, production-ready software, and ops need to learn that Agile techniques are actually powerful tools to enable effective, low-risk change management. Ultimately, we’re all trying to achieve the same thing – creating business value through software – but we need to get better at working together and focusing on this goal rather than trying to optimize our own domains. Unfortunately, many organizations aren’t set up in a way that rewards that kind of thinking. According to Forrester. + +38. What are the advantages of DevOps with respect to Technical and Business perspective? +Answer: +Technical benefits: + +Software delivery is continuous. +Reduces Complexity in problems. +Faster approach to resolve problems +Manpower is reduced. +Business benefits: + +The high rate of delivering its features +Stable operating environments +More time gained to Add values. +Enabling faster feature time to market + +39. Explain AWS? +Answer: AWS stands for Amazon Web Service which is a collection of remote computing services also known as cloud computing. This technology of cloud computing is also known as IaaS or Infrastructure as a Service. + +40. What is DevOps engineer’s duty with regards to Agile development? +Answer: DevOps engineer works very closely with Agile development teams to ensure they have an environment necessary to support functions such as automated testing, Continuous Integration, and Continuous Delivery. DevOps engineer must be in constant contact with the developers and make all required parts of the environment work seamlessly. + +41. What is the most important thing DevOps helps us achieve? +Answer: According to me, the most important thing that DevOps helps us achieve is to get the changes into production as quickly as possible while minimizing risks in software quality assurance and compliance. This is the primary objective of DevOps. Learn more in this DevOps tutorial blog. +However, you can add many other positive effects of DevOps. For example, clearer communication and better working relationships between teams i.e. both the Ops team and Dev team collaborate together to deliver good quality software which in turn leads to higher customer satisfaction. + +42. Which VCS tool you are comfortable with? +Answer: You can just mention the VCS tool that you have worked on like this: “I have worked on Git and one major advantage it has over other VCS tools like SVN is that it is a distributed version control system.” +Distributed VCS tools do not necessarily rely on a central server to store all the versions of a project’s files. Instead, every developer “clones” a copy of a repository and has the full history of the project on their own hard drive. + +43. Which Testing tool are you comfortable with and what are the benefits of that tool? +Answer: Here mention the testing tool that you have worked with and accordingly frame your answer. I have mentioned an example below: +I have worked on Selenium to ensure high quality and more frequent releases. + +Some advantages of Selenium are: + +It is free and open source +It has a large user base and helping communities +It has cross Browser compatibility (Firefox, Chrome, Internet Explorer, Safari, etc.) +It has great platform compatibility (Windows, Mac OS, Linux, etc.) +It supports multiple programming languages (Java, C#, Ruby, Python, Pearl, etc.) +It has fresh and regular repository developments +It supports distributed testing + +44. Why is Continuous monitoring necessary +Answer: I will suggest you go with the below-mentioned flow: +Continuous Monitoring allows timely identification of problems or weaknesses and quick corrective action that helps reduce expenses of an organization. Continuous monitoring provides a solution that addresses three operational disciplines known as: + +continuous audit +continuous controls monitoring +continuous transaction inspection +45. What is the one most important thing DevOps helps do? +Answer: The most important thing DevOps helps do is to get the changes into production as quickly as possible while minimizing risks in software quality assurance and compliance. That is the primary objective of DevOps. However, there are many other positive side-effects to DevOps. For example, clearer communication and better working relationships between teams which creates a less stressful working environment. + +46. Describe two-factor authentication? +Answer: Two-factor authentication is a security process in which the user provides two means of identification from separate categories of credentials; one is typically a physical token, + +47. Explain how can create a backup and copy files in Jenkins? +Answer: Answer to this question is really direct. To create a backup, all you need to do is to periodically back up your JENKINS_HOME directory. This contains all of your build jobs configurations, your slave node configurations, and your build history. To create a back-up of your Jenkins setup, just copy this directory. You can also copy a job directory to clone or replicate a job or rename the directory. + +48. What is Cloud Computing? +Answer: It is advance stage technology implemented so that the cloud provides the services globally as per the user requirements. It provides a method to access several servers worldwide. + +49. Explain with a use case where DevOps can be used in industry/ real-life? +Answer: There are many industries that are using DevOps so you can mention any of those use cases, you can also refer the below example: +Etsy is a peer-to-peer e-commerce website focused on handmade or vintage items and supplies, as well as unique factory-manufactured items. Etsy struggled with slow, painful site updates that frequently caused the site to go down. It affected sales for millions of Etsy’s users who sold goods through the online market place and risked driving them to the competitor. + +With the help of a new technical management team, Etsy transitioned from its waterfall model, which produced four-hour full-site deployments twice weekly, to a more agile approach. Today, it has a fully automated deployment pipeline, and its continuous delivery practices have reportedly resulted in more than 50 deployments a day with fewer disruptions. + +50. Explain how would you handle revision (version) control? +Answer: My approach to handling revision control would be to post the code on SourceForge or GitHub so everyone can view it. Also, I will post the checklist from the last revision to make sure that any unsolved issues are resolved. + +51. How would you make software deployable? +Answer: The ability to script the installation and reconfiguration of software systems is essential towards controlled and automated change. Although there is an increasing trend for new software to enable this, older systems and products suffer from the assumption that changes would be infrequent and minor, and so make automated changes difficult. As a professional who appreciates the need to expose configuration and settings in a manner accessible to automation, I will work with concepts like Inversion of Control (IoC) and Dependency Injection, scripted installation, test harnesses, separation of concerns, command-line tools, and infrastructure as code. + diff --git a/Interview/devops-notes.md b/Interview/devops-notes.md index f08132c9..aa262069 100644 --- a/Interview/devops-notes.md +++ b/Interview/devops-notes.md @@ -1,6 +1,6 @@ # Devops Notes -### Top 5 DevOps Tools You Should Know In 2019 +### Top 5 DevOps Tools You Should Know In 2023 #### Ansible @@ -52,4 +52,12 @@ - Guaranteed message delivery. - Push work into background processes, freeing your web server up to handle more users. - Scale the most frequently used parts of your system, without having to scale everything. - - Handling everything with ease even if it seems to be a huge crash. \ No newline at end of file + - Handling everything with ease even if it seems to be a huge crash. + +#### Git + +- Git is a widely adopted, distributed version control system (DVCS) that is fundamental to modern software development. It is considered an essential tool for source code management and collaborative software development. + + -Distributed Version Control: Git follows a distributed version control model, which means that every developer has a full copy of the entire repository on their local machine. + -Branching and Merging: Git excels in branching and merging capabilities. + -Lightweight and Fast: Git is known for its speed and efficiency. diff --git a/Interview/networking.md b/Interview/networking.md new file mode 100644 index 00000000..72ca6042 --- /dev/null +++ b/Interview/networking.md @@ -0,0 +1 @@ +## Networking and OSI Model - Interview Preparations diff --git a/Interview/readme.md b/Interview/readme.md index d8b11146..f9a127fe 100644 --- a/Interview/readme.md +++ b/Interview/readme.md @@ -1,14 +1,18 @@ -### Notes and Interview Questions: +## Notes and Interview Questions: ****************** -## Contents: -- ![DevOps Interview Questions](https://github.com/Tikam02/DevOps-Guide/blob/master/notes/Dev-ops-Interview.md) +### Contents: -- ![Awesome Interview Questions](https://github.com/MaximAbramchuck/awesome-interview-questions#docker) +- [DevOps Interview Questions](https://github.com/Tikam02/DevOps-Guide/blob/master/Interview/Dev-ops-Interview.md) -- ![Tech Interview Handbook](https://github.com/yangshun/tech-interview-handbook) +- [Awesome Interview Questions](https://github.com/MaximAbramchuck/awesome-interview-questions#docker) -- ![Best Website a Programmer Should Visit](https://github.com/sdmg15/Best-websites-a-programmer-should-visit#interview-preparation) +- [Tech Interview Handbook](https://github.com/yangshun/tech-interview-handbook) +- [Best Website a Programmer Should Visit](https://github.com/sdmg15/Best-websites-a-programmer-should-visit#interview-preparation) +- [How to Prepare for Your DevOps Interview](https://dzone.com/articles/how-to-prepare-for-your-devops-interview) +- [Top 20 Latest DevOps Interview Questions And Answers For 2020](https://www.softwaretestinghelp.com/devops-interview-questions) + +- [Top DevOps Interview Questions and Answers](https://hackr.io/blog/devops-interview-questions) diff --git a/LINUX/Basic_Command b/LINUX/Basic_Command new file mode 100644 index 00000000..9cedcec1 --- /dev/null +++ b/LINUX/Basic_Command @@ -0,0 +1,152 @@ +## LINUX COMMAND + +##DIRECTORY + + sudo - super user do +--- + pwd --> displays present working directory +--- + mkdir (directory name) --> This command create a directory +--- + cd (directory/folder where you want to navigate) -->This command change directory. +--- + ls --> lists contents of current directory +--- + ls -l --> list contents of current directory with detailed output +--- + ll --> list contents of current directory with detailed output +--- + cd +--- + cd .. --> to come out of a directory +--- + rm -r testdir --> to remove a directory +--- + ~ --> Home directory +--- + mkdir -p folder/subfolder/subfolder2 --> create parent and child directory + +--- +--- + +##FILE + + touch test.txt(file name) --> creates a empty file +--- + ls -l --> lists the contents in current directory +--- + echo Print Output + + echo "This is a text" > test.txt +--- + cat test.txt --> writes the content of file into terminal & exits +--- + more test.txt --> writes the content of file on terminal page by page ( to move to next page need to hit space bar on keyboard ) +--- + less test.txt --> open the file on terminal & can be read line by line (use arrows to scroll up & down) + + To comeout need to press 'q' on the key board +--- + vi test.txt --> Visual Editor + -This opens the file in read only mode + -To edit the file, press 'i' on keyboard for INSERT mode & then you can write anything + -once the text is entered, press 'ESC' on keyboard to return back on readonly mode + -press ':wq' on keyboard -- to save & come out of the file + -press ':q' on keyboard -- to come out of the file without saving + -press ':wq!' on keyboard -- to save forcefully & come out of the file + -press ':q!' on keyboard -- to come out of the file forcefully without saving +--- + rm test.txt --> To remove a file +--- +COPY/RENAME/MOVE/OPERATION + + While performing these operations, we can always use absolute paths or relative paths accrodingly. + These commands expects source & dest values + + cp A.txt B.txt --> makes a copy of A.txt names it to B.txt in current directory + + cp /home/A.txt /tmp/A.txt --> make a copy of A.txt to /tmp + + cp -r testdir/ newdir/ --> makes a copy of testdir & names it to newdir in current dirctory + + cp -r /home/testdir /tmp/testdir --> makes a copy of testdir to /tmp + + mv A.txt new.txt ---> renames A.txt to new.txt in current path + + mv A.txt /tmp ---> moves to A.txt to /tmp + + mv testdir newdir --> renames testdir to newdir in crrent path + + mv newdir /tmp ---> moves newdir to /tmp path + +--- + +##Linux pipes + + cat test.txt | grep 'searchkey' ---> Only gives lines from that file thant contains the key in '' + + cat test.txt | less ---> Prints out file content, but you have the possibility to scroll + Quit the reading with 'q' + + cat test.txt | uniq ---> This will sort the given file and print the unique values only. + + cat test.txt | head -4 ---> Only prints out the last 4 lines of the command before the pipe, you can specify any number you want + + ls | wc -l ---> prints out the linenumber of the command before the pipe + +--- + +##PERMISSION + +Observe the output of ls: + +drwxrwxr-x 2 manifoldailearning manifoldailearning 4096 Nov 7 23:38 testdir +-rw-rw-r-- 1 manifoldailearning manifoldailearning 126 Nov 7 23:37 abc.txt +-rw-rw-r-- 1 manifoldailearning manifoldailearning 126 Nov 7 23:38 one.txt + + drwxrwxr-x or -rw-rw-r-- --> Read/Write/Execute Permission for a file or a directory in linux + + (1st value)manifoldailearning --> owner of the file/directory + (2nd value)manifoldailearning --> group who owns file/directory + +--- + +How to update the owner & group for a file/dir - + + chown ( change owner ) is the command to update the owners of dir/file + note: note that you need to have previliges to update the permissions for a file/directory + + Syntax: chown owner:group filename/dirname + +--- + +How to update the read,write & execute permissions for a file/dir + + How to decode the Read/Write/Execute Permission terminology: + + -/d ---> denotes if it is a file or directory ( - means file / d means directory ) + rwx ---> means read,write & execute permissions for super user ( root ) + rw- ---> means read,write permissions for the owner of the file ( ex: manifoldailearning as above ) + r-- ---> means read only permissions for others ( whoever login to the machine ) + + + r --> Permission to read the file. + w --> Permission to write (or delete) the file. + x --> Permission to execute the file, or, in the case of a directory, search it. + + chmod ( change mode ) is the command to update the read/write/execute permissions for a file/directory + r = 4, w = 2, x = 1 + + - | rwx | rwx | rwx + - | 421 | 421 | 421 + + To update the permissions we can sum 421 + If super user needs to have read,write & exeute give 7 + If the owner need to read & write give 6 + If other need to have only read give 4 + + + chmod 777 file/dir -- rwx for root, rwx for owner, rwx for others + chmod 764 file/dir -- rwx for root, rw for owner, r for others + chmod 755 fire/dir -- rwx for root, rw for owner, rw for others +--- diff --git a/LINUX/bash-scripts-manage-system/README.md b/LINUX/bash-scripts-manage-system/README.md new file mode 100644 index 00000000..a92a4da8 --- /dev/null +++ b/LINUX/bash-scripts-manage-system/README.md @@ -0,0 +1,7 @@ +# How to Run + +``` +chmod +x system-management.sh +./system-management.sh + +``` \ No newline at end of file diff --git a/LINUX/bash-scripts-manage-system/system-management.sh b/LINUX/bash-scripts-manage-system/system-management.sh new file mode 100644 index 00000000..f2ff6363 --- /dev/null +++ b/LINUX/bash-scripts-manage-system/system-management.sh @@ -0,0 +1,183 @@ +#!/bin/bash +clear +print_style () { + + if [ "$2" == "info" ] ; then + COLOR="96m"; + elif [ "$2" == "success" ] ; then + COLOR="92m"; + elif [ "$2" == "warning" ] ; then + COLOR="93m"; + elif [ "$2" == "danger" ] ; then + COLOR="91m"; + else #default color + COLOR="0m"; + fi + + STARTCOLOR="\e[$COLOR"; + ENDCOLOR="\e[0m"; + + printf "$STARTCOLOR%b$ENDCOLOR" "$1"; + echo "" +} + + + +ManageProc() { +clear +print_style "This menu facilitates process management, making it easy for you to monitor and control processes." "info" +sleep 1 +PS3="Choose an item: If you don’t see anything, please press Enter." +select CHOICE in "Top 10 CPU% Usage" "Process More Than X CPU Usage(in %)" "Top 10 Memory% Usage" "Process More X Memory Usage(in %)" "Zombie Process" "Kill Process" "Exit";do + case $REPLY in + 1) + clear + print_style "Below are the top 10 applications that utilize the most CPU resources." "info" + sleep 0.5 + print_style "`ps -ax --sort=-%cpu --format pid,ppid,cmd,%cpu,%mem | head -n 10`" "warning"; + ;; + 2) + clear + read -p "Please input your CPU% Usage percentage like 10.0: " threshold + sleep 0.5 + print_style "`ps -ax --format pid,ppid,%cpu,%mem,cmd,user | awk -v threshold=$threshold '{ if ($3 > threshold ) print $0}'`" "warning"; + ;; + 3) + clear + print_style "`ps ax --sort=-%mem --format pid,ppid,%cpu,%mem,cmd,user | head -n 10`" "warning" + ;; + + 4) + clear + read -p "Please input your Memory% Usage percentage like: 10.0: " threshold + sleep 0.5 + print_style "`ps -ax --sort=-%mem --format pid,ppid,%cpu,%mem,cmd,user | awk -v threshold=$threshold '{if ($4 > threshold ) print $0}'`" "warning"; + ;; + + 5) + clear + echo This is Zombie Process, please kill them. + sleep 0.5 + print_style "`ps -ax --format pid,ppid,%cpu,%mem,cmd,stat | awk '$6 == "Z" { print $0 }'`" "danger"; + ;; + + 6) + read -p "Enter the PID of the process which you want to delete it: " ProcessID + echo "here is the process-id of this PID:" + print_style "`ps -ax --sort=-%mem --format pid,ppid,%cpu,%mem,cmd,user | awk -v pid=$ProcessID '{if ($1== pid ) print $0}'`" "info"; + sleep 0.4 + read -p "Enter the signal which you want to send it to the process: " signal + sleep 0.2 + read -p "Are you sure you want to send this signal to this PID? Y|N " answer + case "$answer" in + Y|y) + print_style "sending signal ($signal) to the PID ($ProcessID) in 5 second, you can press Ctrl+C to cancel it." "danger"; + sleep 5 + kill -$signal $ProcessID + if [[ $? -eq 0 ]] + then + echo "the pid: $PID is successfully killed." + fi + ;; + N|n) + echo "Nothing to do " + ;; + + *) + print_style "Bad Input" "danger"; + ;; + esac + ;; + 7) + clear + print_style "Back to the main Menu..." "info" + sleep 1 + print_style "Please press the Enter command" + break + ;; + + + + esac +done + +} + + + +ManagefileSys() { + +#!/bin/bash + +PS3="Choose an item: If you don’t see anything, please press Enter. " +select CHOICE in "List Hard disk" "fine a file with size" "find a file" "find a pattern in files in your system" "Quit" +do + case $REPLY in + 1) + lsblk -f + ;; + 2) + + read -p "Enter the size in M-Byte: " fileSize + find / -type f -size +${fileSize}M -exec ls -lah {} \; + ;; + 3) + read -p "What is the name of the file you are Looking for: " fileName + find / -name $fileName + ;; + 4) + read -p "Enter the pattern: " pattern + find / -type f -name "*" -exec grep -i $pattern {} \; + ;; + 5) + clear + print_style "Back to the main Menu..." "info" + sleep 1 + print_style "Please press the Enter command " + break + ;; + *) + echo "bad input!!!" + ;; + esac +done + + +} + + + + + + +PS3="What do you Want to do: " +select fruit in "Manage your Process." "Adding a iptables rule." "Managing your filesystem." "Quit" +do + + case $REPLY in + 1) + echo "Manage your Process. " + ManageProc + ;; + 2) + echo "Adding a iptables rule. " + ;; + 3) + echo "Managing your filesystem. " + ManagefileSys + ;; + + 4) + echo "Quitting " + sleep 1 + break + ;; + *) + echo "bad input!!!" + ;; + esac +done + + + + diff --git a/Networking/networking-commands.md b/Networking/networking-commands.md index 11472ba9..26f6ed64 100644 --- a/Networking/networking-commands.md +++ b/Networking/networking-commands.md @@ -108,7 +108,33 @@ traceroute to google.com (216.58.198.78), 128 hops max, 72 byte packets tracepath performs a very simlar function to traceroute the main difference is that tracepath doesn't take complicated options. ### nmap -“ network exploration tool and security scanner”. nmap is a very advanced network tool used to query machines (local or remote) as to whether they are up and what ports are open on these machines. +“ network exploration tool and security scanner”. nmap is a very advanced network tool used to query machines (local or remote) as to whether they are up and what ports are open on these machines. Some features only activate when Nmap is run with privileges. More information: . +``` +# Try to determine whether the specified hosts are up and what are their names: +nmap -sn {{ip_or_hostname}} {{optional_another_address}} + +# Like above, but also run a default 1000-port TCP scan if host seems up: +nmap {{ip_or_hostname}} {{optional_another_address}} + +# Also enable scripts, service detection, OS fingerprinting and traceroute: +nmap -A {{address_or_addresses}} + +# Assume good network connection and speed up execution: +nmap -T4 {{address_or_addresses}} + +# Scan a specific list of ports (use -p- for all ports 1-65535): +nmap -p {{port1,port2,…,portN}} {{address_or_addresses}} + +# Perform TCP and UDP scanning (use -sU for UDP only, -sZ for SCTP, -sO for IP): +nmap -sSU {{address_or_addresses}} + +# Perform TLS cipher scan against a host to determine supported ciphers and SSL/TLS protocols: +nmap --script ssl-enum-ciphers {{address_or_addresses}} -p 443 + +# Perform full port, service, version detection scan with all default NSE scripts active against a host to determin weaknesses and info: +nmap -sC -sV {{address_or_addresses}} + +``` ### dig @@ -346,4 +372,4 @@ $ echo "nameserver x.x.x.x" /etc/resolv.conf # Add DNS Server - ```echo "­1" > /proc/­sys­/ne­t/i­pv4/ip forward``` -- Enable IP Forwarding -- ``` echo <"NA­MES­ERV­ER"> > /etc/r­eso­lv.c­onf``` -- Add DNS Server \ No newline at end of file +- ``` echo <"NA­MES­ERV­ER"> > /etc/r­eso­lv.c­onf``` -- Add DNS Server diff --git a/Networking/networking-concepts.md b/Networking/networking-concepts.md index 48c9857a..00c99202 100644 --- a/Networking/networking-concepts.md +++ b/Networking/networking-concepts.md @@ -23,71 +23,6 @@ ## OSI Model -- What is the OSI model? - - - The Open Systems Interconnection (OSI) model is a conceptual model created by the International Organization for Standardization which enables diverse communication systems to communicate using standard protocols. In plain English, the OSI provides a standard for different computer systems to be able to communicate with each other. - - - The OSI model can be seen as a universal language for computer networking. It’s based on the concept of splitting up a communication system into seven abstract layers, each one stacked upon the last. - - - -![OSI Model](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/osi-model-7-layers.svg) - -- 7. The Application Layer - - - This is the only layer that directly interacts with data from the user. Software applications like web browsers and email clients rely on the application layer to initiate communications. But it should be made clear that client software applications are not part of the application layer; rather the application layer is responsible for the protocols and data manipulation that the software relies on to present meaningful data to the user. Application layer protocols include HTTP as well as SMTP (Simple Mail Transfer Protocol is one of the protocols that enables email communications). - -![OSI Model](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/7-application-layer.svg) - -- 6. The Presentation Layer - - - This layer is primarily responsible for preparing data so that it can be used by the application layer; in other words, layer 6 makes the data presentable for applications to consume. The presentation layer is responsible for translation, encryption, and compression of data. - - - Two communicating devices communicating may be using different encoding methods, so layer 6 is responsible for translating incoming data into a syntax that the application layer of the receiving device can understand. - - - If the devices are communicating over an encrypted connection, layer 6 is responsible for adding the encryption on the sender’s end as well as decoding the encryption on the receiver's end so that it can present the application layer with unencrypted, readable data. - - - Finally the presentation layer is also responsible for compressing data it receives from the application layer before delivering it to layer 5. This helps improve the speed and efficiency of communication by minimizing the amount of data that will be transferred. - -![Presentation layer](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/6-presentation-layer.svg) - -- 5. The Session Layer - - - This is the layer responsible for opening and closing communication between the two devices. The time between when the communication is opened and closed is known as the session. The session layer ensures that the session stays open long enough to transfer all the data being exchanged, and then promptly closes the session in order to avoid wasting resources. - - - The session layer also synchronizes data transfer with checkpoints. For example, if a 100 megabyte file is being transferred, the session layer could set a checkpoint every 5 megabytes. In the case of a disconnect or a crash after 52 megabytes have been transferred, the session could be resumed from the last checkpoint, meaning only 50 more megabytes of data need to be transferred. Without the checkpoints, the entire transfer would have to begin again from scratch. - -![session layer](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/5-session-layer.svg) - - -- 4. The Transport Layer - - - Layer 4 is responsible for end-to-end communication between the two devices. This includes taking data from the session layer and breaking it up into chunks called segments before sending it to layer 3. The transport layer on the receiving device is responsible for reassembling the segments into data the session layer can consume. - - - The transport layer is also responsible for flow control and error control. Flow control determines an optimal speed of transmission to ensure that a sender with a fast connection doesn’t overwhelm a receiver with a slow connection. The transport layer performs error control on the receiving end by ensuring that the data received is complete, and requesting a retransmission if it isn’t. - -![transport layer](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/4-transport-layer.svg) - - -- 3. The Network Layer - - - The network layer is responsible for facilitating data transfer between two different networks. If the two devices communicating are on the same network, then the network layer is unnecessary. The network layer breaks up segments from the transport layer into smaller units, called packets, on the sender’s device, and reassembling these packets on the receiving device. The network layer also finds the best physical path for the data to reach its destination; this is known as routing. - -![network layer](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/3-network-layer.svg) - - -- 2. The Data Link Layer - - - The data link layer is very similar to the network layer, except the data link layer facilitates data transfer between two devices on the SAME network. The data link layer takes packets from the network layer and breaks them into smaller pieces called frames. Like the network layer, the data link layer is also responsible for flow control and error control in intra-network communication (The transport layer only does flow control and error control for inter-network communications). - -![Data link layer](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/2-data-link-layer.svg) - - -- 1. The Physical Layer - - - This layer includes the physical equipment involved in the data transfer, such as the cables and switches. This is also the layer where the data gets converted into a bit stream, which is a string of 1s and 0s. The physical layer of both devices must also agree on a signal convention so that the 1s can be distinguished from the 0s on both devices. - -![Physical layer](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/1-physical-layer.svg) - *************************** ## Four DoD layers @@ -288,7 +223,7 @@ - Authoritative nameserver - This final nameserver can be thought of as a dictionary on a rack of books, in which a specific name can be translated into its definition. The authoritative nameserver is the last stop in the nameserver query. If the authoritative name server has access to the requested record, it will return the IP address for the requested hostname back to the DNS Recursor (the librarian) that made the initial request. -- dns records +- DNS Records - A record: - The A record, which is also called a host record contains the ipv4-address of a computer.When a DNS client queries a DNS server for an A record, then the DNS server will resolve the hostname in the query to an ip address. An AAAA record is similar but contains an ipv6 address instead of ipv4. @@ -343,6 +278,33 @@ Internally (within a network), it can be very useful for caching proxy(Squid). F ********************************************** ## Routing Bridging and NAT +### NAT + The motivation behind NAT or Network Address Translation comes from the continuously increasing number of network applications and users along with the limited pool of public IPv4 addresses. + + +NAT enables hosts on an internal network to access an external network. NAT not only solves the problem of IPv4 address shortage but it also solves security loopholes since NAT prevents devices on the external network from directly communicating with hosts on the internal network that use private addresses. + +#### Private IP Addresses +While public IP addresses are used for direct communication on the internet and are handled and distributed by dedicated organizations, private IP addresses are not used for direct communication on the internet and can be used by anyone randomly on an internal network. So a private IP address can be assigned to multiple machines as long as they don't belong to the same internal network. + +- Reserved private IP addresses + + - Class A: + - 10.0.0.0 - 10.255.255.255 + - Class B: + - 172.16.0.0 – 172.31.255.255 + - Class C: + - 192.168.0.0 – 192.168.255.255 + +NAT is usually implemented on network egress devices such as routers or firewalls. An internal network can be an entreprise or a home. So, when you are using your computer at home and you want to access the internet to chat with some friends, a packet is sent to your home router where there is a NAT configured. For a traffic coming from an internal network (home) and going to an external network (internet), the NAT will translate the source IP address (private) which is in this case your computer's, into a specific public IP address so you can communicate with the public or external network. And vice versa, when a traffic is coming from an external network and going to an internal network, the NAT will translate the destination IP address (public) into a specific private IP address. + +#### Static NAT vs Dynamic NAT +When a private IP address is linked to a fixed IP address, this is called static NAT because it is one-to-one mode. Whereas in dynamic NAT, a private IP address is mapped to a group of public IP addresses. Static NAT could result in wasting IP addresses because the public IP address is always reserved for a specific host whether they are online or offline. However, dynamic NAT temporarily assigns a random IP address in the pool of addresses to the host. When the latter is no longer online, dynamic NAT frees that formerly claimed IP address and it is then available for other users. + +#### NAPT and Easy IP +Despite that, dynamic NAT is far from perfect because it does not handle port numbers translation. This is where NAPT or Network Address and Port Translation comes to the rescue because it enables a public IP address to map multiple private IP addresses through ports. In this mode, both IP addresses and transport-layer ports are translated so that different private addresses with different source port numbers are mapped to the same public address with different source port numbers. + +Easy IP also translates both IP addresses and transport-layer port numbers. However, Easy IP applies to scenarios where public IP addresses are not fixed, such as scenarios where public IP addresses are dynamically obtained by egress devices on private networks through DHCP (Dynamic Host Configuration Protocol) for example. ********************************************* @@ -358,4 +320,4 @@ Internally (within a network), it can be very useful for caching proxy(Squid). F ## References: -- [Networking for Devops](https://www.youtube.com/playlist?list=PLFjq8z-aGyQ7BGJKANiIusSq92L7OTytJ) \ No newline at end of file +- [Networking for Devops](https://www.youtube.com/playlist?list=PLFjq8z-aGyQ7BGJKANiIusSq92L7OTytJ) diff --git a/Networking/readme.md b/Networking/readme.md new file mode 100644 index 00000000..1b1c3766 --- /dev/null +++ b/Networking/readme.md @@ -0,0 +1,5 @@ +# Networking: + +- [Networking Commands](networking-commands.md) +- [Networking Concepts](networking-concepts.md) +- [Networking Cheatsheets](cheatsheet) diff --git a/OS/os-commands.md b/OS/os-commands.md index 810b36be..c478dc6e 100644 --- a/OS/os-commands.md +++ b/OS/os-commands.md @@ -1,10 +1,12 @@ # OS commands - [Linux Performance monitoring]() - - [top]() - - [ps aux]() - - [kill]() - + - [top](#top) + - [ps aux](#ps) + - [kill](#kill) + - [df](#df) + - [ss](#ss) + - [lsof](#lsof) *************** @@ -14,7 +16,7 @@ - Display Processes for a Specific User -``` $ top -u root `` +``` $ top -u root ``` @@ -27,6 +29,7 @@ - [Linux CPU Performance Monitoring Tutorial](https://www.slashroot.in/linux-cpu-performance-monitoring-tutorial) - [20 Command Line Tools to Monitor Linux Performance](https://www.tecmint.com/command-line-tools-to-monitor-linux-performance/) - [How to Use the Linux Top command](https://vitux.com/how-to-use-the-ubuntu-linux-top-command/) +- [Process Scheduling in Linux](https://www.scaler.com/topics/operating-system/process-scheduling/) **************** @@ -97,7 +100,7 @@ - To view only PID, USER and CMD columns, we can use the following command. -``` $ps –eo pid,user,cmd `` +``` $ps –eo pid,user,cmd ``` - Finding the process which is using the highest memory @@ -163,4 +166,97 @@ - [Understanding the kill command, and how to terminate processes in Linux](https://bencane.com/2014/04/01/understanding-the-kill-command-and-how-to-terminate-processes-in-linux/) - [A Guide to Kill, Pkill and Killall Commands to Terminate a Process in Linux](https://www.tecmint.com/how-to-kill-a-process-in-linux/) - [How To Use ps, kill, and nice to Manage Processes in Linux](https://www.digitalocean.com/community/tutorials/how-to-use-ps-kill-and-nice-to-manage-processes-in-linux) -- [Linux / Unix: killall Command Examples](https://www.cyberciti.biz/faq/unix-linux-killall-command-examples-usage-syntax/) \ No newline at end of file +- [Linux / Unix: killall Command Examples](https://www.cyberciti.biz/faq/unix-linux-killall-command-examples-usage-syntax/) + +************************** +## df + +- `df` (abbreviated disk **d**isk **f**ree) is a standard Unix command used to display the amount of available disk space for file systems on which the invoking user has appropriate write access. +- `df` for Unix-like and Linux systems is a part of X/Open portability guide since issue 2 of 1987. +- Syntax: + +```$ df``` + +```bash +Filesystem 1024-blocks Free %Used Iused %Iused Mounted on +/dev/hd4 32768 16016 52% 2271 14% / +/dev/hd2 4587520 1889420 59% 37791 4% /usr +/dev/hd9var 65536 12032 82% 518 4% /var +/dev/hd3 819200 637832 23% 1829 1% /tmp +/dev/hd1 524288 395848 25% 421 1% /home +/proc - - - - - /proc +/dev/hd10opt 65536 26004 61% 654 4% /opt +``` + +- To get a more readable format we can pass the `-h` argument which displays in more human readable formats like `KB, MB, GB, or TB` + +`$ df -h or df --human-redable` + +``` +Filesystem Size Used Avail Use% Mounted on +/dev/root 3.0G 2.3G 720M 77% / +devtmpfs 123M 0 123M 0% /dev +``` + +- Other useful arguments include + - `-a or --all`: List all dummy, duplicate, or inaccessible files which are ommited by default. + - `-k`: Use 1024-byte units, instead of default 512-byte units, when writing large figures. + - `-P or --portabilty`: Use a POSIX portable output format, when writing to files. + - `-t fstype or --type=fstype`: Limit the listing of the fstype. By default nothing is ommited. + +### Resources: + +- [Manual Page from GNU Coreutils](https://www.gnu.org/software/coreutils/manual/html_node/df-invocation.html) +- [Linux General Commands Manual](https://www.mankier.com/1/df) +- [FreeBSD General Commands Manual](https://www.freebsd.org/cgi/man.cgi?query=df&sektion=1) +- [df commands examples](https://www.tecmint.com/how-to-check-disk-space-in-linux/) + +--- + +## ss + +* The `ss` command is a tool used to dump socket statistics and display information in a similar fashion as `netstat`. +* The `ss` command can display stats for `PACKETS, TCP, UDP, DCCP, RAW` and `Unix Domain Sockets`. +* Usage: + * `$ ss` will list all the connections regardless of the state they are in. + * `$ ss -a` will list all the listening and not listening ports. + * `$ ss -l` will display only the listening ports. + * `$ ss -t` will display only the TCP connections. + * `$ ss -lt` will display the listening TCP ports. + * `$ ss -ua` will display all the UDP ports. + * `$ ss -lu` will display all the listening UDP ports. + * `$ ss -p` will display all the PID (Process IDs) of the sockets. + * `$ ss -s` will display all the summary statistics. + * `$ ss -4` and `$ ss -6` will display the ipv4 and ipv6 connections respectively. + * `$ ss -at '(dport = :22 or sport = :22)'`, will filter all socket connections with a given destination port (dport) and source port (sport). + * alternatively `$ ss -at '(dport = :ssh or sport = :ssh)'`, will filter all socket connections with a given destination port (dport) and source port (sport), but here the port is given as a service. + +### Resources + +- [linux.com's ss resource](https://www.linux.com/topic/networking/introduction-ss-command/) +- [techmint's ss resource](https://www.tecmint.com/ss-command-examples-in-linux/) + +************************** + +# lsof + +* lsof is a command meaning `list open files`, which is used in many Unix-like systems to report a list of all open files and the processes that opened them. +* In linux/unix, everything is treated as files (pipes, sockets, directories, devices etc). Hence `lsof` is very handy tool in analyzing these resources. +* Usage: + * `$ lsof` will list all open files. + * `$ lsof -u username` will list files opened by specific user. + * `$ lsof -i TCP:22` will list processes running on specific port. + * `$ lsof -i 4` or `$ lsof -i 6` will list IPv4 and IPv6 network files. + * `$ lsof -i TCP:1-1024` will list processes running on specific range of port. + * `$ lsof -i -u^username` will list open files not owned by specific user. + * `$ lsof -i` will shows the list of all network connections `LISTENING & ESTABLISHED`. + * `$ lsof -p 1` will show open files owned by specific process id. + * `$ lsof -c process-name` will list out all the files opened by a particular process. + +### Resources + +- [lsof wikipedia](https://en.wikipedia.org/wiki/Lsof) +- [lsof tecmint doc](https://www.tecmint.com/10-lsof-command-examples-in-linux/) +- [lsof geeksforgeeks doc](https://www.geeksforgeeks.org/lsof-command-in-linux-with-examples/) +- [lsof man page](https://man7.org/linux/man-pages/man8/lsof.8.html) + diff --git a/OS/os-concepts.md b/OS/os-concepts.md index 51e8a759..eb8fc321 100644 --- a/OS/os-concepts.md +++ b/OS/os-concepts.md @@ -53,6 +53,10 @@ There are 2 operating system design principles, which are: (1) Separation of mec The 3 types of Operating Systems commonly used nowadays are: (1) Monolithic OS, where the entire OS is working in kernel space and is alone in supervisor mode; (2) Modular OS, in which some part of the system core will be located in independent files called modules that can be added to the system at run time; and (3) Micro OS, where the kernel is broken down into separate processes, known as servers. Some of the servers run in kernel space and some run in user-space. +#### Resources: + +- [Operating System Tutorial](https://www.scaler.com/topics/operating-system/) + ************** ## Boot Process @@ -126,54 +130,11 @@ The 3 types of Operating Systems commonly used nowadays are: (1) Monolithic OS, ### Concepts -- A process is basically a program in execution. The execution of a process must progress in a sequential fashion. To put it in simple terms, we write our computer programs in a text file and when we execute this program, it becomes a process which performs all the tasks mentioned in the program. - -- When a program is loaded into the memory and it becomes a process, it can be divided into four sections ─ stack, heap, text and data. - -![alt text](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/process.jpeg) - -- Stack: The process Stack contains the temporary data such as method/function parameters, return address and local variables. - -- Heap: This is dynamically allocated memory to a process during its run time. - -- Text: This includes the current activity represented by the value of Program Counter and the contents of the processor’s registers. - -- Data: This section contains the global and static variables. - -- When a process executes, it passes through different states. These stages may differ in different operating systems, and the names of these states are also not standardized. In general, a process can have one of the following five states at a time: - - - Start: This is the initial state when a process is first started/created. - - - Ready: The process is waiting to be assigned to a processor. Ready processes are waiting to have the processor allocated to them by the operating system so that they can run. Process may come into this state after Start state or while running it by but interrupted by the scheduler to assign CPU to some other process. - - - Running: Once the process has been assigned to a processor by the OS scheduler, the process state is set to running and the processor executes its instructions. - - - Waiting: Process moves into the waiting state if it needs to wait for a resource, such as waiting for user input, or waiting for a file to become available. - - - Terminated or Exit: Once the process finishes its execution, or it is terminated by the operating system, it is moved to the terminated state where it waits to be removed from main memory. - -- A Process Control Block is a data structure maintained by the Operating System for every process. The PCB is identified by an integer process ID (PID). A PCB keeps all the information needed to keep track of a process. - -![alt text](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/process-things.jpeg) - -- Process State: The current state of the process i.e., whether it is ready, running, waiting, or whatever. -- Process Privileges: This is required to allow/disallow access to system resources. - -- Process ID: Unique identification for each of the process in the operating system. - -- Pointer: A pointer to parent process. - -- Program Counter: Program Counter is a pointer to the address of the next instruction to be executed for this process. - -- CPU Registers: Various CPU registers where process need to be stored for execution for running state. -- CPU Scheduling Information: Process priority and other scheduling information which is required to schedule the process. -- Memory Management Information: This includes the information of page table, memory limits, Segment table depending on memory used by the operating system. +- When a program is loaded into the memory and it becomes a process, it can be divided into four sections ─ stack, heap, text and data. -- Accounting Information: This includes the amount of CPU used for process execution, time limits, execution ID etc. -- IO Status Information: This includes a list of I/O devices allocated to the process. - root and chroot @@ -279,15 +240,12 @@ The 3 types of Operating Systems commonly used nowadays are: (1) Monolithic OS, - Definition: A Thread also called lightweight process, is basic CPU utilization; it compromises a thread ID, a program counter, a register set, and a stack. A thread is an entity within a process that can be scheduled for execution. -- A thread is a flow of execution through the process code, with its own program counter that keeps track of which instruction to execute next, system registers which hold its current working variables, and a stack which contains the execution history. -- A thread shares with its peer threads few information like code segment, data segment and open files. When one thread alters a code segment memory item, all other threads see that. -- A thread is also called a lightweight process. Threads provide a way to improve application performance through parallelism. Threads represent a software approach to improving performance of operating system by reducing the overhead thread is equivalent to a classical process. -- Each thread belongs to exactly one process and no thread can exist outside a process. Each thread represents a separate flow of control. Threads have been successfully used in implementing network servers and web server. They also provide a suitable foundation for parallel execution of applications on shared memory multiprocessors. -![alt text](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/concurrency.jpeg) + + - Benefits of Multi-threading @@ -324,14 +282,9 @@ The 3 types of Operating Systems commonly used nowadays are: (1) Monolithic OS, - Process scheduling is an essential part of a Multiprogramming operating systems. Such operating systems allow more than one process to be loaded into the executable memory at a time and the loaded process shares the CPU using time multiplexing. -- The OS maintains all Process Control Blocks (PCBs) in Process Scheduling Queues. The OS maintains a separate queue for each of the process states and PCBs of all processes in the same execution state are placed in the same queue. When the state of a process is changed, its PCB is unlinked from its current queue and moved to its new state queue. - The Operating System maintains the following important process scheduling queues: - - Job queue − This queue keeps all the processes in the system. - - Ready queue − This queue keeps a set of all processes residing in main memory, ready and waiting to execute. A new process is always put in this queue. - - Device queues − The processes which are blocked due to unavailability of an I/O device constitute this queue. - ### Resources: @@ -349,9 +302,7 @@ The 3 types of Operating Systems commonly used nowadays are: (1) Monolithic OS, ### Concepts -- Memory management is the functionality of an operating system which handles or manages primary memory and moves processes back and forth between main memory and disk during execution. Memory management keeps track of each and every memory location, regardless of either it is allocated to some process or it is free. It checks how much memory is to be allocated to processes. It decides which process will get memory at what time. It tracks whenever some memory gets freed or unallocated and correspondingly it updates the status. -![alt text](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/memory-management.png) - The process address space is the set of logical addresses that a process references in its code. For example, when 32-bit addressing is in use, addresses can range from 0 to 0x7fffffff; that is, 2³¹ possible numbers, for a total theoretical size of 2 gigabytes. @@ -360,7 +311,7 @@ The 3 types of Operating Systems commonly used nowadays are: (1) Monolithic OS, - Symbolic addresses: The addresses used in a source code. The variable names, constants, and instruction labels are the basic elements of the symbolic address space. - -Relative addresses: At the time of compilation, a compiler converts symbolic addresses into relative addresses. + - Relative addresses: At the time of compilation, a compiler converts symbolic addresses into relative addresses. - Physical addresses: The loader generates these addresses at the time when a program is loaded into main memory. @@ -369,6 +320,7 @@ The 3 types of Operating Systems commonly used nowadays are: (1) Monolithic OS, - The set of all logical addresses generated by a program is referred to as a logical address space. The set of all physical addresses corresponding to these logical addresses is referred to as a physical address space. + ### Resources: - [The Linux Kernerl Docs - Memory Management](https://www.kernel.org/doc/html/latest/admin-guide/mm/index.html) @@ -400,7 +352,6 @@ The 3 types of Operating Systems commonly used nowadays are: (1) Monolithic OS, - Semaphores, Shared Memory and Message Queues do relate to IPC in a very special way, since Semaphores, Shared Memory and Message Queues are “Inter-process Communication Resources” or “Inter-process Communication Facilities”, and different in the way they represent IPC from “Inter-process Communication Mechanisms” like Pipes and FIFOs. Semaphores, Shared Memory and Message Queues are System V (AT&T System V.2 release of UNIX) IPC facilities, and they represent wrapper functions that have been developed and inserted in suitable libraries to harness the energy and beauty of IPC mechanisms. -![Inter Process Communication](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/memory-management.png) - Data sharing among processes can be obtained by storing data in temporary files protected by locks. But this mechanism is never implemented as it proves costly since it requires accesses to the disk filesystem. For that reason, all UNIX Kernels include a set of system calls that supports process communications without interacting with the filesystem. @@ -452,13 +403,7 @@ The 3 types of Operating Systems commonly used nowadays are: (1) Monolithic OS, - Management of I/O devices is a very important part of the operating system - so important and so varied that entire I/O subsystems are devoted to its operation. ( Consider the range of devices on a modern computer, from mice, keyboards, disk drives, display adapters, USB devices, network connections, audio I/O, printers, special devices for the handicapped, and many special-purpose peripherals. -- An I/O system is required to take an application I/O request and send it to the physical device, then take whatever response comes back from the device and send it to the application. I/O devices can be divided into two categories: - - - Block devices — A block device is one with which the driver communicates by sending entire blocks of data. For example, hard disks, USB cameras, Disk-On-Key etc. - - - Character Devices — A character device is one with which the driver communicates by sending and receiving single characters (bytes, octets). For example, serial ports, parallel ports, sounds cards etc. -![Inter Process Communication](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/device_controllers.jpg) - Device Controllers diff --git a/OS/readme.md b/OS/readme.md new file mode 100644 index 00000000..dc001947 --- /dev/null +++ b/OS/readme.md @@ -0,0 +1,42 @@ +## Operating System + +- [OS Concepts for DevOps](#os-concepts-for-devops) +- [Operating System](#operating-system) +- [Boot Process](#boot-process) + - [System startup](#system-startup) + - [Stage 1 boot loader](#stage-1-boot-loader) + - [Stage 2 boot loader](#stage-2-boot-loader) + - [Kernel](#kernel) + - [Init](#init) + - [Resources:](#resources) +- [Process and Process Management](#process-and-process-management) + - [Concepts](#concepts) + - [Resources:](#resources-1) +- [Linux Signals](#linux-signals) + - [Concepts](#concepts-1) + - [Resources:](#resources-2) +- [Threads and Concurrency](#threads-and-concurrency) + - [Concepts](#concepts-2) + - [Resources:](#resources-3) +- [Scheduling](#scheduling) + - [Concepts](#concepts-3) + - [Resources:](#resources-4) +- [Memory Management](#memory-management) + - [Concepts](#concepts-4) + - [Resources:](#resources-5) +- [Inter-Process Communication](#inter-process-communication) + - [Concepts](#concepts-5) + - [Resources:](#resources-6) +- [I/O Management](#io-management) + - [Concepts](#concepts-6) + - [Resources:](#resources-7) +- [Virtualization](#virtualization) + - [Concepts](#concepts-7) + - [Resources:](#resources-8) +- [Distributed File Systems](#distributed-file-systems) + - [Concepts](#concepts-8) + - [Resources:](#resources-9) +- [Cloud Computing](#cloud-computing) + - [Concepts](#concepts) + - [Resources:](#resources-10) +- [References:](#references) diff --git a/Programming/readme.md b/Programming/readme.md new file mode 100644 index 00000000..27cb8b71 --- /dev/null +++ b/Programming/readme.md @@ -0,0 +1,13 @@ +## Programming Laguages You Should Know + +### Python + +### Bash + +### JS + +### Go + +### YML + +### Markdown \ No newline at end of file diff --git a/README.md b/README.md index 68471685..a87c70e2 100644 --- a/README.md +++ b/README.md @@ -2,21 +2,35 @@ ![devops guide](https://github.com/Tikam02/DevOps-Guide/blob/master/img/devops-guide.png) -![GitHub last commit](https://img.shields.io/github/last-commit/Tikam02/DevOps_Cheatsheet?style=for-the-badge) ![Devops](https://img.shields.io/badge/Development-Operations-blue?style=for-the-badge) ![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/devops?style=for-the-badge) [![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors) - - +![GitHub last commit](https://img.shields.io/github/last-commit/Tikam02/DevOps_Cheatsheet?style=for-the-badge) ![Devops](https://img.shields.io/badge/Development-Operations-blue?style=for-the-badge) ![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/devops?style=for-the-badge) ![GitHub contributors](https://img.shields.io/github/contributors/Tikam02/DevOps-Guide?style=for-the-badge) + + + *******************
- - - - - - + + + + + + @@ -33,8 +47,8 @@ - - + + @@ -46,7 +60,8 @@ - + +
Docker
Docker

Docker Concepts
Docker Notes
Docker Tutorial
kubernetes
Kubernetes

Kubernetes Concepts
Kubernetes Commands
Prometheus
Prometheus

Prometheus Concepts
Prometheus Tutorial
Git
Git

Git concepts
Git Advanced
Ansible
Ansible

Ansible Concepts
Ansible Tutorials
Terraform
Terraform

Terraform Concepts
Terraform Tutorials
Docker
Docker

Docker Concepts
Docker Notes
Docker Tutorial
kubernetes
Kubernetes

Kubernetes Concepts
Kubernetes Commands
Prometheus
Prometheus

Prometheus Concepts
Prometheus Tutorial
Git
Git

Git Concepts
Git Advanced
Ansible
Ansible

Ansible Concepts
Ansible Tutorials
Terraform
Terraform

Terraform Concepts
Terraform Tutorials
Jenkins
Jenkins

Jenkins Concepts
Jenkins Tutorials
Books
Books

Interview
Interview

Interview Questions
Gitlab
Gitlab

Gitlab Concepts
Gitlab Commands
Puppet
Puppet

Puppet Concepts
Puppet Commands
Chef
Chef

Chef Concepts
Chef Commands
Puppet
Puppet

Puppet Concepts
Puppet Commands
Chef
Chef

Chef Concepts
Chef Commands
Gitlab
Travis

Travis Concepts
Travis Commands
Actions
GitHub Actions

Actions Concepts
Actions Tutorial
CircleCI
CircleCI

CircleCI Concepts
CircleCI Commands
@@ -54,15 +69,10 @@ -****************** -![Foundation](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/flow.png) -* Foundation -![Flow](https://github.com/Tikam02/DevOps_Cheatsheet/blob/master/img/foundation.png) -* Devops Flow ******************** @@ -70,52 +80,104 @@ ### Getting Started DevOps Links: - [What is Devops - AWS](https://aws.amazon.com/devops/what-is-devops/) -- [DevOps Roadmap by kamranahmedse](https://github.com/kamranahmedse/developer-roadmap/blob/master/images/devops.png) +- [What is DevOps - Logit.io](https://logit.io/blog/post/what-is-devops) +- [DevOps Roadmap by kamranahmedse](https://github.com/kamranahmedse/developer-roadmap/blob/master/public/roadmaps/devops.png) +- [Devops Roadmap by Nguyen Truong Duong](https://github.com/raycad/devops-roadmap) +- [Roadmap To devops](https://medium.com/faun/the-roadmap-to-become-a-devops-dude-from-server-to-serverless-dd97420f640e) - [r/devops](https://www.reddit.com/r/devops/) - [IBM Kubernetes Handson Labs](https://github.com/IBM/kube101/tree/master/workshop) - [Getting Started With Azure DevOps](https://github.com/microsoft/azuredevopslabs) - [Getting started with Google Cloud Platform](https://cloud.google.com/gcp/getting-started/) - [Freecodecamp Devops Getting Started Articles](https://www.freecodecamp.org/news/tag/devops/) - [The-devops-roadmap-for-programmers](https://dzone.com/articles/the-devops-roadmap-for-programmers) -- [Roadmap To devops](https://medium.com/faun/the-roadmap-to-become-a-devops-dude-from-server-to-serverless-dd97420f640e) - [DevOps Getting Started](https://medium.com/@devfire/how-to-become-a-devops-engineer-in-six-months-or-less-366097df7737) - [How-to-get-started-with-devops](https://dev.to/liquid_chickens/how-to-get-started-with-devops) - [Going-from-it-to-devops](https://medium.com/better-programming/going-from-it-to-devops-996192520331) +- [How to Become a DevOps Engineer in Six Months](https://spacelift.io/blog/how-to-become-devops-engineer) +- [Who is DevOps? Is it Worth it to Become a DevOps Engineer?](https://spacelift.io/blog/who-is-devops-engineer) +- [Dynamic DevOps Roadmap: Experience-Driven DevOps](https://devopsroadmap.io/) ************************** -## To Do -- [ ] Add More Notes on OS/Linux -- [ ] Add more concepts of CI/CD -- [ ] Add more interview Question about OS and Networking -- [ ] Kubernetes Monitoring - Prometheus and Grafana -- [ ] Add IaC concepts and Tools -- [ ] Add - AWS CloudFormation,Terraform,Chef,Ansible,Puppet - -************************** ## Contributors ✨ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Neil Duncan
Neil Duncan

📖
cuzza0
cuzza0

📖
Adrian Moisey
Adrian Moisey

📖
Pavel Kozlov
Pavel Kozlov

💬
Milap Neupane
Milap Neupane

💻
john
john

📖

Neil Duncan

📖

cuzza0

📖

Adrian Moisey

📖

Pavel Kozlov

💬

Milap Neupane

💻

john

📖

Jobin George

📖

tsyr2ko

📖

Víctor Nieves Sánchez

📖

Frank

📖

Asad Mansoor

📖

Stanislas

📖

Rodrigo Fazenda

📖

Nikolay Stanchev

📖

Meet Patel

💻

shenxianpeng

📖

Umang Dobariya

📖

Rakesh .B

📖

Federico Garcia-Lorca

📖

Dave

📖

Brahmajit

📖 💻

Milind Chawre

💻

Leandro Nunes

💻

Yashika Gupta

💻

Victor da Silva

💻

errazudin ishak

💻

Niraj

💻 📖

petemadis

📖

Onaopemipo

📖

mygwen

📖

peachybutt

📖

Jenisten Xavier

📖

sahid1486

🖋 💻

Thorsten Hans

🖋 💻

yenyl

📖

Wasisto

📖

Muskan Rathore

📖

Ebennetteng

📖

ShvetaVasisht

💻

Franciosi

💻

Eslam Adel

📖

Mahmood Ahmad

📖

Diego Arostegui

💻

relativvv

💻
+ + + This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! -************************************ +******************************************** +Buy Me A Coffee +********************************************* ## License This project is licensed under the MIT License - Copyright (c) 2019 Tikam Alma diff --git a/Servers/Apache/Readme.md b/Servers/Apache/Readme.md new file mode 100644 index 00000000..b7d6883a --- /dev/null +++ b/Servers/Apache/Readme.md @@ -0,0 +1,6 @@ +# Apahe2 Server + +- Deployment +- Configurations +- Mods +- Security \ No newline at end of file diff --git a/Servers/Apache/configs/templates/deploy-django.md b/Servers/Apache/configs/templates/deploy-django.md new file mode 100644 index 00000000..5e95504f --- /dev/null +++ b/Servers/Apache/configs/templates/deploy-django.md @@ -0,0 +1 @@ +## Deploy Django \ No newline at end of file diff --git a/Servers/Apache/configs/templates/deploy-node-server.md b/Servers/Apache/configs/templates/deploy-node-server.md new file mode 100644 index 00000000..2368ca8c --- /dev/null +++ b/Servers/Apache/configs/templates/deploy-node-server.md @@ -0,0 +1 @@ +## Deploy Node server \ No newline at end of file diff --git a/Servers/Apache/configs/templates/deploy-static-sites.md b/Servers/Apache/configs/templates/deploy-static-sites.md new file mode 100644 index 00000000..a4dfca13 --- /dev/null +++ b/Servers/Apache/configs/templates/deploy-static-sites.md @@ -0,0 +1 @@ +## Deploy Static Websites \ No newline at end of file diff --git a/Servers/Apache/configs/templates/django.no-ssl.domain.conf b/Servers/Apache/configs/templates/django.no-ssl.domain.conf new file mode 100644 index 00000000..b571f2ad --- /dev/null +++ b/Servers/Apache/configs/templates/django.no-ssl.domain.conf @@ -0,0 +1,44 @@ +# ----------------------------------------------------------------------- +# | Config file for example.com host to deploy django server via apache2 | +# ----------------------------------------------------------------------- +# When you use daemon mode, the number of processes and threads is static. This is one of the immediate benefits of using daemon mode. +# Specifically, that process management is more predictable. One of the big problems with using embedded mode is that Apache can decide to create additional processes or kill off existing ones. +# For a web application with large startup costs this is not a good idea as you could suddenly see increased CPU usage due to more processes being started right at the time you don't need it such as when a throughput spike occurs. +# This can actually cause performance to degrade in the short term rather than improve. + +#Use Daemon Mode by Restricting WSGIRestrictEmbedded On +WSGIRestrictEmbedded On + + + + ServerName example.com + ServerAlias www.example.com + + # Path for Django Project /home/DJANGO_PROJECT/ + DocumentRoot /home/DJANGO_PROJECT/ + + WSGIDaemonProcess DJANGO_PROJECT python-path=/home/DJANGO_PROJECT/:/home/env/lib/python2.7/site-packages + WSGIProcessGroup DJANGO_PROJECT + WSGIScriptAlias / /home/DJANGO_PROJECT/WSGI_RELATIVE_PATH + + + + Require all granted + + + + + # Include the basic DevOpsGuide Apache Config set + Include dgac/basic.conf + # Include Required configs from /dgac/ + Include dgac/tls/ssl_engine.conf + Include dgac/tls/certificate_files.conf + Include dgac/rewrites/rewrite_nowww.conf + + + + + Require all granted + + + \ No newline at end of file diff --git a/Servers/Apache/configs/templates/django.ssl.domain.conf b/Servers/Apache/configs/templates/django.ssl.domain.conf new file mode 100644 index 00000000..9226ba1f --- /dev/null +++ b/Servers/Apache/configs/templates/django.ssl.domain.conf @@ -0,0 +1,44 @@ +# ----------------------------------------------------------------------- +# | Config file for example.com host to deploy django server via apache2 | +# ----------------------------------------------------------------------- +# When you use daemon mode, the number of processes and threads is static. This is one of the immediate benefits of using daemon mode. +# Specifically, that process management is more predictable. One of the big problems with using embedded mode is that Apache can decide to create additional processes or kill off existing ones. +# For a web application with large startup costs this is not a good idea as you could suddenly see increased CPU usage due to more processes being started right at the time you don't need it such as when a throughput spike occurs. +# This can actually cause performance to degrade in the short term rather than improve. + +#Use Daemon Mode by Restricting WSGIRestrictEmbedded On +WSGIRestrictEmbedded On + + + + ServerName example.com + ServerAlias www.example.com + + # Path for Django Project /home/DJANGO_PROJECT/ + DocumentRoot /home/DJANGO_PROJECT/ + + WSGIDaemonProcess DJANGO_PROJECT python-path=/home/DJANGO_PROJECT/:/home/env/lib/python2.7/site-packages + WSGIProcessGroup DJANGO_PROJECT + WSGIScriptAlias / /home/DJANGO_PROJECT/WSGI_RELATIVE_PATH + + + + Require all granted + + + + + # Include the basic DevOpsGuide Apache Config set + Include dgac/basic.conf + # Include Required configs from /dgac/ + Include dgac/tls/ssl_engine.conf + Include dgac/tls/certificate_files.conf + Include dgac/rewrites/rewrite_nowww.conf + + + + + Require all granted + + + \ No newline at end of file diff --git a/Servers/Apache/deployment.md b/Servers/Apache/deployment.md new file mode 100644 index 00000000..edcfc65b --- /dev/null +++ b/Servers/Apache/deployment.md @@ -0,0 +1 @@ +# Apache2 Server Deployment diff --git a/Servers/Apache/dgac/basic.conf b/Servers/Apache/dgac/basic.conf new file mode 100644 index 00000000..0f089424 --- /dev/null +++ b/Servers/Apache/dgac/basic.conf @@ -0,0 +1,6 @@ + +Include dgac/security/referrer-policy.conf +Include dgac/security/x-content-type-options.conf +Include dgac/security/x-frame-options.conf +Include dgac/cross-origin/images.conf +Include dgac/cross-origin/web_fonts.conf diff --git a/Servers/Apache/dgac/cross-origin/images.conf b/Servers/Apache/dgac/cross-origin/images.conf new file mode 100644 index 00000000..eb54f64c --- /dev/null +++ b/Servers/Apache/dgac/cross-origin/images.conf @@ -0,0 +1,17 @@ +# ---------------------------------------------------------------------- +# | Cross-origin images | +# ---------------------------------------------------------------------- + +# Send the CORS header for images when browsers request it. +# +# https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image +# https://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html + + + + + SetEnvIf Origin ":" IS_CORS + Header set Access-Control-Allow-Origin "*" env=IS_CORS + + + diff --git a/Servers/Apache/dgac/cross-origin/requests.conf b/Servers/Apache/dgac/cross-origin/requests.conf new file mode 100644 index 00000000..d997865c --- /dev/null +++ b/Servers/Apache/dgac/cross-origin/requests.conf @@ -0,0 +1,26 @@ +# ---------------------------------------------------------------------- +# | Cross-origin requests | +# ---------------------------------------------------------------------- + +# Allow cross-origin requests. +# +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS +# https://enable-cors.org/ +# https://www.w3.org/TR/cors/ + +# (!) Do not use this without understanding the consequences. +# This will permit access from any other website. +# Instead of using this file, consider using a specific rule such as +# allowing access based on (sub)domain: +# +# Header set Access-Control-Allow-Origin "subdomain.example.com" +# +# (1) When `Access-Control-Allow-Origin` points to a specific rule rather +# than `*`, then `Vary: Origin` should be sent along with the response. + + + Header set Access-Control-Allow-Origin "*" + + # (1) + # Header append Vary Origin + diff --git a/Servers/Apache/dgac/cross-origin/resource_timing.conf b/Servers/Apache/dgac/cross-origin/resource_timing.conf new file mode 100644 index 00000000..013df74d --- /dev/null +++ b/Servers/Apache/dgac/cross-origin/resource_timing.conf @@ -0,0 +1,17 @@ +# ---------------------------------------------------------------------- +# | Cross-origin resource timing | +# ---------------------------------------------------------------------- + +# Allow cross-origin access to the timing information for all resources. +# +# If a resource isn't served with a `Timing-Allow-Origin` header that would +# allow its timing information to be shared with the document, some of the +# attributes of the `PerformanceResourceTiming` object will be set to zero. +# +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Timing-Allow-Origin +# https://www.w3.org/TR/resource-timing/ +# https://www.stevesouders.com/blog/2014/08/21/resource-timing-practical-tips/ + + + Header set Timing-Allow-Origin: "*" + diff --git a/Servers/Apache/dgac/cross-origin/web_fonts.conf b/Servers/Apache/dgac/cross-origin/web_fonts.conf new file mode 100644 index 00000000..8bd8f9b5 --- /dev/null +++ b/Servers/Apache/dgac/cross-origin/web_fonts.conf @@ -0,0 +1,13 @@ +# ---------------------------------------------------------------------- +# | Cross-origin web fonts | +# ---------------------------------------------------------------------- + +# Allow cross-origin access to web fonts. +# +# https://developers.google.com/fonts/docs/troubleshooting + + + + Header set Access-Control-Allow-Origin "*" + + diff --git a/Servers/Apache/dgac/errors/custom_errors.conf b/Servers/Apache/dgac/errors/custom_errors.conf new file mode 100644 index 00000000..b9cd5784 --- /dev/null +++ b/Servers/Apache/dgac/errors/custom_errors.conf @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------------- +# | Custom error messages/pages | +# ---------------------------------------------------------------------- + +# Customize what Apache returns to the client in case of an error. +# +# https://httpd.apache.org/docs/current/mod/core.html#errordocument + +ErrorDocument 404 /404.html diff --git a/Servers/Apache/dgac/errors/error_prevention.conf b/Servers/Apache/dgac/errors/error_prevention.conf new file mode 100644 index 00000000..c4aacdaa --- /dev/null +++ b/Servers/Apache/dgac/errors/error_prevention.conf @@ -0,0 +1,12 @@ +# ---------------------------------------------------------------------- +# | Error prevention | +# ---------------------------------------------------------------------- + +# Disable the pattern matching based on filenames. +# +# This setting prevents Apache from returning a 404 error as the result of a +# rewrite when the directory with the same name does not exist. +# +# https://httpd.apache.org/docs/current/content-negotiation.html#multiviews + +Options -MultiViews diff --git a/Servers/Apache/dgac/media_types/character_encodings.conf b/Servers/Apache/dgac/media_types/character_encodings.conf new file mode 100644 index 00000000..56428686 --- /dev/null +++ b/Servers/Apache/dgac/media_types/character_encodings.conf @@ -0,0 +1,38 @@ +# ---------------------------------------------------------------------- +# | Character encodings | +# ---------------------------------------------------------------------- + +# Serve all resources labeled as `text/html` or `text/plain` with the media type +# `charset` parameter set to `UTF-8`. +# +# https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset + +AddDefaultCharset utf-8 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Serve the following file types with the media type `charset` parameter set to +# `UTF-8`. +# +# https://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset + + + AddCharset utf-8 .appcache \ + .bbaw \ + .css \ + .htc \ + .ics \ + .js \ + .json \ + .manifest \ + .map \ + .markdown \ + .md \ + .mjs \ + .topojson \ + .vtt \ + .vcard \ + .vcf \ + .webmanifest \ + .xloc + diff --git a/Servers/Apache/dgac/media_types/media_types.conf b/Servers/Apache/dgac/media_types/media_types.conf new file mode 100644 index 00000000..e7a8942e --- /dev/null +++ b/Servers/Apache/dgac/media_types/media_types.conf @@ -0,0 +1,89 @@ +# ---------------------------------------------------------------------- +# | Media types | +# ---------------------------------------------------------------------- + +# Serve resources with the proper media types (f.k.a. MIME types). +# +# https://www.iana.org/assignments/media-types/media-types.xhtml +# https://httpd.apache.org/docs/current/mod/mod_mime.html#addtype + + + + # Data interchange + + AddType application/atom+xml atom + AddType application/json json map topojson + AddType application/ld+json jsonld + AddType application/rss+xml rss + AddType application/geo+json geojson + AddType application/rdf+xml rdf + AddType application/xml xml + + + # JavaScript + + # Servers should use text/javascript for JavaScript resources. + # https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages + + AddType text/javascript js mjs + + + # Manifest files + + AddType application/manifest+json webmanifest + AddType application/x-web-app-manifest+json webapp + AddType text/cache-manifest appcache + + + # Media files + + AddType audio/mp4 f4a f4b m4a + AddType audio/ogg oga ogg opus + AddType image/avif avif + AddType image/avif-sequence avifs + AddType image/bmp bmp + AddType image/jxl jxl + AddType image/svg+xml svg svgz + AddType image/webp webp + AddType video/mp4 f4v f4p m4v mp4 + AddType video/ogg ogv + AddType video/webm webm + AddType video/x-flv flv + + # Serving `.ico` image files with a different media type prevents + # Internet Explorer from displaying them as images: + # https://github.com/h5bp/html5-boilerplate/commit/37b5fec090d00f38de64b591bcddcb205aadf8ee + + AddType image/x-icon cur ico + + + # WebAssembly + + AddType application/wasm wasm + + + # Web fonts + + AddType font/woff woff + AddType font/woff2 woff2 + AddType application/vnd.ms-fontobject eot + AddType font/ttf ttf + AddType font/collection ttc + AddType font/otf otf + + + # Other + + AddType application/octet-stream safariextz + AddType application/x-bb-appworld bbaw + AddType application/x-chrome-extension crx + AddType application/x-opera-extension oex + AddType application/x-xpinstall xpi + AddType text/calendar ics + AddType text/markdown markdown md + AddType text/vcard vcard vcf + AddType text/vnd.rim.location.xloc xloc + AddType text/vtt vtt + AddType text/x-component htc + + diff --git a/Servers/Apache/dgac/rewrites/rewrite_engine.conf b/Servers/Apache/dgac/rewrites/rewrite_engine.conf new file mode 100644 index 00000000..6028961d --- /dev/null +++ b/Servers/Apache/dgac/rewrites/rewrite_engine.conf @@ -0,0 +1,48 @@ +# ---------------------------------------------------------------------- +# | Rewrite engine | +# ---------------------------------------------------------------------- + +# (1) Turn on the rewrite engine (this is necessary in order for the +# `RewriteRule` directives to work). +# +# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteEngine +# +# (2) Enable the `FollowSymLinks` option if it isn't already. +# +# https://httpd.apache.org/docs/current/mod/core.html#options +# +# (3) If your web host doesn't allow the `FollowSymlinks` option, you need to +# comment it out or remove it, and then uncomment the +# `Options +SymLinksIfOwnerMatch` line (4), but be aware of the performance +# impact. +# +# https://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks +# +# (4) Some cloud hosting services will require you set `RewriteBase`. +# +# https://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-modrewrite-not-working-on-my-site +# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase +# +# (5) Depending on how your server is set up, you may also need to use the +# `RewriteOptions` directive to enable some options for the rewrite engine. +# +# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions + + + + # (1) + RewriteEngine On + + # (2) + Options +FollowSymlinks + + # (3) + # Options +SymLinksIfOwnerMatch + + # (4) + # RewriteBase / + + # (5) + # RewriteOptions + + diff --git a/Servers/Apache/dgac/rewrites/rewrite_http_to_https.conf b/Servers/Apache/dgac/rewrites/rewrite_http_to_https.conf new file mode 100644 index 00000000..9eaf97af --- /dev/null +++ b/Servers/Apache/dgac/rewrites/rewrite_http_to_https.conf @@ -0,0 +1,24 @@ +# ---------------------------------------------------------------------- +# | Forcing `https://` | +# ---------------------------------------------------------------------- + +# Redirect from the `http://` to the `https://` version of the URL. +# +# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS + +# (1) If you're using cPanel AutoSSL or the Let's Encrypt webroot method it +# will fail to validate the certificate if validation requests are +# redirected to HTTPS. Turn on the condition(s) you need. +# +# https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml +# https://tools.ietf.org/html/draft-ietf-acme-acme-12 + + + RewriteEngine On + RewriteCond %{HTTPS} !=on + # (1) + # RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ + # RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[\w-]+$ + # RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ + RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + diff --git a/Servers/Apache/dgac/rewrites/rewrite_nowww.conf b/Servers/Apache/dgac/rewrites/rewrite_nowww.conf new file mode 100644 index 00000000..a7a7a133 --- /dev/null +++ b/Servers/Apache/dgac/rewrites/rewrite_nowww.conf @@ -0,0 +1,40 @@ +# ---------------------------------------------------------------------- +# | Suppressing the `www.` at the beginning of URLs | +# ---------------------------------------------------------------------- + +# Rewrite www.example.com → example.com + +# The same content should never be available under two different URLs, +# especially not with and without `www.` at the beginning. +# This can cause SEO problems (duplicate content), and therefore, you should +# choose one of the alternatives and redirect the other one. +# +# (!) NEVER USE BOTH WWW-RELATED RULES AT THE SAME TIME! + +# (1) Set %{ENV:PROTO} variable, to allow rewrites to redirect with the +# appropriate schema automatically (http or https). +# +# (2) The rule assumes by default that both HTTP and HTTPS environments are +# available for redirection. +# If your SSL certificate could not handle one of the domains used during +# redirection, you should turn the condition on. +# +# https://github.com/h5bp/server-configs-apache/issues/52 + + + + RewriteEngine On + + # (1) + RewriteCond %{HTTPS} =on + RewriteRule ^ - [E=PROTO:https] + RewriteCond %{HTTPS} !=on + RewriteRule ^ - [E=PROTO:http] + + # (2) + # RewriteCond %{HTTPS} !=on + + RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] + RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301,L] + + diff --git a/Servers/Apache/dgac/rewrites/rewrite_www.conf b/Servers/Apache/dgac/rewrites/rewrite_www.conf new file mode 100644 index 00000000..cf3f6378 --- /dev/null +++ b/Servers/Apache/dgac/rewrites/rewrite_www.conf @@ -0,0 +1,45 @@ +# ---------------------------------------------------------------------- +# | Forcing the `www.` at the beginning of URLs | +# ---------------------------------------------------------------------- + +# Rewrite example.com → www.example.com + +# The same content should never be available under two different URLs, +# especially not with and without `www.` at the beginning. +# This can cause SEO problems (duplicate content), and therefore, you should +# choose one of the alternatives and redirect the other one. +# +# (!) NEVER USE BOTH WWW-RELATED RULES AT THE SAME TIME! + +# (1) Set %{ENV:PROTO} variable, to allow rewrites to redirect with the +# appropriate schema automatically (http or https). +# +# (2) The rule assumes by default that both HTTP and HTTPS environments are +# available for redirection. +# If your SSL certificate could not handle one of the domains used during +# redirection, you should turn the condition on. +# +# https://github.com/h5bp/server-configs-apache/issues/52 + +# Be aware that the following might not be a good idea if you use "real" +# subdomains for certain parts of your website. + + + + RewriteEngine On + + # (1) + RewriteCond %{HTTPS} =on + RewriteRule ^ - [E=PROTO:https] + RewriteCond %{HTTPS} !=on + RewriteRule ^ - [E=PROTO:http] + + # (2) + # RewriteCond %{HTTPS} !=on + + RewriteCond %{HTTP_HOST} !^www\. [NC] + RewriteCond %{SERVER_ADDR} !=127.0.0.1 + RewriteCond %{SERVER_ADDR} !=::1 + RewriteRule ^ %{ENV:PROTO}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + + diff --git a/Servers/Apache/dgac/security/content-security-policy.conf b/Servers/Apache/dgac/security/content-security-policy.conf new file mode 100644 index 00000000..c2544f00 --- /dev/null +++ b/Servers/Apache/dgac/security/content-security-policy.conf @@ -0,0 +1,87 @@ +# ---------------------------------------------------------------------- +# | Content Security Policy (CSP) | +# ---------------------------------------------------------------------- + +# Mitigate the risk of cross-site scripting and other content-injection +# attacks. +# +# This can be done by setting a Content Security Policy which permits +# trusted sources of content for your website. +# +# There is no policy that fits all websites, you will have to modify the +# `Content-Security-Policy` directives in the example depending on your needs. +# +# The example policy below aims to: +# +# (1) Restrict all fetches by default to the origin of the current website by +# setting the `default-src` directive to `'self'` - which acts as a +# fallback to all "Fetch directives" (https://developer.mozilla.org/en-US/docs/Glossary/Fetch_directive). +# +# This is convenient as you do not have to specify all Fetch directives +# that apply to your site, for example: +# `connect-src 'self'; font-src 'self'; script-src 'self'; style-src 'self'`, etc. +# +# This restriction also means that you must explicitly define from which +# site(s) your website is allowed to load resources from. +# +# (2) The `` element is not allowed on the website. This is to prevent +# attackers from changing the locations of resources loaded from relative +# URLs. +# +# If you want to use the `` element, then `base-uri 'self'` can be +# used instead. +# +# (3) Form submissions are only allowed from the current website by setting: +# `form-action 'self'`. +# +# (4) Prevents all websites (including your own) from embedding your webpages +# within e.g. the `