Skip to content

Instantly share code, notes, and snippets.

View pgressa's full-sized avatar

Pavol Gressa pgressa

View GitHub Profile
@pgressa
pgressa / sukaj.sh
Created May 30, 2022 16:19
helm-deploy-compare
#!/usr/bin/env bash
#
# Store into the root of mgmt-service-templates directory and simply run. It uses python3.9 specifically to run templating
CURR_DIR=$(pwd)
OUT_DIR=${CURR_DIR}/tests
rm -rf ./tmp
public class MicronautFactory {
private final ApplicationContext context = ApplicationContext.run();
public TaskScheduler getTaskScheduler() {
return context.getBean(TaskScheduler.class, Qualifiers.byName(TaskExecutors.SCHEDULED));
}
}
public class HowToFetchTaskScheduler {
@pgressa
pgressa / meta-observability.md
Last active February 7, 2022 12:43
Observability - K8s pre Meta

Observability of system is generally composed from these three areas:

Metrics

Mostly time series data used for measuring of the performance. This applies both for the infrastructure and application.

Not requested

Event logs

Cloud Object Storage Abstraction Layer

Q: Shouldn't we name it like Cloud Agnostic Object Storage Interface

The Object Storage is one of the fundamental services provided by the cloud provides. The objects are generally stored in the tree directory structure similary like on the file system. The objects are consumed either by API or in most cases by their unique HTTP URL or by cloud specific internal URI (See Appendix 1).

Motivation

The initiative addresses a growing need to support the hybrid cloud applications by allowing the developers to transparently access and manipulate the objects from within applications running in various cloud environments.

@pgressa
pgressa / install.sh
Created July 12, 2021 09:15
Install self-hosted runners
#!/usr/bin/env bash
REPOSITORY_URL=$1
TOKEN=$2
RUNNER_ID=1000
RUNNER_DIR_NAME=
for i in {0..1000}; do
RUNNER_DIR_NAME=runner_$i
@pgressa
pgressa / rds.yaml
Last active November 18, 2021 21:16
cloudformation for rds and autorotate
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::SecretsManager-2020-07-23
Description: Deploys an RDS instance
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Basic configuration
Parameters:
- DBName
19:35:11.839 [default-nioEventLoopGroup-5-14] DEBUG i.m.h.s.netty.RoutingInBoundHandler - Request GET /api/config
19:35:11.839 [default-nioEventLoopGroup-5-13] DEBUG i.m.h.s.netty.RoutingInBoundHandler - Request GET /api/profile
19:35:11.839 [default-nioEventLoopGroup-5-14] DEBUG io.lettuce.core.RedisChannelHandler - dispatching command AsyncCommand [type=HGETALL, output=MapOutput [output=AsyncCommand [type=HGETALL, output=MapOutput [output={}, error='null'], commandType=io.lettuce.core.protocol.Command], error='null'], commandType=io.lettuce.core.protocol.Command]
19:35:11.839 [default-nioEventLoopGroup-5-14] DEBUG i.l.core.protocol.DefaultEndpoint - [channel=0xd612b754, /10.244.0.148:45578 -> mushop-session/10.96.79.153:6379, epid=0x2] write() writeAndFlush command AsyncCommand [type=HGETALL, output=MapOutput [output=[channel=0xd612b754, /10.244.0.148:45578 -> mushop-session/10.96.79.153:6379, epid=0x2], error='null'], commandType=io.lettuce.core.protocol.Command]
19:35:11.839 [default-nioEventLoopGroup-5-1
DEBUG i.m.h.s.netty.RoutingInBoundHandler - Request POST /api/cart
18:46:48.749 [default-nioEventLoopGroup-5-15] INFO api.services.support.CartIdBinder - Binding CartID request Host -> [ mushop-api],User-Agent -> [ Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36],Accept -> [ application/json, text/plain, */*],Accept-Encoding -> [ gzip, deflate, br],Accept-Language -> [ cs,sk;q=0.9,en-US;q=0.8,en;q=0.7],Content-Type -> [ application/json;charset=UTF-8],Cookie -> [ SESSION=MTQwYTMzNjktZDFkMC00MTQyLTgwYmEtNTEyMzM4N2ZmNGIz],Origin -> [ https://129.159.103.190],Referer -> [ https://129.159.103.190/],Sec-Ch-Ua -> [ " Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"],Sec-Ch-Ua-Mobile -> [ ?0],Sec-Fetch-Dest -> [ empty],Sec-Fetch-Mode -> [ cors],Sec-Fetch-Site -> [ same-origin],X-Forwarded-For -> [ 10.244.0.0, 10.244.1.4],X-Forwarded-Host -> [ 129.159.103.190],X-Forwarded-Port -> [ 443],X-Forwarded-Proto -> [ https],X-Forwarded-
/app/application: /usr/lib/libstdc++.so.6: no version information available (required by /app/application)
__ __ _ _
| \/ (_) ___ _ __ ___ _ __ __ _ _ _| |_
| |\/| | |/ __| '__/ _ \| '_ \ / _` | | | | __|
| | | | | (__| | | (_) | | | | (_| | |_| | |_
|_| |_|_|\___|_| \___/|_| |_|\__,_|\__,_|\__|
Micronaut (v2.5.4)
10:02:13.454 [main] INFO i.m.context.env.DefaultEnvironment - Established active environments: [k8s, cloud, oraclecloud]
10:02:13.466 [main] INFO com.oracle.bmc.Services - Registering new service: Services.BasicService(serviceName=DATABASE, serviceEndpointPrefix=database, serviceEndpointTemplate=https://database.{region}.{secondLevelDomain})
@pgressa
pgressa / gist:77ee9eb547c625aeec787ee639173b27
Created June 1, 2021 15:17
maven-micronaut-bug-package-deploy
./mvnw clean package deploy -Dpackaging=docker-native -Ddocker.image.suffix=native --no-transfer-progress -Pgraalvm
docker images --digests | grep -v "<none>" | grep carts-native
shell: /usr/bin/bash -e {0}
env:
JAVA: 11
JAVA_HOME: /home/opc/mushop/runner_1/_work/_tool/Java_Adopt_jdk/11.0.11-9/x64
--2021-06-01 10:25:42-- https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
Resolving repo.maven.apache.org (repo.maven.apache.org)... 199.232.152.215
Connecting to repo.maven.apache.org (repo.maven.apache.org)|199.232.152.215|:443... connected.
HTTP request sent, awaiting response... 200 OK