Reddit DevOps
269 subscribers
4 photos
31K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
What are the key skills of DevOps?

Hi, Developer trying to learn a bit of Devopsy stuff to make my job less painful. I'm not trying to become a DevOps professional, Or be a great or even good DevOps engineer. I just want to learn basics for personal use. Not being confused by server things, build tools ect and basic computer skills.

My question is, If you could only keep like 20% of your knowledge, What would it be? What should I focus on?

https://redd.it/lueijd
@r_devops
Prometheus/Alertmanager/Kube-state-metrics

Hello guys, I am kind of new with Prometheus monitoring and I really need some help with slack alerts, I am a complete beginner when it comes to golang and metrics.

I have Prometheus deployed in my kubernetes cluster and alertmanager that is supposed to send slack notifications, everything runs great but i am having trouble getting my node name in that slack alerts.

Kube-state-metrics are colleting info that I need, like kubernetes_node_info and that metrics contain node names that I would like to use in my slack alerts.

I am able to get node names in kube-state-metrics alerts, like this one

- alert: KubernetesNodeReady
expr: kubenodestatuscondition{condition="Ready",status="true"} == 0
for: 5m
labels:
severity: critical
annotations:
description: 'Node {{ $labels.node }} has been unready for a long time\n VALUE = {{ $value }}\n LABELS: {{ $labels }}'
summary: 'Kubernetes Node ready (instance {{ $labels.instance }})

But what I would like to accomplish is to get that node name for every alert that I have configured, is that possible? I would be more than grateful with any help or at least if you could point me in the right direction?

Also, this is my alertmanager.yml


alertmanager.yml:
route:
group
by: alertname, job, group, app
receiver: slack

receivers:
- name: slack
slackconfigs:
- api
url: 'https://hooks.slack.com/services/xxxxxxx'
channel: '#channel'
sendresolved: true
title: |-
[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }} for {{ .CommonLabels.job }}
{{- if gt (len .CommonLabels) (len .GroupLabels) -}}
{{" "}}(
{{- with .CommonLabels.Remove .GroupLabels.Names }}
{{- range $index, $label := .SortedPairs -}}
{{ if $index }}, {{ end }}
{{- $label.Name }}="{{ $label.Value -}}"
{{- end }}
{{- end -}}
)
{{- end }}
text: >-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Description:* {{ .Annotations.description }}
*Graph:* <{{ .GeneratorURL }}|:chart
withupwardstrend:> Runbook: <{{ .Annotations.runbook }}|:spiralnotepad:>
Details:
{{ range .Labels.SortedPairs }} • {{ .Name }}: {{ .Value }}
{{ end }}
{{ end }}


Thank you!

https://redd.it/lvccoe
@r_devops
Monthly 'Getting into DevOps' thread - 2021/03

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 - 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 - 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 - 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 - 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 - 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 - 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/la7j8w/monthlygettingintodevopsthread202102/

https://www.reddit.com/r/devops/comments/koijyu/monthlygettingintodevopsthread202101/

https://www.reddit.com/r/devops/comments/k4v7s0/monthlygettingintodevopsthread202012/

https://www.reddit.com/r/devops/comments/jmdce9/monthlygettingintodevopsthread202011/

https://www.reddit.com/r/devops/comments/j3i2p5/monthlygettingintodevopsthread202010/

https://www.reddit.com/r/devops/comments/ikf91l/monthlygettingintodevopsthread202009/

https://www.reddit.com/r/devops/comments/i1n8rz/monthlygettingintodevopsthread202008/

https://www.reddit.com/r/devops/comments/hjehb7/monthlygettingintodevopsthread202007/

https://www.reddit.com/r/devops/comments/gulrm9/monthlygettingintodevopsthread202006/

https://www.reddit.com/r/devops/comments/gbkqz9/monthlygettingintodevopsthread202005/

https://www.reddit.com/r/devops/comments/ft2fqb/monthlygettingintodevopsthread202004/

https://www.reddit.com/r/devops/comments/fc6ezw/monthlygettingintodevopsthread202003/


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

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

https://redd.it/lvet1r
@r_devops
Streamline setting up local dev env with docker?

We plan on growing our development team by 2-3x over the next year.

In order to minimize onboarding time, we have been considering if we can someone containerize a local development environment so all new devs can easily work in the same environment, and minimize time needed for set up.

For context, we’re primarily a Java shop.

Any thoughts, suggestions, best practices would be appreciated. Have done some research online but haven’t found anything them feels definitive yet.

Thanks!

https://redd.it/lvg7q3
@r_devops
Best resources/tutorials for setting up basic CI for personal full stack web app

Hi, devops.

I'm a student trying to learn about continuous integration by setting up a basic CI pipeline for a web app. The app uses Python's Flask framework for the back end and React for the front end. I've been trying to use Travis CI.

I've had a lot of questions while trying to write the .travis.yml file to install the front end and back end and then run tests for each. For example, I'm not sure if I should create separate git branches (each with their own yml file) for the Flask app and React app, or if I should use a single yml file that somehow directs the Travis VM to call the installation and testing scripts in the front end and back end subdirectories.

I've been surprised by how few tutorials I've found for setting up a basic CI workflow for a project like this with some unit tests and maybe some tests that test the front and back ends together. I'm definitely a noob with devops though, so I might be asking the wrong questions.

Are there any tutorials or resources you would suggest for learning how to set up a basic CI pipeline for a simple personal project like this?

https://redd.it/lvmtol
@r_devops
MTV Cribs for DevOps

I work at a small company and I'm a junior engineer. I'm getting into DevOps but neither of my coworkers are really equipped to teach me about it. I've been reading lots of articles, but most are either about how to use specific technologies or about very general concepts like CI/CD. I want something between those two: specific enough to be practically useful, but general enough that the whole DevOps infrastructure is described. I'd love to learn how those that know more than me are doing things by having them show us round their systems and explain their rationales, a bit like how a pen tester will walk you through their exploit. Does this exist anywhere?

https://redd.it/lvmjeu
@r_devops
Jobs hiring trend in 2021

Working from remote would be a new normal?


what do you think or see the trend going to be or happening right now?

https://redd.it/lvl7v6
@r_devops
I'm conducting a market research and I have a conjecture, WDYT?

My conjecture is that due to the scarcity of DevOps engineers (from various reasons), or the fact that many times infrastructure and deployment mechanisms are designed and created by software developers without DevOps expertise, many companies suffer from rickety cloud infrastructures and deploy mechanisms which are not robust, not secure and not made by best practices.

How wrong do you think I am?

https://redd.it/lvjzpu
@r_devops
Devops training help needed

Hello all.

I have taken the initiative to deliver sort of an internal training/seminar on the devops culture. There aren't going to be any tools specifics (maybe mentions here and there), but the intention is to help the company understand what devops is and isn't, and set the foundations for next projects to come.

At least 80% of the company are junior to mid developers, so I see this opportunity as particularly important.

What are your thoughts on some topics I could go through, and how would you approach them?

If you can think of any games/excercise that could help prove a point they would be very helpful.

Thanks, really appreciate your help, and keep delivering faster!!

Edit: typos

https://redd.it/lvg1ym
@r_devops
Creating Lambda and ECR in the same terraform

Hello devops masters.
We would like to create a lambda function that runs from a container, we would also like to create the ECR at the same time. The problem is that the lambda cannot be created with a non existing image.. (ECR is created first but it is empty) and the lambda cannot be created..

Since it's kind of a new feature I couldn't find any documentations 😔.

We want to manage the build of the code and the pushing to the ECR seperatly from the terraform which is infra only.

Does anyone have a way around that?

resource "awsecrrepository" "arepo" {
name = var.ecr
name
imagetagmutability = "MUTABLE"
}

resource "awslambdafunction" "alambda" {
function
name = "a-lambda"
role = awsiamrole.a-lambda-role.arn
imageuri = "${awsecrrepository.arepo.repositoryurl}:latest"
package
type = "Image"
tags = var.tags

}

Any comment is much appreciated

https://redd.it/lva06o
@r_devops
Best courses to learn Kubernetes, Dockers and Containers from scratch

Hello

I am looking for some suggestions from experts here to help me with the courses to learn the important concepts of DevOps.
I have Linux Academy membership and can also buy courses from Udemy.

Please let me know where to start with.

Thank you

https://redd.it/lvdqij
@r_devops
Infrastructure State Visualisation For Terraform

Hi everybody!

This one is for the Terraformers among you. I’ve always felt the plan/apply output is pretty messy and could be improved upon, so I decided to do something about it. I’m currently working on a little project called Pluralith. We’re essentially talking about an application that visualises your Terraform state and integrates directly with the Terraform CLI.

The application is currently in an early state with a private alpha starting soon. I demoed the application at HashiTalks 2021 some time ago and the reception was overwhelmingly positive. I already posted in r/Terraform a while ago, but since Terraform is a pretty popular devops tool these days I thought I’d share the project in here and collect some more feedback from people all over the devops landscape. The project could take many directions in the future so if you’re not a Terraform user, but have any ideas or questions that involve any other tools in your workflow I’d also very much like to hear about that :)

If you want to get a better feel for the project check out the website **HERE**. If you are interested in being an early tester or simply want to know when the thing is available for download for your OS leave me your email and I’ll make sure to notify you when you can get your hands on it.

I’ve also created a little subreddit for user feedback, discussions, feature requests etc. We are already over 90 people strong so head over there and join r/Pluralith if you are interested in the project!

I’ve also created a little Linkedin page here so if you’re a Linkedin type of person you can find Pluralith **HERE**

As said feedback, questions, comments etc. are very welcome!

Cheers,

Dan

https://redd.it/lvd0bi
@r_devops
MailServer on EC2 Or Kubernetes

Hello,

we're using some external mailserver which have many issues.

so we want to host our own mailserver internally.

We need a mailserver that Have API to create (inbox according to input name), Get Inbox by email name, Api to get email/delete emails by filters (subject)

&#x200B;

&#x200B;

Please recommend on good ones that easy to setup on EC2 instance or on K8S (Existing cluster)

But full guide please.

&#x200B;

Thanks!

https://redd.it/lvbjw9
@r_devops
CVE-2020-28243 SaltStack Minion Local Privilege Escalation stealthcopter stealthcopter Read more posts by this author.

Command injection vulnerability in SaltStack's Salt that allows privilege escalation via specially crafted process names on a minion when the master calls restartcheck.

Affected Versions: All versions between 2016.3.0rc2 and 3002.5
CVSS Score: 7.0 High
https://sec.stealthcopter.com/cve-2020-28243/

https://redd.it/lv4a8h
@r_devops
Last minute UAT issue putting release at risk

Hi all,

New to DevOps and just starting to learn so apologies if this is dumb question...

Recently on a Friday before a weekend release our UAT team found a potential defect. Basically significant delays in messages being received between two components. I was surprised this came up so late.

Performance testing in the NFT environment, which I was told closest to Prod, could not replicate the issue nor in other environments INT etc. It seemed to me an issue with the UAT environment it self, but this Monday I was told the issue had been found, fixed and a new build promoted to UAT.

It just confused me, because it seemed UAT and NFT are not working on the same builds or perhaps not using all components.

We have a "DevOps" team who tame care of deployment and maintain the environments, but the UAT seems a pretty manual affair hence thought I would as here.

Thanks for any thoughts!

https://redd.it/lva9nq
@r_devops
Startup founders looking to create an MVP

Hi,

I thought there might be an interest in learning more about my startup,MVP Nowwhich helps non-tech domain experts build web and mobile apps without developers in just one hour.

Our team is on a mission to help businesses build software at the speed of their thoughts. I am a Lean startup practitioner and technology advisor at several tech cohorts in Atlanta , GA.
MVP Now Studio is an additional service we provide along with our MVP Now no-code tool to help small business and startups with:-Lean startup advisory (We guide startups on best practices and personalized business consulting)-Lead generation (Out-sourced lead generation, part of customer discovery and sales development)-Website and Application Design and wire framing-Development and technical consultingEarly adoptersThe stage of our development currently is BETA testing our products with early adopters. In this case, we have already created a solution for a non-tech domain expert in the environmental science industry to help find qualified volunteers for environmental projects Nova Conservationhttps://www.novaconservation.com/ We helped Nova Conservation to build a web and mobile app MVP in 1 hour without a single line of code. At this stage, our no-code tool is ready to build common applications such as CRM, HR, and other solutions available for external use with different types of users.Our next steps are to add additional features to help create more targeted solutions like social media, e-commerce, finance and other workflows to cover all possible cases for startup ideas. With this goal in mind, we are looking for non-tech founders and startups who can become our early adopters. We greatly appreciate any pre-accelerator members you can refer to us who might be interested in our services. We look forward to hearing more from non-technical startup founders about proposed solutions for their customers. We are happy to offer free feedback and explain how we might be able to create an MVP for your company today. Look forward to learning more from you !

https://redd.it/lv9uq7
@r_devops
Am I basically doing DevOps?

Hi,

I've been a software developer for two years. I originally started at my new company in September of last year, and it's been crazy, with sometimes pulling in 45-50 hours a week. The company specializes in document validation. Almost all of our software is in PHP, some of our older work being in Zend and CodeIgniter, and the newer stuff in Laravel and some Python. We are not a startup, but due to circumstances that caused the company to become very small at one point, I started off with a small team where there were only 2 other developers and the CEO, and now we have added 3 more people and want to add more.

I am always looking to grow, and I see my boss relying on me more and more. He often messages me early in the morning, at night, and on the weekends to make sure we are ready for this demo or something something is up with the database. I find myself doing less code, but I do a lot of the planning for our software, like the pipelines, the message queues, redis, which database to use, writing config scripts and merging and fixing issues, as well as setting up Sentry, CPanel and AWS resources. I would like to dockerize things but that is difficult to do with our current infrastructure. I will often write the Laravel jobs and the routes for functions, but the core programming algorithms in Python, (the functions themselves), which involve searching and sorting through data structures and solving specific tasks, I leave to a teammate who relies on the pipeline to do his work. I also support a frontend guy with his queries to the database and help him solve problems in the debugger. I also write documentation for the databases and how to operate the software. So I do a bit of delegation, and I have quite a high level of responsibility for the role I technically am (formally just software designer, but basically junior developer).

I was wondering if this basically constitutes devops - I know that devops is a broad subject, but I would like to grow in my career and know which direction I am heading so that I can focus on the professional development needed to grow. I am interested in software configuration, though I find it extremely challenging.

The biggest fear I have always is breaking something, or having a security breach take place under my watch. But I find that I am often having to do investigative work, whether it's related to our application's permissions or work that was left behind by a previous developer and trying to figure out what they were trying to do.

If I am in fact doing DevOps work, and my boss is relying on me to essentially be his right-hand guy, I would like to ask for my title to change to DevOps developer (just the title for now, I don't think I've been at the company long enough for a raise), just because I feel the responsibility I'm taking on is getting very large. But if it is not DevOps, I don't want to overstate my qualifications. Part of me wanting to make clear my title is because if my role is more clearly defined, I am able to confidently delegate and do certain procedures that I know I can be sanctioned to do.

https://redd.it/lv8gnq
@r_devops
Getting an "SSH authentication failed" error when creating EC2 instances using Terraform

I am trying to run an Ansible to create an EC2 instance using [this example](https://github.com/startup-systems/terraform-ansible-example).

It is creating the EC2 instance along with the security groups and VPC, however, at some point, I am getting the following error:

>Error: timeout - last error: SSH authentication failed ([email protected]:22): ssh: handshake failed: ssh: unable to authenticate, attempted methods \[none publickey\], no supported methods remain

This is how the log looks like:

aws_instance.web (remote-exec): Connecting to remote host via SSH...
aws_instance.web (remote-exec): Host: 18.212.56.230
aws_instance.web (remote-exec): User: ubuntu
aws_instance.web (remote-exec): Password: false
aws_instance.web (remote-exec): Private key: false
aws_instance.web (remote-exec): Certificate: false
aws_instance.web (remote-exec): SSH Agent: true
aws_instance.web (remote-exec): Checking Host Key: false
aws_instance.web: Still creating... [5m20s elapsed]

Error: timeout - last error: SSH authentication failed ([email protected]:22): ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Does anyone have any idea why it happens and how I can solve it?

Thanks!

https://redd.it/lv5uz6
@r_devops