Reddit DevOps
270 subscribers
7 photos
31.1K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
A Comprehensive Guide to API Endpoints


Hi hi! Thought this would be helpful for this group and those newer to API development. We have an educational deep dive on API endpoints including 10 Best Practices for designing them, an overview of the types of endpoints, how they work, the future of endpoints, and how to keep them secure. Enjoy!

And do let us know if you find it helpful or if we ought to do one with more advanced API endpoint techniques/if we missed anything major as it relates to endpoints! :)

https://www.getambassador.io/blog/guide-api-endpoints

https://redd.it/1d9lbid
@r_devops
Azure container apps price and alternatives

I have a few microservices that I decided to setup with azure container app. I created one container app that has nginx and this one is public so it can redirect the calls to the right container app depending on the path. I have 2 other container apps, these are private and are the actual services. Why did I do this? Because I want to have a single endpoint to call from the outside.

I now look at the prices and they say that I need to pay depending on number of requests. Which made me worried a little bit as you pay also for bad URLs. I can setup rate limiting in nginx but even this will not solve the problem of someone slowly making calls to bad paths which gets counted anyway towards the bill.

My questions are: any suggestion on how to handle bad http requests? Any other options apart from using azure container apps?

https://redd.it/1d9qoek
@r_devops
How does Russia block VPN services?

I am not sure if this is the right sub, but I didn't find other more appropriate.

I visited Russia yesterday and found out that the most paid VPN services I used - NordVPN, Surfshark are now banned. Both WireGuard and OpenVPN, even manual setup. I used to say that they wouldn't do it, because many businesses depend on private VPNs and it would break too much, but they seem to be doing it successfully. I had my job VPN working without issues the whole time. I was able to find some less known services in GooglePlay, but it was tricky.

Are they just banning IPs or there is something else? What if I set up my own VPN service and use it alone, is there a high chance that it may be banned too?

https://redd.it/1d9rrk8
@r_devops
Bicep or Terraform?

Nothing to do at work right now so I’m studying AZ-104 and going over the different tools used by DevOps and Cloud Engineers.

I’m trying to build as I study and it seems Bicep is easier to pick up. I would prefer to learn with this over Terraform. Besides popularity, is there any other reason to use Terraform over Bicep? Besides limiting myself to jobs that only use Terraform, am I missing out on anything else?

I’m speaking on just the Azure environment right now.

https://redd.it/1d9rcxb
@r_devops
Will using a custom keyboard layout affect me negatively?

Background:
Ok, I am finishing college, so I am looking for a job.
A company that I applied to for a developer role contacted me saying that they could offer me an interview for an entry level devops role, kinda like a trainee if I was interested.

The question:
I use a custom made keyboard layout. If I were to get this role, could my keyboard layout be detrimental to the execution of my job?

I have no idea how is the day to day in an enterprise setup.

I assume that the common thing is to connect remotely to the company servers and get the tasks done there right?

Am I allow to use my own machine?

If they were to provide the hardware to do my job, I will be stuck with wherever software comes with it, right?

If there are problems that could arise from using a custom keyboard layout, could these be mitigated by carrying around a programmable keyboard with my custom layout configured in it?









https://redd.it/1d9t6ob
@r_devops
Converting rich yaml file into a configmap

I am working on a rich yaml file (Not all are key:value pairs) and when I try to convert it into a ConfigMap ( kubectl create configmap --dry-run=client iiui ---from-env-file=my-file.yaml --output yaml | tee somename.yaml), its outputting a really weird configMap output.

How can I achieve converting non key-value paired into a configmap?

https://redd.it/1d9l8jm
@r_devops
Dev testing with trunk based development

I work in a newly built team where we use trunk based development for our microservices - Merges to main trigger the deploys to the dev environment. The problem we are having is the devs are wanting to test their changes by deploying to AWS dev environment before merging to main which i think is creeping into feature based branching strategy.

Any best practices here? Should testing (CI) be improved on the Pull Request step to reduce the need to deploy before merging to main? Or has anyone seen workflows where each dev has their own cloud environment to work on? What else should i consider?



https://redd.it/1da01vm
@r_devops
Suggestions for a new learner

I'm a backend developer with several years of experience across different companies and tech stacks. Recently, I was assigned the DevOps role at my workplace after the previous DevOps engineer left. I've always been curious about DevOps and even asked my team lead for a chance to work in this area. However, I got the role suddenly, with only a month to transition from the previous engineer.

While I've always considered myself good at adapting and learning new skills, this role has been challenging. The previous DevOps engineer was very advanced, and despite his efforts to help me get started, there's a lot to take in. Much of it comes down to learning from experience, and I feel like six months of working alongside him would have been more ideal.

Now, I'm working hard to catch up with all these new responsibilities, but I'm struggling with imposter syndrome because my team has high expectations for me. I could really use some advice on how to manage this transition. Additionally, if you could recommend any tutorials, books, or other resources, that would be great.

For context, we are using AWS, GitHub Actions, Docker, Kubernetes, Terraform, and Rancher. I have a basic understanding of these tools from my recent efforts, but I feel like I lack depth in some areas. Thanks in advance!

https://redd.it/1da36gm
@r_devops
Cloudwatch billing alarm estimated charges/divided by day of month

Hello,


New to cloudwatch and finding it difficult to configure such an alarm that would trigger when EstimatedCharges metric divided by day of month hits a certain threshold. My goal here is to have early warning mechanism that would indicate that I crossed a 'forecasted' monthly threshold rather than have a warning when I actually cross the monthly threshold itself

https://redd.it/1da43h0
@r_devops
Kubernetes in Action vs Kodekloud

Which is the better resource to really understand Kubernetes well and not just pass the CKA exam? I.e. gaining practical knowledge to use on the job.

I'm not sure how to go about learning Kubernetes, so I'm looking for some advice from those of you who tried either (or both) resources.

https://redd.it/1da96bq
@r_devops
What is the "optimal" means of deploying an application like Wordpress between staging and production?

Wordpress is clearly just one instance of a pretty common application structure (files + DB). But it's widely used so I thought I'd use it as an example.

Let's say that you wanted to provision deployment and production environments - both on cloud-hosted (ie, no local development environment).

Some of the options I've seen:

- Staging plugins. These seem to vary in approach but a lot of them seem to overwrite the database every time (I'm guessing that's not a smart idea). One or two try to do it incrementally.

- Git-based deployment workflows. Seem like a better option to me but I'm not sure how database changes are propagated (and even just doing development in something like Wordpress hard to do a lot without making some DB modifications)

... and I'm sure there are others.

Is there one that's considered categorically the best?





https://redd.it/1da9x2w
@r_devops
Phrase I hate - tiger team

I know the phrase originated with nasa but for gods sake I’m a grown man and I don’t want to be on a team that sounds like a children’s show. Also my devops team seems to be devolving into QA-esque nonesense. Anyone seeing that trend?

https://redd.it/1daatmp
@r_devops
Ansible for configuring VM with GPU

Hey,


Writing my first Ansible script for configuring a GPU VM - Anyone here with experience doing this? What are all the tools you guys configure? So far all I've done is provisioned a VM on Azure with SSH access.


There seems to be lots of 'GPU provisioning playbooks' on GitHub, I'm sure someone here might have a workflow they do for each one of these.

This is for a home project!

https://redd.it/1dacy6v
@r_devops
Question: What tools are you using for cloud visualization?

Overall, what tools are you using to visualize your cloud infrastructure and gain insights into what components are connected to other cloud APIs? For example, do you have a good understanding of which services in Kubernetes are talking to other services? How frequently these are occurring? Do you feel like if you had to onboard a new DevOps engineer/Infra engineer you could show them a mapping of your system easily?

https://redd.it/1dabpj6
@r_devops
Escaping DevOps?

TLDR: I'm pidgeonholed into DevOps because of my recent (last 5 years) of work experience. I really want to get back into actually writing software, has anyone successfully escaped and transitioned back?

---

I am so tired of YAML, managing credentials or begging someone else to do things that I can't access, dealing with code just thrown over a wall, etc... My relationship with on-call feels just shy of PTSD. And since when are developers not expected to check that their shipped code works in staging or prod anymore!?

I have 17 years in the industry so I know I can get another job -- the problem is making sure that I find a great one. I'd love to work directly on a game (even if I did DevOps 50% of the time to be valuable) or another role contributing to open source software. My struggle is that my resume wouldn't reflect great as a recent dev and my dev skills need a bit of brushing up as I spent most of my time working with Python. The other issue is that I've always worked remotely; could not afford to move at this point even if I thought I would not be "feral" in an office environment, haha.

Open to ideas, suggestions, or even just hearing others vent :)

https://redd.it/1daehut
@r_devops
Understanding self-hosting a public load balancer for small/early project infrastructure

I'm interested in self-hosting a public load balancer for my infrastructure supporting small/early projects.

I know, I know: It's stupid, I shouldn't do it, I'm insane, stop and use AWS services.

Assume I want to learn the hard way and that's not an option here.

With that said.... I'm curious, generally speaking, what kind of capabilities I'd have, say, self-hosting HAProxy on a t3.small instance (or maybe even a t3.micro)?

AFAICT, HAProxy is wildly performant and can do alot with little. And I'm not doing alot.

As far as average capacity, I'm planning for 'a few hundred' users of an unexciting, JSON-serving mobile application backend. HTTPS, but no WebSockets (yet), file transfers will be routed through S3, nothing complex otherwise.

As far as spike planning, I'll be using pre-configured AMIs for my infrastructure and I'm OK with an autoscaling SLA of 'a few seconds' to horizontally scale up the load balancer, should that ever happen. But I'm not really planning to have spikes and, if they happen, I'm tolerant of some short downtime for horizontal scaling.

As far as ongoing capacity planning, I'd like to be able to have some stats I can keep an eye on and, if the host resources start to saturate, manually horizontally scale as needed (I think CPU/memory/networking probably works for this).

Again, this is for my personal cloud, personal projects. I'm in for the learning.

Is this all a reasonable perspective? Anything I'm missing?

https://redd.it/1dahpk4
@r_devops
Employer seeks my input on the job posting for the position they plan to promote me to.

First off, I'm pretty excited for the potential promotion. I'm a hourly tech support employee at a company that I've worked at for roughly two years. They want me to fill in a configuration management engineer role. I've somehow convinced them that I'm the guy for the job, with zero experience in configuration management.

My technical director sat me down, and requested my input on the job posting for this role. I though this was odd, but am I wrong to assume that they're requesting my input because the know absolutely nothing about the role? All they, and I, know is that they need it. I'm thinking that this could give me some leverage and I need some opinions on how to go about this. I want to be able negotiate a salary (which hasn't been decided upon and is negotiable) and set expectations.

The resume requirements were bare minimum, something I'd expect from the current roll I fill. These include:

1. IT related Bachelors and/or relevant exp.
2. Self-starter
3. Problem-solving skills, communication, documentation skills

The job description excludes skills, knowledge, and expertise in things such as:

* Basics of containerization and the orchestration of containerization
* Basics of YAML/Declartitive configurations 
* Basics of networking including – OSI layers, protocols, IPs, DNS, gateways, routes
* Operating system knowledge (Windows, Linux)
* Terminal proficiency (in Bash or PowerShell )

Would you add all/some of these to benefit the salary? Leave some out to temper their expectations? Let me know your thoughts.

https://redd.it/1dahg76
@r_devops
Best masters degree for DevOps?

Not sure how common it is to pursue a higher level degrees, but if I were, what would everyone suggest?

From what I can tell there has been more emphasis on being able to program at the enterprise application level. So that immediately makes me think a computer science masters.

Would love to hear everyone’s thoughts!

https://redd.it/1daktkb
@r_devops
GitHub Actions Not Capturing Secret

Hi, I've encountered a very frustrating issue when trying to automate deployment using GitHub Actions. It should be pretty simple...build the Blazor site in a release config, install Wrangler, and be on our way, but it's been causing me a great deal of trouble for awhile. Here is the current code I'm using:

name: Deploy to Cloudflare Pages

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'

- name: Publish Blazor app
run: dotnet publish -c Release

- name: Install Wrangler
run: npm install -g wrangler

- name: Deploy to Cloudflare Pages
env:
CLOUDFLAREAPITOKEN: ${{ secrets.CLOUDFLAREAPITOKEN }}
CLOUDFLAREACCOUNTID: ${{ secrets.CLOUDFLAREACCOUNTID }}
run: |
wrangler pages deploy ./bin/Release/net7.0/publish/wwwroot --project-name myproject

However, it fails, saying it's expecting a CLOUDFLARE\
API_TOKEN environment variable. I've tried all kinds of things, but I can't actually seem to access that secret. And of course, I can't log it. I've tried asking a couple of AI assistants, but their guess seems to be as good as mine. If there's something obvious I'm missing, I'd love to hear.

https://redd.it/1dalf36
@r_devops