Reddit DevOps
274 subscribers
64 photos
32K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
What does an ideal team look like?

I was reflecting on some of the companies and their organization structure (whether companies I worked for or from what friends described) and realized I worked in different structures and was curious what you thought was the best one.


I've worked at a company with the traditional dev and ops silos. This obviously was pretty rough.


I've also worked at a company where they had developers on different projects (some might be on multiple) while the ops (made up of devops, sres, and infrastructure engineers) as a service oriented model. This model was 'OK' depending who serviced the Jira task or Service Desk ticket.


My favorite structure was where there was multiple disciplines on the same team responsible for a service. This was where there was one architect, a few software engineers, and a couple site reliability engineers.


As the last one seems to make sense (i.e. accountability), it made me reflect if we had a "healthy" balance between software engineers and site reliability engineers and if this was the norm. This company had their infrastructure in the cloud, which I believe made it easier as the other experience I had was primarily on premise (hence the need for system administrators + network administrators). I'm also curious if any on premise company had something similar to the cloud company I've worked for in the past (SWE + SREs on a single team, thus making the SREs need that networking + system administrator knowledge such as virtualization).

https://redd.it/fjx2e4
@r_devops
How are teams adjusting priorities b/c of COVID-19

My startup, like many others, are now thinking, "how do we survive the next 12 months?" We were planning on building new products but are now thinking of re-architecting our backend for two reasons:

1. get rid of some tech debt we've built up b/c of fast growth
2. save costs

We're on AWS but heavily considering GCP because of their K8 expertise and cost efficiencies.

How are others thinking about priorities given the new COVID-19 world?

https://redd.it/fjve21
@r_devops
(Probably) irrational fear of code theft when hosted in the cloud

Anyone suffer from the (probably stupid) idea that if you host a private repo on some company's server--or use some other company's deployment service--that either one of those companies will steal all your code and ruin you?

It's also not like this code is the Google search algorithm or anything but wondering if I am alone in this. I'll even go so far as to split my repositories so they live on two different hosts with the thought that, "at least all my intellectual property is split up on servers belonging to two different companies so they no one entity can see everything."

I guess it makes me feel better to know I am diversifying but it's also annoying/adds complexity when you have to remember how the GUI of two different hosts/services work when you need to setup or check on things.

It's a tug-of-war between consolidation and simplification and the nagging thought that I ought not put all my eggs in one basket.

https://redd.it/fjr50w
@r_devops
Maniac: Stop wasting time writing docs

Hey everyone!
I'm launching this tool soon and would love some feedback!

[https://trymaniac.com](https://trymaniac.com/)

The idea is to allow developers to run their documentation based on their code. This means:

* Autocomplete suggestions based on the codebase and previous docs
* Code tracking that warns you when documentation looks stale
* Autoupdating where docs will update based on the changed code

Is this something you'd use?

https://redd.it/fkh43i
@r_devops
I can't access my private instance port 80 using my private ip passed to nginx.

error_log /var/log/nginx/error.log;
events {}
http {
server {
listen 443 ssl;
server_name 161.2.60.96;
ssl_certificate /etc/nginx/ssl/cert.crt;
ssl_certificate_key /etc/nginx/ssl/private.key;
location / {
proxy_pass "ip-10-0-159-78.us-gov-west-1.compute.internal:8443/";
}
}
}

Am I not allowed to use a Reverse Proxy to access a private subnet web server?

https://redd.it/fjuddr
@r_devops
Question for r/devops

Would people be interested in contributing articles/tutorials/war stories for a bi-weekly or a monthly newsletter? There seems to be a lot of knowledge here that could be better shared as a newsletter instead of scattered questions and answers.

https://redd.it/fjtqu0
@r_devops
I started working as web systems engineer at top financial firm in US. I want to navigate towards Devops engineer role with AWS cloud later down the road. My current job uses only on-prem and I work on production environment. Is it hard to learn AWS later since I work on only on-prem cloud?



https://redd.it/fkk156
@r_devops
Do not log

> Almost every week I accidentally get into this logging argument. Here’s the problem: people tend to log different things and call it a best-practice. And I am not sure why. When I start discussing this with other people I always end up repeating the exact same ideas over and over again.

> So. Today I want to criticize the whole logging culture and provide a bunch of alternatives.

Link: https://sobolevn.me/2020/03/do-not-log

https://redd.it/fjn28r
@r_devops
Publishing Application Metrics to Azure Monitor Using Micrometer

Observability is the activities that involve measuring, collecting, and analyzing various diagnostics signals from a system. These signals may include metrics, traces, logs, events, profiles and more.

Especially in a DevOps culture, where automation is key in order to stay productive, observability plays an important role.

Micrometer provides a simple facade for the JVM for a number of popular monitoring systems to collect application specific metrics. Currently, it supports the following monitoring systems: Azure Monitor, Netflix Atlas, CloudWatch, Datadog, Dynatrace, New Relic, Prometheus, And many other providers.

In this article, we'll introduce the basic usage of Micrometer with Azure and its integration with Spring boot 2.

[https://dev.to/silviobuss/publishing-application-metrics-to-azure-monitor-using-micrometer-plk](https://dev.to/silviobuss/publishing-application-metrics-to-azure-monitor-using-micrometer-plk)

https://redd.it/fjo3n9
@r_devops
not able to list the s3 policy

`import boto3`

`from botocore.exceptions import ClientError`

`import json`

`import os`

`ACL_RD_WARNING = "The S3 bucket ACL allows public read access."`

`PLCY_RD_WARNING = "The S3 bucket policy allows public read access."`

`ACL_WRT_WARNING = "The S3 bucket ACL allows public write access."`

`PLCY_WRT_WARNING = "The S3 bucket policy allows public write access."`

`RD_COMBO_WARNING = ACL_RD_WARNING + PLCY_RD_WARNING`

`WRT_COMBO_WARNING = ACL_WRT_WARNING + PLCY_WRT_WARNING`

`def policyNotifier(bucketName, s3client):`

`try:`

`bucketPolicy = s3client.get_bucket_policy(Bucket = bucketName)`

`# notify that the bucket policy may need to be reviewed due to security concerns`

`sns = boto3.client('sns')`

`subject = "Potential compliance violation in " + bucketName + " bucket policy"`

`"Potential bucket policy compliance violation. Please review: " + json.dumps(bucketPolicy['Policy']),`

`# send SNS message with warning and bucket policy`

`response = sns.publish(`

`TopicArn = os.environ['TOPIC_ARN'],`

`Subject = subject,`

`Message = message`

`)`

`except ClientError as e:`

`# error caught due to no bucket policy`

`print("No bucket policy found; no alert sent.")`

`def lambda_handler(event, context):`

`# instantiate Amazon S3 client`

`s3 = boto3.client('s3')`

`resource = list(event['detail']['requestParameters']['evaluations'])[0]`

`bucketName = resource['complianceResourceId']`

`complianceFailure = event['detail']['requestParameters']['evaluations'][0]['annotation']`

`if(complianceFailure == ACL_RD_WARNING or complianceFailure == ACL_WRT_WARNING):`

`s3.put_bucket_acl(Bucket = bucketName, ACL = 'private')`

`elif(complianceFailure == PLCY_RD_WARNING or complianceFailure == PLCY_WRT_WARNING):`

`policyNotifier(bucketName, s3)`

`elif(complianceFailure == RD_COMBO_WARNING or complianceFailure == WRT_COMBO_WARNING):`

`s3.put_bucket_acl(Bucket = bucketName, ACL = 'private')`

`policyNotifier(bucketName, s3)`

`return 0 # done`

​

When i test the lambda function getting below error.

​

`Response:`

`{`

`"errorMessage": "'detail'",`

`"errorType": "KeyError",`

`"stackTrace": [`

`[`

`"/var/task/index.py",`

`30,`

`"lambda_handler",`

`"resource = list(event['detail']['requestParameters']['evaluations'])[0]"`

`]`

`]`

`}`

​

`Request ID:`

`"6d5e20e3-652a-4476-9ddb-2c3a396bbc07"`

​

`Function Logs:`

`START RequestId: 6d5e20e3-652a-4476-9ddb-2c3a396bbc07 Version: $LATEST`

`'detail': KeyError`

`Traceback (most recent call last):`

`File "/var/task/index.py", line 30, in lambda_handler`

`resource = list(event['detail']['requestParameters']['evaluations'])[0]`

`KeyError: 'detail'`

​

`END RequestId: 6d5e20e3-652a-4476-9ddb-2c3a396bbc07`

`REPORT RequestId: 6d5e20e3-652a-4476-9ddb-2c3a396bbc07 Duration: 1484.41 ms Billed Duration: 1500 ms Memory Size: 128 MB Max Memory Used: 73 MB Init Duration: 161.87 ms`

​

Can i anyone help me.

Copied the code from

[https://aws.amazon.com/blogs/security/how-to-use-aws-config-to-monitor-for-and-respond-to-amazon-s3-buckets-allowing-public-access/](https://aws.amazon.com/blogs/security/how-to-use-aws-config-to-monitor-for-and-respond-to-amazon-s3-buckets-allowing-public-access/)

​

Thanks.

https://redd.it/fkm5kz
@r_devops
Moving from ProGet to Artifactory or Nexus?

How easy is it to maintain and support Nexus or Artifactory?

I'm looking into getting a different package repository because of new demands from vendors and developers. Our current package repository, ProGet, has a few limitation when it comes to Maven feeds and according to a vendor it's not really suited for docker containers.

So now I'm currently (trying to) setting up Artifactory with ldap integration and multiple local file storages. I've setup multiple applications before, where some tweaking is required, however Artifactory is a different level. This application is both very demanding and vexing, not to mention the learning curve .. there is no curve .. just a wall of ambigious documentation. The documentation is not really clear from my point of view.

There are a myriad of config files on the server which needs to be tweaked. Some settings are in the GUI, but it's really just config files directly stored on the server instead of the database (facinating really ...). What worries me, is how Artifactory will be like to maintain; Are upgrades a nightmare or something that is easy to handle?

In comparison:

TeamCity - config ldap, sql and a few other things and you are pretty much set. The upgrades are done in the web interface.

Bitbucket - lots of settings are set in the web gui, upgrades requires an executable installer

ProGet - inedo hub upgrades for you

https://redd.it/fjldvf
@r_devops
DevSecOps(DevOps Security)- What is your best practice to embed Security into DevOps

In recent years, many software firms are turning towards the use of DevOps Services to build their applications. DevOps has been providing a much faster time for the marketing of the software. It provides a platform for deploying applications in the cloud environment i.e., Cloud DevOps.

There are many companies that provide Cloud DevOps Security consultation. So the vulnerabilities that lie within the software are exposed, which initiates the necessity of a security strategy to be implemented for the application development right from its early stages, and not just at the end to prevent & overcome any of the unanticipated problems.

Now, with the use of DevOps for software development, novel strategies need to be in place to embed security aspects in the development to ensure that the software is not vulnerable to the various attacks by hackers or malicious users. So, the answer that software developers are looking for is DevSecOps.

Here are key best practices for organizations "[Incorporating The 10 Best Security Practices Of The Industry](https://addwebsolution.com/blog/devsecops-incorporating-ten-best-security-practices-industry)".

As a business organization, what is your security practice and what is your take on the DevSecOps?

let's be aware of the change that is taking place in the world of Cloud.

Share your thoughts and insight into the topic.

https://redd.it/fjksqe
@r_devops
Courses for Machine Leaning Devops

Hello,
I want to start learning ML so i can create ML applications to help me and our team with:
- analyzing logs
- prediction maybe of cpu and memory usage
- prediction of next outages

What courses do you recommend that will help me in the future ?

https://redd.it/fji9ab
@r_devops
GKE with nginx ingress vs LB (with SSL)

Hey, we're on GKE and I'm tasked to add SSL routes which probably demands using a certificate. Ideally I would prefer that anything will happen on GCP side so their LB will take care for that, that's less point of failures for me, but most of the articles I find on this matter show how to configure this using nginx ingress. What are your thoughts on this matter?

https://redd.it/fjh03o
@r_devops
What skills are needed to get into a devops role?

Im taking the time to lean new skills and hopefully get into some cloud architecht/sys ops role. Im currently a controls engineer doing robotic programming. Im in the process of getting my AWS solutions architect associate cert and will take the AWS SA Pro following this. I also plan on learning Chef, Docker, and Kubernetes. Is there anything else I should learn or learn instead of these? Any courses that you recommend for learning these (Acloud Guru, Udemy, books)?

https://redd.it/fkowjc
@r_devops
How's everyone doing working from home that normally isn't remote?

My company closed it's doors due to the current pandemic about a week ago. While I've work from home before on several things into evenings or when a kiddo is sick, I've never had to for an extended period of time. Especially with two eight year olds stuck with me, in a small apartment, all day and night as a single parent. It seems my company thinks it's business as usual for everyone.

Is anyone else experiencing this? How are you managing to start productive?

https://redd.it/fkpt4t
@r_devops
You can get my DevOps books free the rest of this month

To help anyone who might find themselves in a situation where they're looking to find a new position either now or in the coming months, I've decided to make both of my DevOps books (Ansible for DevOps and Ansible for Kubernetes) available free for the rest of this month.

If you've ever been interested in Ansible and/or Kubernetes, hopefully this gives you the motivation to finally start learning them. If you can pay something for them, great, but feel no obligation!

See details here: [You can get my DevOps books free the rest of this month](https://www.jeffgeerling.com/blog/2020/you-can-get-my-devops-books-free-rest-month)

https://redd.it/fjdw7g
@r_devops
What is DevSecOps and how to adopt this approach?

To adopt a DevSecOps approach, you will need to focus on 3 axes: people, process and technologies. You will need Security Champions who shift habits. You will also need to modify your existing processes. And finally, you will need to add new tools to your automated pipeline. I have written an article on the [implementation of DevSecOps in companies](https://www.padok.fr/en/blog/devsecops-security). Check it out and let me know if you encountered any other issues.

https://redd.it/fkrfbi
@r_devops
s3 disk usage

Hi, just wanted to ask, if it's normal that i can't see total disk usage of a bucket. We have 100GB quota and when I run 'du' command, it shows little less than 14GB on the bucket.

They replied that we have occupied the whole 100GB and they say something about versioning, which we clearly don't use.

The provider has ceph as backend. I'm using s3cmd utility.

Thanks for help.

https://redd.it/fkrcm2
@r_devops
DevOps defined

This is a marketing piece that points to a lot of HashiCorp products, but I thought the overall look at the different parts of the DevOps pipeline and the explanation of what actually is DevOps was helpful:

[https://www.hashicorp.com/devops-defined](https://www.hashicorp.com/devops-defined)

https://redd.it/fkqrte
@r_devops