Reddit DevOps
274 subscribers
65 photos
32.1K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Unothorized to create Kubernetes cluser on AWS using kops

I'm new to AWS and I'm trying to deploy Kubernetes for some tutorial purposes using kops.For that, I'm using a trial AWS account and I started following [this practical guide](https://ramhiser.com/post/2018-05-20-setting-up-a-kubernetes-cluster-on-aws-in-5-minutes/) to do it but I have an issue with this command :

kops create cluster --node-count=2 --node-size=t2.medium --zones=us-east-1a

which gives me the following error :

I0119 16:14:49.647701 13949 create_cluster.go:517] Inferred --cloud=aws from zone "eu-west-3a" error populating configuration: error querying for valid AZs in "eu-west-3" - verify your AWS credentials. Error: UnauthorizedOperation: You are not authorized to perform this operation. status code: 403, request id: a1f6e99f-76d6-4c3f-95bb-416cc2d67f2e

I wonder if it's not related to some limited access due to my trial AWS account !

https://redd.it/er1jbq
@r_devops
Build a 10 USD Raspberry Pi Tunnel Gateway

In this tutorial I'll show you how to build an Internet Gateway for your home network using a Raspberry Pi and a HTTPS tunnel for just 10 USD.

You can achieve a similar effect of an Internet gateway by enabling port-forwarding on your home router, however there are downsides to this.

An Internet gateway with the [inlets](https://inlets.dev/) OSS project will provide a persistent connection behind the trickiest of networks and let you expose your private and LAN services of choice to the Internet.

[https://blog.alexellis.io/raspberry-pi-zero-tunnel-gateway/](https://blog.alexellis.io/raspberry-pi-zero-tunnel-gateway/)

https://redd.it/equ1cs
@r_devops
Newbie : How do you document your work / knowledge?

Good morning everyone,

I recently started my account on Linux Academy, due to the good reviews and few comments on priors posts and I have to say that is gorgeous, I really like it and I thanks everyone who told me to try it.

---

As for the question, my main doubt right now is how to document and structure what I am learning from them and what I have already learned from myself. Because, if we are realistic I am not gonna retain all the information in my brain...

I would like to know which tools or methods do you use to organize your documentation when you are learning something new.

For the time being I think that what could work is to try to organize my existing repository and try to fit the valuable information from the course into it... but as said I am having a few doubts about this method.

---

As always thanks for your time, and have a great day ^^

https://redd.it/eqvbhp
@r_devops
ubuntu 18.04 auto-heal service on failure

Hey guys, I wanted to know if there's a way to auto-heal a service when he fails or a server restart on ubuntu 18.04

Thanks!

https://redd.it/eqtoi7
@r_devops
GitHub - oslabs-beta/Allok8: ⚡️A pretty swell Kubernetes visualization tool

With a group of enthusiastic engineers, they set forth on a month challenge to create an MVP for Allok8. It’s a conventional and uncomplicated web-based UI Kubernetes visualization tool. Though current tooling is readily available, their goal was to give insights down to the container level, especially when containers become interdependent on one another. They’d love the feedback and support of the open-source community as they’re always looking to grow! Tysm ~

https://github.com/oslabs-beta/Allok8

https://redd.it/er89la
@r_devops
Delayed Notifications Functionality: VictorOps vs OpsGenie

What do you guys think about the delayed notifications functionality on OpsGenie and VictorOps?

https://redd.it/erf5h7
@r_devops
"stress test" application to abuse CPU/RAM/HDD

Hi there,

I want to check and then harden my Kubernetes cluster's stress tolerance by deploying some kind of stress generating application that would:

1) Try to hog as much CPU as possible
2) Try to allocate as much memory as possible
3) Try to saturate disk IO with a lot of operations

The question:

Do you know, can you advice any application that does some harmful chaotic activities, tries to misuse resources, e.g. hogs CPU and leaks memory like there's no tomorrow? Does not need to be Kubernetes specific, just need something that works on Linux ;)

I need this to test if resource limits we apply on our Kubernetes cluster work the way we expect them to work, before deploying production applications there.

Thanks!

https://redd.it/ereddk
@r_devops
What is your code review process?

Do you have a limit for a number of code lines? Do you encourage people not to spend more than an hour on code review? Do you have any metrics that you watch (defect rate, avg time for code review,...), do you use any checklist so you don't forget on important things?

https://redd.it/erckwt
@r_devops
Splitting up long running CI tests into a nightly build

I've recently moved to a company that has some loooooong running tests (whole build takes around 23 hours). I'd like to split the longer running tests into a nightly build (we're using TeamCity). Is there a good way to do this? I can't seem to find documentation on best practices. They also have a bunch of failing tests. Is it DevOp's responsibility to fix failing tests? I've always seen that as a dev/qa responsibility. I'd love to hear some thoughts and ways you've implemented your build configs!

https://redd.it/erdeyt
@r_devops
Does anyone have thoughts on Sonatype Nexus? Looking for best practices for importing and exporting existing artifacts.

As stated, Im looking for best practices for importing and exporting repo contents and migrating to and from instances of Nexus. is the API any good ? And if not how have you gone about using it or not.

https://redd.it/erhxav
@r_devops
Nestjs run and watch files in docker-compose

I have a Nestjs project which i'm using as api in a docker container. After convert bundling and serving process to the webpack instead of nestjs itself, i'm confused how to serve and watch file changes in docker-compose with nodemon.

I could easily open two command prompt one for serve and one for watch mode. I wonder how you guys setting up this with containerzation way.

https://redd.it/erhp8e
@r_devops
What would be a good way to let end users manipulate a containerized gameserver in a k8s cluster through a web interface

Hey, I would like to host some game servers in a kubernetes cluster and allow users to manipulate their own „servers“ i.e. pods. Manipulation would include control over gameserver config files but also some control over resource limits.

I‘m not much of a web dev, but I would be able to code a Java backend for this project. Basically the only thing regarding this project I cannot do is creating a custom web interface. Ideally I would find either an existing web interface solution that serves my purposes or a way to make an existing web interface solution serve my purposes.

I‘m not really sure whether this is the right subreddit for this question. But I also don’t know what subreddit would be a better fit.

https://redd.it/erd7q4
@r_devops
Can you recommend network activity logger that helps to find network connectivity issue?

We are using VMs from Google Compute Engine offer. As our boxes are just old good Debian 10 it doesn't that matter which infrastructure is in use.

Our interconnected microservices (Java apps) sometimes reports losses of network connectivity. Between themselves and sometimes to managed products, like Google Postgress offer.

Application traces aren't helpful. Problems are floating.

I checked Google's offer https://cloud.google.com/monitoring/agent/

It looks like it is based on `collectd` and agent's capability is too generic:

https://github.com/Stackdriver/collectd/blob/stackdriver-agent-5.5.2/src/netlink.c

This stats you can get with `nstat` (iproute2). They are too generic (total numbers without any specific src/dst/port directions).

My strategy is to collect data to make an initial guess WTF is going inside a Google managed network. I can be wrong.

I think we need a tool that

* actively probes "ping" or TCP "open" port connectivity to well known hosts/services (DB, config server, LB, redis) including heartbeats of/to "health" endpoints where they are.

* captures stream of network interface for TCP anomalies. I am not network expert, so I don't know definition of TCP anomalies.

I can imaging that reordered packets or missing ACK (or whatever in Richard Stevens' books) or RST may provide important info for troubleshooting.

Of cause we need source / destination / port to narrow problems to particular subnets / services.

I have no clue how Google manages an infrastructure, what maintenance tasks they run and when.

How can a blindness be cured regarding network activity ?

https://redd.it/erldol
@r_devops
Someone asked me to explain k8 to him like he's 5

This is what i told him

​

>Okay.. Let's use this example
>
>Take a look at a cube of sugar.just one cube, it represents a container...
>
>While kubernetes is the sugar box that houses all containers.
>
>With over 400 cubes, I can move them all at once provided they are inside the box.
>
>However, you know it will be difficult to move individual cubes..

https://redd.it/erkstn
@r_devops
Are AWS/Azure cloud based jobs like system support jobs?

Almost all the cloud jobs description mentions an on-call rotation work. It is true even for roles like cloud developers, cloud architects and solution architect, not just DevOps, SysOps or SREs. **Is there any cloud job for someone who prefers only day-time work?** As a software developer in a core tech company, I get it that it depends a lot on the team and the project. However, the jobs description doesn't say it depends on the team and even for a company like Google and Amazon, the job descriptions of a cloud based role expects on-call rotation support work. Why do AWS/Azure cloud job responsibilities make them like system support jobs?

https://redd.it/erjvto
@r_devops
Survey results: API support options

Hi everyone,

Thank you to all of you who answered my short survey about where you like to go to get help when you have a question about using APIs. I have closed the survey and wanted to share the results with you. There were five questions and 46 respondents and the results are below.

Hope you find it interesting and thanks again. You are all rockstars! :)

# Question 1: Are you (or do you consider yourself) a developer? If not, what is your role.

Yes = 67.4%
No = 32.6 %

Other roles

* Product manager
* Developer for many years, now domain architect
* Cognitive scientist
* SRE
* Network Administrator
* SQA Test
* Sysadmin
* DevOps
* System Admin
* Infrastructure Engineer
* SysEng/SRE
* Growth
* Project Manager
* Implementation consultant

# Question 2: What level of expertise and experience do you have with APIs?

Beginner = 15.2%
Intermediate = 45.7%
Expert = 39.1%

Question 3: Thinking generally about all of the APIs you use, what are the ways you prefer to get help when you have an API-related question? Please select all that apply.

Twitter = 0.6%
Stack Overflow = 16.1%
Ask the community = 7.5%
FAQs/Knowledge Base = 14.9%
API documentation = 28%
Tutorials = 8.7%
Use cases/Partner showcases = 5%
Open a support ticket = 4.3%
GitHub = 11.8%
Other = 3.1% (Google (x2), read the server implementation, curl is your friend as is python & selenium,“ Look for an experienced SME in the vendor organization or LinkedIn. Had a number of projects on REST APIs and some Security APIs lately... ”)

# Question 4: In your opinion, what is the most important aspect of API support? To put it another way, what makes you smile and what makes you frown when thinking about getting help with APIs?

• Short, clear and to the point info that can be search in an efficient way

• Well organized documentation and overall the API is easy to use

• Examples with expected return data and common error codes.

• Great documentation with example calls/responses

• "Good documentation. I shouldn't have to be contacting the developers directly in 99 percent of cases. The API should be well documented with example requests and responses and well tested so when I follow the docs, it works the same way that the examples do.

• What annoys me is when I follow the docs but they are out of date or incomplete and then I have to scour the internet figuring out how to make the API work as intended."

• "Documentation must be complete, accurate, and up to date. This includes both endpoint-specific docs and tutorials/how-tos for implementing common workflows.

• The API design itself should be consistent such that as a developer becomes familiar with the naming conventions etc, it becomes possible to predict how another endpoint can be used. In the same vein, web APIs should follow available standards instead of inventing new ones."

• Documentation

• Docs. I don't want Twitter. I don't want to talk to someone. I don't want a "reach out." I don't want whitepapers full of marketing fluff. I want docs that don't suck.

• I like a sandbox that will help me build the API with a GUI or CLI interface.

• What make me smile/frown is reading through every product API documentation I tested with no standard tool specified.

• "Clear documentation of all aspects the API as well as code samples/tutorials documenting best practice ways of accessing/consuming them are the best. Ideally it should be autogenerated from code comments so I can be sure it is up to date with the latest version of code.

• If I have to interact with somebody to use the API then things have gone wrong. Documentation should not come from social media and should not rely on other users to help with tricky bits. If users are constantly asking the same questions in support forums for things that seem as though they should be simple, you have a problem (looking at you Telerik)"

• Good written documentation with examples

• If you have good documentation why do I need support?

• Thorough documentation, API explorer usual
ly gets the job done.

• Fast and accurate response

• Having the code (and various implementations) openly available to learn and understand from. If it is proprietary , the documentation and author reputation better be outstanding along with a direct support channel

• Example responses with mock data help give a feel for how the ergonomics of an API

• I don't want to have to ask support for what should be written documentation

• When a vendor explains their rationale for an API's behavior.

• Writing guides with zero skill assumption and constant callbacks to linked articles

• Proper documentation. Ideally the documentation is built in the API itself, i.e. you can query for API schema of given endpoint.

• Good documentation

• Well-written and easily searchable docs with lots of example are invaluable.

• A proper rest interface with proper authentication easily handled with python/powershell/whatever

• Having documentation at all helps. But ideally that documentation should guide good usage of an API, not just something that \*works\*. For frameworks this is includes things like establishing convention, and best practice. If there are two ways of achieving something, but one of them is preferred, safer, or otherwise more \*correct\* then this should be clearly indicated.

• "Good: ability to submit changes or request features, fast support/response to issues/bugs, well documented API docs, working examples, documented release notes, future plans, overall communication

Bad: the opposite of any of the above things"

• Honestly finding an API doc that has examples of requests and responses for the common use cases is the greatest thing. The best API is a well-documented one!

• Stability. Don't break existing clients.

• Having good documentation available is key.

• Quick responses that get to the root issue quickly

• Most important is to have an understanding of capabilities and limitations and extent of effort required to configure. What I find intriguing is in the beginning vendors and developer SMEs say - no worries there is an API and it can do what is needed - that brings a smile and then it takes forever to document and actually get things done when APIs are involved.

• When APIs change without informing us makes me frown.

• Valid examples

Having excellent online documentation makes the API usable; examples for usage are hugely important, as well.

# Question 5: Is there anything else you would like to tell us about this topic?

• The Unix world had it quite well with the 'man' command line command, there are some sites that emulate the spirit.

• Please try to be API first when it comes to features. CLI and GUI should be using the APIs to configure. There are so many times where I look for a feature that the GUI can do, but API cannot.

• An API is great but having readily available common language SDKs for the API is even better.

• Build well organized and thought out documentation and include examples for any non standard references

• Documentation with lots of examples are everything.

• Update your documentation with lots of different examples, mongo is a good example of terrible documentation, yes its all technically correct, but very little explanation on why and so few examples, if your trying anything that's not the 1 common query then the examples are useless.

• Video tutorials are the worst, and need to be accompanied by a text version (if they are used at all). I can search text, move back and forward through it precisely and easily, skim it, or take it slow.

• D O C U M E N T A T I O N

• Check out Moesif to understand user behavior on APIs

• Good topic for research. Please do share the results.

I love well-documented APIs!

https://redd.it/erja19
@r_devops
Relevant certifications/courses to have in order to be considered for a DevOps position.

Please remove if not allowed.

​

My short working experience ranges from (backend and frontend) developer for a SAAS solution, System Administrator (both, physical and virtual ones, I even set up and migrated the whole thing to AWS), and now I'm working in a big company but as an Application Specialist, which is just a fancy way to call tech support.

​

But above all those, I've been a Linux nerd since I was young and the best way for me to built a career based on it, is in the DevOps world. I know there are still some roles for Linux Engineers but they are becoming so rare that I need to expand my hunt.

​

I have applied before to some DevOps related jobs and never got any. And the few chances I have had,

I have successfully take their practical tests with Ansible, Terraform, Docker.

​

So I was guessing having some certs on my bucket would be a better way to get a DevOps job. At least as a way to be considered more for job interviews.

​

Any suggestions on where to start?

​

I already have some GitHub projects I've made proving I can use those tools, but honestly, anyone smart enough can have those if documentation is properly read.

​

​

**tl;dr want to get DevOps job, what certs do I need to get closer to it without having a DevOps role before**

https://redd.it/erjtdl
@r_devops
[ELK] Logstash Parsing issues.

Hey Guys!
I have ELK stack configured, where multiple sources (Filebeat) push logs to Logstash and it pushes logs to Elastic search.
However, there are multiple instances where logs were not pushed in ES because of some error such as:
\-Error parsing JSON
\-Unexpected character (, etc
I came to know about this issue when I checked var logs of Logstash.
Question1: How can I check which was the source when Logstash failed to parse and what log it was?
Question 2: How can I configure alerts for Logstash, triggered when any line failed to parse?

https://redd.it/erax55
@r_devops