Reddit DevOps
269 subscribers
11 photos
31.1K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Do you prohibit containers which could POTENTIALLY be run as root?

Hi. If a container had the ability to run as root, but included clear documentation on how to run it as a non-root user and stated that was the best practice, would that be sufficient for your organization? Or, do you prohibit containers which even have the possibility that they can be run as root? Or, put another way; Does your security policies prohibit containers which have the ability to run as root (even though you don't deploy them that way).

Just curious... because I am being impacted by a prohibition like this. Is this typical across the devops landscape now? Sorry if I am out of touch.

https://redd.it/m1y2z3
@r_devops
PromQL assistance with holtwinters

Hi all, I'm new to PromQL (and time series dbs in general) and I'm trying to figure out the below without much of a dev background.

Problem:

\-a count, let's call it "login\
count"

\-it's seasonal (repeating after 7 days)

\-it has labels, let's say country

I'd like to set alerts so if the ratio drops below x (let's say 75%).

​

Here is what I have so far, but if I remove the label I run into all kinds of issues:

sum(increase(login_count{country="DE"}[10m])) / holt_winters(sum(increase(login_count{country="DE"}[10m]))[7d:],.005,.005)

Here is what I thought I had to do:

sum(increase(login_count[10m])) by country / holt_winters(sum(increase(login_count[10m]))[7d:],.005,.005)

​

I'm also not sure that I'm using holt_winters + subqueries correctly, however I seem to be getting the correct results.

https://redd.it/m27cw2
@r_devops
Redis single node to cluster migration

Hello, I have a question. I have a single instance redis (V3.2.12) running. It has now more then 15M+ key value pair. I didn't see it coming in the first place.

​

Now I will deploy a 6 node redis cluster (same version, 3 master, 3 slave). My question is how can I migrate to the cluster. For example can I read first 1000 key value pair then dump it into the cluster then again read 1000 pair and so on. Is it possible to do with any redis client? I can develop if required.

​

Thanks.

https://redd.it/m1vstw
@r_devops
Question So... what's DevOps?

Hello there,

I'm struggling on the definition of DevOps. For me, it is a combination of support versions systems, CI/CD, containers, microservices, logging and testing. Is that right? What am I missing? If you were to teach someone DevOps, what would be the "core" parts?

https://redd.it/m1zwh9
@r_devops
computer science concepts

Hello,

As a self-taught DevOps guy/Cloud developer, I find myself a little weak on some computer science concepts that your average CS student knows. There are great best practices in DevOps but I think I could benefit from getting familiar with some of the more important concepts out there. Are there any books you'd recommend that might introduce some of those concepts? Even if I don't end up using them, at least I'd be able to relate better to other developers in the organization.

I do want to take Harvard's CS50 but I have too much on my plate now and I am looking for something a little less in terms of time commitment. Something like, CS Fundamentals for Dummies type of book.

Thanks!

https://redd.it/m28tev
@r_devops
Survey - Consequences for staff of data privacy breaches?

Quick survey: who knows of devs that have been at a company where there was a data breach or other data privacy incident? What was the consequences for devs at that company?

- Adam, Head of Developer Relations at dataprotocol.com (US data privacy edtech)

https://redd.it/m29b46
@r_devops
Store encrypted secret in Hashicorp Vault

Right now we're storing secrets as plaintext key value pairs. We got a suggestion about using Transit keys and encrypting our secrets. I'm evaluating this approach right now and although it's more secure, it'll be really troublesome when we have to rotate the Transit keys. I'm afraid it might lead to data corruption in some weird rare cases. We also lose the ability to view the secrets from a GUI but I suppose that can be a good thing as well.

I'm interested to know if others are encrypting their secrets or uploading as plaintext.

https://redd.it/m28qza
@r_devops
How do you synchronize files across repos?

Hey,

I am looking for a smart solution to the following problem: We heavily use GitHub and some features that are dependent on availability of certain files like CONTRIBUTING.md, SECURITY.md, pull request templates and others. Those files are very important for us to have a healthy repository.

Those files should be the same across all of our team repos. As we own about 70 repos a manual solution is not feasible. I have thought about writing a custom script but maybe there is a good solution out there that helps me - similar to a database migration runner.

What it should be able to do:

- synchronize files from a central location to multiple repos (templated or not does not matter)
- integratable in a CI pipeline

https://redd.it/m27j0p
@r_devops
good way to practice AWS and Terraform

Hi,

I'd love to evaluate Terraform and AWS, but my company currently does not use them due to the cost matter.

is there any way I can practice them like creating an infrastructure using Terraform?

https://redd.it/m2d6zb
@r_devops
About creating a sharded mongodb cluster on Kubernetes

Hello everyone,

I do not know much about mongodb. Are there any guides for the following architecture? https://severalnines.com/sites/default/files/shard_repset.png
If there is no which steps should I take? I am thinking about getting mongodb operator and apply it's deployment. After that 1 configmap(not sure if I should use 3 configmap) 3 statefulset for the shards. Probably 1 storage class and 3 pvc.
The thing is that I do not know how can I get baseurl and other required configs to set into configmap? Any senior suggestions?
Thanks

https://redd.it/m2cyh6
@r_devops
Launch HN: Haystack (YC W21) – Engineering analytics that don’t suck

Check out Haystack - an Analytics tool that strictly follows NorthStar Metrics while refusing to single out develops and give engineering leaders insight into how to improve their teams performance.


Check them out on HackerNews


https://news.ycombinator.com/item?id=26413311

https://redd.it/m27f2i
@r_devops
How do you guys automate testing video/audio quality on web broadcast applications?

Hey,

I have some input video and audio. This has to projected through a few services which can be accessed through the browser.

Now I want a way to estimate the video/audio going in is the same as the video coming out. Basically is the quality 'good'.

I was thinking bitrate but would this be enough?

I could compare the pixels between input and output but then I need each frame to match. Same idea with audio but comparing the waveforms. This is assuming that I can compare pixels when the output format could be different.

I know some of these ideas are stupid. Just wondering how others do it.

Thanks in advance!

https://redd.it/m26ypy
@r_devops
CI/CD for a monorepo, how to improve it?

I have a Node monorepo that consists of three apps backed by many libraries

- A server that is currently backed by SQLite
- A web app
- An Electron app

The GitHub repository is kept up-to-date with Dependabot that opens pull requests that I also want tested. I plan to work on features in feature branches, they get merged into dev which is staging and then merged into main which is production.

The CI/CD part feels a little overwhelming though. I have a cheap VPS while I play around with this project but I feel like it's a little brittle.

I have three pipelines set up in Buddy, one for feature branches, one for staging and one for production.

- The feature pipeline will just test and build the project
- The staging pipeline will test, build, deploy to the VPS by uploading the files and run a Docker build, restarting the container, then deploy static files to Netlify
- The production pipeline is the same as staging

The code is kept in /opt/project and data (SQLite database) in /var/opt/project/data. I then mount that var directory into the Docker container.

Notice that I am not doing Electron builds yet, as I think they need to be done on their respective platforms, meaning I can only do Linux builds for now (until I pay for a Windows and macOS server).

The setup just feels a little dirty and I'm not sure if there is a better approach. Especially I wouldn't really be sure how to roll back in case something bad happens. I don't like if my test approach changes for instance, I have to edit it three places with identical setup. Is this a DevOps smell? I was considering looking into GitHub Actions but reviews are mixed.

I would prefer to keep the code on GitHub since I have Pro there but I'm completely open to alternatives if it improves productivity. The project is private.

https://redd.it/m1vwzu
@r_devops
Google cloud vs other cloud solutions for AI/machine learning

Hello! I've looking for proper articles comparing the benefits of going with the GCP solutions(mostly due to TPUs) instead of other cloud solutions like AWS, mainly around NLP but I'm having difficulties finding good comparisons and doing them my self since I am not as familiar with ML since I am a SRE engineer.If you could point me to some articles and/or tell me your personal experience I would much appreciate it, as would others in the future looking to find answers to this question!

https://redd.it/m1zsuk
@r_devops
Terragrunt and Terraspace - when to use it

Hey Guys,

We are planning to move all of our infrastructure into code which is Azure and also we are thinking about vSphere. Currently we have 10 subscriptions in Azure. There are two main teams in the company that has 3 subscriptions each which is DEV/TEST/PROD. We also have few DCs around. I came back to the company after some absence and I would like to push for IaC to simplify the management of it.

One of the guys suggested to use Terragrunt as a wrapper for Terraform. However the problem is that 95% of our team do not have much coding experience even in Terraform etc. The new versions of Terraform fixed some issues that were in previous older versions such as module dependencies etc.

I do understand that Terragrunt would help to deploy same infrastructure across environments, however our environments are not 1 for 1 like so I do not really see a point of adding extra layer of complexity. My point of view is simple. Each environment is different so why would we use Terragrunt in the first place. Eventually, maybe after a long time we will rebuild our environments at least in Azure. For now I just want to move whatever infrastructure we have into code and manage from there.

I would think about using Terragrunt if we would have 1 for 1 like environments. Terraform Cloud and Terraform Enterprise adds more functionality which kind of makes hard to decide if going with Terragrunt is a good option.

What is your opinion about that?

https://redd.it/m1tfda
@r_devops
ELK configuration

Hello everyone, I am starting to do my hands on ELK stack , I am running 5 Eos servers on 5 different AWS regions and I created one new ec-2 instance and installed ELK+ Filebeat on it. Can somebody share any relevant links or guide me how to get the logs of 5 Eos server in the ELK dashboard. I tried couldn't find any good guides!!

https://redd.it/m1t9yi
@r_devops
Any suggestions for "modern" approach on CI/CD?

I've been into the devops role for more than a year and I'm still learning a lot of stuff. So we've been trying to make our testing and CI/CD better and the mandated instructions were to use bamboo (yes, we are on the atlassian suite ecosystem unfortunately) and aws in hosting a bamboo agent for the automation testing purposes. Recently, not sure when or if it is even recent, that amazon upgraded to linux 2 and that made our agents and our whole automation bonkers. I have been trying to fix it for a good amount of days but to no avail and so here I am checking if there are better ways to do this.

In case I haven't explained it correctly, the goal was to have the automated testing be run everytime changes are merged. There are also alot of things involved on that as well such as that the branches shouldn't be merged when the automated tests has failed scenarios etc..

Any responses will be very much appreciated as I have been pulling my hair for days, trying to explain why does a ticket with 3 story points have been in several sprints already.

https://redd.it/m1t5l7
@r_devops
Encryption on FLuentbit and Fluentd

Hello Everyone,

Sorry for the beginner's question, I am new to fluentd and fluent bit. Need some insights from the experts on how can we implement encryption on the logs and how to control the logs storage if any application logs volume is high?

Thanks for looking into this.

https://redd.it/m1snip
@r_devops
What advice do you have when a technical interviewer is asking you what you're working on at your current company?

So I had an interview today and with a team mate from a different company and they were asking very pointed questions on what I was doing. Most likely to gauge my ability to use those tools. (e.g Oh you were using Jenkins? How did you use Jenkins on your project.) But sometimes I almost feel like they are trying to get a handle on how I do a particular solution so they can do it themselves. Am I wrong in thinking this? How should I handle these deep drill downs into my skillsets?

https://redd.it/m2wliv
@r_devops
Platform Engineer looking for Career Advice

Hello everyone!

I was hoping to ask some career advice as I am now starting to ponder about what the next step should be.

Quick intro:

I am 3+ years into my role as a Platform Engineer in the public sector. My duties include the following… build APIs (Ruby on Rails, Serverless/Lambda) as a form of middleware between development teams and our AWS environment develop Infrastructure-as-Code(Terraform/CloudFormation) to help teams provision standardized infrastructure in AWS Migrating applications to AWS via containerization and orchestrating in Kubernetes build CI/CD pipelines to increase velocity and feedback loop for developers

Prior to that, I’ve had 1 year of experience working as a full-stack developer while completing my B.S. in Computer Science

Areas/things I’ve enjoyed:

\- Building CLI tools in Go

\- Containerizing/Orchestrating applications with Docker/K8s

\- Developing small/single-functionality services with Lambda/Serverless

Areas/things I’ve disliked:

\- React

\- JavaScript

\- CSS

Next Steps:

I’ve been pondering the idea of beginning the job hunt. There is no career growth with my current company. No technical track to follow, no chance for future raises, etc. I’m not sure if its a “grass is greener on the other side” situation or not. I figured I would reach out to ask questions to gain some insight :)

Questions:

\- If I enjoy building software/tools/automation for the Cloud, which job titles should I be looking for? DevOps/SRE/Platform Engineer? Are there differences between the 3? I tend to enjoy the development work VS the sysadmin work

\- How is your work/life balance as a DevOps/SRE/Platform Engineer?

\- Are you on-call? How often are you woken up in the middle of the night to troubleshoot an issue?

\- What sort of projects do you work on?

\- What was the interview process like for your current role? Was it algo/ds heavy?

\- Is LeetCode-style interviews prominent with DevOps/SRE/Platform Engineers?

https://redd.it/m2wedx
@r_devops
suggest me open source hosting control panel

I am looking for a cPanel alternative free open-source hosting control panel for my azure VM (Ubuntu Server 18.04 LTS - Gen1). basically, host few WordPress sites and PHP backend sites. I tried vestacp but it didn't load my IP and port after installation.

https://redd.it/m2uypq
@r_devops