Reddit DevOps
278 subscribers
70 photos
32.2K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
I wrote a script to create a working ECS cluster on AWS using the AWS CLI.

It creates the ECS cluster and all the required elements; a task definition, service, EC2 instance, security groups, load balancer and target group. The end result is a simple Hello World app.

There is a clean up script too to take it all down afterwards. Hopefully it'll be useful to someone trying out ECS

[https://gist.github.com/gordonmurray/259eb3c52e66188ea4b0e3b420a6ccd8](https://gist.github.com/gordonmurray/259eb3c52e66188ea4b0e3b420a6ccd8)

https://redd.it/e0q7c9
@r_devops
what's the difference between Prometheus and grafana? Can someone please ELI5.

Let's say that I have to monitor CPU utilization and create alert lifestyle based upon some thersold values , or reading some DB to get live time metrices of an app and create alerts .

https://redd.it/dygjhq
@r_devops
So I've create my first gitlab+docker pipeline. What next?

hi. Finally created my first gitlab pipeline. gitlab-ci.yml looks like this:

image: docker:dind

services:
- docker:dind

stages:
- build
- deploy

build:
stage: build
script:
- docker build -t repo/project .

deploy:
stage: deploy
script:
- docker run -p 8088:8088 -d --name projectname -t repo/project

And here is the Dockerfile:

FROM openjdk:11-jdk
VOLUME /tmp
COPY . .
RUN apt update -y && \
apt install maven -y && \
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0 -Dpackaging=jar -Dfile=ojdbc7-12.1.0.jar && \
mvn clean package

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","target/project.war"]


Now how do I keep things from redownloading again? Why are there many more images than just the one I create are being created on the machine running gitlab-runner? Is there a dynamic way to get rid of my previous container and deploy a new one on it's place? What's the further reading you would recommend to work on my pipeline?

https://redd.it/dyg3sv
@r_devops
Jenkins Migration

Can anyone help me out How to Migrate from Cloudbee's Jenkins to EC2 Instance based Jenkins - What are the steps , plugins needed ???

https://redd.it/dxyl36
@r_devops
Zoho (paid own domain) mail delivery issues to outlook.com addresses

[ /r/devops is maybe not the right place for this, but hopefully close enough, mods delete if disagree ]

TLDR; is anybody else using (paid, own domain) zoho for email having trouble getting mail to outlook.com addresses?

---

A month or so back I moved all my email to zoho.com (my own domain with a paid account that is, not a free zoho account).

A week or so ago there was a day where mail was being temp failed to outlook.com addresses (including my own), Zoho logged them as fail and retried and eventually (many hours) they got through.

Today, I did another random test email to my personal (free) gmail, no problem, and an email to my personal (free) outlook.com which just vanished.

The Zoho mail logs SAY it was delivered. The zoho support chat, which seemed a bit weird, like they couldn't find the message-id I gave them, and did a screen-share (which seemed REALLY weird for an email issue for which I've given the log details, but whatever) said, after a lot of "investigating" that it was delivered and that it must be Microsoft's problem.

No, it is not in my outlook.com junk or any folders, my (zoho driven) address is specifically even whitelisted as a safe sender. I have previously sent to the outlook.com address through the zoho driven address fine, it's not a typo.

So not sure where to go from here, I guess it *could* be a problem at Outlook's end, it *could* be a problem with just my (again, free) outlook.com address, but.... ehh....

I've tried several times, same result, zoho says delivered, never appears in outlook.com account.

https://redd.it/dy0k3j
@r_devops
There's no such thing as CI/CD!

Recently, I became aware of a trend that has been growing since too long: conflating CI and CD into the same word group - CI/CD. When this is done by marketers, this is business as usual, a mix of buzzwords and hype that shouts "Look at me!". But when this is repeated by professional software engineers, I start to worry. And this is exactly what’s happening right now. This post is meant to be a snapshot of my thoughts that I can refer others to in order to dispel the confusion I believe is surrounding CI/CD.

Read further <https://blog.frankel.ch/no-such-thing-as-ci-cd/>

https://redd.it/e10utq
@r_devops
Continuous deployment

So I have Express backend and React frontend and basically what I wanna achieve is: write code, push to git repository and then on the server automatically build react app and serve it via nginx and start/restart the backend.

What would I need to achieve this?

https://redd.it/e0z6ez
@r_devops
Network as Code

Is anyone here using Ansible with physical firewalls and switches to implement Network-as-Code? At work we're moving towards having source control be the "single source of truth" and doing away with all other change control. We're doing well with IAC for most things, but network configs are still manually done then backed up remotely for fail-back.

I'd like to set up an git+ansible+jenkins network-as-code solution. I'm wondering if anyone else has done this and would be willing to share their experience? What hardware did you use? Did it work ok?

https://redd.it/e123un
@r_devops
How do you create index in ElasticSearch ?

I have shipped log files from logstash to ElasticSearch.
I can open Kibana also.

Now I'm stuck how to create index.


Is it possible to create index from Kibana ? (if Yes, How)

https://redd.it/e13052
@r_devops
A general-purpose, git-centric, audit-friendly quality gating tool

I wrote [Red Light Green Light](https://github.com/atgreen/red-light-green-light) last year in an effort to simplify quality gating for CI/CD pipelines. The idea behind it is that we should decouple the process of evaluating test results away from the underlying testing tools themselves, in a way that is:

* centrally managed
* version controlled
* auditable
* customizable
* protected with authentication/authorization mechanisms

The goal of all of this is to enable auditors to easily answer the following questions as they relate to any artifact promoted through a CI/CD pipeline:

* who presented test results for evaluation?
* what were those test results?
* what policies were they evaluated against?
* who defined the policies and when?


I'm also the author of an opensource library called libffi, and Red Light Green Light was critically important to helping me qualify travis-ci test results. I just released a new version of libffi and wanted to share how useful Red Light Green Light was in the process.


[https://github.com/atgreen/red-light-green-light](https://github.com/atgreen/red-light-green-light)
[https://rl.gl](https://rl.gl)

https://redd.it/e144sj
@r_devops
Does anyone know if Chef/Berkshelf has a way to tar up a directory full of chef cookbooks? My project lead says it was a thing but I can't find it.

Thanks for the help :).

https://redd.it/e18vib
@r_devops
Resources/practice for learning OS concepts?

I found out about [roadmap.sh/devops](https://roadmap.sh/devops), and I'm curious about the OS concept section. How much would we have to get into the various concepts? I'd imagine that I could get a handle through some Wikipedia reading and Google, but I'm curious if there's a way to put them into practice from being at this early point in the roadmap. Would the practice come as I get more advanced, and the reading be enough at this point, or not?

Your responses would be greatly appreciated; thanks.

https://redd.it/e14lmp
@r_devops
How I manage my blog

Hello everyone, I just wrote a post about how I've deployed it and use Github Actions to publish new stuff. It's nothing sophisticated but I wanted to share it, in case anyone will ever find it useful :)

Here is the link: [https://samirettali.com/posts/hosting/](https://samirettali.com/posts/hosting/)

https://redd.it/e14ygg
@r_devops
LogStash and AWS ElasticSearch connectivity issue

AWS ElasticSearch endpoint don't have 9200 port. But When I start Logstash , it is adding 9200 in the ES host end point.

This is causing connectivity failure.

Please see the screenshot Link.

How do I fix the issue?

https://i.imgur.com/w07X0HN.png

https://redd.it/e1cf9i
@r_devops
Avoiding users manually connecting/linking individual services you provide to an SSO/Identity provider?

Like how creating an account with Google gives you implicit access to all their existing services, but in this case, you host some third-party(ones you don't develop in-house) services such as a wiki or forum software, but keep that same seamless login experience?

Provided the third-party service supports external auth(eg OpenID Connect, Google/Facebook or self-hosted provider like Keycloak), can you have your own centralized auth.mydomain.com, and not have a new user visit each hosted service being prompted to select/consent an SSO provider?

I understand that once each service has been connected to an SSO provider for the user, they would from then on have the seamless SSO experience, but it'd be nice to take away that initial sign-up friction/fatigue experience so that it appears to be a first-party cohesive experience through all the services available to the user.

I'm having difficulty with what the terminology for this flow is, or if it's actually possible for services that offer generic OIDC or LDAP support. Grafana has this [Auth Proxy](https://grafana.com/docs/auth/auth-proxy/), but this kind of thing seems uncommon, and the term "Auth Proxy" can [mean different things](https://github.com/discourse/discourse-auth-proxy).

https://redd.it/e1dsyn
@r_devops
running logstash as service

I run logstash this way :
>/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf --debug

But If I run as a service like this :
>initctl start logstash

do I still need to pass config file path here or config file path will be picked up by service automatically ?

https://redd.it/e1fzu7
@r_devops
Code Management

Let me preface this by saying i'm not a developer, and never have been or will be, sure i script but nothing more complex than that.

Issue i have with our setup at work, is the development team use local disk to store code, and only checkin code when it's complete and ready to deploy. Personally i thought you checkin at regular intervals, then trigger a build when you're ready to deploy but admit i don't get the whole pipeline thing of code deployment.

Can anyone advise if i'm way off beam expecting regular checkins to a TFS or similar code management server?, seems that way if you lose a piece of hardware via clumsyness or hardware failure, you don't lose all your work, or is this the wrong way to look at this?

Problem is we in infrastructure are having to figure out a way to make sure they don't lose code if there is a hardware failure, and it also hampers our desire to move to VDI type solutions for developers as they would be non or semi persistent desktops only.

Not wanting to bash the dev team, just can't understand why a checkin triggers a build, can you not use tags or something similar to checkin partially completed code?

TIA

https://redd.it/e1goyi
@r_devops
Let a 1,000 flowers bloom. Then rip 999 of them out by the roots.

Thought this article (from 2015) about engineering effectiveness and scale was worth reading: [https://www.gigamonkeys.com/flowers/](https://www.gigamonkeys.com/flowers/)

In particular I liked the equations for thinking about this problem, even if the author acknowledges he's just spitballing for the key values.

https://redd.it/e1ifo9
@r_devops