Skip to content

Instantly share code, notes, and snippets.

Setup

  • start the cluster
MON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d
  • create an http topic:
aws --endpoint-url http://localhost:8000 sns create-topic --name=fishtopic \
  --attributes='{"push-endpoint": "http://localhost:10900"}'
@yuvalif
yuvalif / server.py
Created September 7, 2023 15:53 — forked from mdonkers/server.py
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer

notification retries

  • limit number of reties (ephemeral)
  • notification TTL (persistent)
  • spacing the retries (ephemeral)
  • global config via options

phase 1

  • per topic config via REST
  • notification TTL migration
  • documentation
  • start a vstart cluster
MON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d
  • create a lua file that implemets access log and depends on cjson and socket packages
  if Request.RGWOp == "get_obj" then
    local json = require("cjson")
    local socket = require("socket")
    local unix = require("socket.unix")
set -e
name=$1
id=$2
mkdir -p "$name"
cd "$name" ||exit
wget "http://qa-proxy.ceph.com/teuthology/$name/$id/teuthology.log" -O "teuthology$id.log"
  • start multisite wirh 2 clusters and tracing enabled:
MON=1 OSD=1 MDS=0 MGR=0 ../src/test/rgw/test-rgw-multisite.sh 2 \
  --jaeger_tracing_enable=true --jaeger_agent_port=6831 --debug-trace=20
  • start the "all in one" container of jaeger, this will run: the agent, the collector the backend and the UI:
$ podman run \
  -e COLLECTOR_OTLP_ENABLED=true \
 -p 6831:6831/udp \

Setup

  • start the cluster
ON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d
  • create a persistent amqp topic:
aws --region=default --endpoint-url http://localhost:8000 sns create-topic --name=fishtopic \
  --attributes='{"push-endpoint": "amqp://localhost", "amqp-exchange": "ex1", "persistent": "true"}'
# zshrc
# set path
export PATH=$HOME/bin:/usr/local/bin:$HOME/go/bin:$HOME/.local/bin:/app/bin/:$PATH
# golang
export GOPROXY=https://proxy.golang.org,direct
export GOBIN=$HOME/go/bin
# for other themes, see: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes

setup

  • deploy a cephadm cluster with a custom build:
sudo cephadm --image <image> bootstrap --mon-ip <ip> --single-host-defaults
  • start OSDs:
sudo cephadm shell ceph orch apply osd --all-available-devices
  • enable the rgw service there: