Reddit DevOps
277 subscribers
69 photos
32.2K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Do you really need multi-cloud strategy?

How will a multi-cloud be an option for an application where you have rich integration components such as APIs between applications. Latency is a big issue.

https://redd.it/ecpjau
@r_devops
“Ops by Code” - DevOps for Ops

Hello,

since DevOps is mostly used in the development context, I tried to write down my thoughts from the perspective of IT operations.

[https://medium.com/zoisays/ops-by-code-devops-for-ops-771d8cf6a22f?source=friends\_link&sk=6b403f9ed704bd0add9e750fe77d4de8](https://medium.com/zoisays/ops-by-code-devops-for-ops-771d8cf6a22f?source=friends_link&sk=6b403f9ed704bd0add9e750fe77d4de8)

What do you think?

https://redd.it/ecfygp
@r_devops
How to automatically build a project which is not mine?

All my services are based on docker images(*), automatically updated with Watchtower:

- the ones I get from Docker Hub
- and the ones I wrote myself, put in GitLab and have a CI/CD pipeline which is triggered when there is a new commit (and which builds an image and pushes it to a repository of mine)

There is now a project on GitHub I am interested in and would like to package in a docker image. A one-shot `docker build ...` is not difficult - the part I am not sure how to approach is the continuous updates of the image when the source (the project on GitHub above) changes.

The solution I will be using is to have nightly/hourly/... builds, which will eventually catch up with the changes and push a new image to my repository.

Are there better solutions (ones where I could have "something" trigger a build on my side)?

---
(*) while this question revolves around building docker images, it is the general approach I am really interested in (= how to "monitor for changes" a remote project)

https://redd.it/ecbgk0
@r_devops
Traefik 2 with GKE

Dear Peers,
Maybe someone can share your experience
Got following setup : GKE + Traefik as LB via Helm chart
At the moment, have to manually update the DNS A records to point to an externalIP , which gets assigned when we launch Traefik.
Looks like, it is not possible to assign static IP to Traefik to persist between restarts
I've tried following approach
1.gcloud compute addresses create gkestaticip --region

(\* tried alreadt both regional & global)
2. Setting **loadBalancerIP: 35.x.y.z**
No success, Traefik get a fresh IP from gcp the pool

Something i found on medium, though doesnt seem to work
[https://medium.com/faun/how-to-assign-external-ip-address-static-to-a-gcp-kubernetes-engine-service-c5be91cdcfd5](https://medium.com/faun/how-to-assign-external-ip-address-static-to-a-gcp-kubernetes-engine-service-c5be91cdcfd5)

https://redd.it/eca2ld
@r_devops
On-Call Nightmares Podcast - Episode 45 - Kelsey Hightower - Google

One of my favorite people in technology is hands down Kelsey, I was lucky enough to get a chance to talk to him about his career and life on-call.

[https://www.podomatic.com/podcasts/oncallnightmares/episodes/2019-12-19T08\_16\_15-08\_00](https://www.podomatic.com/podcasts/oncallnightmares/episodes/2019-12-19T08_16_15-08_00)

​

Thanks and let me know if you'd like to be on in the future. [https://twitter.com/oncallnightmare](https://twitter.com/oncallnightmare) or [[email protected]](mailto:[email protected]).

https://redd.it/ecvgxy
@r_devops
Phoenix Project - Kindle edition free today (UK)

Not sure how long it will be free, but in the UK it is currently free for kindle. Grab it while you can I guess?

[https://www.amazon.co.uk/Phoenix-Project-DevOps-Helping-Business-ebook/dp/B078Y98RG8](https://www.amazon.co.uk/Phoenix-Project-DevOps-Helping-Business-ebook/dp/B078Y98RG8)

(sorry if direct links aren't allowed)

https://redd.it/ecrjs0
@r_devops
If you could start from scratch, what would you use?

If you could go back and start your project again with the knowledge you have today, what would you use? Would you choose different tools, languages, infrastructure? Why? What did you learn that makes you think these would be better suited than what you currently are using?

https://redd.it/ecx197
@r_devops
how to pass ssh key into an instance with cloudformation

I need to clone repository which requires ssh key , and I want to pass ssh key to instance as text or as a parameter, so in cloudformation user data I can run bash script clone repo with ssh key to directory.
Is it possible?
any workaround ?

https://redd.it/ecz1xf
@r_devops
What is the best way to scale an node application?

Today I have an application that is separated in: An API, a crawler, and the processor. The crawler\`s job is to get the download URL for videos on YouTube and the processor process the video\`s information. My problem today is, the crawler is too fast for the processor and the queue gets enormous, I would like to scale my processor to match the demand (the processor is written in C and it runs on Linux). My ecosystem is currently running on GCP and I'm using rabbitMQ for the queue.

https://redd.it/ecy4a7
@r_devops
What do you guys use for centralised logging?

Just investigating which solution would be best for us at the moment. An ELK stack seems like overkill, cloudwatch -> s3 -> athena seems pretty alright. But if there's a quick and easy 3rd party tool we can just send logs to that would be preferable since we then don't have to worry about maintenance or setup of the tools.

https://redd.it/ecr8wg
@r_devops
audit standards IS-13-ST-001

what is IS-13-ST-001 standards? I get a audit log question below:

​

Is auditing has been enabled, as per IS-13-ST-001 standards ?

https://redd.it/ed2w4b
@r_devops
Packer + VirtualBox + start from VMDK. How?

I have a VMDK file (or a VDI file), and I want to feed that into Packer-with-virtual box to build a new image (after running some provisioners)

With the qemu builder, there is a "disk_image" boolean flag that lets me pass a img file instead of a true ISO file to the "iso_url" config. is there an equivalent for virtual box?

I know one way to do it would be to build a VM in virtualbox with the VDI file attached, and then use the virtualbox-vm builder. Alternatively I can put in a series of vboxmanage commands that effectively removes the ISO and puts my VDI in.

Is there a more idiomatic way of doing that in Packer?

https://redd.it/ed4j4c
@r_devops
Looking for Postman help or what to Google: How to pass multiple values of same key from GET response to POST

Sorry if my title isn't correct. I'm still new to this.

If my response with some amount of values that look something like this:

"value": [
{
"id": "af9b966a-0d3a-40b2-aa7f-89f3d67d6ba3",
},
{
"id": "dbcb3ee4-8f0b-46d3-a935-de612c56349d",
},
{
"id": "384e8d9a-d1f7-4272-acf7-d1bc0eed197d",
}

How do I then create same amount of POSTs, each using the "id" value as a variable in the URL?

I hope I'm not being too general. It seems like knowing how to do this will come up pretty often so I want to learn how to use this interchangeably.

https://redd.it/ed5ndv
@r_devops
Had anyone had success forwarding logs from Jira Cloud to Sumo Logic?

Looks like sending logs from Jira Server to Sumo Logic is pretty straight forward. Don't agree with the concept that "cloud is managed so you shouldn't have to worry about the logs. I've only found vague references from people who have used Jira Cloud Webhooks to forward events to a SEIM. Has anyone here had success? Any resources you could point me toward?

https://redd.it/ed5gl5
@r_devops
SonarQube with ReactJS - false positive on duplicates and coverage on new code

I'm trying to analyze ongoing ReactJS project using SonarQube (first time with that tool) version 6.7.5 but after second code scan I'm getting Quality Gate failed due to 0% Coverage on New Code and 5% Duplicated Lines on New Code.

First problem - I have no clue why I'm getting it at all (no coverage on new code) when I see new code got picked up by SonarQube. It looks like most of functional components are not covered by tests

Second problem - duplicates. Most of them are false positive like import statements or declarations (ex. react-table and columns declaration). Is there any way to mark them as non-duplicate? Or is there any workaround to get those kind of code blocks as valid (not dups)?

https://redd.it/ed4t0s
@r_devops
Conditional statement for choosing node(agent) in Jenkins pipeline?

Hi guys! I'm new to jenkins pipeline. We are using scripted pipeline.


I'm trying to do the following in my jenkinsfile with the purpose that if "master" is being used, then run in "slave". Is that what the following conditional does in scripted pipeline? If not, is there a better/right way?


node ("master||slave") {
.....
}

https://redd.it/ed3nsw
@r_devops
Most advanced GitHub Actions examples?

My team and I are re-evaluating SaaS-based replacements for Jenkins. with one of those being GitHub Actions. Let me say we’ve been able to achieve some fairly advanced Jenkins pipelines having started with evolving shared libraries that abstracted the underpinnings for building and deploying a wide variety of projects with a high degree of control.

I would appreciate links to projects or what not showing off the current limits that people are pushing GitHub Actions including any technical articles on some of the best practices around them.

Thanks!

https://redd.it/ed0obe
@r_devops
Use GitHub actions at your own risk

[https://julienrenaux.fr/2019/12/20/github-actions-security-risk/](https://julienrenaux.fr/2019/12/20/github-actions-security-risk/)

TL;DR: Using GitHub actions with branch names or tags is unsafe. Use commit hash instead.

Something to keep in mind when you use GitHub actions marketplace!

https://redd.it/edbs4q
@r_devops
[stable/prometheus-operator] ldap sync grafana dashboard keeps logging out

Do anyone face the below issue or some solutions ?

\*\*Describe the bug\*\*

grafana dashboard keeps logging out after setting up the ldap configuration

lvl=eror msg="Failed to look up user based on cookie" logger=context error="user token not found

​

\*\*Which chart\*\*:

prometheus-operator-8.3.3

​

\*\*What happened\*\*:

After setting up the below config to integrate grafana with AD, able to login with AD creds for a second(only first time) and when i browse any dashboards it keeps logging out

​

Next attempts, there is a green tick it's authorized but not able to login

lvl=eror msg="Failed to look up user based on cookie" logger=context error="user token not found"

​

Config

grafana.ini:

paths:

data: /var/lib/grafana/data

logs: /var/log/grafana

plugins: /var/lib/grafana/plugins

provisioning: /etc/grafana/provisioning

analytics:

check\_for\_updates: true

log:

mode: console

filters: ldap:debug

\# session:

\# cookie\_secure: true

security:

\# cookie\_secure: true

cookie\_samesite: "none"

auth:

login\_maximum\_inactive\_lifetime\_days: 7

login\_maximum\_lifetime\_days: 30

token\_rotation\_interval\_minutes: 600

api\_key\_max\_seconds\_to\_live: -1

grafana\_net:

url: [https://grafana.net](https://grafana.net)

\## LDAP Authentication can be enabled with the following values on grafana.ini

\## NOTE: Grafana will fail to start if the value for ldap.toml is invalid

auth.ldap:

enabled: true

allow\_sign\_up: true

config\_file: /etc/grafana/ldap.toml

​

ldap:

enabled: true

config: |-

verbose\_logging = true

​

\[\[servers\]\]

host = "[adhost.com](https://adhost.com)"

port = 3269

use\_ssl = true

start\_tls = false

ssl\_skip\_verify = true

bind\_dn = "BindAddress\\\\%s"

search\_filter = "(sAMAccountName=%s)"

search\_base\_dns = \["dc=xxx,dc=com"\]

​

\[servers.attributes\]

name = "givenName"

surname = "sn"

username = "sAMAccountName"

member\_of = "memberOf"

email = "mail"

​

\*\*What you expected to happen\*\*:

Dashboard should not automatically logout for every few seconds

​

\*\*How to reproduce it\*\* (as minimally and precisely as possible):

I see some of the page showing same issue, but none of them resolved

example: [https://community.grafana.com/t/after-upgrade-from-grafana-5-to-6-dashboard-keeps-logging-out/14931/61](https://community.grafana.com/t/after-upgrade-from-grafana-5-to-6-dashboard-keeps-logging-out/14931/61)

https://redd.it/ediee8
@r_devops