Reddit DevOps
277 subscribers
69 photos
32.2K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Vault Root Account Replacement

Once I revoke the root token, I want to create a couple of accounts that have root access to all of vault.

The documentation seems to suggest creating an admin policy for this that looks like this: [https://gist.github.com/kawsark/4cdb66093d6206d9e036ecd1294e6509](https://gist.github.com/kawsark/4cdb66093d6206d9e036ecd1294e6509)

But I am wondering why not create a policy that looks like this instead?

path "*"
{
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}

This block seems to do the same (and more?) and it is less verbose than the above, also (I assume) it covers all cases. Is there any best practice against this?

https://redd.it/ejfc1w
@r_devops
Which flow should I take during deploy of big API changes to keep the consumers in sync?

Hello

I am running a project that is in dev stage (so there are breaking changes etc.), but I met with a problem of keeping the changes in sync with UI client / consumer.

Let's say that there is 1 developer to maintain both backend API and frontend App, when this developer commits a change to develop branch then Jenkins is doing some shell magic to deploy the stuff.

So, if the developer pushes change to API, then a long process of deployments starts; Before the API deployment ends he pushes another change to UI App which deployment takes seconds and we are in a state where UI can throw random errors since the API deployment did not finish.

Even if we reverse the case, ie. the first deploy goes for UI App, the API changes are still not deployed so there still will be random errors in UI App.

While I know about things like backward compatibility and such, a big changes still may happen in the process, and this scenario is from what I can think of - the simplest. This is no rocket science microservice architecture but plain API - UI project for now.

In perfect world the API and UI deployments ends in the same time.

https://redd.it/ejds19
@r_devops
Pubsubbeat + elasticsearch creates only one index

Hi.

I've just set up pubsubbeat + elasticsearch in order to get logs from stackdriver to my private elasticsearch cluster. Everything works fine except that it's only using one index. It created an index called pubsubbeat-8.0.0-2019.12.31-000001 and it's adding all the documents inside the same index instead of creating one every day. Do you know how to force it to create an index daily? I've found the delete\_by\_time query but I would prefer to delete a whole index, looks cleaner.

Thanks

https://redd.it/ejdgfs
@r_devops
Do you use hot redeploy in production or have downtime for new release installation? Is hot redeploy actually needed for your system?



https://redd.it/ejlipp
@r_devops
Zero to Hero guide 2020

Hi, I am a software developer with 3 years of experience and just recently had to work on a project that uses AWS.

No need to say that I was overwhelmed by all the terminologies and network configuration.

I learned about Docker and bought a very simple course on Udemy about Deploying a NodeJS application docker container to AWS EC2, but that was it... I think I need some sort of pipeline to work with that will make CD/CI easier and pain free.

What resources (books, course, YT channel) you guys recommend getting started on DevOps, especially on AWS, in 2020?

https://redd.it/ejkfm4
@r_devops
DNS SSL Apache in Docker Container

The current setup is ec2 ubuntu instance with docker container that runs my app during development and demo purposes only.

My question is how do you setup ssl cert in your server? do you set it up inside the container? or in the ec2 instance itself and you just mount it on the container?

https://redd.it/ejalr3
@r_devops
What do you recommend my learning path be? I’m looking to deploy Django projects in an intelligent way- currently looking at AWS EBS + Docker + git

Unfortunately I’m getting a little tired of the endless articles that don’t cover everything, and that’s nothing against them.

For someone like me, how do you recommend I proceed? “All” I want is an easy way to develop and deploy.

I’m sure that’s what everyone says though.

Whether it’s books, coursers, or whatever, I’m all ears for the practical knowledge.

I am partial to docker though, it’s been helpful for my speed in development, and it’s my understanding that it helps in deploying, right?

Thank you for your time.

https://redd.it/ejonhe
@r_devops
How many environments do you use per project?

At my workplace, most teams have 4+ envs (e.g. dev, qa, uat, staging, prod).

I'm curious if many other teams do it this way or if the norm is to keep things simpler with just staging and prod?

https://redd.it/ejmat1
@r_devops
RShiny Dashboard for rendering AWS Biling reports

Happy New Year!

Thinking of creating an R shiny dashboard that produces data visualization off AWS billing reports for Management to view.

Thinking of downloading the cost and usage reports on to an S3 bucket where my R code reads and filters the data and produces the visuals

Just curious if anyone has implemented this before

Thanks

https://redd.it/ejvvbm
@r_devops
Those of you in .NET, do you manage windows images with Packer? If so, how do you update them with new code?

I am trying to develop a new standard around development environments and our infrastructure as code. I would like to know the fastest way to have updated windows images because I plan on using spot instances for the development environments.

So my question is, is packer just another AMI where you would have pre-installed programs and/or the pre-deployed code? This seems very inefficient because code is updating all the time.

If spot instances are terminating and coming online left and right, I would want the most efficient way to get the newest code on the new instances that are coming back online. Using a pre-baked AMI would be fast, but updating that AMI to always have the latest code (or different versions/tags of code) seems like the challenge.

What is the industry standard way of doing this?

https://redd.it/ejzj0j
@r_devops
Measuring uptime

I work for a SaaS company in charge of IT Ops. Our executive team is constantly asking me to publish uptime stats of our various applications which continues to prove to be very difficult to do. I am wondering what others are doing.

For some background we run web based applications and we use StatuaCake to simply verify our apps in the datacenters are responding. I typically use this but many people immediately push back saying just because the app was up doesn't mean it was actually working for our customers.

We use New Relic for an APM tool which is great for telling us how we are responding but it doesn't give a great way to easily report uptime that our executives could understand (unless I'm just missing something).

We have some infrastructure monitoring via PRTG as well but I don't think I can use that for this ask.

How are others doing this? I'm sure I'm just missing something obvious that would help me figure out how best to present numbers to our company.

https://redd.it/ejyntx
@r_devops
WebDev or DevOps – what am I better off learning now as a 3rd-world uni student?

I have an interest in both. But what interests me more is finding an employer willing to sponsor me (the sooner the better). Which job do you think is more common for sponsorship? Which job is more future-proof (next 10 years)? Which offers more remote opportunities?

https://redd.it/ejye8s
@r_devops
How would you explain DevOps to Management?

How would somebody explain or justify the adoption of engineering practices around DevOps to management? What arguments would resonate with people who are often focused on financial results and deadlines before anything?

I've come with some arguments myself, they're not in any order of priority, but I think they would come up as something average business focus management would understand:

​

1. Behavioral science developed for approximately 7 years now ( State of DevOps, DORA, Accelerate, etc), demonstrate (data-driven) that the **engineering practices of DevOps (TDD, BDD, Test Automation, etc) are strongly correlated with organizational culture and the overall organization results**;
2. It doesn't make sense to restructure the teams to work in a fake-agile fashion if you're still delivering projects rather than managing an end to end product lifecycle. **Every project objective is to deliver something on budget and on time. A product objective is to deliver the value of any kind to a customer**;
3. You won't go the extra mile of automating tests or developing test cases before you actually write the function code if you'll simply throw your code over the wall to operations. DevOps is not about transferring Operations tasks to the Development of vice-versa, it's about having the teams (squads) responsible for what they build. Y**ou build it, You'll run it**. If you'll get called 2 AM to fix a problem caused by a known error that was re-introduced in the code, you'll immediately understand the benefits of regression testing.
4. If you don't consider quality in the design of your product, chances are that in the long run, you'll consume most of your budget maintaining bad code you kicked out the door rather than developing new features for the customers. The cost per feature/business function should remain relatively flat or at least predictable upon the adoption of DevOps and will explode on the Ops side if the practices are not correctly established. The increasing complexity of systems and the interactions among the stakeholders will likely take them to a point where enterprises will spend a lot of money keeping them alive without delivering real value to their customers or decide to spend even more money to replace it altogether. **Bottom line is that DevOps is not only about quality but makes a lot of economic sense.**

What arguments would you use?

https://redd.it/ejy41o
@r_devops
Blog Post: How to Build an Azure Pipeline (Build/Release) from Scratch

Hey guys, I just wrote a shiny new blog post you may enjoy on the ATA blog.

Summary: Learn how to set up an Azure Pipelines build and release pipelines from scratch in this step-by-step tutorial with tons of screenshots.

https://adamtheautomator.com/azure-pipelines-tutorial/

If you'd like to write posts like this, get promoted and get paid, join us! https://adamtheautomator.com/friends

https://redd.it/ejxzrf
@r_devops
Supercharge your Kubernetes setup with OhMyZSH + awesome command line tools

`kubectl` can be quite cumbersome to work with, as it has long commands and no support for regex-based querying (e.g. when querying pod logs). For example

kubectl logs -f myLongNamedPod-xxx-yyy -n myNamespace

Wrote a quick article about several command-line tools I've used over the years to speed up my kubectl workflow, hope you guys will find it useful.

For instance, with the `stern` tool, you could perform the above command as

stern LongNamed

and tail the logs of all pods matching this name pattern.

https://agrimprasad.com/post/supercharge-kubernetes-setup/

https://redd.it/ejrja5
@r_devops
Any starting advice or examples for deploying a full-stack personal project (preferably with Docker)?

Hi! I'm about to get started on a personal full-stack web app project built with

- Node server
- React SPA
- Mongo Database

I'm thinking it'd be nice to be able to have my whole app run on Docker, both locally and in production, but I'm getting a bit overwhelmed with all of the different options for how to set everything up. In particular, I'm pretty confused around...

- If I want to be able to develop locally using a simple `docker-compose up` (or something similarly easy) do my server and web apps need to be in the same repo? If they're in separate repos, how can I get a similarly simple dev setup?

- All of the various tutorials I see for deploying these kinds of apps deploy everything to the same server, including the database. But I imagine that I'd want to have my database running on a separate machine, so it can be scale in size independently of the app. And if I do want to run the DB on a separate machine, how does that fit into a potential docker compose setup? Would I potentially need to use docker-compose to run the whole stack locally, but something else for deployment?

- Should I care at all about Dokku or K8S or some other PaaS, or should I just roll my own until I actually understand everything? Are Dokku and K8S even comparable products?


Any guidance is much appreciated, I'm very much a beginner at deployment.

https://redd.it/ek5cx3
@r_devops
What do you monitor/alert on your Kubernetes cluster(s)?

I'm setting up some production kubernetes clusters and looking to see what others monitor/alert on their clusters to give me some inital ideas past the very basic CPU/MEM/Network

​

I'm using Prometheus and Alertmanagerwith Grafana for visualization if that makes much difference.

​

PS, I'm thinking of this as more discussion than a direct ask for help so forgive a lack of specific details here.

https://redd.it/ek4an3
@r_devops
Ephemeral Environments with Gitlab and Microservices?

I've been requested to bring ephemeral environments to my development team (they're dividing up into a few separate teams) , and we're currently looking into using Gitlab. I'm supporting a single Springboot application with a dozen microservices and a single database. Is Gitlab going to be the best solution to deploy all of the microservices at once into ephemeral environments?


We're dividing the teams up into a backend developer, a frontend developer, and a QA resource. The overall goal is that the backend and frontend developer can work on a single feature at a time and then have the QA person test afterwords. I'm new to Gitlab and I'm having a little trouble understanding how/if this can be easily done. Has anyone done anything similar to this using Gitlab?

https://redd.it/ek91mp
@r_devops
Hi DevOps,

Hi DevOps,

Here i created playlist of my videos.

One place to learn Linux,Python,Ruby,Git,Github,Jenkins,Teamcity,Chef,Ansible,Docker,Kubernetes,Aws,Azure,Nagios.

real-time hands on videos. Nearly we have 100 videos .

subscribe my channel for more upcoming videos

Devops video Tutorials

\----------------------

Linux Videos Play list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76ILhSIu6m9p\_Cr4-SeFosD-y](https://www.youtube.com/playlist?list=PLsgnv1SN76ILhSIu6m9p_Cr4-SeFosD-y)

Python videos Play-list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76IKsK24E1MHQ9aT9OpvGl5NR](https://www.youtube.com/playlist?list=PLsgnv1SN76IKsK24E1MHQ9aT9OpvGl5NR)

Ruby Videos-Playlist:

[https://www.youtube.com/playlist?list=PLsgnv1SN76IJb7KCj98rSz7FSjYtTn6Yg](https://www.youtube.com/playlist?list=PLsgnv1SN76IJb7KCj98rSz7FSjYtTn6Yg)

Git videos Play-list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76IL13nvGWcrJoUWOfxLQB9XA](https://www.youtube.com/playlist?list=PLsgnv1SN76IL13nvGWcrJoUWOfxLQB9XA)

Jenkins videos Play-list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76IJXVCrAxk-LK5Iy9jt-SGm6](https://www.youtube.com/playlist?list=PLsgnv1SN76IJXVCrAxk-LK5Iy9jt-SGm6)

Teamcity Videos Play-list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76ILDYbKJdKs2sbgRAZfhl4\_F](https://www.youtube.com/playlist?list=PLsgnv1SN76ILDYbKJdKs2sbgRAZfhl4_F)

Chef Videos Play-list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76ILtD3TnVtXpX1hmwjyY9OuT](https://www.youtube.com/playlist?list=PLsgnv1SN76ILtD3TnVtXpX1hmwjyY9OuT)

Ansible video:

[https://www.youtube.com/watch?v=kmE\_WKCdbdA](https://www.youtube.com/watch?v=kmE_WKCdbdA)

Docker videos play-list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76IIIhgEJDZfrF8m1o85-J7O8](https://www.youtube.com/playlist?list=PLsgnv1SN76IIIhgEJDZfrF8m1o85-J7O8)

Kubernetes videos play-list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76ILS5Z\_VYJWm8KIoicAjFjCX](https://www.youtube.com/playlist?list=PLsgnv1SN76ILS5Z_VYJWm8KIoicAjFjCX)

Aws Videos Play-list :

[https://www.youtube.com/playlist?list=PLsgnv1SN76IJU7JGlAMcIRBGpu279\_lud](https://www.youtube.com/playlist?list=PLsgnv1SN76IJU7JGlAMcIRBGpu279_lud)

Azure Videos Playlist:

[https://www.youtube.com/playlist?list=PLsgnv1SN76ILiWjq0mMW32wggNASNsp3P](https://www.youtube.com/playlist?list=PLsgnv1SN76ILiWjq0mMW32wggNASNsp3P)

Packer Videos Play-list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76IK78KZTqyGaws2q17vM7HAp](https://www.youtube.com/playlist?list=PLsgnv1SN76IK78KZTqyGaws2q17vM7HAp)

Terraform Videos Play-list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76IIrgVnNCi-URqEkPFRN4LWh](https://www.youtube.com/playlist?list=PLsgnv1SN76IIrgVnNCi-URqEkPFRN4LWh)

Nagios Videos Play-list:

[https://www.youtube.com/playlist?list=PLsgnv1SN76ILOMxlUmTTCoxFUq74mps51](https://www.youtube.com/playlist?list=PLsgnv1SN76ILOMxlUmTTCoxFUq74mps51)

https://redd.it/ek8jwa
@r_devops
What tools are you using the keep track of ECR vulnerability scan reports?

Originally, scan reports can be observed manually via Console for each repository, which is not really great in case you have 100+ of them. AWS also mentions two "ECR" native solutions to tackle this problem:

\- One involving a bunch of Lambda functions (calling the Lambdas via bash and channel them into an ATOM feed

\- The other involves Athena to query scan findings (I find it a bit of an overkill)

As for me, I have created two Lambda functions which enables me to posts daily vulnerability scan findings digested into Slack.

I am curious if it is a problem for anyone else and which tools are you using to tackle this problem?

https://redd.it/ekhsnj
@r_devops