Reddit DevOps
269 subscribers
4 photos
31K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Please help me understand why my docker compose file is not working

This is for setting up the local development Sql Server database, I am trying to use one container for the database and another to run init scripts as a client as soon as the database container is available:

version: '3.8'
services:
databasecontainer:
image:
mcr.microsoft.com/mssql/server:2022-latest
container
name: MiBodaFetecCrmDatabase
environment:
- ACCEPT
EULA=Y
- SAPASSWORD=SecretPassword!!!!
- MSSQL
PID=Developer
ports:
- 1433:1433
volumes:
- sqlserverdata:/var/opt/mssql
restart: always
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P SecretPassword!!!! -Q 'SELECT 1' || exit 1"]
interval: 10s
retries: 10
start
period: 10s
timeout: 3s

databaseconfigurator:
image:
mcr.microsoft.com/mssql/server:2022-latest
volumes:
- ./DatabaseScripts:/docker-entrypoint-initdb.d
depends
on:
databasecontainer:
condition: service
healthy
command: bash -c /opt/mssql-tools/bin/sqlcmd -S databasecontainer -U sa -P SecretPassword!!!! -d master -i docker-entrypoint-initdb.d/init.sql; echo "All done!";

volumes:
sqlserver
data:


This waits until the sqlcmd is healthy and ready (at least I think it does). Then it tries to connect as a client, but it throws this error:

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-
specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instan
ce name is correct and if SQL Server is configured to allow remote connections.


I don't understand. I am using the service name as host name. It should find it easily right? But I guess not, can someone please help me?

https://redd.it/1ckkv3o
@r_devops
Dockerfile usage

If you're writing a Dockerfile to be executed within a CI/CD pipeline (Setup -> Build -> Analyze -> Build Container -> Deploy), would you prefer installing dependencies and building the application separately, or reusing the artifact from the previous build job? To me, the latter seems obvious, but I've only seen the former approach used so far.

https://redd.it/1cklmfh
@r_devops
Is Canonical Juju still relevant and used in DevOps space?

From my perspective, I think most people do not use it as it is more inclined to canonical products. And it is jsut another vendor lock in platform. I have not personally ever used this tool, so I could be wrong entirely.

I saw many demos/talks on conference videos. They look very good. Also, the project is more than 10 years old. I have not met a single person in devops space who uses it on their workplace or personally except a canonical employee. Just wondering today, is it just me or the tools are quite irrelevant.

https://redd.it/1ckks58
@r_devops
🤔1
Which deployment tool would be the best?

Tldr: how to deploy a containerized app where containers should deploy and terminate on demand?

Hey everyone,

I've been working on an application that provides remote rendering, essentially allowing users to view scenes or engage in gaming without relying on their own GPUs. Initially, the application was set up to run on a virtual machine (VM), but I've recently managed to containerize it, condensing it into a single image as from resource utilization purpose it's better and it's easier to ship.

Here's the gist of how it works:

- Think of it as a single-player application, where each user requires their own container instance to interact with.
- Upon user disconnection, the container should terminate automatically. No need for logging or data retention; the container's sole purpose is to run while the user is connected.
- Every time a user joins, they're assigned a fresh container instance. Even if the same user reconnects, they'll get a brand-new container.
- The application operates on a specific port (it's essentially a WebRTC server) within each container, with users connecting through this port.

Now, I'm looking to deploy this application, preferably on AWS. Given these requirements, what would be the best deployment strategy? I've been considering options like Amazon ECS or Amazon EKS with a single pod per user scenario, but I'm open to suggestions and insights from the community.

Thanks in advance for your help!

https://redd.it/1ckmgpm
@r_devops
Get error log alerts in Grafana Loki? (or please recommend other software)

I have a docker container running a python flask app and I want to get alerts for error logs

Specifically, I want to be alerted by email or a phone notification when a new error comes in, not a repetitive error that keeps happening. Obviously, the novel error detection prevents spamming

And a nice UI like grafana would be really nice too, would like to see the error logs in between the charts in the dashboard.

Or is there a better solution than Loki? I don't want to use an external service, I would like to run it like Loki in docker compose, so that logs stay on my server and don't reach third party.

Thanks in advance!

https://redd.it/1ckopmy
@r_devops
Is there an open-source fork for Hashicorp Packer or in general creating VM images?

I have been using Hashicorp Packer for creating QEMU / VMware OVMF images. With all the potential rug pulling and the subsequent forks of Hashicorp products, is there actually a fork for Packer?

QEMU with command-line is quite verbose and tedious and I found the wrapper of HCL via Packer a bit more configuration friendly.

If there is no fork, what are other tools being used to create such VM images in the OSS world?

https://redd.it/1ckopgu
@r_devops
How much time do you spend on call?

Right now I'm on a team of 3, doing 2-week rotations of on call. Generally no one gets through 2 weeks without having at least one incident. Some of my friends say I've got it easy only working 4 weeks out of the quarter, others say I'm being exploited.

https://redd.it/1ckqwjk
@r_devops
I want to learn DevOps and the reason is...

There are lot more job posts for DevOps than web developer in my region.

I have BSc in Computer Science. I had a hard time to get programming concepts in college, I failed two years,, since I never coded before and I believe I am a slow learner.i have attention problems and I struggle with consistency.

Most advance stuff I did was one project made in MERN stack which by the way I had a huge help with. I couldn't do it alone.

For now I do low income job until I find something better but I don't want to ditch IT stuff,and honestly I really need career change. I still feel there could be room for me to improve and get in that industry.

As I am looking these IT industry jobs I realized people are looking for senior web developers(frontend, backend and full stack). There are almost not at all any internships or junior positions, but I have noticed there are a lot of DevOps positions and my general feeling is that they would rather chose some DevOps without much experience than web developer with decent experience.

In my mind I think there are too many web developers around and lot less DevOps engineers and if I would chose to pursue web developer position I would need to put a lot more work than what I could learn to start as a DevOps.

Could this be truth, could I engage myself in learning DevOps and get a job faster? I would really appreciate opinion of people who are actually doing DevOps for the living.

My plan would be to start Udemy course on DevOps, learn as much as I can and try to apply to these DevOps positions. And of course I would do practical projects and show as part of CV.





https://redd.it/1ckwb77
@r_devops
Monorepo

Guys any one worked on mono nepo deployment with docker. Isnt it complicated? Got some help from stack over flow. I am frist time and looks like there is a huge leaning curve for monorepo.

https://redd.it/1ckvs5l
@r_devops
Do you like Yaml? Why or why not?

I'm acquainted with great code bases that heavily use Yaml, so I'm not really sure why other people dislike it. Spring Boot was my introduction, so it might be because I've only ever had good documentation when working with it, but when I see it used for K8s, I have no complaints. What's the better alternative that people like using? (I'm particularly looking to hear from people who hate dealing with Yaml)

https://redd.it/1cl2ytt
@r_devops
AWS/Cloud Consumption

What is your Organizations cloud footprint? How much does your org spend in the cloud and what industry is it in?

https://redd.it/1cla6y5
@r_devops
New Grad Interview Tips

Hi folks! I am interviewing for a entry-level devops position. I am a CS major (undergrad) graduating this month, and have done 4 SWE internships during school but not devops specifically. The posting says the following:

Reporting to Manager Technology, DevOps, you’re going to be a part of a team that does… 

What You’ll Be Doing

You’ll be working with AWS infrastructure, networking and services 
You’ll be working with Infrastructure as Code, Terraform Cloud, Terragrunt, Helm
You’ll be working on automating and removing manual processes
You’ll be looking at Site Reliability to find opportunities for optimization

I'm going through an interview loop with three rounds: "This interview will be a deeper dive into you background and past projects and how they related to the role as well as diving in deeper to why you are interested in a DevOps role at company X."

The recruiter told me that they decided to hire 2 juniors to backfill a senior/staff devops person that just left. As someone in industry, what would you be looking for in this kind of interview? How should I prepare?

https://redd.it/1cl9vvu
@r_devops
How to Set Up Affordable Email Forwarding for Your AWS Domain

Hey folks! 👋 I wanted to share a practical guide for setting up email addresses for your AWS domain with minimal costs. This approach requires only a single Lambda function, and I've implemented it successfully for my own domains. If you're looking to manage your email setup more efficiently and affordably, this might be the solution you're after.

In my YouTube video, I walk you through the entire setup process using a fully automated Terraform infrastructure that simplifies adding new domains. Plus, I've included all the source code you need in my RadzionKit repository to help you jumpstart your project! 🌟

🔗 Check out the video: AWS Domain Email Setup
📂 Source Code: RadzionKit on GitHub

Let me know what you think, and feel free to reach out if you have any questions!

Cheers,
Radzion

https://redd.it/1clbrw5
@r_devops
How much should a DevOps engineer know about Git and development and coding practices?

Hi all,

I'm a rather new IT architect with a software development background of 10 years.

I work for a university and when I joined, we had one young devops guy who maintained all our stuff, we have a docker swarm and he knew docker well, git well and linux well.

Our 3 in-house devs only wrote code, they knew very little about Docker and this one devops guy managed everything after the devs pushed their code.

We then hired one more, they were both quite decent and covered everything and when I joined, I had a lot to learn and to do so I didn't have time to get into that topic.

But then they both left and we hired 2 new ones. They were also not the most experienced, but had about 5 years of experience and seemed smart and interested and knew linux etc.

And both have been solving their problems quite well, asking a lot of questions and being proactive.

But recently one of them had issues when trying to merge code that was mirrored to our Gitlab from a partner developer. And basically I found out he doesn't know how to use git very well. He doesn't know the process of resolving conflicts. He tried to learn about it, but used Gitlab's UI for that and that always is not possible.

Of course I get it that a devops can't or shouldn't know about conflicts on the business logic side, but everything related to the CI files or package.json/composer.json files or stuff like that, I feel like they should know.

And of course during the interview he said he doesn't have much experience with development, so i took that into account, but I want him to learn now. I feel like understanding package managers and GIT is the basics, minimal requirement that a devops should have. Also docker, which he can manage with now, but didn't know much from the start.

I have been quite accommodating and understanding, but then again I feel like it's not my job to do those things instead of him or teach him how to use Git. I have bigger things to worry about.

So I am wondering how should I approach this. I want him to deal with this and learn git. I want at least one devops to be FLUENT in it and know it better than me. The previous guy was like that.

But I also don't want to create a conflict because we're a team and get along well.

https://redd.it/1clduy4
@r_devops
Creating a SUSE lab. Any ideas?

Hey there!
I am tasked with the creation of a SUSE lab so pre-sales eng can try it out on their own and I can use it during our training presentations.

What do you think are the hot topics and real scenarios I should be covering?
I would like to be focused on SUSE rancher...

Thank you!

https://redd.it/1clfii0
@r_devops
SEEKING REFERRALS DevOps Engineer for 100% Remote Web3 Roles

Hey Fellas,

I'm a DevOps engg with 4+ years of experience, specializing in Web3 space for the past 3 years. Seeking 100% remote roles. If you know of any openings or can refer me, I'd be grateful.
Check out my LinkedIn and let's connect!

Peace Out

https://redd.it/1clgdjv
@r_devops
[HELM] is this the correct way to pass values ?

values.yaml

mongodb:
  replicaCount: 1
  image:
    repository: mongo
    tag: 4.4.6
  command:
    - "numactl"
    - "--interleave=all"
    - "mongod"
    - "--wiredTigerCacheSizeGB"
    - "0.1"
    - "--bind_ip"
    - "0.0.0.0"



command: 
{{- range $command := .Values.mongodb.command }}
  - {{ $command}}
  {{- end }}


https://redd.it/1clgr55
@r_devops
Monday morning funny

Good morning! Here's a joke for you fellow Monday warriors:

Why did the developer stare intently at the application monitoring dashboard all weekend? ...Because if they looked away, it might actually go green! 😂

https://redd.it/1clirq7
@r_devops