forked from Harshhaa-Dev-Projects/devops-resources
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
harshhaareddy
committed
Sep 27, 2021
0 parents
commit 8b4be65
Showing
94 changed files
with
2,616 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The image used for "Dataops" is taken from [Flaticon.com](Flaticon.com) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
## Ansible | ||
|
||
### Videos | ||
|
||
Name | Comments | ||
:------ |:--------: | ||
[Ansible 101 - Jeff Geerling](https://www.youtube.com/watch?v=goclfp6a2IQ&list=RDCMUCR-DXc1voovS8nhAvccRZhg&index=1) | Comprehensive practical way to learn Ansible | ||
[What is Ansible? - TechWorld with Nana](https://www.youtube.com/watch?v=1id6ERvfozo) | High-level short overview of Ansible | ||
[How to write your first Ansible playbook](https://www.youtube.com/watch?v=BeYUQaFS-vg) | Practical video on how to write a playbook in Ansible | ||
|
||
### Articles | ||
|
||
Name | Comments | ||
:------ |:--------: | ||
[Learning Ansible basics - Red Hat](https://www.redhat.com/en/topics/automation/learning-ansible-tutorial) | Red Hat's guide on how to learn Ansible basics + links to the content itself | ||
[Writing reliable Ansible Playbooks - 2021](https://dev.to/xlab_si/writing-reliable-ansible-playbooks-295i) | | ||
[Introduction to Ansible - 2021](https://medium.com/@bagusays/introduction-to-ansible-82f2bc12cd87) | | ||
[A CI/CD Pipeline Project for a Trunk-Based Development Strategy in a Kubernetes Environment](https://medium.com/swlh/a-ci-cd-pipeline-project-for-a-trunk-based-development-strategy-in-a-kubernetes-environment-c4ffea9700fe) | | ||
|
||
### Books | ||
|
||
Name | Comments | ||
:------ |:--------: | ||
[Ansible for DevOps](https://www.amazon.com/Ansible-DevOps-Server-configuration-management/dp/098639341X) | | ||
[Ansible: From Beginner to Pro](https://www.amazon.com/Ansible-Beginner-Pro-Michael-Heap/dp/1484216601) | | ||
[Ansible: Up and Running](https://www.amazon.com/Ansible-Automating-Configuration-Management-Deployment/dp/1491979801) | | ||
|
||
|
||
### Cheat Sheet | ||
|
||
* Check if list has elements | ||
|
||
``` | ||
when: my_list | length > 0 | ||
``` | ||
|
||
* Update all packages | ||
|
||
``` | ||
- name: Update system packages | ||
package: | ||
state: latest | ||
name: "*" | ||
``` | ||
|
||
* Update packages informations and display packages informations | ||
|
||
``` | ||
- name: Update packages informations | ||
package_facts: | ||
manager: "auto" | ||
- name: Display all installed packages informations | ||
debug: | ||
msg: "{{ ansible_facts.packages }}" | ||
- name: Display all Chromium package informations | ||
debug: | ||
msg: "{{ ansible_facts.packages['chromium'] }}" | ||
when: "'chromium' in ansible_facts.packages" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# AWS | ||
|
||
## Tools and Projects | ||
|
||
Name | Comments | ||
:------|:------: | ||
[Cloud Mapper](https://github.com/duo-labs/cloudmapper) | "analyze your Amazon Web Services (AWS) environments"" | ||
[EC2 Instances Info](https://www.ec2instances.info) | "Easy Amazon EC2 Instance Comparison" | ||
[amazon-redshift-utils](https://github.com/awslabs/amazon-redshift-utils) | "Contains utilities, scripts and view which are useful in a Redshift environment" | ||
|
||
## Blog Posts & Articles | ||
|
||
Name | Comments | ||
:------|:------: | ||
[The Hitchhiker’s Guide to Redshift — part 1: With great power come performance issues](https://blog.atomdata.io/the-hitchhikers-guide-to-redshift-part-1-with-great-power-comes-performance-issues-748d293e0b18) | | ||
|
||
## IaC | ||
|
||
Name | Comments | ||
:------|:------: | ||
[terraformer](https://github.com/GoogleCloudPlatform/terraformer) | "A CLI tool that generates tf/json and tfstate files based on existing infrastructure (reverse Terraform)." | ||
[terraforming](https://github.com/dtan4/terraforming) | "Export existing AWS resources to Terraform style (tf, tfstate)" | ||
|
||
|
||
## Videos | ||
|
||
Name | Comments | ||
:------|:------: | ||
[Amazon Redshift Tutorial](https://www.youtube.com/watch?v=fc5WPKnbam8) | Edureka, 2018 | ||
|
||
## Certificates | ||
|
||
Name | Comments | ||
:------|:------: | ||
[DevOpsBit Cloud Practitioner Summary](http://devopsbit.com/aws-cloud-practitioner) | 2020 | ||
|
||
## Interview Questions | ||
|
||
Name | Description | ||
:------|:------: | ||
[devops-interview-questions repository](https://github.com/bregman-arie/devops-interview-questions/#aws) | Over 100 questions | ||
[AWS interview questions and answers](https://www.besanttechnologies.com/aws-interview-questions-and-answers) | 250 AWS interview questions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Azure | ||
|
||
## IaC | ||
|
||
Name | Comments | ||
:------|:------: | ||
[terraformer](https://github.com/GoogleCloudPlatform/terraformer) | "A CLI tool that generates tf/json and tfstate files based on existing infrastructure (reverse Terraform)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# Bash | ||
|
||
## Resources | ||
|
||
Name | Description | ||
:------ |:--------: | ||
[Bash Wiki Hackers](http://wiki.bash-hackers.org/start) | "hold documentation of any kind about GNU Bash" | ||
[Bash Reference Manual](https://tiswww.case.edu/php/chet/bash/bashref.html) | everything there is to know about bash | ||
[Hacker Rank Linux Shell](https://www.hackerrank.com/domains/shell) | Bash Challenges | ||
[ExplainShell](https://explainshell.com) | Provides explanation on commands | ||
|
||
## Best Practices | ||
|
||
Some best practices for you to learn and use in your scripts | ||
|
||
### 1. Exit script when a certain command fails | ||
|
||
When a script written in Bash fails to run a certain command it will keep | ||
running and will execute all other commands mentioned after the command which failed. | ||
Most of the time we would actually want the opposite to happen. | ||
In order to make Bash exit when a specific command fails, use 'set -e' in your script. | ||
|
||
``` | ||
#!/usr/bin/env bash | ||
set -e | ||
ls /usr/lib/cowabunga | ||
date # It will never run this (unless you have /usr/lib/cowabunga on your system for some reason...) | ||
``` | ||
|
||
### 2. Allow some commands to fail | ||
|
||
Not every failure is a good reason to exit a script. | ||
You will probably want to allows some commands to fail and keep running | ||
To achieve that simple append '|| true' to your command | ||
|
||
``` | ||
#!/usr/bin/env bash | ||
set -e | ||
dance || true | ||
ls /tmp # This command will run even if `dance` failed | ||
``` | ||
|
||
### 3. Get used to using curly braces {} | ||
|
||
It's a good habit to use curly braces when | ||
referring to variables. Let's see few examples. | ||
|
||
`echo \${foo}bar` if not used you would expand \$foobar | ||
`echo ${10}` to expand any positional parameter beyond you'll have to use {} | ||
`echo ${A[0]}` to expand array elements | ||
|
||
There are additional advantages covered in next sections. | ||
|
||
### 4. Undeclared Variables | ||
|
||
The following one-line "script" will work just fine | ||
|
||
``` | ||
ls ${x} | ||
``` | ||
|
||
It's reasonable to think that whoever wrote this amazing script | ||
wanted x to be defined somewhere and either forgot to do it or the | ||
user didn't follow the instructions. | ||
In order to avoid strange failures with your script you would | ||
want to execute 'set -u' in order to make sure variable are not | ||
undefined | ||
|
||
``` | ||
#!/usr/bin/env bash | ||
set -u | ||
ls ${x} | ||
``` | ||
|
||
Now the script will return error trying to use undefined x variable. | ||
|
||
### 5. Use ':-' for allowing undeclared variables | ||
|
||
Sometimes you would want to allow variables to be undeclared. | ||
In that case use this syntax to do so: '\${X:-}'. | ||
You can also set default value if variable is undeclared | ||
like this: '\${X:-mario}' | ||
|
||
``` | ||
#!/usr/bin/env bash | ||
echo "Nothing more than emptiness ${X:-}" | ||
echo "But here, there is ${X:-something}" | ||
X='anymore' | ||
echo "It doesn't feel empty ${X:-}" | ||
``` | ||
|
||
## Things you should never do | ||
|
||
### 1. Don't use backticks (``) for running commands | ||
|
||
backticks were (and still are) used for executing a command and using its | ||
output as a command as well. For some reason people are still using backticks | ||
in scripts although they are deprecated long time ago and were replaced | ||
by \$(...) which was introduced by ksh for the first time and now part of | ||
POSIX standardization. | ||
|
||
``` | ||
x=`date` -> No! | ||
x=$(date) -> Yes :D | ||
``` | ||
|
||
## Cheat Sheet | ||
|
||
#### Variables | ||
|
||
* Set variable with default value (string): `x=${x:-'some_default'}` | ||
* Set variable with default value (variable): `y=${y:-$z}` | ||
|
||
#### Arguments | ||
|
||
* Read input: `read -p "enter a number: " num` | ||
* Number of arguments: `$#` | ||
* Check if an argument was passed | ||
|
||
``` | ||
if [ "$#" -lt 1 ]; then | ||
echo "Illegal number of parameters" | ||
fi | ||
``` | ||
|
||
#### Files | ||
|
||
* check if file exists | ||
|
||
``` | ||
FILE=/some/file | ||
if [ -f "$FILE" ]; then | ||
echo "$FILE exists" | ||
fi | ||
``` | ||
|
||
* check if directory exists | ||
``` | ||
DIR=/some/dir | ||
if [ -d "$DIR"]; then | ||
echo "$DIR" exists" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Videos | ||
|
||
Name | Comments | ||
:------|:------: | ||
[SOLID design principles](https://www.youtube.com/watch?v=rtmFCcjEgEw) | by Katerina Trajchevska, 2019 |
Oops, something went wrong.