Reddit DevOps
277 subscribers
69 photos
32.2K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Junior IT here, trying to utilize Ansible for the first time, looking for advice of whether my first project is over my head

Hello eveyone,

**Background story - not mandatory**

So I've been working as a Junior sysadmin for almost 3 years now. I started off as help desk in my company but as time passed, I learned a bunch of things and really got into automating stuff with PS and Python.

I recently started watching some YouTube videos about Ansible and would like to learn it. I don't have much experience with those sort of things so I wanted to get some advice from this sub on whether my first project is too big for me, or if it's actually doable.

I'm part of an IT team. The guy who is in charge of our virtualization environment is pretty old fashioned and he likes to do things manually. We have an environment of over 1600 VMs and each week we deploy more. Even though he told me he wouldn't use it, I wrote a PoSH GUI script that clones a bunch of VMs at once. He'd get tickets asking for 20 new machines and would just clone them manually, so I helped out and he does use it nowadays.

--

**End of story - The thing I need help with**

I want to help on another matter and that's VM deployment customization. Our senior sysadmins usually deploys a bunch of CentOS/RH VMs and he configures each of them manually for stuff like how many disks the machine will have, size, partition type, file system type, etc.

Is there a way for me to create a script or a play book that will do those sort of things for me? For example, our CentOS template has 2 disks in it, both LVM and with a fixed size. If I deploy that template and edit it before I click "finish", the cloning will fail, so I just deploy it, then edit the disks, format it, etc.

Ideally, if it's doable using Ansible and if I understand playbooks correctly, then I would write a file in which I specify:

* Number of VMs
* OS
* Partition size
* FS type
* Since we're using LVM - PV, VG and LV names and paths.
* And other VMWare stuff like Datastore, hosts, folders, etc, which seems pretty straight forward.

I'd like to know if this project is beginner friendly, assuming I know my way around VMs and some basic scripting.

If it is, I'm not sure where to begin, what I need or what tutorial to follow first, so any tips would be great :)

Thanks!

https://redd.it/ey6wcc
@r_devops
Demo of multistage and canary CI/CD and cloud automation for microservices with GCP, Kubernetes, Terraform, GCB and ArgoCD/Rollouts

Just did a pretty complete and fully-featured end-to-end [automation demo](https://github.com/ilya-lesikov/gke-demo) on GKE. I think this might be helpful for both beginners and people with some experience.

What's in it?

* Multistage deployments (staging, prod)
* Canary deployments
* Horizontal pod/instance autoscaling
* Rollbacks, self-healing
* Distributed tracing, monitoring, logging, profiling, debugging

I used GCP, GKE/Kubernetes/Kustomize, Terraform/Terragrunt, GCB, ArgoCD, Argo Rollouts, Stackdriver, [hipstershop microservices](https://github.com/GoogleCloudPlatform/microservices-demo/tree/master/src). Setup/deployment is heavily automated so it will be easy for you to deploy it on GCP with Free Trial yourself.

The demo is here: [https://github.com/ilya-lesikov/gke-demo](https://github.com/ilya-lesikov/gke-demo)

https://redd.it/ey965p
@r_devops
DevOps knowledgebase/wiki

Thought this might be of interest to folks here:

[https://devops.yoga/](https://devops.yoga/)

(I'm not affiliated with this project, just saw it and thought it was cool.)

https://redd.it/ey8wm6
@r_devops
Deploying Windows 10 images

I was wondering what the best way to create custom windows 10 images for client would be? The idea is we create a customized image and then deploy them to client machines. The trick is, we have a bunch of different clients and the images all need to be tweaked for the different deployments.

Is there a easy way to accomplish this?

https://redd.it/ey8uze
@r_devops
Docker/Kubernetes

Hello Guys/Girls. I am starting startup with small team. We are building complex web application. I don't have big experience with deployment, I thought I could learn docker/kubernetes to use on current project. I need suggestions where to start, what ressources can I use etc.

https://redd.it/ey8t22
@r_devops
Similarity of Staging and Production Environment

Hi all,

I'm reading about the Staging Environment and some things are not clear to me. If it's supposed to be similar to the Production Environment, then:

1. Is the same amount of machines (VPS) used as in the Production Environment?

2. Is it usually placed in some subdomain? If so, how is its access normally limited? Through firewall?

3. Assuming Let's Encrypt Certificate is used for the Production Environment. What kind of Certificate is usually used for the Staging Environment? Same Certificate in the same domain? Separate Certificate in another domain or maybe a self-signed certificate?

https://redd.it/ey8a11
@r_devops
Which status page do you use? Anyone use cachet.io?

Hey folks, which status page do you use integrated with Pagerduty/Grafana/Prometheus, etc.? Things like statuspage.io, status.io, and has anyone integrated the open source cachet.io with PagerDuty?

Obviously not interested in things folks have for manually updating status :P

https://redd.it/ey54mu
@r_devops
29% of highest security integration orgs endure friction when collaborating

A watermark of traditional security activities within organizations is the high tension between security teams, the operations or IT, and the core R&D engineering. When all of these teams are siloed with their activities and overall goals unaligned, they create tension and friction that manifests in mis-executive security activities.

However, when security practices are integrated throughout the SDLC, then the overall confidence level of security practices levels up for the entire organization. Furthermore, the Puppet report shows that, when security activities take place very early in the SDLC, they are more impactful.

From the Puppet & Snyk DevSecOps Insights study at [https://snyk.io/blog/29-percent-of-highest-security-integration-orgs-endure-friction-when-collaborating/](https://snyk.io/blog/29-percent-of-highest-security-integration-orgs-endure-friction-when-collaborating/)

https://redd.it/eyrzpz
@r_devops
GUI Alternative to Chef

Hi

The automation engine I am working on can be used as an alternative to Chef to some extent. I am reaching out to see if you guys could provide some advice and viewpoint.

[https://staging-totalcloud.webflow.io/alternative-to-chef-totalcloud](https://staging-totalcloud.webflow.io/alternative-to-chef-totalcloud)

TIA

https://redd.it/ey6ocy
@r_devops
Terraform vs Roll-Your-Own Cloud Infrastructure Code

Just curious if anyone has actually run through the pros and cons of using Terraform to manage cloud infrastructure, vs writing your own using the provided APIs of whatever cloud providers you use. Assume we've all read [Terraform's own opinion](https://www.terraform.io/intro/vs/boto.html) and have a general understanding of [NotInventedHere Syndrome](https://en.wikipedia.org/wiki/Reinventing_the_wheel). How does Terraform beat writing your own Infrastructure-As-Code using the APIs directly, in specific cases?

It seems to me that Terrform looks solid and well-designed, but still doesn't quite align with what I'd envision to be an ideal declarative infrastructure specification. There's the added complexity of a generic "resource" abstraction, which all the syntax is designed around. But you still need to know (a) the provider-specific cloud resources you want to provision as well as (b) how to declare those resources in Terraform. As with most HashiCorp tools, it looks robust with a solid user experience, with features like `terraform plan`. But I still wonder if it's really worth it.

If I am going to have to think about the resource details anyway, I might as well spend the time to learn use the API, without the need to filter it through Terraform's abstraction layer first. That way, I know I'll be able to implement anything I want and won't ever be limited by 3rd party design decisions. I can design my own infrastructure specification format and base it on what I actually need, rather than be tied to a general language that has to be suitable for everyone. It might not be as robust and generally applicable as Terraform but that won't matter if it covers everything I need it to cover.

What are *good* reasons not to do this?

https://redd.it/eywqi8
@r_devops
How to stop Terraform from running all resources at the same time?

Hey all, I am new to Terraform and I am trying to write out some terraform files, and I am running into an issue. Some of my resources depend on "previous" modules to finish running and I am hitting a snag. I would like to run each resource in succession rather than simultaneously. Is there a way to do this?

Some things I tried:

Splitting them up into modules

Splitting them up into separate files and manually calling them when the resource is finished spinning up (best thing that worked so far but cumbersome)

Putting timeouts in place as a wait (this just ran the timeouts at the same time as well).

https://redd.it/eyt4xs
@r_devops
Monitoring solutions for remote research data acquisition systems

I work in academic research and operate a few remote research data acquisition systems (CentOS). I need to be notified when there is a failure in the data acquisition hardware or software, as well as things like failing hard drives or UPS battery. Thus far I've tried to make-do with emailing myself via a dedicated GMail address and try to set up stuff to send me emails if something goes wrong. The problem is that I end up spamming myself(e.g. if a data acquisition program runs once every two minutes but there's a hardware failure I get 720 emails/day over the weekend with the same error message!), especially if it's something that I can't really fix \*right now\*. Also I wish I could somehow aggregate stuff that's the same type of message from the same system, possibly silence certain errors, etc.

I'm sure there are products out there that can help with this kind of thing, but I don't really know what direction to go in at the moment. We could probably spend a little on a 3rd party service if it was worth it, and/or I could possibly convince our university IT to get us to self-host something.

Any advice? TIA.

https://redd.it/eyx71j
@r_devops
Splitting tests by timing in circleci

Hi all,

I'm trying to work out how to split tests by timing in circle. I have the following in my config:

`- run: gotestsum --junitfile /tmp/test-results/go-test/$(echo $RANDOM).xml $(go list ./... | circleci tests split --split-by=timings)`

`- store_test_results:`
`path: /tmp/test-results/`

The thought with the $RANDOM was that since we are splitting the tests and each container writes a new file, that it would read in all the files and combine them when it read the test results on run. That clearly isn't happening. Does anyone have a good example on how to properly split go tests by timing in circleci?

https://redd.it/eyxxnr
@r_devops
Terraform creating EC2 with AWS launch template

Hi all,

Asked my coworker about wanting to use Terraform to create a new EC2 instance and have it consume an existing launch template... but it didn't look like Terraform cloud could consume an existing launch template. So when I asked if that was the case, I was asked to define what a launch config was for, and the next response I get is "define what terraform is, and then smack yourself in the back of the head". And I don't know why it was a dumb question.

We have user data in the launch template that bootstraps the ec2 to our chef server and then assigns the node a role, which has a runlist assinged to that role.

I wanted to have Terraform create the new ec2, and use the launch template since it has the existing user data needed for the chef bootstrapping, role, runlist, etc.

I guess that wasn't a feasible or logical thing to suggest. Anyone have the patience to explain to me why?

Thanks!

https://redd.it/ez0r5i
@r_devops
Just laid off. What should my next steps be?

I've been working at a small company for 5 years as its sole IT/DEVOPS person until it was acquired last summer. Things were looking good, was moved to an SRE team based out of the new parent company and promoted, the works. We spent 6 months on refactoring the old app to make way for directives from the top, and boom, this morning they called me in to lay me off.

I could use advice on what to do to shop myself around to other local tech companies, and how to represent my experience. I'm self taught, my skills are python, SaltStack, AWS cloud, and process architecture. I'd like to be making a move to something similar to my current, erm, former role, but I got there by starting as a junior programmer and moving up as opportunity came. Any thoughts would be appreciated.

https://redd.it/eytrr0
@r_devops
Getting ready for first DevOps job

Hello fellow redditors,

I am turning here for your help to get ready for my first, ever, DevOps job interview. I've found articles here and there talking about general DevOps culture, some differencies between Dev, Ops and so. However - I would need some help from you - experts and get some advices on specific topics.

First - to line up topics that were mentioned:
\- coding/scripting
\- infrastructure
\- scaling
\- running applications

Also they mentioned, they are in process of migrating services to containers, so Docker and k8s might be in question.

Second - I was told to bring my laptop with working coding env.


So I would like to get help from all of you experts in here, to line up some questions that might apear in regards of topics above and also, some of the scripting/coding excercisses they might be asking.

Third - any general advice for technical interview, feel free to share your knowledge with me (pretty please).

https://redd.it/eyz80e
@r_devops
Technical Interview with a seemingly Non-Technical person?

I have a 1 hour long technical tomorrow with a big company for a DevOps Intern role. I looked up the person who will be interviewing me according to the email I received and it appears that they don't really have any technical experience, not even a STEM degree from college. Anyone know what kind of questions I could expect, considering it is a "technical"? Also if anyone has any advice for prepping for a devops role, please share I could use it! I've just been brushing up on the things they asked in the HackerRank and learning about what DevOps actually is lol. I appreciate any insight y'all have, I'm super nervous, thanks!

https://redd.it/eyx8as
@r_devops
Any suggestions how to establish the devops for my application?

Hi reddit!

I've recently worked on a product that manages orders of a Café company from their supplier.

I need help understanding how to run the devops side of it. I'm using a standard MERN setup (MongoDB, Express, React, Nodejs).

Currently, I'm using Heroku (which is amazing but a bit expensive for the current state of the product), Mongo ATLAS (Not having any issue with the free tier at the moment)

My product is quite simple. There are 3 types of roles:

**Location:** Viewing, creating orders (Usually 1 order per day)

**Supplier:** Viewing orders, marking them as "shipped" (Usually entering every day)

**Owner:** The one with the "bird's-eye view", can't do anything (Entering just few times a month)

In total, I have 8 users but not all of them enter the app every day.

​

I don't have any experience with AWS but I'm up for learning whatever is needed.

I'm doing any aspect of the app (design, product, front and back end)

If anything is unclear feel free to ask me anything.

Thanks in advance!

https://redd.it/eyx3fe
@r_devops
Opinions on Jenkins X?

I'm going to be working on a Jenkins X project and was interested in people's opinions on it.

https://redd.it/eyptuy
@r_devops