Reddit DevOps
268 subscribers
2 photos
31K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Looking for API feedback on a TypeScript DSL for dynamic CI config

As I've spent more time on my team's CI pipeline and investigating various CI providers (we've had a lot of trouble with Circle and I'd like to get away from them if possible), I've noticed that most providers/platforms now support dynamically generating the CI pipeline config at the start of the job. It's a [recent addition to Circle](https://circleci.com/blog/introducing-dynamic-config-via-setup-workflows/), but others, like GitLab, have supported it for longer. In Buildkite, it's almost mandatory, since your initial CI config has to be set in the UI -- if you want a pipeline, even a static one, checked into your repo, you have to create a minimal bootstrap config in the UI that clones your repo and manually selects the pipeline file to run.

I see good reasons for this -- YAML + bash isn't the most elegant or expressive combo for big, complex pipelines. I've thought about writing some tooling before, but I didn't like the idea of having to install my preferred scripting language onto every CI node to run scripts. The dynamic config feature has given me a new idea, though: a TypeScript DSL for **generating** pipeline configurations.

The idea is that you'd run a TS script as your CI-generation job, the output of which would be a pipeline config for your platform of choice. Because there's a lot of overlap in the functionality of different CI systems, I think it should be possible to define jobs and steps in a mostly-platform-independent way, then "compile" them to the platform representation. I don't expect to be able to migrate CI providers just by swapping output targets -- I'm sure every project has platform-specific details to work out -- but I do think it could make migration *easier* and reduce lock-in.

[This is an example](https://gist.github.com/davidwallacejackson/a5e4f02115b23d06c7588e9d5ed7535a) of what pipeline definitions look like in the API as I've implemented it so far -- the working library name is `build-gen`. I'm not married to any of the design decisions, of course, or even to actually using this thing. It feels like a good direction to me, but this is why I'm looking for feedback -- I'm wondering if there are good reasons people haven't done things like this before -- or, maybe they have and I haven't found them, or maybe there are just better tools to solve these problems.

And a few stray thoughts on my reasoning:

* Most CI platforms have some abstractions built in for conditional execution, "defined steps" and matrix running -- to me, this seems like a signal that most people will eventually want traditional programming constructs like \`if\`, functions, and loops in their CI pipeline, as it grows.
* I chose TypeScript because it's my favorite language to write in, but this tool or one like it could of course be written in any language. I was actually working on this before the Circle blog post I linked above was released, but I note that they express interest in a TypeScript-based config tool as a possible future development, which feels encouraging.
* Type-checking and documentation comments (in TS or any other "full" programming language) offer some nice ergonomic benefits that apply just as well to CI as they do to anything else.

Anyway! Thank you for reading all of that. Would you use this thing? Does it look interesting to you? How are you handling templating and dynamic configuration in your CI systems right now? Any insight would be very welcome.

https://redd.it/oaqs9r
@r_devops
Did you take do250 course? Do you advise it?

Hi
Do you advise this course?
redhat course "practices your DevOps journey do250"

https://redd.it/oarlia
@r_devops
Moving files

What is the best automated approach of moving repo files from gitlab to a onedrive that is connected via a private network?....And being able to push and pull the changes .

https://redd.it/oagtif
@r_devops
How long until you used a new programming language idiomatically?

I started programming and C was the first language I used a lot, so I do a lot of things like I'd do in C. My first NodeJS programs looked this like C programs.

After years of using NodeJS (in small doses as it's not my main job) I used JavaScript'isms with easy and naturally: I became fluent in idiomatic JavaScript: Callbacks, promises, prototypes, anonymous functions...can't scare me now. Took about 3 years, mainly because I didn't program that much.

Learning Dart was a please: It's a lot of JavaScript minus the stupid parts. And static types. It's so similar to JavaScript, that learning the few Dart'isms was quick and simple and natural. Maybe 3 months that took me.

At work I use Python: very different and even after years my programs don't do Python'isms. 3 years and counting...

This makes me wonder: How long did it take you to be fluent and idiomatic in a new programming lanaguage?

Focus is on new. If you start programming with Python, I'd assume everything it does feels "natural" and thus easy to adopt.

Update: Fix grammar.

https://redd.it/obf30b
@r_devops
Moving developers files

What is the best automated approach of moving developers files from gitlab to a onedrive that is connected to a private network? And be able to push and pull changes to both environments

https://redd.it/oagjld
@r_devops
What is the best alternative to ElasticSearch for a logging stack?

We are using EFK (Elasticsearch, Fluenbit and Kibana) as our logging stack and things are working fine when the load is low or medium but when the load is high Elasticsearch cannot coupe with the high load and it returns 429 error (sometimes other errors).

After some search, I found that the suggested solution is giving Elasticsearch much more resources than we do. We can do this on our development cluster (we run EFK on Kubernetes clusters) but we need to run our product on very small clusters (sometimes even on Microk8s) and giving Elasticsearch more resources cannot work for us everywhere. What is the best alternative to Elasticsearch that is not as resource hungry as Elasticsearch?

https://redd.it/obh870
@r_devops
One YAML CI/CD pipeline to rule them all?

Does anyone have an example of a tidy and cleanly written YAML CI/CD pipeline that covers deploying from dev, release, hotfix, main branches to dev, staging, prod env? With different stages, different env variables, versioning, approving, using a deployment pattern like blue-green deployment, and all the best practices. Or is this not a good practice to begin with (cramming it all in a single YAML )?
Use case for a simple web app deploy lets say.

https://redd.it/obijy7
@r_devops
Terraform Environments Questions

Hello!

I am a more traditional IT Infrastructure person adopting IaC practices (pretty much just using ansible for lots of stuff including provisioning). I say traditional because we don't have a dev team or deal with code in any way. We're just managing vmware for stuff like AD or VMs for HVAC systems to run, or Oracle EBS to run.


Anyway, I'm looking at Terraform for provisioning. Everything that I learn in tutorials or their documentation has references to multiple environments like dev, stage, and prod. We don't really have those types of environments, though. The closest we have is our Microsoft SQL Servers where we have Dev and Prod, but they aren't really related to each other and we also have a lot different production ones (both stand alone and clusters). Probably 30 in total.


So I'm wondering, do I treat each SQL server/SQL Cluster as an environment? instead of calling it dev and prod, do I call the environments prod-sql-1 and prod-sql-2 and dev-sql-1 and prod-sql-cluster1 using prod-sql-1.tfvars and prod-sql-2.tfvars and prod-sql-cluster1.tfvars to specify their differences? And would I put these all in the same pipeline or would I make a different repo for each and each have their own pipeline (So I'd have 20 pipelines just for Microsoft SQL alone and then probably 50 pipelines for all the random one-off servers). Or is this something for workspaces (something I haven't wrapped my head around that yet). Or is there some other way I should be going about this I'm missing?

​

Thanks in advance for any help/tips!

https://redd.it/obl4rl
@r_devops
Day 1 of 101 Days of DevOps

Welcome to Day 1 of 101 Days of DevOps

https://www.101daysofdevops.com/courses/101-days-of-devops/lessons/python-os-module/ (You must be registered in order to view the link)
Link to register: https://www.101daysofdevops.com/register/

https://redd.it/obnnru
@r_devops
Hi dear programmers business founder here want knowledge about payment systems. Please read below

I run a service marketplace and I'm stuck at getting a payment gateway. I have come to a understanding that if i use a global payment gateway like paypal, stripe Braintree to accept payments and use hyperwallet to payouts my sellers it would work. So developers my question is from a technical perspective would this be possible to do. This has been stopping me from launching my business please if you could give me insight i would be very thankful.

https://redd.it/obqay7
@r_devops
How do you explain your job to non technical people?

Every time people ask me what I do and I say I am a devops engineer I get a ??? look. I usually say that it's automating infrastructure and code deployment to try to explain it in simple terms and I still get a ??? look.

So how do you guys explain your job to non technical people in your life? My parents are completely mystified and keep asking me about it lol

https://redd.it/obqs5t
@r_devops
Monthly 'Shameless Self Promotion' thread - 2021/07

Feel free to post your personal projects here. Just keep it to one project per comment thread.

https://redd.it/obsrol
@r_devops
Monthly 'Getting into DevOps' thread - 2021/07

What is DevOps?

[AWS has a great article](https://aws.amazon.com/devops/what-is-devops/) that outlines DevOps as a work environment where development and operations teams are no longer "siloed", but instead work together across the entire application lifecycle -- from development and test to deployment to operations -- and automate processes that historically have been manual and slow.

Books to Read

The Phoenix Project - one of the original books to delve into DevOps culture, explained through the story of a fictional company on the brink of failure.
[The DevOps Handbook](https://www.amazon.com/dp/1942788002) - a practical "sequel" to The Phoenix Project.
Google's Site Reliability Engineering - Google engineers explain how they build, deploy, monitor, and maintain their systems.
[The Site Reliability Workbook](https://landing.google.com/sre/workbook/toc/) - The practical companion to the Google's Site Reliability Engineering Book
The Unicorn Project - the "sequel" to The Phoenix Project.
[DevOps for Dummies](https://www.amazon.com/DevOps-Dummies-Computer-Tech-ebook/dp/B07VXMLK3J/) - don't let the name fool you.

What Should I Learn?

Emily Wood's essay - why infrastructure as code is so important into today's world.
[2019 DevOps Roadmap](https://github.com/kamranahmedse/developer-roadmap#devops-roadmap) - one developer's ideas for which skills are needed in the DevOps world. This roadmap is controversial, as it may be too use-case specific, but serves as a good starting point for what tools are currently in use by companies.
This comment by /u/mdaffin - just remember, DevOps is a mindset to solving problems. It's less about the specific tools you know or the certificates you have, as it is the way you approach problem solving.
[This comment by /u/jpswade](https://gist.github.com/jpswade/4135841363e72ece8086146bd7bb5d91) - what is DevOps and associated terminology.
Roadmap.sh - Step by step guide for DevOps or any other Operations Role

Remember: DevOps as a term and as a practice is still in flux, and is more about culture change than it is specific tooling. As such, specific skills and tool-sets are not universal, and recommendations for them should be taken only as suggestions.

Previous Threads
https://www.reddit.com/r/devops/comments/npua0y/monthlygettingintodevopsthread202106/

https://www.reddit.com/r/devops/comments/n2n1jk/monthlygettingintodevopsthread202105/

https://www.reddit.com/r/devops/comments/mhx15t/monthlygettingintodevopsthread202104/

https://www.reddit.com/r/devops/comments/lvet1r/monthlygettingintodevopsthread202103/

https://www.reddit.com/r/devops/comments/la7j8w/monthlygettingintodevopsthread202102/

https://www.reddit.com/r/devops/comments/koijyu/monthlygettingintodevopsthread202101/

https://www.reddit.com/r/devops/comments/k4v7s0/monthlygettingintodevopsthread202012/

https://www.reddit.com/r/devops/comments/jmdce9/monthlygettingintodevopsthread202011/

https://www.reddit.com/r/devops/comments/j3i2p5/monthlygettingintodevopsthread202010/

https://www.reddit.com/r/devops/comments/ikf91l/monthlygettingintodevopsthread202009/

https://www.reddit.com/r/devops/comments/i1n8rz/monthlygettingintodevopsthread202008/

https://www.reddit.com/r/devops/comments/hjehb7/monthlygettingintodevopsthread202007/

Please keep this on topic (as a reference for those new to devops).

https://redd.it/obssx3
@r_devops
Advice for a student

I’m sure this question gets asked here every once in a while, but I am a CS student interested in working with the cloud/devops type role.

My understanding is that internships are not that common as well as entry level roles. Is this true?

I am decent with Linux and can code well in Python.

My plan was to take the acloudguru learning path for devops and then some udemy courses on docker and kubernetes followed by getting the SAA.

Would this be a good route for me to take? Or should I try to get a role in backend or something and transition over to cloud/devops later?

Thanks

https://redd.it/obuly9
@r_devops
How to learn all about networking specifically from a linux perspective?

A lot of the books and videos I've been using to try and understand networking either talk about it in general terms or from the perspective of Cisco or other hardware.

But I'm using regular linux commands on a regular linux machine and it's difficult to get a comprehensive view of everything from the linux perspective. And it's making it difficult for me to really understand how things work even though I've been learning for a long time.

How do I figure all this out? Can you recommend any resources to learn specifically on linux and in a practical way? It's best to learn by doing but I get so lost when trying to do anything that isn't trivial that I get totally stuck.

https://redd.it/obsfqm
@r_devops
My junior project - Saleor adaption for Kubernetes

TL;DR: a Mechanical Engineer, First Steps in the DevOps World, I would love to review my Junior Project.

After almost two months of independent work and study, I feel I have reached a sufficient level to present and ask for an opinion about a project for a private portfolio. It is an adaption of Saleor for Kubernetes. A Headless implementation (GraphQL API) of the E-Commerce platform on Kubernetes, written in Python (Django) for the backend, and has two React applications for an admin dashboard, and the storefront.

Already exists :

1. Code management in GitHub.
2. PostgreSQL as a Database.
3. Redis for the benefit of Task Queue.
4. Celery and Beat for task execution and scheduling, with Autoscaling according to the number of tasks in the queue (Prometheus Adapter).
5. GitHub Actions in favor of an automated pipeline to test, build and push the Images to Dockerhub in each push to the main branch.
6. Nginx as an HTTP and HTTPS Server.
7. Monitoring using Prometheus and Grafana by Redis, Node, Celery, and PostgreSQL using the relevant Exporters, including Alertmanager with Slack notifications.
8. Automatic deployment using Kustomization file, or Ansible Playbook (optional, both ways work great).

In work:

1. Automatic SSL certs.
2. Solve Terraform interface issues.
3. Jenkins agents, on-demand at Kubernetes (Docker In Docker).
4. Pipeline files in favor of an automatic CD to GKE.
5. Improve all relevant resources to High Availability.

Can be impressed by the project in my profile on GitHub (four Repos in total, participating as Submodules). https://github.com/ArielLahiany/platform

As I mentioned, will be more than happy to get a comment, a review or to hear what you think is missing, what is recommended to improve, or general recommendations to Junior in the field.

https://redd.it/obpmtv
@r_devops
DevOps in an IoT shop?

I've been doing DevOps in SaaS shops for some time now, and now I'm in an IoT shop. Now that I've been there a month, I now know that it's two different, but related things.

I could run down a long list of things that make the difference, but it boils down to this: There is a hesitancy to have other people do things for you. Databases are on VMs, no autoscaling, things like that.

Anyhow, anyone have any advice on IoT DevOps?

https://redd.it/obrxru
@r_devops