Skip to content

Instantly share code, notes, and snippets.

View gibizer's full-sized avatar

Balazs Gibizer gibizer

  • Red Hat
  • Budapest
  • 13:02 (UTC +02:00)
View GitHub Profile
import functools
import random
import time
import eventlet
from oslo_concurrency import lockutils
eventlet.monkey_patch()
LOCK = "my-lock"
// How to default a struct field?
// Example code: https://github.com/gibizer/simple-operator-example/commit/08fb63dda8aae4c20272b8e87d680228948e8ff6
// terminal #1
[fedora@gibi-f35 simple-operator-example]$ make run
test -s /home/fedora/op-build/simple-operator-example/bin/controller-gen || GOBIN=/home/fedora/op-build/simple-operator-example/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2
/home/fedora/op-build/simple-operator-example/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/home/fedora/op-build/simple-operator-example/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...

Chapter 3. Configuring Compute nodes for performance

# (gibi): this chapter is good as is

3.1. Configuring CPU pinning on Compute nodes

# (gibi): mostly good. But the 3rd bullet point needs a reword as we don't have overcloud any more. I think we can even drop the 3rd bullet point

  1. Designate Compute nodes for CPU pinning.
  2. Configure the Compute nodes to reserve host cores for pinned instance vCPU processes, floating instance vCPU processes, and host processes.

Deploy

User with sudo

This is only needed in a clean hypervisor. If you have a laptop with a user with sudo then you can skip the user creation and sudo setup. As root:

useradd -s /bin/bash -d /home/gibi -m gibi
echo "gibi ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/gibi
sudo -u gibi -i
@gibizer
gibizer / tcib-commit-to-container-image.md
Last active December 19, 2023 10:37
Tcib commit hash to quay.oi container image
import threading
import time
def some_work():
time.sleep(1)
print("a bit of work done")
def task(timeout: threading.Event):