Reddit DevOps
277 subscribers
69 photos
32.2K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Monthly 'Getting into DevOps' thread - 2020/012

**What is DevOps?**

* [AWS has a great article](https://aws.amazon.com/devops/what-is-devops/) that outlines DevOps as a work environment where development and operations teams are no longer "siloed", but instead work together across the entire application lifecycle -- from development and test to deployment to operations -- and automate processes that historically have been manual and slow.

**Books to Read**

* [The Phoenix Project](https://www.amazon.com/Phoenix-Project-DevOps-Helping-Business/dp/1942788290) - one of the original books to delve into DevOps culture, explained through the story of a fictional company on the brink of failure.
* [The DevOps Handbook](https://www.amazon.com/dp/1942788002) - a practical "sequel" to The Phoenix Project.
* [Google's Site Reliability Engineering](https://landing.google.com/sre/books/) - Google engineers explain how they build, deploy, monitor, and maintain their systems.
* [The Site Reliability Workbook](https://landing.google.com/sre/workbook/toc/) - The practical companion to the Google's Site Reliability Engineering Book
* [The Unicorn Project](https://www.amazon.com/Unicorn-Project-Developers-Disruption-Thriving-ebook/dp/B07QT9QR41) - the "sequel" to The Phoenix Project.
* [DevOps for Dummies](https://www.amazon.com/DevOps-Dummies-Computer-Tech-ebook/dp/B07VXMLK3J/) - don't let the name fool you.

**What Should I Learn?**

* [Emily Wood's essay](https://crate.io/a/infrastructure-as-code-part-one/) - why infrastructure as code is so important into today's world.
* [2019 DevOps Roadmap](https://github.com/kamranahmedse/developer-roadmap#devops-roadmap) - one developer's ideas for which skills are needed in the DevOps world. This roadmap is controversial, as it may be too use-case specific, but serves as a good starting point for what tools are currently in use by companies.
* [This comment by /u/mdaffin](https://www.reddit.com/r/devops/comments/abcyl2/sorry_having_a_midlife_tech_crisis/eczhsu1/) - just remember, DevOps is a mindset to solving problems. It's less about the specific tools you know or the certificates you have, as it is the way you approach problem solving.
* [This comment by /u/jpswade](https://gist.github.com/jpswade/4135841363e72ece8086146bd7bb5d91) - what is DevOps and associated terminology.
* [Roadmap.sh](https://roadmap.sh/devops) - Step by step guide for DevOps or any other Operations Role

Remember: DevOps as a term and as a practice is still in flux, and is more about culture change than it is specific tooling. As such, specific skills and tool-sets are not universal, and recommendations for them should be taken only as suggestions.

**Previous Threads**
https://www.reddit.com/r/devops/comments/ei8x06/monthly_getting_into_devops_thread_202001/

https://www.reddit.com/r/devops/comments/e4pt90/monthly_getting_into_devops_thread_201912/

https://www.reddit.com/r/devops/comments/dq6nrc/monthly_getting_into_devops_thread_201911/

https://www.reddit.com/r/devops/comments/dbusbr/monthly_getting_into_devops_thread_201910/

https://www.reddit.com/r/devops/comments/cydrpv/monthly_getting_into_devops_thread_201909/

https://www.reddit.com/r/devops/comments/ckqdpv/monthly_getting_into_devops_thread_201908/

https://www.reddit.com/r/devops/comments/c7ti5p/monthly_getting_into_devops_thread_201907/

https://www.reddit.com/r/devops/comments/bvqyrw/monthly_getting_into_devops_thread_201906/

https://www.reddit.com/r/devops/comments/blu4oh/monthly_getting_into_devops_thread_201905/

https://www.reddit.com/r/devops/comments/b7yj4m/monthly_getting_into_devops_thread_201904/

https://www.reddit.com/r/devops/comments/axcebk/monthly_getting_into_devops_thread/

**Please keep this on topic (as a reference for those new to devops).**

https://redd.it/exfyhk
@r_devops
Consulting on cloud architecture optimization?

As a company looking to optimize our cloud computing systems (AWS services or such) how much would we expect to pay a Cloud Solutions Architects or other professionals hourly? Are there good software out there doing this?

https://redd.it/exgt0d
@r_devops
How to interpret various memory statistics? Cold, hot, rss, cache, swap, etc.

So I set some logging environment, its mostly based on Grafana with Prometheus and CAdvisor for Docker container monitoring.

While these tools are very cool and easy to setup, I am confused about memory consumption they represent.

Right now it shows that my Prometheus instance uses almost 4.39GB of ram, what the...

I made further investigations which and the 4.39GB is the result of call to a total memory usage, which **seems to** be built from something that some people calls a cold memory:

* mapped\_file (26MB)
* rss (2680MB)
* cache (1700MB)
* swap (0MB)

And the hot memory metrics:

* working set (270MB)

I don't really understand how flexible the cold memory is and how the resources taken by cold memory would be cut if any other linux process would suddenly burst in ram usage.

Let's imagine the scenario where other process starts heavy operations and takes significant amount of server's ram, what would happen with these cold / hot resources mentioned above? Some of them should be ready to release right?

https://redd.it/exasgh
@r_devops
College student looking to interview a software engineer!

Hello all,

I am currently enrolled in a software engineering program at my university and I would like to conduct a recorded audio call interview with someone in the industry as part of a school assignment. I would like to ask about three experiences of a bug escape at your workplace. For example, it could be a successful bug escape, a failed bug escape and a typical bug escape. Of course, this is not set in stone and I am open to any other extra workplace stories!

Please PM me if you are interested as your help will be extremely appreciated!

Thank you again

https://redd.it/exrft3
@r_devops
Show devops: dep-scan is a free open-source dependency audit tool built for CI

Thanks reddit for the fantastic support (and sponsorship!) you gave me when I announced my previous project - a free open-source SAST tool called [sast-scan](https://github.com/AppThreat/sast-scan)

Working on sast-scan gave me several useful insights into the world of vulnerabilities, CVE, CWE and so on. So it made natural sense to implement a new [dependency scanner](https://github.com/AppThreat/dep-scan) for modern DevOps and DevSecOps folks.

If you are used to using dependency-check and those commercial scanners you will find dep-scan to be a lot more performant. Give this project a try and let me know your thoughts.

https://redd.it/exp7n3
@r_devops
instrumenting docker web app with Prometheus

Hello,

I am learning about Prometheus and am trying to find examples of containerized web applications that have Prometheus instrumentation.I have a simple example of how to instrument w/ python:

import http.server
from prometheus _client import start_http_server
class MyHandler(http.server.BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.end_headers()
self.wfile.write(b"Hello World")
if __name__ == "__main__"
start_http_server(8000)
server = http.server.HTTPServer(('localhost', 8001), MyHandler)
server.serve_forever()

How can this be added to a dockerized web application that's built with Python?

https://redd.it/exrd1n
@r_devops
Why aren’t ChatOps more popular?

A co-worker asked me this question and I’m curious to hear what other people think.

To be clear, I mean running/monitoring operations from chat interfaces/clients. Not using chatbots (like Hubot)

https://redd.it/exwb9u
@r_devops
Can Nginx handle thousands of virtual hosts?

Hi all. I'm working on an app hosted in Kubernetes that lets users add custom domains. Each time a domain is added, the app creates an ingress (virtual host) and a certificate in Kubernetes. The database used by Kubernetes (etcd) can only scale up to a point because of db size limits, plus there will be a limit to the number of virtual hosts that Nginx can handle. Because of these two reasons I am going to re-architect the app so it can spread users across many small Kubernetes clusters instead of a single big one. Questions:

1. How many virtual hosts can an Nginx instance handle comfortably from your experience? Does anyone have experience with, say, thousands of virtual hosts or more? I will need to do some testing but I would like an idea of what to expect more or less.
2. When there are many virtual hosts, can it happen that Nginx drops connections when reloading the config when a virtual host is created/updated/deleted?
3. Is Nginx quick enough when reloading a config that includes many virtual hosts?
4. Would something like Traefik or Haproxy be any more efficient with many virtual hosts and with dynamically reloading/updating its configuration?

Thanks a lot in advance!

https://redd.it/exti34
@r_devops
pipeline job not parsing IP's correctly

Hi,

​

I am trying to create a job that does an SCP to a couple of servers.

The list of servers comes from Extended Choice Parameter plugin: (values for instance: [1.2.3.4](https://1.2.3.4),[5.6.7.8](https://5.6.7.8))

The stage that SCP's is as follows:

stage('copy'){

sshagent (credentials: \['deploy'\]) {

def ips = "${environment.split(',')}"

for (ip in ips) {

echo ip

}

}

}

​

But instead of getting the IP's I get them separated to each line, for instance:

1

.

2

.

3

.

4.

​

And so on...

​

Can someone guide on how to correctly tim the IP's from a list?

https://redd.it/exq5l1
@r_devops
Designing for Reliability - Using an Internet Door Buzzer as an Example

Hi Reddit - I created an internet door buzzer a while back and being an SRE I decided to describe why I over-engineered it a little bit to increase reliability by a lot. Wrote a thing about it:
https://medium.com/@lutraman/designing-for-reliability-using-an-internet-door-buzzer-as-an-example-eb654b7121d0

https://redd.it/exm1sj
@r_devops
Launch Darkly vs Split.io

Guys,
I am new to feature flags - would love to hear about pros and cons of both Launch darkly and split.io, from people who have used both. And any other alternatives (suitable for big enterprises) that we should consider?

Thanks

https://redd.it/exthn9
@r_devops
Dumping initial data for dockerized MySQL database image.

Hello,

I'm trying to figure out what's the best way to dump related data from a cloud database to create a local development environment via docker image, but I'm having trouble thinking of a solution to getting all related to an record in a table. The database runs on MySQL 5.7

I'll try to explain what I mean:

* Table A is related to Table B and Table C and so on.
* Table B is related to Table M and Table N...
* Table M is related to Table V...
* Table V is related to Table Z

What I want to achieve is make a script/tool/whatever that would extract the data from all nested relation tables from A through Z by the ID(primary key) of a record in Table A.

https://redd.it/extwhz
@r_devops
Ansible playbook for 2 Node HA was clusters Active/Passive config with Pacemaker?

Looking for a good playbook that configures two Ec2 instances ( provisioned by terraform) in an active/passive state using Pacemaker, a cluster resource manager.
The way Pacemaker works is setting up a node as primary then copy an auth key to the secondary node.
What Ansible commands should I use to copy/move files from EC2-a to EC2-b? (I can use scp or copy/fetch).

https://redd.it/exmm3q
@r_devops
Dockerized Vim/Zsh/Tmux/Whatever IDE for more powerful code editing on server

Part of what I do in company where I work is devops and from time to time, I do development of tools right on servers.... (for example, I have been doing some networking stuff, with specialized hardware, I can test only on dev servers)

​

For minor file editing, it is more than ok to just use default vim config, or to clone minimal one, but, for bigger projects, I do prefer my whole vim setup...

​

Unfortunatly, it has grown a bit and has some dependencies, so, I have decided to create docker container out of it and to include some of my favourite tools, like jq, fzf, etc.

​

You can take a look at it at: [https://github.com/nemanjan00/dev-environment](https://github.com/nemanjan00/dev-environment)

​

I did put most of my dotfiles right into docker file...

https://redd.it/exzoyl
@r_devops
Bamboo Specs tutorials (for Bamboo 6.8+) ?

Hi all

So right now, the company I'm working for is focusing mostly on using Bamboo instead of Jenkins (much to my annoyance...). And it's beginning to hurt my job position.

I don't know Java, in fact my attempts at learning it have just lead to frustration and rage quitting. Does anyone know where a can find an up to date set of tutorials for Bamboo Specs?

I've got access to Pluralsite and LinkedIn Learning.

Thanks in advanced

https://redd.it/ey5n4l
@r_devops
Traffic shadowing - tools and advice

Hey, need to reproduce my production API inputs to a staging/dev server and ensure our next version can successfully process this real-world input. What tools did you use for that? any other advice and lessons you learned during this journey?

https://redd.it/eydm1z
@r_devops
Using output from a Terraform var in same module

Im using a Terraform [main.tf](https://main.tf) file and creating an AWS instance and attaching a VPC, EIP, gateway etc, and also configuring an RDS instance.

​

output "rds\_endpoint" {

value = "${aws\_db\_instance.default.address}"

​

terraform output gives the DNS name

and nslookup provides the IP address.

export db\_host = 192.x.x.x (ip address of RDS instance)

I'm trying to pass this variable as an environment variable using local-exec but its not possible as it says output is not defined. If I create another terraform module such as [database.tf](https://database.tf), can I then pass on the output to my [main.tf](https://main.tf) file? Not quite sure how this works..

Basically I want to SSH into a machine and pass this env variable to a Python script so its know the IP to access.

​

\# MySQL configurations

app.config\['MYSQL\_DATABASE\_USER'\] =$user

app.config\['MYSQL\_DATABASE\_PASSWORD'\] = $pass

app.config\['MYSQL\_DATABASE\_DB'\] = $db\_name

app.config\['MYSQL\_DATABASE\_HOST'\] = $db\_host

https://redd.it/eyh9l3
@r_devops
Teams of DevOps teams

Hi,

Apologies if this is slightly off topic (and rambling).. I'm asking for advice/insights on dealing with changes that DevOps enables in an organisation, rather than DevOps practices/tooling itself.

For context: the adoption of DevOps culture at the company I work for has allowed us to move towards "service teams" - basically autonomous DevOps teams that run a range of services e.g. customer-facing web apps, but also a lot of internally focused services - k8s platform, internal monitoring, security logging, development tooling etc. Each team runs many services, but each service is run by only a single team. Generally this model has has worked well for us so far.

Currently, we're at about 12 teams geographically distributed (and growing). Our primary tools for communication *between* teams are a Wiki, MS Teams (🤮but moving towards slack) and email.

Our problem is we're struggling with, what I think is essentially the N(N-1)/2 communication problem.

As we scale the number of teams, things are starting to get a bit more chatoic/brittle, and signal/noise ratio is getting worse. As an example, a customer recently suffered an outage because one team hadn't seen an important announcement, dropped into in a particular slack channel, by another team.

I'm curious if anybody else works in an organisation where this is a problem and whether they have insights, products or strategies they adopted to solve/mitigate it.

One avenue we are looking at is the "Team API" concept discussed in [team topologies book](https://teamtopologies.com/book), which looks really interesting. The Team API, from what I understand, is basically a agreed framework that standardises how teams interact within an organisation. It wouldn't necessarily solve the N/(N-1)/2 problem, but formalising and standardising might hopefully might make the problem slightly more manageable.

Jeff Bezos' "API mandate" is probably an extreme example of a Team API, but I've not seen any concrete examples of "Team APIs" being applied in much much smaller organisations.

Anyway, I'd be curious to hear from anybody else suffering the problem, or others with insights into how they've scaled DevOps teams.

Thanks!

https://redd.it/eyehxy
@r_devops
Help deciding cloud architecture for IOT product

Hi!

I am working with an IOT startup who are currently working to create a proper backend for their product.

Basically we have a monitoring system which generates a packet, and we want to send this to the cloud and store it in a time series database. Next we run some algorithms that we have written based on the received data and generate insights which we send back to an android application.

As we don't have any proper backend yet, we are flexible with the suggestions for architecture but we have to look at the costing. I don't have much experience developing for any cloud architecture but I'm ready to learn. Could you please suggest what architecture would work best for the above mentioned scenario?

Thanks!

https://redd.it/eybp9n
@r_devops
Gitlab-CI cache options

Hi guys!

I’m really new gitlab user but last week i got a project to optimize our gitlab-ci with cache. I read the docs but i don’t understand tottaly how is it work.
In my project need to cache composer and npm packages, but i also want to understand how is it work.

Thanks any help!

https://redd.it/eye000
@r_devops