Reddit DevOps
270 subscribers
5 photos
31K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
How do you configure an nginx server block without an "index.html"? Is that possible?

I have this code running on DigitalOcean VM right now as a backend.

https://github.com/u/netflix-clone-back

I'm trying to configure an Nginx server block with it but I don't have an "index.html" file to use.

I used this package pm2 to keep it running perpetually as a process with the command "pm2 index.js".

And due to the fact it's just a node and ExpressJS app, I don't have a "npm build" option in the "package.json" to get a build folder with an "index.html" to use in the server block.

My question is, how do I run the equivalent to "npm build" here?

And if I do get a build folder, will I still be able to run "pm2 index.html" to keep it perpetually running as a process in the VM? Will I even need pm2? Or will Nginx keep it running perpetually itself?

https://redd.it/z30xl3
@r_devops
set up and tear down eks nodes to run integration tests

I'm looking for suggestions on optimizing resources when running tests in an EKS environment. We have difrerent accounts/environments for dev, staging, test and prod deployed with terraform on AWS. They have the same architecture/resources but we want to reduce costs and I am wondering if someone has experience on provisioning eks nodes on demand. The idea is to reduce the eks workers node to cero and when someone wants to run tests just provision a worker node, deploy the pods/resources and when the tests are over just tear down the compute node again. We use CircleCI right now as our CI/CD....so wanted to ask if do you see any drawbacks/disvantages on this plan? Someone is doing something similar? Thanks in advance

https://redd.it/z35acn
@r_devops
How to manage your dotfiles with git

https://fwuensche.medium.com/how-to-manage-your-dotfiles-with-git-f7aeed8adf8b

It's been a while that I wrote this post, but I've just got a new computer and the post was still surprisingly relevant. I'm sharing it here in the hope that it's also useful to others 🤗

https://redd.it/z363nm
@r_devops
What's a good way to design this?

I once wrote a script which would check an AWS S3 bucket for the existence of an object, and if it existed it would run a script locally on my laptop. Like a sort of automated task which I could trigger remotely by placing an object in an S3 bucket. However it turned out that sending an API call every 30 seconds cost quite a bit considering its literally doing nothing most of the time.

Now that we have things like AWS event bridge (which didn exist when i wrote this years ago). Is there a nice way of accomplishing this? I'm curious how other people would go about it.

https://redd.it/z2mowl
@r_devops
DevOps/Cloud engineer reporting to a Developer?

I recently joined a company that implements a different kind of setup for teams. For example, one team has backend developers, QA's, Product manager, frontend/mobile devs and one dedicated cloud/devops engineer, about 10-12 people per team. The lead of this team is a developer, so I'm reporting to a developer who has no idea what I do as a Cloud Engineer, they basically just throw requests at me to build and deploy (quite frankly the same damn thing thay just differ in service names).

My question to the community is: is this a normal setup nowadays?

I'm having a hard time adjusting to it because I feel like it's a relegation from what I do then (leans more towards infrastructure design and build, CI/CD, cloud solutions architecture, etc) and now (developer support quite frankly).

Adding fuel to the fire is that my feedback from the team is usually just stuff that patronizes me. No concrete feedback on the technical stuff (is my output any good or how can I improve this skill, stuff like that).

https://redd.it/z38epb
@r_devops
Imagine you could have a secret manager with any functionality at all. What would you want in it?

Hi everyone!

We're building a new open-source secret manager (https://github.com/Infisical/infisical) that's modern and easy to use. We're still super early but wanted to get your thoughts on what the ideal secret manager experience should look like if you could rebuild one from scratch — Imagine anything is possible.

https://redd.it/z39ij4
@r_devops
How can I recruit for devops skills when I don't have those skills myself?

So we need a person with some devops expertise to come in and tell us how we should be doing things. We know the way we are currently doing things (various cobbled together scripts and manually set up ec2 instances and cloud resources) is not right/sustainable/scalable, and we know what some of the approaches we should be looking at are.

I'm a Python web application developer and I know how to interview for people with my skill-set because I can weed out the BS merchants in a conversation by asking them questions I know the answer to, and I can look at their approach to a simple programming task and see if it is good or now based on my own experience

However I don't really have any developed skills in any of the technologies we need in devops: IAC, orchestration etc. I don;t know when I ask a question if the person knows what they are talking about or if they have just read a dozen blogs with buzzwords in. I don't know what task I can set that is big enough for me to have an idea if they know what they are doing, but not so big it is taking the mick to ask the candidates to do in their own time. We've tried taking a punt on people before and been burnt

So any tips on what I should do to be sure we only hire someone with the right skill-set?

https://redd.it/z2sht8
@r_devops
DR/BCP with another region in AWS

I wanted to know what would be the most ideal DR/BCP plan. Cloudflare is our authoritative DNS. So should we like replicate the whole infrastructure and add DNS entry of that Load balancer on Cloudflare with the same domain name in another AWS region? Want to know best industry practices in this.

https://redd.it/z2mavy
@r_devops
How do I implement a HA PostgreSQL setup in k8s/k3s ?

I am trying to setup HA PostgreSQL in k3s on a bare metal VM.
I think this tool https://github.com/zalando/postgres-operator is relevant to what I'm trying to achieve, but I have absolutely no idea how to go ahead with this. Can someone pls point me to a tutorial of some sort that can act as a starting point? I just read about the CAP theorem and I dont have much idea about distributed databases.

Thanks!

https://redd.it/z3cs98
@r_devops
Getting better with operations / oncall

I want learn how to get better with oncall, specifically with knowing where to look, what things to look for, what actions to take and so on. Are there any resources / books or anything that I can take a look at to get better at ops?

https://redd.it/z3ehbo
@r_devops
(Noob) Question - Proxy request to vendor requiring static IP

I have some serverless functions running that need to retrieve data from a vendor that requires us to whitelist an IP. The functions are all using public IP addresses. I believe I should be able to create a small server that has a static IP address and then send my requests to that, which then redirects the request w/ all it's data to the vendor but now has the static IP from the server, then when it gets the response, it just sends it back to my function app.

I've tried googling for how to implement this but I think I am missing some key search terms to find what I need. I know this is possible but haven't yet found instructions that show me how to accomplish this.

My concern is that generally the origin's IP persists through redirects, so it seems like it should not be as simple as just redirecting the request. I'm wondering if I would need to do something like

1. Create NGINX server on my small static IP server
2. create small app that takes input data and does a POST request to the Vendor
3. return vendor response to my serverless function

Would this work? Is there a better way?

https://redd.it/z3ex33
@r_devops
Fast-Ansible: Ansible Tutorial, Sample Usage Scenarios (Howto: Hands-on LAB)

I want to share the Ansible tutorial, cheat sheet, and usage scenarios that I created as a notebook for myself. I know that Ansible is a detailed topic to learn in a short term, so I gathered useful information and create sample general usage scenarios of Ansible.

This repo covers Ansible with HowTo: Hands-on LABs (using Multipass: Ubuntu Lightweight VMs): Ad-Hoc Commands, Modules, Playbooks, Tags, Managing Files and Servers, Users, Roles, Handlers, Host Variables, Templates, and many details. Possible usage scenarios are aimed to update over time.

Tutorial Link: **https://github.com/omerbsezer/Fast-Ansible**

Extra Kubernetes-Tutorial Link: **https://github.com/omerbsezer/Fast-Kubernetes**

Extra Docker-Tutorial Link: **https://github.com/omerbsezer/Fast-Docker**

Quick Look (HowTo): Scenarios - Hands-on LABs

[LAB: Multipass-SSH Configuration (Create Ansible Test Environment)](https://github.com/omerbsezer/Fast-Ansible/blob/main/Multipass-SSH-Configuration.md)
LAB: Install Ansible and Test Basic Ansible (Ad-Hoc) Commands
[LAB: Implement First Playbook](https://github.com/omerbsezer/Fast-Ansible/blob/main/Implement-First-Playbook.md)
LAB: Playing Docker Module
[LAB: Important (Mostly Possible Used) Modules Sample Tasks](https://github.com/omerbsezer/Fast-Ansible/blob/main/Important-Modules-Sample-Tasks.md)
LAB: Refactoring / Improving Playbook
[LAB: Targeting Specific Nodes (Grouping)](https://github.com/omerbsezer/Fast-Ansible/blob/main/Targeting-Specific-Node.md)
LAB: Adding Tags
[LAB: Managing Files](https://github.com/omerbsezer/Fast-Ansible/blob/main/Managing-Files.md)
LAB: Managing Services
[LAB: Adding Users](https://github.com/omerbsezer/Fast-Ansible/blob/main/Adding-User.md)
LAB: Roles
[LAB: Host Variables](https://github.com/omerbsezer/Fast-Ansible/blob/main/Host-Variables.md)
LAB: Handlers
[LAB: Templates](https://github.com/omerbsezer/Fast-Ansible/blob/main/Templates.md)

Table of Contents

Motivation
[What is Ansible?](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#whatIsAnsible)
How Ansible Works?
[Creating LAB Environment](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#labEnvironment)
Ansible Basic (Ad-Hoc) Commands
[Ansible Modules](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#modules)
Ansible Playbooks
[Inventory File - Targeting Specific Nodes](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#inventory)
Tags
[Managing Files](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#files)
Managing Services
[Adding Users](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#users)
Roles
[Host Variables](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#hostvariables)
Fast-Ansible: Ansible Tutorial, Sample Usage Scenarios (Howto: Hands-on LAB)

I want to share the Ansible tutorial, cheat sheet, and usage scenarios that I created as a notebook for myself. I know that Ansible is a detailed topic to learn in a short term, so I gathered useful information and create sample general usage scenarios of Ansible.

This repo covers Ansible with HowTo: Hands-on LABs (using Multipass: Ubuntu Lightweight VMs): Ad-Hoc Commands, Modules, Playbooks, Tags, Managing Files and Servers, Users, Roles, Handlers, Host Variables, Templates, and many details. Possible usage scenarios are aimed to update over time.

**Tutorial Link:** [**https://github.com/omerbsezer/Fast-Ansible**](https://github.com/omerbsezer/Fast-Ansible)

**Extra Kubernetes-Tutorial Link:** [**https://github.com/omerbsezer/Fast-Kubernetes**](https://github.com/omerbsezer/Fast-Kubernetes)

**Extra Docker-Tutorial Link:** [**https://github.com/omerbsezer/Fast-Docker**](https://github.com/omerbsezer/Fast-Docker)

Quick Look (HowTo): Scenarios - Hands-on LABs

* [LAB: Multipass-SSH Configuration (Create Ansible Test Environment)](https://github.com/omerbsezer/Fast-Ansible/blob/main/Multipass-SSH-Configuration.md)
* [LAB: Install Ansible and Test Basic Ansible (Ad-Hoc) Commands](https://github.com/omerbsezer/Fast-Ansible/blob/main/Install-Ansible-Basic-Commands.md)
* [LAB: Implement First Playbook](https://github.com/omerbsezer/Fast-Ansible/blob/main/Implement-First-Playbook.md)
* [LAB: Playing Docker Module](https://github.com/omerbsezer/Fast-Ansible/blob/main/Docker-Module.md)
* [LAB: Important (Mostly Possible Used) Modules Sample Tasks](https://github.com/omerbsezer/Fast-Ansible/blob/main/Important-Modules-Sample-Tasks.md)
* [LAB: Refactoring / Improving Playbook](https://github.com/omerbsezer/Fast-Ansible/blob/main/Refactoring-Playbook.md)
* [LAB: Targeting Specific Nodes (Grouping)](https://github.com/omerbsezer/Fast-Ansible/blob/main/Targeting-Specific-Node.md)
* [LAB: Adding Tags](https://github.com/omerbsezer/Fast-Ansible/blob/main/Tags.md)
* [LAB: Managing Files](https://github.com/omerbsezer/Fast-Ansible/blob/main/Managing-Files.md)
* [LAB: Managing Services](https://github.com/omerbsezer/Fast-Ansible/blob/main/Managing-Services.md)
* [LAB: Adding Users](https://github.com/omerbsezer/Fast-Ansible/blob/main/Adding-User.md)
* [LAB: Roles](https://github.com/omerbsezer/Fast-Ansible/blob/main/Roles.md)
* [LAB: Host Variables](https://github.com/omerbsezer/Fast-Ansible/blob/main/Host-Variables.md)
* [LAB: Handlers](https://github.com/omerbsezer/Fast-Ansible/blob/main/Handlers.md)
* [LAB: Templates](https://github.com/omerbsezer/Fast-Ansible/blob/main/Templates.md)

Table of Contents

* [Motivation](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#motivation)
* [What is Ansible?](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#whatIsAnsible)
* [How Ansible Works?](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#howAnsibleWorks)
* [Creating LAB Environment](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#labEnvironment)
* [Ansible Basic (Ad-Hoc) Commands](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#commands)
* [Ansible Modules](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#modules)
* [Ansible Playbooks](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#playbooks)
* [Inventory File - Targeting Specific Nodes](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#inventory)
* [Tags](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#tags)
* [Managing Files](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#files)
* [Managing Services](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#services)
* [Adding Users](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#users)
* [Roles](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#roles)
* [Host Variables](https://github.com/omerbsezer/Fast-Ansible/blob/main/README.md#hostvariables)
*
AWS or Azure for next decade??

I want to know which will be Azure or AWS rule the market in coning decade. Which one is easier to learn?
What will be the criteria of selecting in your project?

https://redd.it/z3il80
@r_devops
How to do HTTP access from outside to EC2 that in private subnet of a VPC?

I have app running on EC2 which is in private subnet. I have mapped private subnet to NAT gateway which resides in public subnet with internet gateway. My question is how can I do http access to that private subnet? Currently I can not access from outside world. I have also allowed http port in EC2 security group.

https://redd.it/z3iyzw
@r_devops
Azure - Copy files over SSH to old AIX box

Hey,

I'm trying to copy some scripts to a remote AIX box using an Azure pipeline. The scripts are in an Azure report. The official Microsoft "Copy files over SSH" task fails because the underlying dependencies do not allow the relevant key exchange algorithm as present on the box. I've gone to Microsoft support about this and while they were quite helpful, this isn't gonna change.


Ideally we'd just update the box - and therefore the OpenSSH version - but this isn't up to me and doesn't look likely.


I'm trying to figure out a way of using Plink to copy the files to the box. I can get plink to talk to the server and run various commands but can't figure out a way of copying the files from the Azure repo to the server using this method.


Any suggestions would be welcome.
Thanks

https://redd.it/z3l2xd
@r_devops
What is the best way to integrate the bind9 service on ci/cd?

Hi, it often happens that due to new services or the removal or change of services, I have to manually change the entries in the zone file of the bind9 service.

we use the GitLab-CE system for CI/CD, as you probably know, A - records in the DNS are changed by a simple change in the zone file, in this regard, I wanted to know how to properly splice the GitLab + bind9 file zone so that users themselves change the necessary entries if necessary.

https://redd.it/z3jteg
@r_devops
KOPS vs EKS

As someone who is starting learning kubernetes, which one would you recommend to use.

I would say kops since you can see the master node. But at the same time I think EKS would be easier since you mainly take care and interact only with the worker nodes.

Let me know your thoughts.

https://redd.it/z3igx0
@r_devops
Odigos V0.1.35 - Distributed Tracing and more. New features and destinations

We just released Odigos v0.1.35 with exciting new features:

Prometheus users: Based on our distributed tracing, Odigos can now automatically generates metrics for any open-source library in use
Honeycomb users: Odigos now supports metrics and logs in addition to distributed traces

Odigos supports several managed and open-source destinations and we are constantly adding more backends.

Using one of the destinations we support? Make sure to update and install the latest version of Odigos to get the most accurate data and resolve production issues faster 🎯 🚀 💡

https://github.com/keyval-dev/odigos

Check out our supported destinations: https://github.com/keyval-dev/odigos/blob/main/DESTINATIONS.md

https://redd.it/z3hbh9
@r_devops