Reddit DevOps
270 subscribers
8 photos
31.1K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
My docker app exits abruptly when deployed on local PC but runs fine on remote VM

Howdy guys

So I'm still kinda new to docker.

So I was trying to deploy my node app inside a container with mongodb and mongo express (also inside a container) at once using a docker compose yaml file on my personal computer.

As soon as I run the docker compose, I notice that my node app close almost immediately with an exit code of 1 and sometimes 134 and 139.

So I created an azure vm on cloud with 8gb of RAM and 1TB storage and it ran fine without none of my containers exiting with any error code.

To the point. Could it be cos my laptop does not meet the hardware requirements to run multiple containers and whats the system requirements to run containerized images ?

My laptop spec: 4GB RAM, 500GB HDD corei3 CPU

https://redd.it/n8ms6b
@r_devops
Free learning directory

Hey everyone, throw away account.

I'm starting to curate a directory of some great, free learning materials that range from covering topics like, computer science fundamentals, to devopsy stuff with Ansible etc.

I'll keep updating the repo as I go along, and of course everyone is free to provide their inputs and add materials of their own.

https://github.com/alex067/FreeResourceCenter

https://redd.it/n8w5nf
@r_devops
What is the Devops Career ladder or life after devops?

What are some roles that are natural for a people minded DevOps Engineer to move into, what does the career ladder in this field look like for people who don’t want more of the same?
Excuse me if this turns into a rant as I am very much reaching the burnt-out stage of my career and with my current job. I see a ton of posts about getting into DevOps but I hardly ever see anything about advancing in the field or good roles to move from DevOps to. I have spent the better part of a decade as a “DevOps engineer/enabler” (I know it is not much to some people) and I am actively reaching the end of my rope. It might just be my current job, but beyond the senior title it seems like there is no real advancement to be had unless the rare manager leaves. I have seen countless mentions online about DevOps being a bit of a dead end at a certain point, and this seems to be the truth at my current job.
I have reached the point in my career where I will be happy if I never need to look at a Jenkins file, diagnose why a stack is failing, figure out why iOS builds are not working, or write a single line of code again. The parts I like about the job, bringing people together, breaking down barriers, finding better processes, facilitating and leading cultural change seem few and far between at this point. I have reached out internally and have gotten no feedback, so I am reaching out to this subreddit for advice. What are some roles that are natural for a people minded DevOps Engineer to move into, what does the career ladder in DevOps look like for people who don’t want more of the same?

https://redd.it/n8mqew
@r_devops
Demand for EKS in industry, compared to ECS

DevOps engineer at my work said EKS is a fair learning curve. Not so for ECS. I have a whole suite of AWS services and DevOps practices to learn so I wanted to ask if ECS is quite marketable on its own. Or are most of the industry use cases pushing towards EKS nowadays and it should be prioritized?

https://redd.it/n8bhbm
@r_devops
Can some explain me difference between DevOps and CICD?. I am confused here !

I am hearing DevOps at one side and CICD on the other side, Delivery or deployment. Confused by these terms.

https://redd.it/n8aeix
@r_devops
12-factor app and once-off scripts?

According to 12-factor app, once off scripts should be run in an environment identical to production.

So if you have a script like python backfill_missing_records.py then you should run it in an environment that matches production, i.e., same docker image, same environment variables, etc.

But this is pretty hard to do?

Our production system is docker containers running on ECS fargate. We can have jenkins issue a task that pulls the latest docker container, runs the desired script and then exits, however --

1 - this is slow

2 - feedback cycles are slow (you don't find out if the script had a problem for several minutes)

3 - compared to SSHing into a production machine to run the script, you can't immediately take corrective action if something does go wrong

Up till now we've been maintaining machines in production environments that expose a SSH port and we've been manually going into those machines and running once of scripts as needed. However, these machines aren't guaranteed to stay in parity with production and generally just have a copy of the repository and some of the correct environment variables.

These machines are different from prod (EC2 vs ECS, no docker image, parameter drift, etc). But on the other hand, running these kinds of scripts in a prod-like environment seems pretty inconvenient as well.

How do other teams resolve this?

https://redd.it/n7z34n
@r_devops
To be a devops, do we need to be a peogrammer?

Do I need to know program in order to be a devops?

https://redd.it/n817i9
@r_devops
Failed dream job interview due to 2 questions, would appreciate any answers about these

Hey guys, coming down from a big failure today. So I got into selected for interview in a dream job, not big name but in terms of $$$, worklife balance, culture, etc. So I clear first round it was standard, complete some assignment, all good. Had talk with Devops lead. He asked me 2 questions that I had no answers for and that was it. I mean 2 questions.

So here is how it went,

He: So we want continuous deployment very frequently what is the best way to achieve this?

Me: CICD pipeline using tools like Jenkins, Gitlab, etc.

He: Okay, great. Now say for some reason there is a faulty release, how will you delete and roll it back automatically?

Me: Not sure maybe we can have Prometheus send alert which would trigger a python k8s script for rollback?

He: Not the best way

​

Next one, he asked me something related to helm before

He: So, let me give you a scenario. Our users are growing and we are making application ever better by introducing new tools and more applications, like Redis, python app , etc. What would you do in devops perspective so that adding and maintaining those new applications is as easy as possible?

Me: Create docker image for new component, manifest and helm and then Maybe we can have git repository to store all helm chart ?

He: Are you sure?

Me: Not really

​

We that's it to be honest some questions here and there, I guess either I am kinda dumb, maybe these were easy questions. Anyway I'd appreciate the answers guys. Thank you

https://redd.it/n7qiwt
@r_devops
Podman vs Docker

How many of you are using podman at work in place of Docker? How good it is?

https://redd.it/n7tidm
@r_devops
Host apps on different subdomains on the same ec2 server

Hello everyone,

Let me start by saying, I'm a noob in DevOps. Recently I encountered a situation where I have to host 2 flask apps on two different subdomains, for example, I've to host flask_app_1 on sub1.example.com and flask_app_2 on sub2.example.com. I have an ec2 instance and I own the example.com domain and I'm using Nginx as well. I did some trying before. I tried making a .conf file in the sites-available folder for both of them and linking them, but that didn't work. I'm not sure if I'm doing something wrong in this method or whether I should be doing something else other than this.

I'm pretty sure this is a famous thing that many websites do, but I just can't get it. Can somebody help me to get this problem fixed?

Thank you!

https://redd.it/n90ewe
@r_devops
Developing on Apple M1 Silicon with Virtual Environments

I teach a graduate course on DevOps and Agile Methodologies which is 50% lecture and 50% hands-on. In the hands-on labs, I use Vagrant and VirtualBox to provide consistent development environments for my students. This eliminates the problems with some students having Macs while others have Windows... everyone develops on Linux! 😁

That worked really well until Apple released their new 2020 Macs with Apple M1 Silicon chips based on the ARM architecture which VirtualBox won't run on. My luck, 8 students showed up for the spring semester with Apple M1 Silicon Macs and none of my VirtualBox based labs would work. So I purchased an Apple M1 Mac mini and began looking for a solution.

I just published Developing on Apple M1 Silicon with Virtual Environments to document how I solved this problem and provided a consistent development environment for all students using Vagrant with Docker as a provider.

You can read it here (feedback/questions are welcome): https://johnrofrano.medium.com/developing-on-apple-m1-silicon-with-virtual-environments-4f5f0765fd2f

If you want to try this out on an Apple M1 Mac, you can clone one of my lab reps ion GitHub and bring it up for yourself: https://github.com/nyu-devops/lab-flask-rest.git

(Next article will be how I got this working with Visual Studio Code Remote Containers as well)

https://redd.it/n973sc
@r_devops
Web application support resources

Any resources you can provide so I can get better at supporting web app. Mainly the server side troubleshooting part? I mean I know stuff from working over the years but would like a proper go to resource where I can learn about all the possible scenarios on why a site may go down and best solution to troubleshoot them.

https://redd.it/n97j8q
@r_devops
Issues with TFS agent version on Android Builds?

Hey guys so our dev team at our company started reported android build fails for our android apps. It looks like sometime in the last week (last successful android build was 5/3..however we only have 2 android apps we don't touch daily).

Wondering if anyone has seen this/gotten past this without just upgrading agent versions. I'm just wondering what happened that would force something like this and I hope this info can help others.

​

Required version as of some time in the last week: 2.182.1

Our current agent versions: 2.173

https://redd.it/n96yra
@r_devops
DoorDash Custom Canary Kubernetes Controller

Hey folks, I thought you might be interested in learning how we at DoorDash built a custom Kubernetes Canary controller on top of Argo Rollouts in the linked blog post. Let us know your comments and feedback!
https://doordash.engineering/2021/04/14/gradual-code-releases-using-an-in-house-kubernetes-canary-controller/

https://redd.it/n8zo60
@r_devops
Making the case for a new quality dimension for K8s apps

One of my mentors once said "Don't optimize before it works". I think that we could make a case that cloud native applications do already work. Hence, the next logical step is to think about running our apps with the optimal resource configuration. My team and I make the case that resource efficiency should be a key dimension for cloud native applications and I'd like to invite you to join our discussion next Thursday about best ways to integrate efficiency in our daily work. Find more details here:https://www.stormforge.io/event/crossing-kubernetes-performance-chasm/?utm\_medium=social&utm\_source=Reddit&utm\_campaign=crossingthechasm

https://redd.it/n7r4fb
@r_devops
Ad hoc jobs question

Hello everyone,

I was hoping to ask the experienced DevOps Engineers here for some help with the concept of ad-hoc jobs. I have read that "AWS CodePipeline and GitHub Actions do not cater for ad hoc jobs. AWS CodePipeline needs a trigger, and then runs a static pipeline. GitHub Actions is listening to git events. "

Our team is leaning towards using GitHub Actions and I am trying to determine if GitHub Actions not catering for ad-hoc jobs is something that we should seriously consider. However, I am not sure I understand clearly the concept of ad-hoc jobs. Could someone clarify what these ad-hoc jobs are, and what do they actually do? Is it a big downside that GitHub Actions do not cater for them? Any help will be much appreciated.

https://redd.it/n7q44g
@r_devops
Slack ChatOps for releases

Looking for solutions,

problem:

inherited project, release process is semi manual and cannot be completed without heavy engineer involvement.

​

proposition:

in order to win back time for engineers to refactor the release process into something a little more up to date, we should create a slack chatbot which can be used to send api requests to our build and release automation services.

​

I have done some research and the most accessible solution appears to be errbot.io which supports a sort of ACL which would be perfect for the gated release process our stakeholders require.

The solution needs to be fairly lightweight and written in an accessible language that won't require much up skilling from our engineering team should they need to support it.

I am about to enter the rabbit hole on this topic, I have no idea what the infrastructure will look like yet. Hopefully it can all be run from a lambda on AWS.

​

Any tips, ideas, warnings or references would be greatly appreciated at this point. Keen to hear what you've got for me DevOps!!!

https://redd.it/n7lv7w
@r_devops
New to cloud CI infrastructure (Bitbucket Pipelines in my case). What is the proper way to make a release?

I do traditional desktop software development with slow point releases, e.g. myapp_1.2.1.tar.gz. So no CD, I just build, compress, and upload to the Downloads section of my repo, from where people can manually obtain my release packages. I recently started using Bitbucket.

I already set up Bitbucket Pipelines to launch a build whenever there's a commit. I'd like to start using it to create the actual release package: so manually click something to initiate my intention to make a 1.2.1 release from a commit, compile the app, run tests, update a header file with the string "1.2.1", create the archive myapp_1.2.1.tar.gz, and upload that.

I read the doc and learned how to do these steps but I can't tell how I'm supposed to send the desired version name to this pipeline.

Based on what I read (their doc isn't the best btw), I saw 2 ways:

* pipelines can be triggered based on a pushed git tag. So instead of making a release from the web UI, I could open a git terminal, create and push the git tag "release-1.2.1". This will trigger a pipeline configured to trigger on "release-*" tags. Anything in the pipeline can then extract "1.2.1" from the value of the $BITBUCKET_TAG envvar. This seems very unnatural to me, it inverts the flow I'm used to.

* I could abuse repo variables. Keep an CURRENT_RELEASE_VERSION=1.2.1 variable which I update before making a release. I don't like this because I could forget to update the variable, or click the Run Pipeline button by mistake when I'm not trying to make a release. And because of that silly stuff can happen like overwriting past versions, overwriting git tags, etc. Also, this doesn't communicate the explicit intent of making a release.

It feels like there's a clean 3rd method I'm missing.

Here's a skeleton of the pipeline I had in mind before I started: https://paste.ubuntu.com/p/zmn8ffkkJ6/

https://redd.it/n9k1u8
@r_devops