Reddit DevOps
271 subscribers
11 photos
31.1K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Seperate devlopment and production containers?

Should I separate the development environment container from the production container (ei. into a Dockerfile and Dockerfile.dev)?

Otherwise I think I would have to either:

\- Parameterize the Dockerfile

\- Make a multistage file, and use targets when building containers

I think separating these would make the gap between between development and production greater, but make the setup simpler.

I'm quite new to deploying larger applications, so the pros and cons of the various approaches aren't quite obvious to me.

https://redd.it/fl7vdp
@r_devops
GCP Fundamentals Series: Three online half-day programs and take your skills to new heights

Cloud OnBoard is a free online instructor-led training program that enables developers and IT professionals to expand their skill set into the cloud. **Google Cloud Platform (GCP) Fundamentals Series** brings the Google Cloud Community together for three consecutive days of interactive learning and hands-on labs.


Choose one, two, or all three online half-day programs and take your skills to new heights:

* Core Infrastructure
* Big Data & Machine Learning
* Application Development with GCP

**March 24** **-** **26, 2020**

[https://cloudonair.withgoogle.com/events/apac-gcp-fundamentals-series](https://cloudonair.withgoogle.com/events/apac-gcp-fundamentals-series)

[https://imgur.com/a/0F4Yh6F](https://imgur.com/a/0F4Yh6F)

https://redd.it/flnzmh
@r_devops
I just took a job in DevOps (software sales) What Book would you recommend for me to get a basic understanding of DevOps etc?

Thanks in advance

https://redd.it/fl9xou
@r_devops
Career Advice: how to restart

How to restart the career and learn things.

Myself:

Worked as a Devops engineer from starting of my career.

Tech Stack: Aws, Docker, Kubernetes, Linux, Python(very little).

I am not perfect in any stack right now as the requirement and stack changed at very fast pace. I want to learn the technologies in depth of docker kubernetes and cloud computing. But right now not getting exposer in the company.

Working on nginx lua openrestry. Not getting it to work. Plus there are not source/ tutorial available on the same.

If someone has faced the similar issue in the career and they could changed the path and drift the career to where they want to work. Please pour some guidance in comments.

Regards

https://redd.it/fl8z40
@r_devops
How has your work flow changed with extended remote work?

I am sure folks here have worked from home for few days in between - but with an extended period of remote/ work from home, has your workflow changed? Do you communicate more across functions now? are all communications shifted to slack/email now?

Just curious, what folks are experiencing - or any new flows which are making them more productive?

https://redd.it/fl49fj
@r_devops
gaming on containers?

Hey everyone!
Is it possible to run games on Windows container?

I have this question because running VMs use tons of resources. I would have no problems with VMs but it has to run its own kernel besides containers which uses the hosts kernel so it uses more RAM and CPU resources to do so (poor mans life). Is it possible to run games inside Windows containers and also be able to interact with it like you would do on your host OS screen (Windows)? Running the game on host uses about only 5-8% of CPU, but when I try to run it on VM together it adds to be about 30% (Game inside VM) of CPU usage for one game instance... I want to run as many game instances as possible, only 1 game instance is allowed on one OS. I know that there is such a thing as Windows sandbox which doesn't really fit me because only 1 sandbox allowed to run per OS.

i7-6700HQ
GTX 950M
16GB of DDR4

Is there any lightweight solutions to VM?
If Windows container is able to support video output how to setup everything?

P.S. I don't care about security and isolation. Stability and workload is my problem.

https://redd.it/fkzfax
@r_devops
Enabling HTTPS via letsencrypt on AWS EC2 with nginx/docker

It's my first experience, so bear with me :)

We don't have devops in a team so I as a developer gotta do this. I'm working on enabling https for my domain via nginx & certbot on docker & AWS EC2. I follow this instruction [https://stackoverflow.com/questions/57239213/how-to-enable-https-on-aws-ec2-running-an-nginx-docker-container](https://stackoverflow.com/questions/57239213/how-to-enable-https-on-aws-ec2-running-an-nginx-docker-container) & I stuck on generating dummy certificate via letsencrypt. Http-01 challenge fails every time. I've got A, SOA, NS & CAA records set in Route53. Below I changed my real domain name, not sure if i should do this. My nginx.conf is :

"worker\_processes 1;
user nobody nogroup;
\# 'user nobody nobody;' for systems with 'nobody' as a group instead
error\_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker\_connections 1024; # increase if you have lots of clients
accept\_mutex off; # set to 'on' if nginx worker\_processes > 1
}


http {

include mime.types;
\# fallback in case we can't determine a type
default\_type application/octet-stream;
access\_log /var/log/nginx/access.log combined;
sendfile on;
server {
listen 80;
server\_name mydomain.pl www.mydomain.pl;
server\_tokens off;
location / {
return 301 https://$server\_name$request\_uri;
}


location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
}


server {
listen 443 ssl;
server\_name mydomain.pl www.mydomain.pl;
server\_tokens off;
ssl\_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl\_certificate\_key /etc/letsencrypt/live/example.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl\_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location /static/ {
alias /nginx/static/;
autoindex off;
}


\# location for files downloads.
location /media/ {
add\_header Content-disposition "attachment; filename=$1";
alias /nginx/media/;
try\_files $uri $uri/ =404;
}


location /static\_django/ {
alias /nginx/static\_django/;
autoindex off;
}


location \~ \^/(crm|api) {
proxy\_set\_header Host $host;
proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;
proxy\_set\_header X-Real-IP $remote\_addr;
proxy\_set\_header X-Forwarded-Proto $scheme;
proxy\_pass https://api:8000;
proxy\_set\_header X-Server-Ver $nginx\_version;
}


location / {
root /usr/share/nginx/html;
index index.html index.htm;
alias /nginx/build/frontend/;
try\_files $uri$args $uri$args/ $uri /index.html;
proxy\_set\_header Host $http\_host;
proxy\_set\_header X-Real-IP $remote\_addr;
proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;
}
}
}
"

Error from letsencrypt tells:

"Domain: mydomain.pl

Type: connection

Detail: Fetching

[https://mydomain.pl/.well-known/acme-challenge/F8S1jFeD64QKWsDWu9lN1Dcv1-FatLHjEcchR53-ago:](https://ehom.pl/.well-known/acme-challenge/F8S1jFeD64QKWsDWu9lN1Dcv1-FatLHjEcchR53-ago:)

Timeout during connect (likely firewall problem)
Domain: [www.mydomain.pl](https://www.ehom.pl)

Type: unauthorized

Detail: Invalid response from

[https://www.mydoman.pl/.well-known/acme-challenge/2iDeX95XKRo6m-MgPtI25K0j-IiG79xR07O8DwLSTCk](https://www.ehom.pl/.well-known/acme-challenge/2iDeX95XKRo6m-MgPtI25K0j-IiG79xR07O8DwLSTCk)

"

What else should I check to overcome this issue?

https://redd.it/fkz6cq
@r_devops
DevOps Industry knowledge



Hi,

I wanted to get a little knowledge of the DevOps industry. What sort of companies generally use DevOps as a service and what are some best companies that provide DevOps as a service?

***PS- I am trying to write a paper on the DevOps industry and answers to these questions would be of great help to me.***

https://redd.it/fkt4pm
@r_devops
Highly available, external load balancer for Kubernetes in Hetzner Cloud using haproxy and keepalived

Hi, I needed a load balancer for my Kubernetes cluster in Hetzner Cloud and since HC doesn't offer LBs as a service yet, I set up a highly available load balancer with haproxy and keepalived. Check it out if you need something similar - what's described in the post can be adapted to other providers as well.

https://vitobotta.com/2020/03/20/haproxy-kubernetes-hetzner-cloud/

https://redd.it/flvv6n
@r_devops
Help with gitlabCI pipeline triggers

Hey guys,

I mostly work with Jenkins but am currently doing some stuff on gitlabCI, and I'm having an issue trying to achieve something which seems pretty simple to me. I want to be able to trigger one pipeline if another one succeeds, but I haven't been able to find any reference to that in the official docs and I'm pretty stuck.

Basically, if pipeline A succeeds, I want pipeline B to run. I guess it can be configured in the ```when``` section, something like ```when: pipeA.success``` or something like that, but I haven't been able to achieve it.

I'm pretty lost so if anyone could point me towards some better docs or even a stackoverflow thread that would be great.

Thanks in advance!

https://redd.it/flxfus
@r_devops
Newbie

Three years ago, I used to use bitbucket and it used to build whenever we push code. That's it.

What has changed now ? Nowadays, different setup, am told we should go to Azure pipeline and there are environments, we can just click on them DEPLOY, it's done.

To code, we need to log into AWS workspace, all in our teams use the same.

So what has changed actually ? Why we hearing the word "Devops" more than ever ? It's confusing.

What is Kubernetes ? Am I using ? Again someone please tell in layman how it helps ?

Now, Docker, please ? Enlighten me.

I have kept on going through lot of blogs, lot, but ended up getting confused.

This will help everyone whose jumping into this for the first time, okay you can consider me dumb if that helps.

Imagine am starting a media company, so how can I be employing Devops, Kubernetes, Docker etc ? Say am gonna have huge following

PS: hey thanks in advance

https://redd.it/flylzx
@r_devops
the case against jenkins in 2020

[https://medium.com/@shrayk/the-case-against-jenkins-in-2020-310276e39280?sk=da35dec5f82ff3db9d724cbd5fb4f6f9](https://www.google.com/url?q=https://medium.com/@shrayk/the-case-against-jenkins-in-2020-310276e39280?sk%3Dda35dec5f82ff3db9d724cbd5fb4f6f9&sa=D&source=hangouts&ust=1584806310069000&usg=AFQjCNFxkrML3W-Wosu1ELCr_Gb9TVrKMw)

​

some food for thought around choosing a different CI system, and some of the reasons surrounding that

https://redd.it/flz7su
@r_devops
which technologies to pick? docker vs config management

hello, I'm starting to learn DevOps tools and I've faced too many tools to choose in between.

so I want to know if I should learn docker and Kubernetes or ansible/chef, etc.

what benefits it might have to learn both? because as I've googled there are many articles which say docker is the new mainstream and has many more benefits compared to config management.

but in this popular [RoadMap](https://roadmap.sh/devops), as I understand it's suggested to learn both!

https://redd.it/fm178q
@r_devops
SQL code canonical formatting tool

Does anyone know of a tool which can format SQL code and align things, like what gofmt does for go code?

https://redd.it/flxisv
@r_devops
Setting up dynamic inventory for multiple cloud providers in ansible

My company works with uses Google Cloud, Azure, AWS, and several other cloud solution providers. We are in the process of moving to Ansible/Salt for some of our processes. The task I've been assigned is setting up Ansible to gather dynamic inventory for each of these systems starting with AWS. I've worked with Ansible and am familiar with configuring it and using it. What I'm unsure of is how to get the aws\_ec2 plugin to work. I have it enabled and have tried to use it but the documentation seems to be missing something, mostly how to actually tell Ansible how to connect and authenticate with the AWS account. I've done several searches and seen some examples but none seem to cover the pre-configuration steps.

We will eventually be doing this for Google Cloud and Azure but that will be another task completely since each one will need either a plugin or script built (I believe). Feel free to lend any advice for that, however, right now we are mostly concerned with doing this in AWS.

Any assistance is appreciated!

https://redd.it/flz0dv
@r_devops
At home projects

Hi. So I recently lost my job and while I have been managing devops teams for quite some time, I never really did a lot of hands on environment builds, CM, and CI/CD. I can talk through them but now want to get more hands on as I have time. Any recommendations on projects so I’m not just aimlessly building? I’ve already used terraform to build AWS infrastructure and it works so I know I can do it. Thanks so much.

https://redd.it/flwmip
@r_devops
Trying to automate VM (Ubuntu 18.04 Cloud-Image) creation using cloud-init - stuck on static ip

I'm using the `nocloud` datasource with cloud-init and want to set a static IP address for an Ubuntu 18.04 Cloud-Image. As far as I understood, I need to put the config for the network into the meta-data.yaml file. Ubuntu 18.04 is using netplan, so the example on the cloud-init docs are not so clear for me. Has some of you done this before?

Whats the proper way of configuring a static IP on a Ubuntu 18.04 Cloud-Image using cloud-init?

https://redd.it/flwa8r
@r_devops
Do I have a chance to land on a DevOps work if I have developer and support work experience?

(I hope this long post is appropriate here.)

When I was in my first employer, I was a C/C++ developer. Then after a year, the project ended and I was transferred to another project with a Support Analyst role. Basically, my job as a Support is to receive calls and incident tickets for us to fix. But I didn't have access to the code; I was just to analyze and coordinate to the appropriate team to fix the issue. Aside from that, I became a Change Request Coordinator, coordinating with teams if a certain change request is good to deploy. I do other tasks but they are all non-developer tasks.

I was a Support Analyst for almost 3 years when I accepted a job offer for other company. This offer came during the time that I'm slowly accepting my fate as Support Analyst. Compare to my 1st employer, this 2nd employer is not that big and the salary/benefits is not that good. I just accepted the 2nd because, that time, I thought that maybe this is what I've been waiting for so long. I almost lose hope because I thought nobody would accept me considering I didn't have work experience as Java developer. (I preferred Java over C/C++ even before I started working)

Now that I'm here in my 2nd employer, I thought I'll finally get myself fulfilled with my job, but apparently not. There's no official training here so I'm self-studying the technologies so that I can relate to my teammates. Even if my teammates are (sometimes) helping me, I feel like they are annoyed whenever I ask them. I will not disclose other issues as it will deviate from the topic, but to sum it up, I'm trapped (yes, trapped because I'm in a 2-year employment bond) in a toxic environment. I didn't expect that being in this company is much worse than I thought.

Before I started on my 2nd employer, I told myself that if working as a developer did not turn out well here, I'll just go back to my 1st employer and embrace if I would land again on Support roles.  Apparently, it's a toxic environment for me. Also, it seems that I don't belong in this developer role, no matter how I try. Although I'm still able to complete my tasks, I feel that I'm already losing my drive in being a developer. Somehow I regret accepting the job offer and leaving my 1st.

Now, I'm thinking if it still worth trying to land a DevOps job on my next employer, since I have experience both in development and support. Am I too ambitious with this? Or should I just pursue being a Developer?

Sorry for the long read.

https://redd.it/fltz7e
@r_devops
Does devops design architecture?

Is a dev ops engineer in charge of designing a web architecture or is that mainly a developer’s job? Is the dev ops engineer more focused on maintenance? I find I enjoy learning about web systems and thinking about how to design, code and deploy them. There is so much more than just a server and a database now with the cloud and everything.

https://redd.it/flrqv8
@r_devops
Best tool(s) for small home/cloud management

I have 3 computers on my home network, plus VMs and Docker, and one cloud server, with one or two more coming soon. All use Debian as the base.

I will be using either Samba AD or FreeIPA to handle users, passwords and permissions, and one computer I will be using to virtualize PFSense. So each computer in my network(s) has different requirements, although the base Debian install will be identical across all.

This use case has me a little confused about how to manage IAC and updates. I have spent a long time reading about possible solutions, but I'm wondering what approaches others have taken.

Here are my use cases:

\- One server will virtualize PFSense and possibly some other DNS or network related tools such PiHole and Grafana.

\- Another server will be a NAS with several docker images installed (Jellyfin, Gitlab, etc)

\- The cloud server runs a web server and a database.

The IAC solutions all seem massively complex for my use case, or focus only on Docker (k8s, Rancher). Other solutions involve chaining together a series of tools (Chef/Puppet/Salt/Terraform, etc) I considered a ProxMox cluster, but there is way too much functionality for my basic needs.

Should I use something like Packer to automate the creation of the similar/identical Debian installs, and then use something Docker-based to handle the rest? Should I accept more complexity on the basis that it will serve me better over time?

I'd prefer open source over proprietary, but any/all suggestions will be most appreciated!

https://redd.it/fllnjf
@r_devops