Reddit DevOps
267 subscribers
30.9K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Invalidating a web resource where cached resource's expire date isn't expired yet

Let's say the resource that was cached by a client web browser has an eTag and has an expire date of June 30, 2021. My assumption is that every time the browser visits this page again, it will grab it from its local cache or copy. How can we tell the browser that a new version of the resource has been uploaded and that his local copy isn't stale yet? We can't tell everyone that new resource has been uploaded. What is also the behavior when this resource is being served by Nginx?

For sure, we can delete our local cache but some visitors doesn't really know how to do that.

https://redd.it/ksk5lz
@r_devops
Seeking Career Advice

Hey everyone,

Hope you’ve all been in good health!

I was hoping you guys could give your opinions on my situation and I’ll try to be brief.

I’m a DevOps contractor operating in Toronto with 2 years of experience. I’m charging $40/hr +HST in my current contract, and the client expressed interest in hiring me full-time when my contract ends. There was a brief mention of compensation which was much lower than what I currently charge “because benefits”.

Now obviously I’m unhappy about that, but it’s not time to discuss compensation yet and I’m sure they’re open to listening; I like them and they like me. But I live in Canada and health care isn’t an issue so benefits is not a big deal for me.

I’m most likely going to ask to remain as a contractor and even try to bump up my rate, but I think I’ll have better luck just finding another contract tbh.

My questions are:
- Am I already charging way too little?
- How does one gauge what to charge?
- Should I choose the contracting life and keep hopping on whoever pays me more till I decide to settle?
- Are you a fulltime or contractor advocate? Why?

I don’t think I should focus on a stable long term job in one place now because I feel like I’ll be missing out on opportunities and experiences. This field is hot and we are in demand. I feel like I should leverage that.

I also have a CKA cert and working on Vault and cloud certs, if that’s relevant in any way.

I ask because I want to know what is realistic to charge as I begin searching for new contracts and negotiate.

Any personal experience stories and advice would be great too. Appreciate yall and Happy New Year!

https://redd.it/kqe6sd
@r_devops
B2B How do you charge for time spent on mailing / calling with customer?

First of all - I have no idea where could I post such a question, but I believe that in devops reddit there are both programmers and ops that work in B2B model, so they may know the pain. Also I cannot think of other place anyway...

Me as an individual who runs a company I always try to do my best when staying in touch with my customers, this mean both the good quality mail responses and extensive phone calls whenever needed. However during the whole month such things can be counted in a big amount of hours (explaining why things works the way they do in mailing, having few 30 minutes calls stacks up, once I had a 2 hour call) which ends with a follow up questions from customer that sounds like "can you check it?", or "cah you test it?". Well, yeah, if you would consider paying me for what you should already know, right?

This is an invisible pile of hours, and I am wondering how other people tells their customer "Hey, I just spend 10 hours on communication with you. Here is the bill"

https://redd.it/kq94xg
@r_devops
Need advice on scaling and containers/K8s.

Hello,I have a VPS running a node/express cluster with pm2 behind nginx serving my APIs. Recently my API has attracted a lot of users and I have many problems scaling.I also have the mongoDB instance running locally.I want to upgrade my architecture.

I have upgraded from $5 VPS to a $40VPS and it has been scaling nicely until now. I'm seeing more and more latency on my requests during peak times.

So the first step was to optimize my code. I did that. That took some time off my routes. Next I want to do these things and I need advice on each of these points:
- Keep mongoDB on a separate $5 instance and make it a private network so that two of my VPS can talk. Should I do this?- Move from express -> fastify.
- I've never used Docker/K8s. I've read about them would like to use them. I use digitalocean as my VPS provider and they offer a k8s auto scaling option. I see no users in the night so I would like the server to scale down during that time to save costs, and then to auto-scale to multiple nodes during peak hours. I've never worked on containers. My current architecture is very monolithic. What changes would I have to do to achieve this or should I do something different altogether.
- Any other advice you would like to offer based on my arch:


My complete architecture:
- Ubuntu
- Nginx
- Mongo
- DBNodejs + Express + Redis + Socket.io

Thanks in advance!

https://redd.it/kq37z0
@r_devops
Pain Points with Docker/Kubernetes?

For those of you using Docker/Kubernetes, how do you feel about it? Any particular pain points or anything you think is missing? I'm thinking about building a devops tool / library, so wanted to see what might be useful for people.

https://redd.it/kq33kd
@r_devops
Who in your organization makes a decision whether to build/buy a new tool?

And how big is your organization? I'm mostly curious to know whether engineers have this purchasing power and what kind of approval process there is for new tools.

https://redd.it/kq1bge
@r_devops
Udemy has a sale right now, any tools you'd recommend an intern learn?

I plan on learning some of the tools I've seen on job descriptions like Jenkins, Maven, AWS etc but the tools are endless and my budget is very limited.




Could you guys recomend what I should learn? Where I should focus my efforts on.

https://redd.it/kpz4jp
@r_devops
Can anyone remember an ineractive browser "game" explaining the CapitalOne Hack?

I have a strong memory of a vendor creating a microsite game that walked you through ~15 steps to replicate the CapitalOne hack (90% confident it was that use case) with a console in the browser window. But I can't seem to re-find it. Does anyone else remember it and have the link?

https://redd.it/ksz4op
@r_devops
GCP Memory Store Alternative

Could someone tell me, whether using GCP's Memorystore for Redis is better or using a Redis Docker Container with a mounted volume could be almost equivalent?

Since the gcp service is really expensive.
I can't seem to justify 35 USD per month for just 1 GB of storage.

I can't seem to fine anything online to help me understand what is the approach I should finalize on.

Any help or guidance would be highly appreciated :)

https://redd.it/kt1mxc
@r_devops
Is there a good APM or cloud monitoring solution for large private clouds?

In other words, is there something like datadog for monitoring cloud and application performance which does not require sending metrics to their cloud?

https://redd.it/kt2hyp
@r_devops
AWS EKS Architecture Discussion

I’ve been tasked with designing our Kubernetes Cluster offering for AWS. The requirement is to use managed EKS clusters. I've worked primarily on GCP and Azure, so while I'm quite familiar with those clouds, AWS is new for me.

I’ve read the AWS EKS documentation front to back as well as many AWS blog posts.

I'm recommending deploying EKS with custom networking enabled so that the pods do not receive IP address on the same subnet as the primary node interface. The benefit of this, as I understand it, are reserving IP space (by using a non RFC1918 IP Address) and being able to set separate security policy for pods. AWS Kubernetes CNI plug-in accomplishes this by utilizing a secondary ENI on the nodes which is deployed in a separate subnet.

We use Kubenet in Azure and I have to document why this is a bad practice in AWS. This is where things start to get fuzzy for me. With kubenet, since kubernetes implements a bridge network the pods cannot communicate with each other without NAT. In Azure this is not such a big deal because the limit on User Defined Routes in the routing table is 400 so you can theoretically have up to a 400 node cluster. In AWS the main VPC route table limit is 50 routes, SO your theoretical cluster limit is 50 nodes.

Whew! Ok with that all said I was wondering if we could get around the 50 node limit by using Custom Route Tables or a Transit Gateway alongside Kubenet Network Plugin?


Also I was wondering if someone could explain to me why CNI with custom networking enable does not require a route per worker node if the node is still NATing the Pods via the secondary interface.


Thanks!

https://redd.it/kt3g88
@r_devops
Alternatives to Terraform for AWS EKS deployments.

First off I am going to say that I'm probably going to use terraform.


I've been tasked with deploying AWS infrastructure to support EKS Cluster Deployments, VPCs, Subnets, etc... I've used terraform in other CSPs and sometimes terraform falls flat keeping up with the CSPs APIs. My co-workers have used powershell and bash to call the APIs directly. I'm not interested in doing that. So whats the next best alternative? AWS CloudSDK with Python? eksctl? aws-cli? CloudFormations (Please no)?


Any suggestions would be appreciated.

https://redd.it/kt3cje
@r_devops
Python exercise tips for SRE interview?

I have the next few rounds of an SRE interview coming up. The position will rely a fair amount on the ability to create tools. My background is largely in linux administration, but I do have \~2 years of python under my belt and \~5 with bash. I am self taught, so I don't have any real official foundational knowledge/concepts. During the first interview, I had to solve a easy/medium difficulty leetcode problem. When I pulled up python, I completely blanked. I even forgot how to write a function! So I panicked and switched to bash. Thankfully I solved it in an appropriate amount of time, they liked my solution and thought I did well enough to move me onto the next interview. In any case, I imagine there will be more tasks like this one. I've been doing problems on leetcode (and struggling), but I am curious, are there any other really good resources or labs/projects I could work on?

https://redd.it/kta899
@r_devops
DevOps Server Admin Letter Satire

I remember a humorous letter written from the perspective of a server administrator who did not like automation or configuration management or something to that effect. Does anyone know what I am talking about? Know where I can find this? Thanks in advance!

https://redd.it/kta7n4
@r_devops
I am looking for some beginner/intermediate GitLab Ci/CD piplenine guides

Hello,

I am currently in hope of transferring to a new DevOps team that is starting from scratch(something like internship which will be performance profiled based on the results).

Based on what I understand the basics are to build up a pipeline that will do the build, make tests, and push to production. But I don't know and can't find any good sources in doing this.

Note: I still haven't checked the pinned books in the subeditor but I think that they are a very good start in my path to DevOps.

Any help will be appreciated, thanks :)

https://redd.it/kt62nj
@r_devops
login to github from terminal

anybody know the git input on terminal kind of lost here cause nothing is saving

https://redd.it/kt9ieo
@r_devops
Question about pull request CI strategy

I'm working in a company where all CI procedures determined by the DevOps team mostly without asking the developers. We have tests covering almost any place of our applications.

About a week ago one of my pull request branches couldn't pass the CI procedure and I realized that the production branch is being merged to my PR branch (feature) before the CI procedures.

There were no CI issues with the master branch. However, when it gets merged to my PR branch it fails at some CI checks. After digging the errors I found that there is a non-standard configuration included in the production branch and it was conflicting with my PR because what I implement was right (following the RFC's and documentation.)

Now it is my branch that is falling. I asked DevOps to not merge the production branch when running the CI procedures because I want my PR branch to be tested in isolation without changes from the production branch.

However, DevOps declined by saying "This is how it works, otherwise we can't guarantee the production branch stability if we don't merge it to PR branch before CI procedures."

While I see the DevOps argument is valid but I still I'm not convinced to have run CI procedures with the production branch merged to the PR branch.

So what is your CI procedure look like in terms of PR branch testing and do you think what our DevOps team is doing legit?

https://redd.it/ktf7r0
@r_devops
Never bend the rules in an effort to prop up a fundamentally flawed system. Instead, follow the rules to the letter in order expose the systemic problems. It's the only way to bring about change.

Just thought I'd toss that one out there, as I am sure some of you are enduring a serious mess right now.

https://redd.it/ktck69
@r_devops
Azure pipeline Variables between tasks

Hey,
Im really struggling with variables between tasks and hope to find some help.

I have one powershell task which parse a yaml file, and extract a variable. This variable im setting like this:
Write-Host("##vsotask.setvariable variable=APPLICATION_NAME;isOutput=true$tempApplicationName")

where $tempApplicationName holds the parsed yaml variable im looking for. I have debugged it to make sure it has value.

In the next task, I have a Kubernetes task, which takes inputs:

- task: Kubernetes@0
condition: succeeded()
displayName: "Waiting for rollout"
inputs:
connectionType: Kubernetes Service Connection
kubernetesServiceEndpoint: ${{parameters.kubernetesServiceEndpoint}}
namespace: ${{parameters.namespace}}
command: rollout
arguments: status deployment/$(APPLICATIONNAME) -n ${{parameters.namespace}}

Resource I been looking at:
https://medium.com/microsoftazure/how-to-pass-variables-in-azure-pipelines-yaml-tasks-5c81c5d31763

${{ variables['APPLICATIONNAME'] }} // which is compile time, so i know it wont work
$(variables'APPLICATION_NAME') // Runtime but never worked either

Any ideas?

https://redd.it/kt246j
@r_devops