Reddit DevOps
269 subscribers
5 photos
31K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
I am trying to do service discovery without k8s, does anyone have any thoughts?

This is probably the wrong place to post this (if anyone has any ideas I'm open). Starting to go mad, but I want to do something very simple, but I can't find any solution online.

I am currently using openSLP for one service to discover another service. My architecture is that I have 1 parent node and many children nodes. The children do not run the same software as the parents, but they potentially could run a shared sidecar or implement the same library. I am very experienced with docker, but k8s scare me as I mainly work in air-gapped environments, but we have a specific deployment model where our parent can be on some remote network (thus requiring use of public IPs). openSLP is usually only used in LANs, but I've made my own hacks to allow for communication to endpoints behind a public IP, but I don't necessarily agree with doing SLP over the internet.

I keep on doing searches for service discovery and every. single. time. I get things like istio, and consul that do not seem relevant for what I want to do. The children nodes never communicate with each other (actually isolation is preferred here). I don't care to have some raft-based HA nonsense (its nonsense) to share data between my nodes. I just want the parent to know about the children in a concise, simple to understand manner, and I'd preferably prefer some kind of zero config support (like I have with unicast SLP).

Does anyone have any idea what I'm talking about? Am I a madman?

https://redd.it/oo8uc3
@r_devops
Should I use a self-hosted version of GitLab or setup components I require manually?



Hi I trying to work out if its worth deploying a self-hosted version of GitLab or setup indivusal comments (docker registry, git server, jenkins ci/cd pipelines etc) manually.

Without getting into too much detail I like to do a lot of hands-on learning and can’t afford a lot of OpEx costs associated with running things in the cloud and prefer to make use of equipment I have at home to run things.

For now I been using Github (free tier), however I have been eat a good chuck of the free time available running regular docker builds and other CI/Unit test pipelines. I am not overly keen on paying for the pro account. I am also aware that I can run my own runner/agent, however I not overly keen on this (for a number of security reason – my network / security background).

For now, I have decided I want to attempt to move what I can to on-premise (git server and docker registry and ci/cd pipeline solution), as I have no need for anything to be public.

One option is that my NAS can easily act as a remote Git Server and I can deploy my own docker registry and Jenkins server. This would meat most of my needs however its not a very elegant solution (and would involve a bit of setup).

The other option is should I deploy Gitlab self hosted version on my own infrastructure. The only downside is GitLab is very overboard for what I need (git repo, docker registry and Ci/CD pipeline), as I don’t need wiki’s dashboard etc, I also image there be a lot of post deployment tweaking required (ie security).

What are peoples thoughts on this and what do you currently do? Perhaps I should just bite the bullet and pay for GitHub or GitLab (however all these subscriptions start adding up)

https://redd.it/oocf8b
@r_devops
Are Kubernetes and Terraform exclusive or complementary?

Have been learning a bit about Terraform in the past 2 weeks. 0 kubernetes knowledge. Something that I'm still not sure is where kubernetes fits with Terraform.

Are they totally different tools, are they complementary or are they exclusive (you can use one without the other).

Can one also do Infrastructure Provisioning with K8s?

https://redd.it/oobd91
@r_devops
Bitbucket cloud + Jenkins integration?

I know Bitbucket server can work with Jenkins, but does anyone have experience getting Bitbucket Cloud to work with Jenkins? Thanks.

https://redd.it/ooakmy
@r_devops
A short (less than 6 mins!) introduction to Continuous Integration!

I have made a short video (less than 6 minutes long) on Continuous Integration, intended for anyone to view! Whether you're from a data, infrastructure, operations or developer background, this should give you some insight into the why, how and what of Continuous Integration.


https://cloudchris.ws/7t

https://redd.it/oo5xgp
@r_devops
Overwhelmed with information

This is geared towards senior devops and people with experience hiring devops positions. I’ve been in IT for just about three years I have a degree in cyber security, and I want to move into a devops position. Currently I am an IT coordinator for a small firm. I have my AWS solutions architect associates Certification and also learning terraform and Git.
What are some hands-on projects that would get me hired for junior level and above the devops positions?

https://redd.it/ooip4o
@r_devops
Managing multiple secret keys in CI/CD tools

Typical CI CD process involves lots of heterogeneous tools Jenkins , Git , Sonar , GCP cloud build , Docker reg etc.

In a given process all these tools should be communicating/integrating with each other.

To enable integration there are tokens, secrets to be managed across multiple tools.

As a best practice these tokens need to be managed and rotated safely. I always noticed managing these keys and rotating them is a manual process. Are there any tools that will allow to manage keys and rotate them , secure them effectively after a one time setup across every tool ?

https://redd.it/oo3s9h
@r_devops
DeFi Q&A

In one hour (6PM CEST) we will start our Q&A session on TwitterSpaces!

It's gonna be a DeFi discussion with Stani Kulechov, Joseph DeLong & Greg Vardy

Join us if you're interested!

https://redd.it/oo3z7u
@r_devops
crond isn't running unless I ssh to the container

This is my Dockerfile

​

FROM php:7.4-fpm-alpine

COPY / /var/www/

RUN apk update && apk add php libraries ..

WORKDIR /var/www

# add the crons
RUN mkdir /etc/periodic/minutely
COPY docker/crons/minutely/crons.sh /etc/periodic/minutely/crons.sh
RUN chmod -R 0755 /etc/periodic/minutely
RUN chmod +x /etc/periodic/minutely/crons.sh
RUN (crontab -l 2>/dev/null; echo "* * * * * cd /etc/periodic/minutely && sh crons.sh")| crontab -
RUN crond start

EXPOSE 9000

​

This won't start \`crond\` but if I ssh to the container after it starts running and run `crond start` again, everything works fine, why?

https://redd.it/oo3wq9
@r_devops
Set hostname in Dockerfile

There's an API we use that raises docker containers and it doesn't allow us to start container with specific hostname (-h hostname123). The only thing it accepts is a dockerfile.

Is there a way to have the Dockerfile set a specific hostname? It stops from something else to work

If you're curious why I'm asking:

> (we use SGE, and I'm building a container that would be able to submit jobs. SGE only accepts specific hostnames, and doesn't allow wildcards. It only accepts jobs that are sent only form a static list of full hostnames. For testing, I started a container with -h hostname123 and it did work)

https://redd.it/oo29fp
@r_devops
(Poll) What is DevOps?

What do you see DevOps? Is it a Role/Job title? Is it a way of working with both development and operations? Both? Something Else? Share your view in comments :)

View Poll

https://redd.it/oom4er
@r_devops
If one is interested in DevSecOps

Where could you learn more about? Coursed , tutorials and stuff?

I tried to find something on a cloud guru Pluralsight etc, but wasn't satisfied. Any tips or ideas?

https://redd.it/oon6ui
@r_devops
Github actions + PM2

Hi.

I'm trying to deploy Nest.js app with help of GitHub actions and PM2. In workflow logs, I can see that the app was started (as root).

[PM2\][Initialization\] Environment variable HOME (Linux) or HOMEPATH (Windows) are not set!

[PM2\][Initialization\] Defaulting to /etc/.pm2

[PM2\] Spawning PM2 daemon with pm2_home=/etc/.pm2

[PM2\] PM2 Successfully daemonized

[PM2\] Starting /root/actions-runner/_work/_tool/node/16.5.0/x64/bin/npm in fork_mode (1 instance)

[PM2\] Done.

┌─────┬─────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐

│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │

├─────┼─────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤

│ 0 │ api │ default │ N/A │ fork │ 7701 │ 0s │ 0 │ online │ 0% │ 27.1mb │ root │ disabled │

└─────┴─────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

But when I ssh to the VPS and run pm2 ls command, I can't see anything.

Any help would be appreciated.

https://redd.it/oop7dr
@r_devops
What does "reaped" mean in Supervisord logs?

I'm running a docker container that executes a Supervisord daemon, and I see constant logs of:

2021-07-21 13:23:49,035 INFO reaped unknown pid 2818 (exit status 127)

2021-07-21 13:23:49,035 INFO reaped unknown pid 2819 (exit status 0)

2021-07-21 13:23:34,018 INFO reaped unknown pid 2808 (exit status 127)

2021-07-21 13:23:34,018 INFO reaped unknown pid 2809 (exit status 0)

2021-07-21 13:23:19,000 INFO reaped unknown pid 2800 (exit status 0)

2021-07-21 13:23:19,000 INFO reaped unknown pid 2799 (exit status 127)

2021-07-21 13:23:03,982 INFO reaped unknown pid 2791 (exit status 127)

2021-07-21 13:23:03,982 INFO reaped unknown pid 2792 (exit status 0)

2021-07-21 13:22:48,965 INFO reaped unknown pid 2782 (exit status 127)

2021-07-21 13:22:48,965 INFO reaped unknown pid 2783 (exit status 0)

​

I don't know what this log means and I'm not sure what's causing it. Does anyone have a clue? Thx.

https://redd.it/ooq32r
@r_devops
Why redirect stderr to dev/null?

I recently started working as an Infrastructure Engineer and looking at the script files I often see this line: 2>/dev/null. What is the purpose of discarding errors? I thought errors should always be handled instead of being discarded.

https://redd.it/oo6res
@r_devops
Need code wrapper for failing code

Hi DevOps. I need to create a code wrapper that will call failing code a number of times. So far, this is what I build. Let me know if I am missing something or you have a better alternative.

#!/bin/bash

function runx() {
RESULT=1
for ((n=0; n<4 && $RESULT != 0; n++))
do $@
RESULT=$?
if [ $RESULT != 0 ]; then
echo "error in[$n]: $@"
sleep 1
fi
done
}

# For test:

runx true
runx false


My result:
error in[0]: false
error in[1]: false
error in[2]: false
error in[3]: false


https://redd.it/oot0hd
@r_devops
Recent college graduate here, can I apply to dev ops roles as an entry job?

I don't have any internship experience but DevOps sounds like it would be right up my ally. Are there any tips for what I can do to land a DevOp job?

https://redd.it/ooudml
@r_devops
Red Hat: A waste of money or worth it?

Hey All,

Thought I’d gather some opinions around Red Hat licenses and if anyone think they are/aren’t worth it.

For context one of our infrastructure team came out with a line “Red Hat enterprise Linux is a complete waste of money, we may as well just use centos or Ubuntu and save thousands a year”. Having never used Red Hats support I was curious as to what benefits you actually get paying for RHEL.

Similarly, Ansible tower is on the face of it a repacked version of the open source awx. Ansible tower is also full of feature requests which are waiting on the awx project to implement so why would one pay for a license when you effectively could get all the functionality for free? The only reason I can think of is certain organisations like access to vendor support.

https://redd.it/oouags
@r_devops
Help with Interview Assignment

Hello Guys,

I have been given a take-home task for a devops role and I feel that I need a bit of guidance/help. I've been unemployed since July 2020 and I really need this job before my unemployment runs out. I've already started it, but I feel stuck and can't seem to find the right material, most likely due to lack of experience. i

If anyone would be willing to offer some guidance I will be eternally grateful. I am desperate and really need this job. Thank you!

Cheers,

https://redd.it/oovnkj
@r_devops