Пятничный деплой
4.4K subscribers
1.33K photos
26 videos
167 files
7.65K links
Подборка ссылок, статей и постов из мира DevOps\SRE\разработки. Если вы хотите прислать фидбек, интересную статью или просто поболтать пишите @count0ru https://t.me/s/count0_digest
Download Telegram
Forwarded from Sysadmin Tools 🇺🇦
Алертилка на #go+#lua

Источники данных:
Clickhouse
Prometheus
Postgres
MySQL
Каналы:
Slack
Telegram
Syslog
Хранилища
S3

Script based alert system https://balerter.com
Github
​​Echelon - hierarchical logs in terminal on steroids.
Cross-platform #go library to organize logs in a hierarchical structure.

Features:
- Customizable and works with any VT100 compatible terminal
- Supports simplified output for dump terminals
- Implements incremental drawing algorithm to optimize drawing performance
- Can be used from multiple goroutines
- Pluggable and customizable renderers
- Works on Windows!

https://github.com/cirruslabs/echelon
​​Litmus helps Kubernetes SREs and developers practice chaos engineering in a Kubernetes native way.

Litmus is a toolset to do cloud-native chaos engineering. Litmus provides tools to orchestrate chaos on #k8s to help SREs find weaknesses in their deployments. SREs use Litmus to run chaos experiments initially in the staging environment and eventually in production to find bugs, vulnerabilities. Fixing the weaknesses leads to increased resilience of the system.

Litmus takes a cloud-native approach to create, manage and monitor chaos. Chaos is orchestrated using the following Kubernetes Custom Resource Definitions (CRDs):
- ChaosEngine: A resource to link a Kubernetes application or Kubernetes node to a ChaosExperiment. ChaosEngine is watched by Litmus' Chaos-Operator which then invokes Chaos-Experiments
- ChaosExperiment: A resource to group the configuration parameters of a chaos experiment. ChaosExperiment CRs are created by the operator when experiments are invoked by ChaosEngine.
- ChaosResult: A resource to hold the results of a chaos-experiment. The Chaos-exporter reads the results and exports the metrics into a configured Prometheus server.

Chaos experiments are hosted on hub.litmuschaos.io. It is a central hub where the application developers or vendors share their chaos experiments so that their users can use them to increase the resilience of the applications in production.

https://github.com/litmuschaos/litmus

#docker #devops #ts #go
Forwarded from oleg_log (Oleg Kovalov)
По поводу #go race detector, решил погуглить всякие статейки. Нашел одну, которую не узнал, может и не видел. Конечно же ничего нового, но такое ощущения, что больше теории рассказано, чем обычно. Вдруг заинтересует.

https://krakensystems.co/blog/2019/golang-race-detection
​​sqlbench measures and compares the execution time of one or more SQL queries.

The main use case is benchmarking simple CPU-bound query variants against each other during local development.

Only PostgreSQL is supported at this point, but pull requests for MySQL or other databases are welcome.

https://github.com/felixge/sqlbench

#go
Forwarded from SWE notes
Статья о том как происходит выполнение HTTP запроса при работе со стандартной библиотекой в Go

#go #http #web #std

https://eli.thegreenplace.net/2021/life-of-an-http-request-in-a-go-server/
​​Ain is a terminal HTTP API client. It's an alternative to postman, paw or insomnia.

Features:
- Flexible organization of API:s using files and folders.
- Use shell-scripts and executables for common tasks.
- Put things that change in environment variables or .env-files.
- Share the resulting curl, wget or httpie command-line.
- Pipe the API output for further processing.
- Tries hard to be helpful when there are errors.

Ain was built to enable scripting of input and further processing of output via pipes. It targets users who work with many API:s using a simple file format. It uses curl, wget or httpie to make the actual calls.

https://github.com/jonaslu/ain

Personal opinion: I don't like GUIs, they are harder to work with. So, any tools that can be replaced should be replaced.

#go
​​Prevent Kubernetes misconfigurations from reaching production (again 😤 )! Datree is a CLI tool to ensure K8s manifests and Helm charts follow best practices as well as your organization’s policies.

It’s far more effective than manual processes, such as sending an email to a slew of developers, begging them to set various limits, which likely falls on deaf ears because developers are already overwhelmed.

The CLI integration provides a policy enforcement solution for Kubernetes to run automatic checks on every code change for rule violations and misconfigurations. When rule violations are found, Datree produces an alert which guides the developer to fix the issue inside the CI process — or even earlier as a pre-commit hook — while explaining the reason behind the rule.

Right now, there are 30 battle-tested rules for you to choose from.

https://github.com/datreeio/datree

#k8s #devops #go
#tip #go #security

Два способа проверить свой код на наличие уязвимостей

📌Инструмент govulncheck, безусловно, является универсальным для сканирования репозиториев на наличие известных уязвимостей.

🔸Инструмент использует официальную базу данных уязвимостей Go vuln.go.dev, всеобъемлющий источник известных уязвимостей в общедоступных модулях Go.

🔸Govulncheck можно использовать в командной строке или как часть рабочего процесса CI.

📌Еще одним инструментом, заслуживающим внимания, является gosec: Golang Security Checker.

🔸gosec — CLI-инструмент, который может быть интегрирован в пайплайн CI. В дополнение к этому, gosec входит в состав golangci-lint.

🔸По умолчанию он отключен, и вы можете включить либо все проверки на уязвимости, либо только определенные из них. Таким образом, ваш код проверяется на наличие уязвимостей каждый раз, когда ваша IDE запускает линтер.

🔸В отличие от govulncheck, gosec не проверяет наличие известных уязвимостей в общедоступном коде Go. Скорее, он проверяет код на соответствие списку уязвимых шаблонов программирования, включая: жестко закодированные учетные данные, непроверенные ошибки, построение SQL-инструкций с использованием fmt и т.д.
🔥1
Forwarded from DevOps FM
📚 Пятничное чтиво на канале DevOps FM.

В прошлом мы уже обсуждали зомби-ресурсы в облаке, теперь пришло время зомби-процессов — и не где-нибудь, а внутри Docker-контейнера с Go-приложением.

Савас Вендова делится кейсом, в котором его сервер стабильно падал с ошибкой Redis Pub/Sub из-за проблем с утечкой памяти. Причиной были зомби: дочерние процессы Node.js не завершались корректно даже после os.Process.Kill() в Go. А поскольку приложение запускалось как PID 1 внутри Docker, оно не собирало съедающие ресурсы зомби-процессы.

Проблему решили с помощью Tini — init-решения для контейнеров. Оно перехватывает SIGCHLD и корректно завершает все процессы. Подробный разбор кейса с примерами читаем здесь.

Желаем всем, кто отдыхает, хороших выходных, а тем, кто дежурит — спокойных смен без серьёзных алертов и зомби!

#devops #docker #go #zombieprocesses
Please open Telegram to view this post
VIEW IN TELEGRAM