Reddit DevOps
275 subscribers
69 photos
32.2K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Redis Observability

Greetings!


I'll try to keep this as succinct as possible. Essentially, I'm looking for advice or tooling to help us get more insight and observability into our Redis nodes in AWS. The basic metrics like cache misses, etc are not enough.


We are having an issue with our production redis cluster right now that's causing occasional downtime on our site and we need more insight into the inner workings of what's happening on the node. The problem usually presents itself as a sudden spike in connections on the node. We have flow logs setup to see what's connected to it, but that's it. It's just telling us what we already know, that our API nodes are contacting the redis node. The question is, why is this sudden spike happening?


We are aware of the typical redis commands like CLIENT LIST, but we were hoping for something that didn't require us to be manually on the box WHILE an issue was happening to figure out what's going on.


Thank you!

https://redd.it/ezuk2j
@r_devops
Managing SSH user access to AWS instances across multiple accounts.

Hi guys,

I am curious to hear how others are currently achieving this for your teams and/or users?

I recently worked a on a project where I was required to use SSM for all access to instances and at first I really didn't like it. I can safely say now that I'm absolutely an advocate! Our team is now using SSM where possible and taking advantage of no bastions, using AWS IAM for auth and not needing SSH keys stored locally or on servers.

I thought I'd share this small tool I created recently for anyone interested. It's not a completely new concept but I was more so interested in being able to git-manage and centralise config for our team, making sure we're in sync and up-to-date. Obviously it still requires that you actually keep the configs up-to-date or find a way to automate as you provision new instances. I now simply symlink to our git-managed SSH config.

[GitHub - elpy1/ssh-over-ssm: SSH over AWS SSM.](https://github.com/elpy1/ssh-over-ssm)

Any feedback or suggestions would be greatly appreciated!

https://redd.it/ezskxe
@r_devops
Gandalf: An Intelligent, End-To-End Analytics Service for Safe Deployment in Cloud-Scale Infrastructure

This paper describes a system that uses anomaly detection in deployments (PDF): [https://www.usenix.org/system/files/nsdi20spring\_li\_prepub.pdf](https://www.usenix.org/system/files/nsdi20spring_li_prepub.pdf)

https://redd.it/ezuj03
@r_devops
Looking for a reality check with using Docker

I run the tech side of a small web development shop. We're going through some changes with our hosting infrastructure, so I thought this would be a good opportunity to introduce Docker to the mix. However, I haven't ever used Docker or the like, so even after watching a whole bunch of explainer videos, I'm still not totally clear on the specifics of how it will fit into the puzzle.

All of the websites we host are run off the same environment. They're fairly complex sites that utilize a number of different applications: nginx, php-fpm, mysql, elasticsearch, redis, openoffice, node.

My understanding of Docker is that we can configure these applications to run in containers so that we can potentially deploy a secondary hosting environment, or quickly set up a new developer's local environment to mimic production. But what I don't quite understand is how the site-specific configuration gets into place.

So - we've got the applications running. What about the user accounts that each house their specific website files and under which specific php-fpm pools are run? What about the server monitoring tools that keep the applications running? What about the SSL certificates and cron tasks? Where does Docker end and some other tool begin?

https://redd.it/ezx34r
@r_devops
Gitlab vs many integrated tools?

I'm new to DevOps and am currently training. Is there any benefit to choosing Jenkins plus other tools over a complete offering like Gitlab? My understanding may be a bit off so bare with me haha. But gitlab seems like a nobrainer to my untrained self.

https://redd.it/ezrjy5
@r_devops
PHP not Dynamical rendering Select List

Hi,

I am trying to get this PHP Page working, I am trying to populate a Drop Down list based on the Selection of the First List, The First List is population, but unable to get the Second list populated:

I have one Table called Test with four Columns:

`<?php`
`function load_datacenter()`
`{`
`$servername = "localhost";`
`$username = "dev";`
`$password = "/";`
`$dbname="vsphere";`
`$connect = new mysqli($servername, $username, $password, $dbname);`
`$sql = "Select DISTINCT Datacenter from vsphere.test";`
`$result = mysqli_query($connect, $sql);`
`while($datacenter = mysqli_fetch_array($result))`
    `{`
`echo "<option value= $datacenter[Datacenter]>$datacenter[Datacenter]</option>";`
    `}`   
`}`
`?>`
`<html>`
`<head>`
`<title>`
`</title>`
`</head>`
`<body>`
`<p>Select DataCenter`
`<select name="datacenter" id="datacenter">`
`<option value=" ">Select Data Center</option>`
`<?php echo load_datacenter(); ?>`
`</select></p>`
`<p>Select vCenter`
`<select name="vcenter" id="vcenter">`
`<option value="">Select vCenter</option>`
`</select></p>`
`</body>`
`</html>`
`<script>`
`$(document).ready(function(){`
`$('#datacenter').change(function(){`
`var datacenter = $("#datacenter").val();`
`$.ajax({`
            `url:"fetch_vcenter.php",`
            `type:"post",`
            `data:"datacenter="+datacenter,`
`success:function(data){`
`$('#vcenter').html(data);`
            `}`
        `})`
    `});`
`});`
`</script>`

&#x200B;

The Fetch\_vCenter.php

`<?php`
`$servername = "localhost";`
`$username = "dev";`
`$password = "";`
`$dbname="vsphere";`
`$connect = new mysqli($servername, $username, $password, $dbname);`
`$Datacenter=$_POST["Datacenter"];`
`$sql = "select DISTINCT Vcenter FROM vsphere.test WHERE Datacenter='$Datacenter'";`
`$result = mysqli_query($connect, $sql);`
`while($row = mysqli_fetch_array($result))`
    `{`
`echo"<option value=$row[Vcenter]> $row[Vcenter]</option>";`
    `}`   
`?>`

https://redd.it/ezz80k
@r_devops
Q about Google Cloud Billing Accounts

Using 2 GCP accounts. 1 - org account that has some credit. 2 - a regular. account with a project. Need to modify account(project) 2 so that it uses the billing account of account 1. Cant find anything in the console. Want to keep the ability to have different credentials to login to console.

https://redd.it/ezzfbd
@r_devops
What kind of python scripts used for devops role?

Most of the firm's were looking devops engineer with python scripting knowledge...I would like to know at what scenarios, devops engineer needs to write python scripting..
It would be great, can anyone guide me what are the test cases you were involved in writing python scripting..
Tell me some scenarios...if possible....,

https://redd.it/ezwvr6
@r_devops
Minikube and Kubectl explained for Beginners

In the [1st video "Minikube and Kubectl"](https://youtu.be/E2pP1MOfo3g) I cover the **theory** from:

* What is Minikube?
* What is Kubectl?

To **practice**:

* Setup of a minikube cluster locally

The [2nd video "Basic commands of Kubectl"](https://youtu.be/azuwXALfyRg) is basically a demo, where I'll go through basic commands by showing how to:

* create, edit, delete a pod
* useful debugging commands - e.g. how to get interactive terminal of the container
* apply configuration file

Please check it out and I hope these videos are helpful for some of you. 🤓

https://redd.it/ezvvz9
@r_devops
Confused about a core concept - what am I missing?

Docker allows applications & their dependencies to be bundled up so that they run predictably and reliably in any environment. Sure.

What if the app is a web app? Since the app runs in the browser, the underlying OS/local env doesn't _really_ matter, thus what's the benefit of docker here? In this case, I feel like the browser is the environment, is that right?

Or is the server it's hosted on still the environment?

Clearly, I have no true understanding of docker and I'm clearly missing something, but really want to understand. My question probably makes no sense, but if anybody could help fill my knowledge gap I would be extremely grateful.

https://redd.it/f03h6w
@r_devops
Is testing part of a build process, or should they be seen as completely separate steps?

Disclaimer: All binaries should be fully tested before letting them touch production side. Period. This is something is fully believe in and won't deviate from.

There's basically 2 views on this:

1\. **Yes, the testing is part of the build.**

When you push something to your branch, this branch should be build and tested fully. This means the developer will have to wait for the entire process(includes unit testing and integration testing) to complete. The mindset here is that an untested binary is not a valid output and should not exist.

2\. **No, the testing is a separate**

Same thing as above, but if you push something to a branch ci/cd picks up your new changes and builds your code. This binary/output is then stored somewhere as an untested blob. *Then depending on your configuration*[1], you can run another job to test the output. This test job then does whatever the other method of working does and stores/deploys the tested output.

-----------------
My opinion:

Personally I'm in the mindset of the latter because it decouples the build from the testing, giving you the benefit of [1]. Not every branch needs to be tested on every push. I want to push and get results asap. I don't want to wait. The former mindset makes no sense to me since it just sounds like "tests are mandatory so every build should be tested", but that doesn't mean you should implement it on a technical level like that.

I'm curious about opinions from this sub.

https://redd.it/ezwztw
@r_devops
Is a devops job a good move for me?

I am looking for new jobs and I am currently fullstack developer (technically lead architect) for the startup I work at. I do a lot of devops in my current role and am about to sit the AWS CSAA exam and I do enjoy this aspect of my work. I am interviewing for a Head of Devops role at a challenger bank which I think I have a good shot at but this would likely not include any application development.

I would like my future roles to be things like Head/VP of Engineering do you think this is a good career move?

https://redd.it/eztr4s
@r_devops
Where to start ?

i'm pursuing my career towards cybersecurity and i don't know much about devops i thought it would helpful if i add devops to it but i don't know where to start so can you guys help me by giving good information

https://redd.it/ezswxz
@r_devops
Is there a way to hit a particular pod for a request.

So i have a kube cluster deployed for a service which runs around 50 pods. A few of them having been going out of memory and I am pretty sure there is memory leak in my application. I have written an endpoint in my application which takes the heap dump and then uploads it on s3. I want to take this heap dump on a long running pod so i can debug the mem leak. Is there way i can hit a particular pod using postman by passing in some selectors?

https://redd.it/ezsp4n
@r_devops
Application monitoring tool

I am looking for an Application monitoring, health check, and service map dashboard tool for node js and java based applications. I host applications in AWS EC2 servers.

Could you please tell me which is the most popular tool for this purpose?

Which tool can help ?

https://redd.it/ezs73j
@r_devops
[DevSecOps] Stick to CentOS 7.x for DevSec Linux Baseline or attempt to adapt it to CentOS 8.x?

I'm using https://github.com/dev-sec/linux-baseline to create hardened image basic templates. However, the repo hasn't been updated to support the newer distributions yet, and I need to stick to CentOS for a specific project.

In terms of best practices, should I stick to CentOS 7.x as a known safe default, or or try to lift up the DevSec Linux Baseline to support CentOS 8.x instead, without really knowing what I'm doing?

https://redd.it/ezq838
@r_devops
Build a Serverless appliance with cloud-init and faasd

Have you heard of faasd, [the new provider](https://docs.openfaas.com/architecture/faas-provider/) for OpenFaaS? It's just like OpenFaaS on Kubernetes, the same API, same UI, CLI and ecosystem, but without the complexity and stress of running a scale-out distributed system.

In this short tutorial I'll show you how to leverage cloud-init, a standard way to install packages and to configure cloud hosts to get a faasd host in less than 5 minutes flat. Or your money back.

[https://blog.alexellis.io/deploy-serverless-faasd-with-cloud-init/](https://blog.alexellis.io/deploy-serverless-faasd-with-cloud-init/)

If you're avoiding Kubernetes, or keen to use the right tool for the right job, would you use this? What would you like to see in terms of documentation and literature around it? If you try out the tutorial, please let me know what you think.

https://redd.it/ezpybt
@r_devops