Reddit DevOps
268 subscribers
2 photos
31K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
How to add non modular jar in module project ?

stackoverflow-source

I tried import junit.awtui in my module project main class

Error report : The package junit.awtui is not accessible

Problem is junit jar hasn't module-info.class, so its packages are not accessible
How can I resolve the problem ?

https://redd.it/13prgrs
@r_devops
DevPod Demo - Walkthrough of the UI and CLI tips (Open Source alternative to Codespaces)

Here's a demo with one of the DevPod creators. We walk through how to create workspaces, how providers work, how the CLI can be used instead of the UI, and other topics we haven't covered previously in videos.

If you have questions, or want to see content around some of the topics we briefly touched on, let us know!

https://youtube.com/live/Bu-aGpzwMUw

https://github.com/loft-sh/devpod

https://redd.it/13psb7z
@r_devops
Jenkins credentials

So, I was very excited about creating my first pipeline from scratch! Using Terraform to write my code and a GitHub repo, then now it comes to automating with Jenkins and I keep getting this error message



Error: configuring Terraform AWS Provider: failed to get shared config profile, default with provider["registry.terraform.io/hashicorp/aws"\], on providers.tf line 9, in provider "aws": 9: provider "aws" { Build step 'Execute shell' marked build as failure Finished: FAILURE



The code runs with no errors from the Cloud9 instance but for some reason, Jenkins cannot access the shared credentials file. Help, please

https://redd.it/13pux6j
@r_devops
Learn how elastic.co "does" internal eng productivity this Friday

This Friday, Stacey King Poling, Director of Engineering at Elastic.co will discuss eng productivity as part of Aviator's "off the record" series.

It's free and not recorded. Hope to see you there.

https://twitter.com/Aviatorco/status/1661070867453886465?s=20

Sign up: https://dx.community/

https://redd.it/13pw9hy
@r_devops
dagger tool

Hello, folks!

I have been studying a bit the dagger for CICD tool at https://dagger.io/
For me it's pretty cool how pipelines could be created using Python/others programming languages instead of using YAML / pwsh/ bash scripts/ GitHub actions.
Other positive point is to have a way to test the pipelines without spending time on cloud CICD solutions.
What do you think about? Are you currently using for your projects/in your company?

Appreciate your comments

https://redd.it/13pvqlc
@r_devops
Hypocritical managers and devops

Has anyone else noticed the number of managers that are absolute hypocrites? They want us to do strict 9 to 5, in the office a certain amount. And then they are barely visible from the org standpoint, work from home without any schedule for us to know when they'll be available. I'm at the point where I've been with this org for a year now almost and I think I'm ready to move on already. Like if I had kids it'd be a lot easier to get him to be flexible about the hours. But since I don't have kids it's like he expects my entire life to revolve around this team.

Like, I was 7 years in the industry before this job. Have appointments, health issues, have PT, etc. Those are ALL during the day. It's weird, as long as he doesn't see or is doing his own thing he doesn't care. But he just gets these random moments of "i must exercise my power and feel powerful" and we're just supposed to bow down. It's so cringe and I'm ready to leave this employer.

/vent /rant

https://redd.it/13pwwnb
@r_devops
Help me understand trunk based development (for academia and research usefulness)

I'm an academic researcher. I have a deep fear of one day being one of those old professors who still thinks LabView is the greatest thing since sliced bread and that there isn't even a reason to give something like Python the time of day.

Git flow is an excellent branching model. It still has its place for things like open-source projects where you need to control things tightly. It is also relatively simple, and can easily be explained and followed by other academics and scientists who, while they write good code for their domain, are not themselves software engineers.

I'm a proponent of semantic versioning and conventional commits. I also believe deeply in achieving 100% code coverage and that this plays a significant role in continuous integration before allowing merges back into main.

I keep hearing about trunk-based development. I've read many articles. I've read most of trunkbaseddevelopment.com. However, it all seems like a lot of talk. It looks even more so to be just the absolute Wild West and an excuse to develop however you want. Of the few more fleshed-out examples I have found, it quite honestly seems to largely resemble git flow in many ways, minus the develop and release branch, just going straight from feature to main, assuming it has passed all the CI checks.

Emphasis keeps getting placed, it seems, on these short-lived feature branches so that you can avoid merge hell. Merge hell is not a consequence of long-lived feature branches. It is a consequence of inadequate project management, in my experience. It stems from needing a proper issue tracker and project manager; from two people or groups working on the same area of code simultaneously.

I understand trunk-based development is not meant to replace things like git flow for open source, but I am interested in if it fits internal projects. But I am seriously failing to understand the appeal or, quite frankly, the point.

I especially don't understand this rapid or short-lived feature branch talk. Sometimes features take a long time to develop. Writing good unit tests and integration tests often takes longer than writing the code itself. There's no getting around that and no changing the fact that you shouldn't be prematurely merging code from a significant addition that will take time to engineer out properly.

I don't understand what trunk-based development actually solves, and that isn't just a consequence of poor project management.

What am I missing or failing to understand here? Are there any good articles or resources that talk about and address these kinds of issues in a salient way that are not just pure hype clickbait blog posts?

Thanks in advance.

https://redd.it/13pyae7
@r_devops
OIDC Proxy Server for AWS/Github Actions

Has anyone created a custom api server that acts as a proxy between Github enterprise org and AWS for adding OIDC provider

​

end goal is to use github actions to use oidc role on aws. however github enterprise org has a VPN in front of it and cannot validate thumbprint through providers (AWS console)

https://redd.it/13q2dc8
@r_devops
"um": GPT-powered CLI Assistant

Hey, fellow Redditors! I'm excited to share with you a CLI tool that we've been working on called `um`. `um` as in "um... what was that aws cli command to invoke lambda function?".

GitHub: [https://github.com/promptops/cli](https://github.com/promptops/cli)

**Motivation**

On average I run roughly 15 shell commands a day. These include a lot of trivial git commands, but there’s the occasional aws cli command to run, or I have to untar a file, or run internal script with positional arguments which I always mess up. And this leads to googling, or reading through the aws cli help, source code, etc. Ultimately I don’t want to remember funky syntax, I just want to say what I want to do and get it done. That's why we developed "um" - just ask questions in plain English right there in the terminal and get the perfect shell command. No more context switching.

**Key Features**

* **Find the right command without leaving the terminal:** ask questions in plain English directly from the command line.
* **(Optional) Index your shell history for sub-second response:** By indexing your history, `um` can suggest previously used commands and personalize generated responses. The index is stored locally on your machine.
* **GPT-powered answers:** `um` uses GPT-4 (by default) to generate command line expressions based on your queries.
* **Context-aware corrections:** `um` learns from your corrections, ensuring that similar questions give you improved results over time.
* **Respecting your privacy:** To protect your sensitive data, `um` uses the excellent [detect-secrets](https://github.com/Yelp/detect-secrets) python library to remove passwords and tokens before indexing commands. Also our OpenAI account is opted out of collecting and using data for training the next versions of GPT.

**How** `um` **works**

`um` first checks the indexed history for sub-second responses. If the command is not found, it uses the generative model to provide command suggestions based on your query. You also get explanations of the suggested commands. Corrections that you make are indexed, to ensure improved suggestions for similar questions in the future.

**Installation**

👉 Please visit our [GitHub repository](https://github.com/promptops/cli) for installation instructions and more details.

**Examples**

$ um list running ec2 instances

📖 aws ec2 describe-instances
➜︎ aws ec2 describe-instances --filters 'Name=instance-state-name,Values=running' --query 'Reservations[].Instances[].{Instance:InstanceId,Type:InstanceType,State:State.Name}' --output table
💭️ don't see what you're looking for? try providing more context

$ um list git branches ordered by recency

📖 git log
➜︎ git for-each-ref --sort=-committerdate --format='%(committerdate:relative) %(refname:short)' refs/heads
💭️ don't see what you're looking for? try providing more context

We value your feedback! We are still in the early stages of development, if (when) you encounter any issues or have suggestions for improvements, please let us know. Reply to this post, report in github, or contact me directly.

Thank you for your support, and happy scripting!

https://redd.it/13q48o5
@r_devops
Ansible - how widely used is it ?

Past two organizations / teams I have been with they used ansible but it seemed like rarely. They weren’t always pushing changes to a ton of nodes etc. Probably got used a handful of times a year. New place I’ve seen it used twice in the past 3 years….

It is just the places I have worked at or is it slowly being phased out ?

https://redd.it/13q3oo3
@r_devops
How long do you stay “stuck”

Preface, Junior here - on a relatively smalll team. Only 3 of us and 2 other seniors. One just started parental leave as of yesterday.

Have been stuck on an issue well since yesterday and I have been exploring a few options. Have been running things locally but I keep coming back to square 1. At this point it’s frustrating, on a relatively simple Ask but the requirements have me unsure how to tackle said problem.

Other senior is super busy lately and I’m just frankly not sure when to ask for help/insight, especially since this would be considered a more junior problem.

When do you guys decide it’s time to reach out rather than being stuck for X amount of time longer. Unfortunately Imposter syndrome has me paralyzed on seeking advice/help..

https://redd.it/13q3k4n
@r_devops
My boss keeps committing his creds into git

Today I saw that my boss had created a script, again, that could include his system credentials, I looked at his branch, and sure enough, it does. Last time I cleaned a repo where he did this I had to clean it twice, because he pushed his copy of the branch up again. How do you handle this?

No impersonating him destructively isn’t an option, it’s a sensitive system where I’d have more than normal penalties.

Yes, I am already looking at other opportunities despite only being here almost 3 months.

https://redd.it/13q6fwm
@r_devops
Running tests in dockerfile that depend on ephemeral mongo container, is it worth trying or is there a better way?

So I've got a flask/react app as well as some unit tests for it. the api connects to mongodb. The tests depend on a mongodb connection, and I've currently got it set up to connect to a local mongo container, populate it with some data, then test against that but I'd like to automate the mongodb container creation/population. Except im currently just running docker run -d mongo --network host to start the container and the tests are connecting to mongodb://localhost:27017

Now, from what I've read it is typically not the best practice to do testing in the same step as building the image, so I'm open to alternatives that would be a better idea for this, I'm fairly new to devops. I've read a little about multi-stage docker builds, but still trying to wrap my head around how the above app would be structured or if they're even applicable here.

https://redd.it/13pvy59
@r_devops
Instana synthetic monitoring

Im using the new instana synthetic monitoring feature to monitor my website. I have a smart alert that is created when the test fails 3 times consecutivrly . My website shuts down over night, so the tests fail - is there a way for the tests to run only at a certain time, I.e during the day?

https://redd.it/13pu3og
@r_devops
SONARQUBE LTS 9.9

Hi Team , i have one query we have sonarqube 8.9.8LTS and devloper have written code in java8, now with the sonarqube lts 9.9 it supports java 17 and sonarscanner java 11 or 17 , will this affect as the code written in java 8 will come to scanner where java 8 is not supported . How we can handle this?

https://redd.it/13qc6h6
@r_devops
Unable To Publish Port On Host Machine With Docker

I was trying to build an image from Dockerfile but it didn't worked When I Use

docker run -p 8081:8080 yt-test

But, It Works When I Use Host As Network Interface. On Host Port 8080 (But I Want 8081).

docker run --network host yt-test

This is my Dockerfile

FROM python:3.9

RUN apt-get update && apt-get install -y git

WORKDIR /app

RUN git clone https://github.com/user234683/youtube-local

WORKDIR /app/youtube-local

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 8080

CMD "python", "server.py"

Any Idea Why This is Happening?

https://redd.it/13qdeie
@r_devops
If an 18yo person applied for a job and had a load of Cloud Provider certs + CKA - what would be your gut reaction?

My 17yo daughter (non-binary) is F-ing up at school caused by the usual stuff of bullying, depression and teenage angst and is unlikely to finish her A levels. She didn't get a high enough maths gcse grade, 1 point off being able to A level Computer Science and selected criminology instead along with Accounting and law.

So I've bought the GCP Architect, Azure Architect, AWS Architect and Mumshads CKA courses and I'm going to sit with her while she goes through them, does the practice and then buy her the exams.

She'll be 18 by the time she sits them and/or has to do retakes.

So if a CV for an 18 yo with no work experience and a load of certs got past the recruiter screening and landed in your inbox, what would be your thoughts/reactions

Edit

What I should have pointed out is that yes she does have an interest in doing it. And that this is a step to getting a bottom of the ladder entry-level job plus the architecture of the providers, their services, how they integrate, gives the high level knowledge of what they are about.

https://redd.it/13ooqr6
@r_devops
What would be the optimal working environment for junior cloud/devops engineers?

Where I come from good devops engineers are rare as (natural) diamonds - and every company is searching for them. I don't really have that much competition but I think my rate of growth could be much better at a larger company.

I'm just some weeks short of becoming intermediate where I work at, finally.
But their lack of an automation/security mindset is probably corrupting my future chances, so:


If you had some experience and want to grow or if you were younger again and had a 2nd chance, what would you actually look for at companies?
What structure, benefits, responsibilities... how large?
I want to have impact and for that I need the right environment.

https://redd.it/13qg6m4
@r_devops
DevOps Conferences -Europe 2023

Hi, guys,

I hope you are all doing well.

I was hoping you could give me some ideas of interesting conferences for DevOps people in Europe happening this year still.

Thank you :)

https://redd.it/13qi5lz
@r_devops
Can Terraform Replace Powershell scripts ?

Hello and sorry for asking this as im not really experienced enough know the answer to this.

Context : as my company as a default setup for the Azure tenant of our Clients and will adjust them afterwards for special "needs", ive created around 6-8 Powershellscripts that will create the User and Groups Management import the basic policies ( Endpoint compliance etc ,thanks github for that one) etc etc.


Now my question is could the same be achieved with a terraform file ?
Would you recommend doing it that way or stick to the PS Scripts ?


Thanks :)

https://redd.it/13qk8ou
@r_devops