Reddit DevOps
268 subscribers
30.9K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Need help in groovy code /shared libray for jenkinsfile

Hi all


This is my jenkins file
Jenkinsfile
========

library(something)

pipeline {

agent any

stages {

stage('Welcome Step') {

steps {

myfile()

}

}

}

}


myfile.groovy
===============
def call(){

sh 'echo hello world"

}


I just need to add a parameter in myfile() so that it over rides the existing sh like


myfile(sh 'echo some script which the user can pass ')


then output is


some script which the user can pass





If myfile() is without parameter then


below block will excute


def call(){

sh 'echo hello world"

}

output will be


hello world

can you please help me with this
I tried using if else but unsure how to execute sh inside a function as a parameter

https://redd.it/rp25vj
@r_devops
Is Devops what I do?

The position I'm in is essentially something that never existed at our small company. I do some dev work in an app that I built, sql dB creation and maintenance, automation scripting and rpa, support, upgrade, and build data interfaces for various enterprise software packages. Other misc crap related to these tasks.

https://redd.it/rp1j7q
@r_devops
What’s everyone experience with the recruitment process. Do you feel like recruitment process is broken ?

I was wondering what’s everyone experiencing is. Do you feel like it’s necessary to go through all these interview stages including assessment or better to have one off technical interview. Do you think all level of engineering should undergo similar recruitment process ?

https://redd.it/rp6hxz
@r_devops
CloudReach?

I know these questions are annoying, but I’ve looked everywhere (Google, Reddit, job boards, etc…) and found nothing about the below information.

Hopefully this is an appropriate sub for this, but I’m in another career right now and have been exploring career switch from accounting/finance. Does anyone have experience with CloudReach? Specifically this job title: Associate Cloud Systems Developer - Talent Academy.

The company has fairly good Glassdoor reviews etc… just looking for any unbiased advice/opinions.

We have an interview set up soon. Appreciate any input.

https://redd.it/rp7r31
@r_devops
What can I learn from my business requirements role to aid in a future DevOps career?

Hey all,

I've wanted to get into an ops/cloud engineer role for over a year (creating/maintaining pipelines, etc, whatever else the specific role entails). My background is a little helpdesk, some business-type experience, and some ports, protocols, and services engineering.

I recently landed a business and requirements analysis role, my first exposure to the SDLC. Closer to my goal. Although I don't want to stay in this role forever, I want to perform well in it and pick up whatever I can that will help in the long run.

Is there anything I should try to capitalize on? Anything I should try extra hard to learn?

https://redd.it/rp7i62
@r_devops
What is the averagre DevOps salary?

Hi!

I am thinking about moving to the other country. Do you think that the below values are correct for the average gross salary for the DevOps Engineer (AWS) with 3 years of experience?

1. Oslo - 70 000 NOK/month,
2. Copenhagen - 60 000 DEK/month,
3. Helsinki - 6000 EUR/month,
4. Zurich - 8500 EUR/month,
5. Vienna - 7000 EUR/month.

I would really appreciate any input!

https://redd.it/roygqq
@r_devops
error while running ansible file on ubuntu linux

ERROR!

'sudo' is not a valid attribute for a Play

The error appears to be in '/home/ubuntu/ansible/play.yaml': line 4, column 4, but may

be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

\- hosts: host1

\^ here

​

​

​

---

- hosts: host1

sudo: yes

name: play1

tasks:

- name: Install Apache

apt : name = apache2 state=latest

https://redd.it/rpbh4h
@r_devops
Google Cloud Run vs PaaSs like Heroku

Hi folks,

I'm evaluating deployment options for a small startup and wanted to know what I'd get with fully managed PaaSs like Heroku that I won't with a container as a service platform like Google cloud run ?

I've tried Google Cloud run and it seems pretty straightforward to set up, the only thing that I imagine would be easier on Heroku is that you wouldn't need to "glue" things together like Cloud SQL, Secret manager, Google Cloud storage etc, it seems you can even use Procfiles with cloud run but I used Docker.

The only things that worries me is that it offers too much options and I could end up with surprising bills, for example I ended up with a $40 cloud SQL bill just with the hello world example used for few hours.

So what would I gain with Heroku that I wouldn't with Google cloud Run + Cloud SQL etc ? Thanks in advance.

https://redd.it/rpdgdn
@r_devops
Deployment scripting is not continuous delivery. Agree?

I was just discussing with my friend that most of the companies are actually not doing DevOps the right way. Well, nobody knows what is the right way still but I know that deployments through scripting that is maintained over time is not continuous delivery and it isn't the path to DevOps.

What if the guy who knows this type of deployment leaves one day?

I think most of the companies say they are doing continuous delivery and deployment but they aren't.

Well, even most of the service/tool providers say they are a CI/CD tool company but what they do is just CI. The CD part is missing in most cases.

Do you agree on this? Open for discussion.

https://redd.it/rpgqzo
@r_devops
Can someone ELi5 webhooks

I understand that they POST data usually within a JSON payload. I've been going through some docs for various tools (lakeFS, Prefect) and everything seems to support posting webhooks, but I can't find anything about receiving them? Am I missing something?

I'm trying to achieve CI/CD data pipeline.

Step 0 - There is some data in a cloud bucket

Step 1 - Batch job runs and fetches data from somewhere, but that data is pulled into an isolated data branch in LakeFS

Step 2 - *this is where I think webhooks should be used* As part of a pre-commit hook lakefs needs to send data saying "hey there's new data on this branch" to a databricks cluster which then says "sure let me run these data quality checks"

Step 3 - Assuming the quality checks pass it databricks says "you're good to go, all checks cleared" and then that data is commited and then merged. (or some pre-merge check could be done too for conflict resolution)

Does one still need webhooks when using something like Prefect/Airflow anyways? The "state" information passes between tasks, and data can be explicitly passed between tasks. I'm confused I guess as to whether an orchestration tool is sufficient for data pipelines? But I'm confused as to why lakeFS has webooks.

​

Anyone willing to explain webhooks in the context of data engineering?

https://redd.it/rph18d
@r_devops
Modernize Your Legacy System The DevOps Way

Modernizing the legacy IT infrastructures has become a necessity to keep pace with digital transformation and disruption as no organization can afford to weigh down under the burdens of traditional IT systems by becoming outmoded in the contemporary world.” 

https://redd.it/rpks7f
@r_devops
Lab recommendations

I started as a sysadmin then moved into management. I'm looking to move back to working hands on with tech. DevOps seems like a good fit because I have a strong scripting and dev background and have been managing a private cloud and some Azure resources for the past 5 years.

When learning about virtualization I would build servers at home and run services like Plex, OwnCloud, SabNZBD and the likes. This was both educational and useful for some hobbies.

I want to practice building and deploying in AWS and Azure, but am looking for inspiration for the services that I can deploy in that lab environment. Any recommendations?

https://redd.it/rpoznu
@r_devops
Moving into Azure DevOps

Hi All,

I am moving from a Level 3 Support role to a Azure DevOps role

Would anyone have recommendations on where to start my new learning path and what would be the fundamentals to learn and what order would be best to learn them?

I am already very confident with Azure from a administration and implement aspect

https://redd.it/rpq08a
@r_devops
How did you guys learn networking

Hi All,

I am into azure. Sometimes I feel the networking stuff is too hard to understand not azure but networking in general..
I do know about IP address subneting and stuff but haven’t studies anything particularly for networks
Any network gurus here can you suggest me a path to learn networking so that it can be useful for my cloud journey ( preferably practical and short)

https://redd.it/rpspmu
@r_devops
Should and Can I move from networking to Devops after 9 years behind a cisco router?

Hello everyone! I want to shift from my current Routing and SD-WAN day to day work to DevOps. For me it is more engaging and exciting. Also from what I hear, the job postings are more and the pay is somewhat better. There is also the option for remote-work. I want to hear opinions from people who shifted to this as well. And will I make it as a much older candidate entering as a fresh in something this big?

https://redd.it/rptd38
@r_devops
Terraform - Import existing infrastructure or recreate everything?

You have been given full control of your companies infrastructure (≈10 lambda functions, 2 RDS and 5 S3 buckets, all across 2 VPCs), and must manage it with Terraform. Which of the options would be best?

View Poll

https://redd.it/rpt9mw
@r_devops
A hashicorp vault plugin for ephemeral Jenkins users/api tokens

Hey folks!


I thought some of the folks here would be able to take advantage of a new vault plugin I've been working on. I recently had a need to have auto-expiring API tokens for Jenkins so I developed this plugin for vault to have a cleaner solution. Hopefully it helps some others here as well.


https://github.com/circa10a/vault-plugin-secrets-jenkins

https://redd.it/rpxstq
@r_devops
Managing an ec2 in 2022

Hi,
I work in a relatively small shopping oriented startup.
We have a mobile app with ~10k users and a back-office system which should handle similar load to the app.
We are expecting to grow steadily over the next year, probably to a max of 100k users in the best case.
The user traffic is quite steady during the day (with only a small percent of users active at any given time) and non-existent at night (good time for maintenance stuff).
We built our stack all in on aws with amplify including appsync, dynamodb, lambda etc.
In practice, the mobile app and the backoffice are using separate amplify stacks.
While the mobile app has benefited greatly from this stack, and graphql in particular, the backoffice system has become a pain to work with as the team grows and the usecases are getting more complex. Dev velocity is affected negatively, and simple product requirements often entail unnecessarily complex solutions.
As a result, we have been considering going back to the basics with a simple ec2 instance, and a monolith backend deployed on it, probably running on docker, 2016 style.
A big difference compared to 2016 is that there are good IaC solutions to help maintain this type of stack, simple as it may be.
We also considered ecs/fargate - but our bad experience with amplify discourages us from going into another aws rabbit hole.
I think that we can probably scale on a single ec2 instance over the next year while increasing dev velocity significantly, and we can reconsider scale when the time comes.
I do however have some reservations, in particular going back to an older type of stack (2016 style), and having to manage an ec2 in terms of patches, permissions etc (I have seen aws ssm can ease some of the pains).
I'd be glad to get some opinions on this topic, and open to hear other alternatives.

Thanks!

https://redd.it/rpv6m0
@r_devops