Reddit DevOps
271 subscribers
11 photos
31.1K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
CI workflow with gitlab for Liferay DXP

I want to know if someone has make this before.

I saw there is a jenkins file for configure the jobs but i need to make it without Jenkins, just with gitlab CI.

Liferay DXP with multiple modules, but for updating individually.

​

Thank you in advance.

https://redd.it/pnegtr
@r_devops
Terraform apply for ec-2 Instance

Hello Everyone,
having an issue by only creating Ec-2 instances with terraform.
While creating an Instance it actually says.

"Failed to reach target state. Reason:client.Internal error: Client error on launch"

But other services such as vpc,S3 buckets and users can be created by terraform easily but ec-2 throws this error.

https://redd.it/pne2f3
@r_devops
Restricting scope of Jenkins groovy global variables to a parallel stage?

I have a Jenkins pipeline with a lot of groovy code, which unfortunately have been written on assumption that it will NOT be used in parallel stages and as such contains lots of global variables.

Naturally attempting to wrap it into parallel stages produces collisions and race conditions.

Question: is there a way to tell Jenkins not to marshal the global variables between parallel branches?

Simple example would look like this

def someFunction (int branch) {
sh "echo $branch"
someString = "hello branch $branch"
sh "echo $someString"
}

node {
parallel {
branch1: {
someFunction (1)
},
branch2: {
someFunction (2)
}
}
}

Because someString is global, this results in branch1 sometimes printing hello branch 2 and vice versa.

Of course in this example I can fix it by declaring a separate someString at the beginning of each branch, but in the case I am actually dealing with there are a lot of these, so it gets out of hand very quickly. Is my only option to bite the bullet and fix it all?

https://redd.it/pncx3r
@r_devops
Check My Strategy: IaC in 2021+

We're an infrastructure-focused team laying the groundwork and strategy for how to managed our environments and can influence the tools developers and other teams use. I'm struggling with the options because there are so many with good pros and cons. We're at the point where people are going to start investing a lot of time into learning these technologies so we need to make a good decision that will serve us for at least a few years.

We currently use the following:

* Ansible Tower for IaaS server deployments regardless of cloud
* Amazon Web Services (large footprint, rapidly growing)
* AWS SAM for serverless applications
* AWS CloudFormation for almost everything else (S3, IAM, etc)
* Microsoft Azure (small footprint, slowly growing)
* Failed attempt at using ARM for cloud-native resources years ago, left it behind and make changes by hand
* VMware vSphere (large footprint, shrinking)
* Ansible Tower for some network/host management stuff

Assumptions:

* We're doing CI/CD for any IaC
* We're not going to get rid of AWS SAM for serverless apps, so our team needs to know CloudFormation at some level to support developers
* VMware is probably going to stay mostly manual as the admins managing that infrastructure are not automation-focused
* We want to get better about managing our Azure resources/capabilities
* We want to follow industry best practices and use the best tools, without chasing every new shiny technology.
* We don't do cross-cloud applications. We use multiple clouds, but don't typically need to deploy "cross cloud".

My future strategy with reasoning:

* Ansible Tower for IaaS server deployments (unchanged)
* We "vend" servers which are consumed by other teams so long-term management and lifecycle isn't a good fit for traditional state-based IaC
* AWS SAM for serverless applications (unchanged)
* Best in class for managing serverless apps on AWS, which is the only place we do serverless.
* Terraform to replace AWS CloudFormation and Azure ARM for deploying resources that don't fall into the serverless or pure IaaS categories
* Really struggled with this because CDK is an up-and-comer, and the momentum for our environment is heavily toward AWS.
* Alternative would be AWS CloudFormation -> AWS CDK, and Azure ARM -> Terraform, but I'm not sure that CDK/Terraform are differentiated enough to warrant using the vendor-specific CDK technology.
* Terraform is a highly marketable skill with large community backing and momentum
* Allows for potential to branch into managing VMware more and other technologies we use (managed firewalls, monitoring, etc)

What do you think? Where did I go wrong.

https://redd.it/pnj2lj
@r_devops
Could someone please explain in basic terms what DevOps is all about?

I studied computer science and I'm working as a developer, but I recently heard about a career path called "DevOps".


I tried to Google it to see what it's about but the answers were a bit confusing.


Could someone please explain in really basic terms what it means?


TIA!

https://redd.it/pnfp47
@r_devops
How do you look at environments?

Trying to do some DevRel research for the company I just started working for, and would like to know how developers look at environments. Any insights you could provide would be great. Thanks!

https://redd.it/pnkjf7
@r_devops
Translate Kubernetes for Prometheus Dashboard CN 20201209

Can someone please help to translate the description for this Grafana dashboard?

https://grafana.com/grafana/dashboards/13105

Edit: Or maybe suggest an alternate one.

https://redd.it/pntjxc
@r_devops
Boss says promotions & raises are on hold. What do I do?

I have been with my company for 2 years as an intern, 1 year as a contractor, and I am now approaching 1 year as a full time employee. For my first 3 years there, I was a level 1 DevOps Engineer making $25 per hour. As a full time, I am now a level 2 engineer making $90k annually. I am in the US, working for a Fortune 50 in an expensive city in the Northeast (rent is $1.8k per month for me).

For all of 2021, I have trained numerous Senior-level employees not just on the work we do, but DevOps culture as a whole. I've introduced our team to new tools & concepts that have actually saved us money and drastically improved our velocity. I migrated applications from on-prem to the cloud singlehandedly. I documented processes & frameworks that all our development teams have adopted in their workflow. I am the single DevOps resource among a dozen different projects (one is customer-facing with over 100 million customers), and I frequently put up with unpaid on-call / after-hours issues.

During all of my quarterly reviews with my boss this year, I received nothing but praise. When I ask if there is anything I can improve on, the reoccurring joke is "only if you start working 24/7."

I was gutted today when my boss told me that our department will not be doing any promotions or raises in the next year due to budget constraints because of the pandemic (which is interesting because we are seeing record profits). Many of the DevOps engineers in my circle at the same company are a level above me, making $120k per year. My personal goal was to ask for a promotion to level 3 when I hit my one-year mark, matching that $120k pay, or at least coming close. When I got the news from my boss, I wasn't left with any time to speak up before given the "well, meeting is over and I need to drop" spiel.

Obviously I want to address this because I have put in so much time & effort this last year to prove myself. I just don't know what to do. I enjoy the work I am doing, but I constantly feel overworked and underpaid. How should I approach my boss about this?

https://redd.it/pnvr11
@r_devops
Azure Bot + WhatsApp integration

Hello, I made the Azure QnA Bot, but I can't figure out how to integrate it with WhatsApp. The purpose of this is to have a bot like in WhatsApp Business that allows to choose options, but also be able to type free text to get the info. The info itself would be on Azure SQL Database resource and can be edited and read from it via WhatsApp.

How do I go about it?

https://redd.it/pnzjih
@r_devops
Changing EC2 Windows AMI Resolution -1920 X1080 during Test Pipeline run

Hi Guys - I have a requirement to change EC2 windows AMI screen resolution to 1920 x 1080 as part of application testing criteria. I am using custom AMI build via packer and wanted to change the resolution during Jenkins Pipeline run. During the Jenkins CI execution, new EC2 instance will be spinned up using the custom AMI and execute the UI test cases inside the machine. Tests are being executed using power shell scripts which internally calls the window based application , tapping PsExec.exe . I tried variety of solutions, none of them works properly and the resolution always defaults to 1024x768

Solutions tried so far

1. Executing Powershell command to force set during the pipeline run.Set-DisplayResolution -Width 1920 -Height 1080 -Force

​

2.Installing TightVNC on the EC2 Windows machine and set the resolution to 1920 X 1080. The instance type we were using G4DN.Xlarge . After that creating a new image out of it and levaraging it. It didnt work either


3. Changing registry values inside the machine.
XResolution and YResolution
HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Video\\GUID\\0000\\DefaultSettings.XResolution

HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Video\\GUID\\0000\\DefaultSettings.YResolution

4. Installing Choco packages - > Screen resolution and setting auto logon feature.
https://github.com/dhoer/choco-screen-resolution**
choco install -y screen-resolution --params "'/UserName:{{ windows_user }} /Password:{{ windows_password }} /RdpUserName:{{ windows_user }} /RdpPassword:{{ windows_password }}'"**
Not sure, what is wrong here. Any solutions and directions for this case would be much appreciated.. Thanks very much!

https://redd.it/pnzauv
@r_devops
For Pulumi users, are you running it yourself or do you use their paid tier?

I'm tempted to give it a try but I'd like to understand the costs beforehand. I wonder how people run pulumi here?

https://redd.it/po2dqn
@r_devops
GH Actions Code Review

I've been using a pet project to learn Github Actions recently and wanted to reach out and see if anyone was interested in providing some feedback on my first CI/CD pipeline. You can see it here. You can also see the last full run results here.

In short, it performs linting, checking, and testing with every push (including caching in between runs since Rust is notoriously slow to compile). When a new tag is generated, in addition to the above, it publishes it to crates.io, builds cross-platform versions of the binary, cuts a new GH release with the generated build artifacts, and then pushes the update to my Homebrew tap.

What I'm most interested in is feedback which improves readability (it does seem a bit unwieldy at first sight), performance, and reliability. Thanks in advance!

https://redd.it/po421d
@r_devops
Why a Good Developer Experience Matters

A good developer experience means providing developers with everything they need to do their work the best way possible. Here’s why that matters.

https://loft-sh.medium.com/why-a-good-developer-experience-matters-7cd34f08fbb7

https://redd.it/po5w7s
@r_devops
Need some help with the AWS load balancer configuration with nginx as webserver.

Hi All,

I am new to aws and nginx and devops in general, I am facing an issue with aws application load balancer configuration, (I have faced the same issue on classic load balancer as well). Behind the loadbalancer there are two EC2 ubuntu instances running with nginx as the webserver serving a static site and hosted in godaddy.

Static website content is kept on location /home/ubuntu/sitename/index.html. Now the problem I am facing is when I am giving the health check path as / in target groups. ALB is picking the default index.html file of nginx located at /var/www/html/index.html. If I try to change the path fo health check to /home/ubuntu/sitename health check always fails. But the site works fine if I am not using ALB, with one EC2 instance i can access the site with domainname and same nginx configuration, also I can access the default nginx page if I give the ip of EC2 in browser.

I would like to keep the site content in the same location, and make it work without having to delete/rename the default nginx index.html

What I am I doing wrong here? please help.

Thanks in advance.

Below is my Nginx configuration file

server {

listen 80;

listen [::\]:80;

root /home/ubuntu/sitename;

index index.html index.htm;

\# Make site accessible from https://localhost/

server_name sitename.com;

location / {

\# First attempt to serve request as file, then

\# as directory, then fall back to displaying a 404.

try_files $uri $uri/ =404;

\# Uncomment to enable naxsi on this location

\# include /etc/nginx/naxsi.rules

}

}

https://redd.it/po792z
@r_devops
List of IaC & SaaS Infrastructure Services?

Hi guys,
is there a list or matrix of infrastructure services, not for VMs, but more stuff like, only CDN or only DNS, or SMS or 2fa or internet-answeringmachine or pizza-ordering (okay, last one is half joking) services, which can be controlled via IaC Code/programs?

i know like, twilio for sms or phonecalls, but there must be more.

https://redd.it/po6e3m
@r_devops
K8s on Mac Mini M1

With no update on MacMini today during Apple Event I'm considering getting the "old" MacMini M1 16Gb ram. Anyone had experience running K8s on it and doing active development? Please share your experience and what you used (minikube, kind, k0s, k3s, etc)?

Also, if you use node.js, how fast are package installation times?

Thank you.

https://redd.it/po8rcp
@r_devops
gitlab cicd vs systemd



this may be a crazy question - I want to host an algo-trading system which will trigger morning 9.00 AM and runs till 3.00 PM. I'm considering hosting either as a service using systemd or using gitlab cicd to trigger this. (i can watch activity here at any moment).

what is the best choice? is cicd reliable for running the whole day ?

https://redd.it/po2dcr
@r_devops
Challenge Tagging Helm Charts With the right version.

So, I am using Github actions and helmfile to setup a workflow that allows us to deploy resources to our clusters. All the code is in one repo with the below structure. The problem is that there really is not a very good plugin to deploy multiple helm charts into S3 and GitHub pages is public. The only public forGitHub actions to s3 only works for one repository at a time and I want a situation where CI/CD "loops" through the charts in the charts folder and finds the one with a change and requires that they value in the `chart.yaml` file be bumped up. How can I achieve this?

|

|- charts/<helm-chart>

|

|- clusters/<kubernetes-cluster-name> -

| | - cluster-helmfile.yaml

|

|- helmfile.yaml.

https://redd.it/po1uua
@r_devops
How is success measured in your DevOps team? Is anyone using these 4 key metrics?

Through six years of research, the DevOps Research and Assessment (DORA) team has identified four key metrics that indicate the performance of a software development team: 

Deployment Frequency—How often an organization successfully releases to production
Lead Time for Changes—The amount of time it takes a commit to get into production
Change Failure Rate—The percentage of deployments causing a failure in production
Time to Restore Service—How long it takes an organization to recover from a failure in production

https://cloud.google.com/blog/products/devops-sre/using-the-four-keys-to-measure-your-devops-performance

https://redd.it/poczlz
@r_devops