Skip to content

Instantly share code, notes, and snippets.

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:
  • start multisite wirh 2 clusters
MON=1 OSD=1 MDS=0 MGR=0 ../src/test/rgw/test-rgw-multisite.sh 2
  • export credentials
export AWS_ACCESS_KEY_ID=1234567890
export AWS_SECRET_ACCESS_KEY=pencil
  • start multisite wirh 2 clusters
MON=1 OSD=1 MDS=0 MGR=0 ../src/test/rgw/test-rgw-multisite.sh 2
  • export credentials
export AWS_ACCESS_KEY_ID=1234567890
export AWS_SECRET_ACCESS_KEY=pencil

K8s Setup

install minikube, run minikube with enough CPUs and 2 extra disks (for 2 OSDs):

$ minikube start --cpus 6 --extra-disks=2 --driver=kvm2

install kubectl and use from from the host:

$ eval $(minikube docker-env)

setup

note that the following PR introduces end2end tracing (RGW->OSD) for "object PUT"

  • start the cluster with tracing enabled:
OSD=1 MON=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -d -n -o jaeger_tracing_enable=true -o jaeger_agent_port=6831

Note that, by default, both OSD and RGW try to send th traces to a different port than the one the agent listen on by default

  • start the "all in one" container of jaeger, this will run: the agent, the collector the backend and the UI: