Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Hey, searching pub buddy at Montreal (wine / beer / steack)

Thomas Decaux ebuildy

🎯
Hey, searching pub buddy at Montreal (wine / beer / steack)
View GitHub Profile
@ebuildy
ebuildy / send.json
Created February 17, 2023 18:33
elasticsearch APM get max duration percentiles for 10 minutes
View send.json
POST apm-*-span/_search
{
"size": 0,
"query": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": "2023-02-16T13:00:00.540Z"
@ebuildy
ebuildy / impl-workflow.yaml
Last active November 12, 2022 21:21
ETL to elasticsearch with pyspark , argo-workflow , kubernetes
View impl-workflow.yaml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: djobi-workflow-
spec:
entrypoint: djobi
serviceAccountName: workflow
ttlStrategy:
@ebuildy
ebuildy / simple-pyspark-argo-workflow.yaml
Last active November 10, 2022 00:09
Play with pyspark from argo workflow
View simple-pyspark-argo-workflow.yaml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: pyspark-
spec:
entrypoint: pyspark
templates:
- name: pyspark
inputs:
@ebuildy
ebuildy / s3-delete-keys.ts
Last active October 4, 2022 17:56
Play with AWS S3 API on javascript
View s3-delete-keys.ts
public async deleteKeys(keys: string[]): Promise<any[]> {
function spliceIntoChunks(arr: any[], chunkSize: number) {
const res = [];
while (arr.length > 0) {
const chunk = arr.splice(0, chunkSize);
res.push(chunk);
}
return res;
}
View config.sh
spark.executor.extraJavaOptions: -Dorg.xerial.snappy.use.systemlib=true -Dorg.xerial.snappy.lib.path=/usr/lib/libsnappyjava.so
View create_transform.json
PUT _transform/test
{
"source": {
"index": [
"apm-*-span"
],
"query": {
"bool": {
"filter": [
{
View create aliases
POST _aliases
{
"actions": [
{
"remove": {
"index": "consolidation-ctr-v1",
"alias": "consolidation-ctr"
}
},
{
@ebuildy
ebuildy / base.yaml
Last active December 31, 2021 09:39
Ansible + argoCD API recipes
View base.yaml
---
- tags: ["always"]
set_fact:
argocd_url: http://localhost:2369
api_headers: &api_headers
Authorization: "Bearer {{ lookup('env', 'ARGO_TOKEN') }}"
@ebuildy
ebuildy / update_labels_bulk.sh
Created December 28, 2021 09:14
Update kubernetes pod labels, bulk mode
View update_labels_bulk.sh
# get pods to update
kubectl get pods --selector=elastic.org/elasticsearch-cluster=hot --output=jsonpath={.items..metadata.name}
View chart.yaml
apiVersion: v2
name: my-elasticsearch
type: application
version: v0.0.1
dependencies:
- name: elasticsearch
repository: https://helm.datatok.io
version: 7.16.1-4
- name: networkpolicy
repository: https://ebuildy.github.io/k8s-as-helm/