Skip to content

Instantly share code, notes, and snippets.

View daipham3213's full-sized avatar
🧨

daipham.3213 daipham3213

🧨
View GitHub Profile
@daipham3213
daipham3213 / eventloop.py
Last active September 4, 2024 03:01
asyncio event loop with worker pool, can be used in a native python thread
"""This module provides a custom event loop for the health manager service.
The event loop is implemented as a thread that runs an asyncio event loop.
This allows the health manager to run periodic tasks and other asynchronous
operations without blocking the main thread.
The event loop is started when the module is imported and runs until the
program exits. The main thread can interact with the event loop by submitting
tasks to it using the `spawn` function.
"""
import asyncio
ceilometer
ceilometer-acentral
ceilometer-acompute
ceilometer-alarm-evaluator
ceilometer-alarm-notifier
ceilometer-anotification
ceilometer-api
ceilometer-collector
c-sch
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: API",
"type": "python",
"request": "launch",
[[local|localrc]]
HOST_IP=10.0.0.5
FLOATING_RANGE=172.24.0.0/24
FIXED_RANGE=10.0.0.0/24
IP_VERSION=4
LOGDAYS=2
LOGFILE=/opt/stack/logs/stack.sh.log
MYSQL_HOST=$HOST_IP
@daipham3213
daipham3213 / s3
Last active August 19, 2022 03:37
#!/bin/bash
#
# lib/cinder_backups/s3
# Configure the s3 backup driver for external s3 compatible storage
# Enable with:
#
# CINDER_BACKUP_DRIVER=s3
# enable_service c-bak
#!/usr/bin/bash
# PUT THIS FILE IN devstack REPO
unset LANG
unset LANGUAGE
LC_ALL=en_US.utf8
export LC_ALL
# Clear all OpenStack related envvars
unset `env | grep -E '^OS_' | cut -d = -f 1`
[[local|localrc]]
HOST_IP=10.0.0.3
MYSQL_HOST=$HOST_IP
RABBIT_HOST=$HOST_IP
GLANCE_HOSTPORT=$HOST_IP:9292
IP_VERSION=4
FLOATING_RANGE=10.0.0.128/25
FIXED_RANGE=10.10.1.0/24