https://github.com/zhsj/wghttp
go install github.com/zhsj/wghttp@latest
wghttp
--listen 127.0.0.1:9050
--client-ip=
--dns=
--private-key= \
https://github.com/zhsj/wghttp
go install github.com/zhsj/wghttp@latest
wghttp
--listen 127.0.0.1:9050
--client-ip=
# locals { | |
# vm_name = join("-", [local.prefix, "master", var.nodeIndex]) | |
# root_disk_name = join("-", [local.prefix, "root", var.nodeIndex]) | |
# k8s_data_disk_name = join("-", [local.prefix, "kubernetes-data", var.nodeIndex]) | |
# } | |
resource "kubernetes_manifest" "vm" { | |
manifest = { | |
"apiVersion" = "virtualization.deckhouse.io/v1alpha2" | |
"kind" = "VirtualMachine" |
#!/bin/bash | |
# Configuration | |
INTERVAL=1 # Measurement interval in seconds | |
DURATION=60 # Number of measurements to take | |
# Automatically detect page size | |
PAGE_SIZE=$(getconf PAGESIZE) | |
echo "Detected page size: ${PAGE_SIZE} bytes" |
from flask import Flask, request, jsonify | |
from flask_cors import CORS | |
import psycopg2 | |
import os | |
app = Flask(__name__) | |
CORS(app, resources={r"/api/*": {"origins": "https://demo.pt.dvp.flant.dev"}}) | |
# Настройки подключения к PostgreSQL | |
DB_HOST = os.getenv('DB_HOST', 'db.demo-db.svc.cluster.local') |
#!/bin/bash | |
# Function to display usage instructions | |
usage() { | |
echo "Usage: nsenter.sh -n|--namespace <namespace> -p|--pod <pod-name> [-c|--container <container-name>] [-t|--nsenter-namespaces <namespaces>] [-u|--ssh-user <user>] [-h|--ssh-host <host>] [-x|--node-name-prefix <prefix>] -- <command> [args...]" | |
echo "Options:" | |
echo " -n, --namespace Namespace of the pod" | |
echo " -p, --pod Name of the pod" | |
echo " -c, --container Name of the container (optional; default is the first container)" | |
echo " -t, --nsenter-namespaces Namespaces for nsenter (optional; overrides defaults, e.g., 'mnt,uts') net namespace is used by deafult" |
#!/usr/bin/env bash | |
NAMESPACE="env-1b4119-testcases" | |
SCRIPT_TEMPLATE=' | |
for VM in %%VMS%%; do | |
VM_NAME=$(echo ${VM} | cut -d% -f 1); | |
VM_NS=$(echo ${VM} | cut -d% -f 2); | |
VM_IP=$(echo ${VM} | cut -d% -f 3); | |
VM_NODE=$(echo ${VM} | cut -d% -f4); |
curl -s https://gist.githubusercontent.com/fl64/a72b15b5e8ff169f34162d58794bfdd9/raw/dvp-migrate-cloudinit-secret.sh | bash -s -- env-1b4119-testcases env-1b4119-cloud-init-with-mounted-vi-pvc
how to run
Usage example:
curl -s https://gist.githubusercontent.com/fl64/75a5904f9bbadcb3d5a12c3dec3c7708/raw/vm-debug-bundle.sh | bash -s -- -n env-1b4119-testcases -v env-1b4119-vm-hotplug-iso-vi-cr-2 --bundle-path . --keep --no-tar
Params:
#!/usr/bin/env bash | |
NAMESPACE="testcases" | |
SCRIPT_TEMPLATE=' | |
for VM in %%VMS%%; do | |
VM_NAME=$(echo ${VM} | cut -d% -f 1); | |
VM_IP=$(echo ${VM} | cut -d% -f 2); | |
VM_NODE=$(echo ${VM} | cut -d% -f 3); |
#!/bin/bash | |
data=$(date $T) | |
echo "content-type: text/plain" | |
echo "content-length: $(echo ${data} | wc -c)" | |
echo | |
echo ${data} |