Skip to content

Instantly share code, notes, and snippets.

requirements

  • allow disable/enable of tracing in the "preRequest" context, by setting a request boolean flag from a lua script:
Request.Trace.Enable

by default, the flag should be set to true/false according to the global tracing configuration, and could be ovwerwritten to specific requests from the script.

  • add event (=log) API:
Request.Trace.AddEvent(name)

this is list of followup work that should be done after the replication notifications PR is merged.

  • implement s3:ObjectSynced:Delete
  • implement s3:ObjectSynced:DeletionMarkerCreated
  • add integration test
  • finish and test example PR
  • fix comment - add constness. handled here
  • start:
MON=1 OSD=1 MDS=0 MGR=0 ../src/test/rgw/test-rgw-multisite.sh 2
  • create the bucket:
hsbench -a 1234567890 -s pencil -u http://localhost:8001 -bp my-bucket -b 1 -r zg1 -m i
  • upload objects:

vstart

  • start:
MON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d
  • create a bucket
hsbench -a 0555b35654ad1656d804 -s h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q== -u http://localhost:8000 -bp my-bucket -b 1 -r default -m i
  • set quota for all buckets and enable it:

vstart

setup

  • start:
MON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d -o rgw_max_objs_per_shard=50 -o rgw_reshard_thread_interval=60
  • verify the number was set, and that dynamic reshard is enabled:
bin/ceph -c ceph.conf daemon out/radosgw.8000.asok config get rgw_max_objs_per_shard
bin/ceph -c ceph.conf daemon out/radosgw.8000.asok config get rgw_dynamic_resharding
#################################################################################################################
# Define the settings for the rook-ceph cluster with common settings for a small test cluster.
# All nodes with available raw devices will be used for the Ceph cluster. One node is sufficient
# in this example.
# For example, to create the cluster:
# kubectl create -f crds.yaml -f common.yaml -f operator.yaml
# kubectl create -f cluster-test.yaml
#################################################################################################################
kind: ConfigMap
  • download CRC from here

note that you would need a Red Hat Developer account. But there is no subscriptions needed for CRC

  • CRC requires a "pull secret" taken from the download page for crc start to work

if CRC is already running use: crc delete first

  • CRC doesn’t provide any additional disk so users on linux can try something following to make it work:
qemu-img create -f raw crc-extra-disk 30G
sudo virsh attach-disk crc --source /full/path/to/crc-extra-disk --target vdb --cache none

note: no restart is needed for CRC

Initial Setup

  • download and install minikube
  • download and install libvirt, and run minikube with an extra disk (this is later on needed for Rook/Ceph):
minikube start --driver=kvm2 --extra-disks=1

Knative

  • install Knative serving:
#!/usr/bin/python
import boto3
import sys
if len(sys.argv) == 3:
# topic name as first argument
topic_name = sys.argv[1]
# region name as second argument
region_name = sys.argv[2]
# my zshrc
# set path
export PATH=$HOME/bin:/usr/local/bin:$HOME/go/bin:$PATH
# for other themes, see: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="simple"
# enable command auto-correction.
ENABLE_CORRECTION="true"