Skip to content

Commit

Permalink
Add tools and protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
abregman committed Feb 17, 2021
1 parent 1ef9c2b commit d7cf559
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 26 deletions.
60 changes: 41 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,22 @@
<!-- ALL-TOPICS-LIST:END -->


* [DevOps Roadmap](#devops-roadmap)
* [Alternative Roadmaps](#alternative-roadmaps)
* [Learn About DevOps](#learn-about-devops)
* [Learn Git](#learn-git)
* [Programming](#programming)
* [Operating Systems](#operating-systems)
* [DevOps Toolchain](#devops-toolchain)


<a name="devops"></a>
## DevOps

### How to learn and practice DevoOps
### DevOps Roadmap

* The following path is opinionated. You can find alternative paths in the next section.
* Remember, DevOps is more a culture rather than a list of tools or platforms. The reason you learn concepts and tools is to be comfortable enough to practice and apply that culture
* Learn what DevOps is all about
* Remember, DevOps is more a culture rather than a list of tools or platforms. The reason you learn concepts and tools is to be comfortable enough to practice and apply that culture.

Let's start with the must

Expand All @@ -68,9 +76,9 @@ Topic | What to learn | Alternatives | Description
Version Control | [Git](#Learn-git) | None | Version Control is used everywhere and Git is the leading version control technology
Programming | At least one [programming language](#programming) | | Anyone who practice DevOps should know programming to some extent
Operating System | [Linux](#operating-systems) | Windows | Operating Systems is another must when it comes to DevOps
Protocols | DHCP, UDP, TCP, SSH | Not as an alternative, you can simply learn later: NFS, NTP | Learn how these protocols work and what they are used for
Protocols | DHCP, UDP, TCP, HTTP, SSH | Not as an alternative, you can simply learn later: NFS, NTP, FTP | Learn how these protocols work and what they are used for
Applications | Web Server, Load Balancer, Cache, Database | | Learn how they work and try out some implementations (e.g. MySQL for databases and httpd for web servers)
System Design | Availability, Reliability, Scalability, Performance | Learn how to design infrastructure and systems
[System Design](https://github.com/bregman-arie/system-design-notebook) | Availability, Reliability, Scalability, Performance | Learn how to design infrastructure and systems

What's next? (Note: the order isn't important)

Expand All @@ -83,7 +91,7 @@ CI/CD | Jenkins, GitHub Actions | Gitlab CI, Circle CI, Argo CD |
Logging and Dashboards | Elastic Stack (Elasticsearch and Logstash), Report Portal | Graylog, Splunk |
Monitoring | Prometheus and Grafana | Nagios, Datadog |

### Alternative Roadmaps and Paths
### Alternative Roadmaps

Name | Description
:------|:------:
Expand Down Expand Up @@ -148,6 +156,12 @@ Once you are familiar with the commands and feel comfortable enough to keep deep
* Kernel
* Virtulization

### System Design

System Design can be a complex topic. For that reason, I've created a separate repository for you to learn it properly.

<p align="center"><a href="https://github.com/bregman-arie/system-design-notebook"><img src="images/system_design_notebook.png"/></a></p>

### Tools, Apps & Services

Name | Description
Expand Down Expand Up @@ -247,28 +261,32 @@ Name | Description
[The 12 Factor App](https://12factor.net) | must-read in my opinion
[A distributed Systems Reading List](https://dancres.github.io/Pages/?fbclid=IwAR2gapLU03iaxH4NDotc0LD_GiXOkyByfMT3iwufofUOEfCKEVwmezE3vCw)

## Tooling and Systems
## DevOps Toolchain

- [ ] CI/CD
- [ ] Jenkins (Managed & on-premise)
- [ ] Jenkins (Managed & on-premise, Containers supported, Plugins)
- [ ] GitHub Actions (Hosted service)
- [ ] Travis (Hosted service)
- [ ] CircleCI (Hosted service)
- [ ] GitLab CI (Hosted service and on-premise)
- [ ] [BuildKite](https://buildkite.com) (Hosted)
- [ ] [Zuul](https://zuul-ci.org/docs/zuul) (Hosted and on-premise)
- [ ] [Drone](drone.io)
- [ ] [Drone](https://www.drone.io)
- [ ] [Tekton](https://cloud.google.com/tekton)
- [ ] [Argo CD](https://argoproj.github.io/argo-cd)

Note: "Provisioning" tools can be used to perform configuration management to some extent. The same applies for configuration management tools, which can be used for pprovisioning.

- [ ] Provision
- [ ] Terraform
- [ ] CloudFormation (AWS only)
- [ ] Pulumi
- [ ] Provisioning
- [ ] Terraform (Open Source)
- [ ] CloudFormation (Available only on AWS)
- [ ] Pulumi (Open Source)

- [ ] Configuration Management
- [ ] Ansible
- [ ] Puppet
- [ ] Chef
- [ ] Salt
- [ ] Configuration Management (all Open Source)
- [ ] Ansible (Agentless, Mutable Infrastructure, Procedural)
- [ ] Puppet (Agent, Mutable Infrastructure, Procedural)
- [ ] Chef (Mutable Infrastructure)
- [ ] Salt (Mutable Infrastructure)

- [ ] Images
- [ ] [diskimage-builder](https://github.com/openstack/diskimage-builder)
Expand All @@ -283,11 +301,15 @@ Name | Description
- [ ] Monitoring
- [ ] [Prometheus](https://prometheus.io)
- [ ] Nagios
- [ ] [statuscake](https://www.statuscake.com) - Website Uptime & Performance Monitoring
- [ ] Datadog
- [ ] Zabbix
- [ ] Monit
- [ ] [Statuscake](https://www.statuscake.com) - Website Uptime & Performance Monitoring

- [ ] Log Management
- [ ] Logstash
- [ ] Graylog
- [ ] Papertrail
- [ ] Fluentd
- [ ] [Splunk](https://www.splunk.com)
- [ ] [SumoLogic](https://www.sumologic.com)
Expand Down
Binary file added images/system_design_notebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 19 additions & 7 deletions resources/mongo.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ Name | Description

* DB stats: `db.stats()`
* Switch to a DB: `use DB_NAME`
* show collections: `show collections`
* Show collections: `show collections`
* Show all the document in a collection: `db.COLLECTION_NAME.find({})`
* Count the number of documents in a collection: `db.COLLECTION_NAME.count()`
* Remove all the documents from a collection: `db.COLLECTION_NAME.remove({})`
* Rename field: ```db.hosts.updateMany( {}, { $rename: { "CURRENT_FIELD_NAME": "NEW_FIELD_NAME" } } )```

#### Mongoexport

* Export Mongo DB collection to a JSON file: `mongoexport --db=DB_NAME --collection=COLLECTION_NAME --out=data.json`
* Export specific fields from a Mongo DB collection to a JSON file: `mongoexport --db=DB_NAME --fields=FIELD_NAME,FIELD_NAME2 --collection=COLLECTION_NAME --out=data.json`
* Rename field: ```db.hosts.updateMany( {}, { $rename: { "CURRENT_FIELD_NAME": "NEW_FIELD_NAME" } } )```

#### Aggregations

Expand All @@ -33,16 +37,24 @@ Name | Description

```
mongo_client.update(
{ "account_number": account_num },
{ "$addToSet": { "hosts": {'hostname': hostname} } }
{ "account_number": account_num },
{ "$addToSet": { "hosts": {'hostname': hostname} } }
)
```

* Add a new element to an array in sub-document (if it doesn't exists already):

```
mongo_client.update_one(
{ "account_number": account_num, "hosts.hostname": hostname },
{ "$addToSet": { "hosts.$.attachment_uuids": attachment_uuid } }
mongo_client.update_one(
{ "account_number": account_num, "hosts.hostname": hostname },
{ "$addToSet": { "hosts.$.attachment_uuids": attachment_uuid } }
)
```

* Add all the elements in an array to an array in document (This is not about adding the array as it is but adding the elements of it):

```
mongo_client.update_one(
{'_id': 1},
{'$addToSet': {'some_list': { '$each': [1, 2, 3]} }}, upsert=True)
```

0 comments on commit d7cf559

Please sign in to comment.