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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/docs-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docs Quality

on:
pull_request:
push:
branches:
- main

jobs:
docs-quality:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci

- name: Check README links
run: npm run check:readme-links

- name: Check docs links
run: npm run check:doc-links

- name: Check content quality
run: npm run check:content-quality

- name: Build docs site
run: npm run build
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- [Commands](docs/kubernetes/commands.md)
- [Sample Apps](https://github.com/Pradumnasaraf/DevOps/tree/main/docs/kubernetes/apps)
- [Manifest Files](https://github.com/Pradumnasaraf/DevOps/tree/main/docs/kubernetes/k8s-resources-type)
- [Tools](docs/kubernetes/tools.md)
- [Tools](https://github.com/Pradumnasaraf/DevOps/tree/main/docs/kubernetes/tools)
- [Playground](docs/kubernetes/playground.md)
- [Other Resources](docs/kubernetes/other-resources.md)

Expand All @@ -34,7 +34,7 @@
- [Workflows](https://github.com/Pradumnasaraf/DevOps/tree/main/docs/github-actions/Workflows)
- [Scenarios](docs/github-actions/scenarios.md)
- [Other Resources](docs/github-actions/other-resources.md)
-

## Linux

<img align="right" src="https://user-images.githubusercontent.com/51878265/209197882-51406a8f-04ff-4c53-a362-ac32ae8566ad.png" height="100" alt="linux">
Expand Down Expand Up @@ -71,11 +71,11 @@

<img align="right" src="https://user-images.githubusercontent.com/51878265/213385507-52f03107-388c-4992-9b5e-c89de6906e37.png" height="100" alt="network">

- [Notes](docs/go/introduction.md)
- [Learning Resources](docs/go/learning-resources.md)
- [Notes](docs/golang/introduction.md)
- [Learning Resources](docs/golang/learning-resources.md)
- [Concepts](https://github.com/Pradumnasaraf/DevOps/tree/main/docs/golang/concepts)
- [Practice App](https://github.com/Pradumnasaraf/DevOps/tree/main/docs/golang/apps)
- [Other Resources](docs/go/other-resources.md)
- [Other Resources](docs/golang/other-resources.md)

## Helm

Expand Down Expand Up @@ -138,4 +138,4 @@

- [Notes](docs/terraform/introduction.md)
- [Learning Resources](docs/terraform/learning-resources.md)
- [Commands](docs/terraform/commands.md)
- [Commands](docs/terraform/commands.md)
18 changes: 9 additions & 9 deletions docs/argocd/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ keywords: ["ArgoCD", "GitOps", "Kubernetes", "Continuous Delivery"]
slug: "/argocd"
---

Argo CD is a popular GitOps controller. It is used to deploy applications to Kubernetes clusters. It is also used to manage the configuration of the cluster itself. It can be changed too.
Argo CD is a GitOps controller for Kubernetes. It watches a Git repository, compares the desired state with the current cluster state, and helps keep them in sync. It is commonly used to deploy applications and manage cluster configuration declaratively.

> _"One the founding principles of GitOps - everything stored in Git."_
> One of the main ideas in GitOps is simple: store the desired state in Git.

- For production we can use the [Autopilot](https://github.com/argoproj-labs/argocd-autopilot). For a traditional approach we can use the [Manifest directory](https://github.com/argoproj/argo-cd/tree/master/manifests) approach. Community [Helm](https://github.com/argoproj/argo-helm/tree/master/charts/argo-cd) charts are also available
- For production, you can use tools such as [Autopilot](https://github.com/argoproj-labs/argocd-autopilot), install from the official [manifest directory](https://github.com/argoproj/argo-cd/tree/master/manifests), or use the community [Helm chart](https://github.com/argoproj/argo-helm/tree/master/charts/argo-cd).

<p align="center"><img width="1014" alt="Screenshot 2022-11-29 at 11 44 57 PM" src="https://user-images.githubusercontent.com/51878265/204613004-e5dace25-7502-487d-acea-86d63c70cc2a.png"></img></p>

### Installation

- By applying the manifestsReference: [ArgoCD Installation](https://argoproj.github.io/argo-cd/getting_started/#1-install-argo-cd)
- Install it by applying the manifests. Reference: [Argo CD Installation](https://argoproj.github.io/argo-cd/getting_started/#1-install-argo-cd)

```bash
kubectl create namespace argocd
Expand All @@ -27,7 +27,7 @@ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/st
Default credentials:

- Username: admin
- Password : It can be found by running the following command
- Password: You can get it by running the following command

```bash
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
Expand All @@ -37,11 +37,11 @@ kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.pas

<p align="center"><img width="820" alt="Screenshot 2022-11-30 at 4 56 41 PM" src="https://user-images.githubusercontent.com/51878265/204785046-93eb5b20-31b6-4f2b-b2a4-223f88f18718.png"></img></p>

- **Auto Sync** - ArgoCD will automatically sync the application with the Git repository. This is done by polling the Git repository at a specified interval.
- **Auto Sync** - Argo CD automatically syncs the application with the Git repository.

- **Self Healing** - If the changes are done directly to deployment/cluster, it will discard those changes and keep the state as per the Git repository. For example, if someone change the replica count to two from 1 from the CLI, it will be changed back to 1.
- **Self Healing** - If someone changes resources directly in the cluster, Argo CD can revert them so the live state matches Git again.

- **Auto Pruning** - ArgoCD will automatically delete the resources that are not present in the Git repository. By default, it will not.
- **Auto Pruning** - Argo CD can automatically remove resources that are no longer defined in Git.

## Progressive Delivery

Expand All @@ -51,7 +51,7 @@ Progressive Delivery is the practice of deploying an application in a gradual ma

- **Canary** - Deploy the new version of the application to a small subset of users. If the new version is working fine, then deploy it to the rest of the users. This is the most common form of progressive delivery. It is also the most complex to implement. It requires a lot of infrastructure and a lot of testing.

- To make the whole setup declarative way and make it infrastructure as we deploy ArgoCD Argo CD applications just like any other Kubernetes resource. This is also managed through a git repository.
- To keep the whole setup declarative, we can define Argo CD applications just like any other Kubernetes resource and store them in Git as well.

[Docs](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/) for reference.

Expand Down
5 changes: 5 additions & 0 deletions docs/argocd/learning-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ slug: "/argocd/resources"

- [GitOps Tech world with naina (Video)](https://youtu.be/MeU5_k9ssrs)
- [GitOps Fundamentals (Course)](https://learning.codefresh.io/)

## Read next

- [ArgoCD Introduction](./introduction.md) - Return to the main concepts and examples.
- [Other Resources](./other-resources.md) - Explore sample manifests and supporting material.
7 changes: 6 additions & 1 deletion docs/argocd/other-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ keywords: ["ArgoCD", "GitOps", "Kubernetes", "Continuous Delivery"]
slug: "/argocd/other-resources"
---

Here are list of other resources that you can refer to learn more about ArgoCD:
Here are some extra resources you can use to go deeper into ArgoCD:

- [Sample ArgoCD Manifest files](https://github.com/Pradumnasaraf/DevOps/tree/main/docs/argocd/manifests): A collection of ArgoCD manifest files to help you understand the concepts better.

## Read next

- [ArgoCD Introduction](./introduction.md) - Review the core ArgoCD concepts and workflow.
- [Learning Resources](./learning-resources.md) - Continue learning with videos and guides.
34 changes: 16 additions & 18 deletions docs/bash-scripting/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords: ["Bash", "Scripting", "Unix", "Shell"]
slug: "/bash"
---

We start by creating a file with the `.sh` extension. For example, `script.sh`. Then we write the script in it. For example:
We usually start by creating a file with the `.sh` extension, for example `script.sh`, and then add Bash commands to it.

Basic Script

Expand All @@ -17,15 +17,15 @@ Basic Script
echo "Hello World"
```

We can run this by `bash script.sh` or `./script.sh`. But the second will only work if the script is executable (permission to execute). We can make it executable by `chmod +x script.sh`. Now we can run it by `./script.sh`.
You can run this script with `bash script.sh` or `./script.sh`. The second form only works if the file is executable. To make it executable, run `chmod +x script.sh`.

### Shebang

The first line of a bash script is called the shebang. It tells the system which interpreter to use to run the script. The shebang for bash is `#!/bin/bash`. The shebang for python is `#!/usr/bin/env python`. It varies from language to language.
The first line of a Bash script is called the shebang. It tells the system which interpreter should run the file. For Bash, a common shebang is `#!/bin/bash`.

### Variables

It is a placeholder for a value. Just like any other programming language. We use $ to access the variable. Eg: `$NAME`. We can also use `${NAME}`. The braces ensure the variable is not mistaken for a command.
A variable is a named value. In Bash, we use `$` to read it, for example `$NAME`. You can also write `${NAME}` when you want to make the variable boundary explicit.

```bash
#!/bin/bash
Expand All @@ -39,9 +39,9 @@ echo "My name is $NAME"
echo "My name is ${NAME}"
```

NOTE: We can create variables by `NAME="John"` through CLI; we can't use it in the script because it is not exported. We can export it by `export NAME="John"`. Now we can use it in the script.
NOTE: If you set `NAME="John"` in the shell, it is only a shell variable. To make it available to child processes, export it with `export NAME="John"`.

But here is one more catch. If we exit the terminal and open a new one, the variable will be gone. To make it permanent, we can add it to the `.bashrc` file. It is a hidden file in the home directory. We can open it by `vi ~/.bashrc` or any other editor. We can add the variable to the file. Eg: `export NAME="John"`.
If you close the terminal, that exported variable is gone. To make it persistent for future shell sessions, add it to `~/.bashrc` or your shell startup file.

### User Input

Expand All @@ -59,7 +59,7 @@ echo "Hello $NAME, nice to meet you!"

We can pass arguments to the script. The arguments are stored in the `$1`, `$2`, `$3` and so on. `$0` is the name of the script.

Eg: `bash script.sh arg1 arg2`
Example: `bash script.sh arg1 arg2`

```bash
#!/bin/bash
Expand All @@ -69,7 +69,7 @@ echo "First Argument: $1"

### Arithmetic Operations

We can do Arithmetic operations in bash. We use the `(( ))` to do Arithmetic operations.
We can do arithmetic operations in Bash with `(( ))`.

```bash
#!/bin/bash
Expand Down Expand Up @@ -104,9 +104,7 @@ else
fi
```

```bash
if [$1 == "hello"], then echo "Hello World", fi
```
The compact one-line form exists, but the block form is easier to read and debug.

#### Comparison Operators

Expand Down Expand Up @@ -173,7 +171,7 @@ done

### Functions

We can create functions in bash. The syntax is:
We can create functions in Bash like this:

```bash
#!/bin/bash
Expand All @@ -186,16 +184,16 @@ sayHello
```


- `exit 1` - Exit the script with an error (non-zero exit code).
- $RANDOM gives a random number between 0 and 32767.
- $SHELL gives the path of the shell.
- $USER gives the username of the user.
- $HOSTNAME gives the hostname of the machine.
- `exit 1` exits the script with a non-zero status code.
- `$RANDOM` gives a random number between `0` and `32767`.
- `$SHELL` gives the path of the shell.
- `$USER` gives the username of the current user.
- `$HOSTNAME` gives the hostname of the machine.


### jq

jq is a command-line JSON processor. It is used to parse JSON. It is used to extract data from JSON. It is used to transform JSON. It is used to generate JSON.
`jq` is a command-line JSON processor. It is useful for reading, filtering, transforming, and generating JSON from shell scripts.

#### Installation

Expand Down
7 changes: 6 additions & 1 deletion docs/bash-scripting/learning-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ slug: "/bash/resources"

- [You need to learn Bash Scripting right now playlist - NetworkChuck (Video)](https://youtube.com/playlist?list=PLIhvC56v63IKioClkSNDjW7iz-6TFvLwS)
- [Devhints Bash Cheat Sheet](https://devhints.io/bash)
- [Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html)
- [Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html)

## Read next

- [Bash Scripting Introduction](./introduction.md) - Revisit shell basics and examples.
- [Other Resources](./other-resources.md) - Browse extra scripts and concept files.
9 changes: 7 additions & 2 deletions docs/bash-scripting/other-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ keywords: ["Bash Scripting", "Linux", "Shell Scripting"]
slug: "/bash/other-resources"
---

Here are list of other resources that you can refer to learn more about Bash Scripting:
Here are some extra resources you can use to learn Bash scripting with examples:

- [Concepts](https://github.com/Pradumnasaraf/DevOps/tree/main/docs/bash-scripting/concepts): Each topic is break into seprate files to help better understand the concepts.
- [Concepts](https://github.com/Pradumnasaraf/DevOps/tree/main/docs/bash-scripting/concepts): Each topic is split into separate files so the concepts are easier to understand.
- [Scripts](https://github.com/Pradumnasaraf/DevOps/tree/main/docs/bash-scripting/scripts): A collection of Bash scripts I have created to help you understand the concepts better.

## Read next

- [Bash Scripting Introduction](./introduction.md) - Go back to the basics and common shell concepts.
- [Tools](./tools.md) - Explore tools that make shell work easier.
9 changes: 8 additions & 1 deletion docs/bash-scripting/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ keywords: ["Bash Scripting", "Linux", "Shell Scripting"]
slug: "/bash/tools"
---

Here are a few tools that are useful when writing or debugging shell scripts:

- [Chmod Calculator](https://chmodcommand.com/)
- [devhints](https://devhints.io/)
- [jq](https://stedolan.github.io/jq/)
- [jq](https://stedolan.github.io/jq/)

## Read next

- [Bash Scripting Introduction](./introduction.md) - Review shell basics and examples.
- [Other Resources](./other-resources.md) - Explore extra scripts and concept files.
15 changes: 12 additions & 3 deletions docs/devsecops/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@ keywords: ["DevSecOps", "DevOps", "Security"]
slug: "/devsecops"
---

It is a set of practices that combines software development (Dev) and information security (Sec) to shorten the systems development life cycle while providing continuous monitoring to ensure the delivery of secure software.
DevSecOps is the practice of integrating security into the software delivery lifecycle instead of treating it as a separate step at the end. The goal is to build, test, ship, and operate software with security checks built into the workflow.

- [DevSecOps](https://www.redhat.com/en/topics/devops/what-is-devsecops)
In practice, DevSecOps usually includes:

# MORE INFO COMING SOON
- scanning dependencies and container images
- checking infrastructure and configuration for misconfigurations
- shifting security review earlier into CI/CD pipelines
- keeping feedback fast so teams can fix issues before release

Good DevSecOps is not about adding more gates everywhere. It is about making secure defaults, useful automation, and fast feedback part of normal engineering work.

### What's next?

- [DevSecOps overview from Red Hat](https://www.redhat.com/en/topics/devops/what-is-devsecops)
Loading
Loading