This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(root@quads) - (20:16) - (~) | |
-=>>python -m cProfile /opt/quads/bin/quads-cli --full-summary | |
cloud01: 0 (Initializing cloud) | |
cloud02: 20 (Real Shift on stack) | |
cloud03: 0 (Initializing cloud) | |
cloud04: 0 (Initializing cloud) | |
cloud05: 0 (Initializing cloud) | |
cloud06: 0 (Initializing cloud) | |
cloud07: 0 (Initializing cloud) | |
cloud08: 0 (Initializing cloud) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from paramiko import SSHClient, AutoAddPolicy | |
import argparse | |
if __name__ == "__main__": | |
parser = argparse.ArgumentParser(description='Execute ls on remote host') | |
parser.add_argument('--host', dest='host', type=str, default=None, help='Remote host') | |
parser.add_argument('--user', dest='user', type=str, default=None, help='Remote user') | |
parser.add_argument('--passwd', dest='passwd', type=str, default=None, help='Remote pass') | |
parser.add_argument('--ssh-key', dest='ssh_key', type=str, default=None, help='Public SSH Key') | |
_args = parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import paramiko | |
import argparse | |
if __name__ == "__main__": | |
parser = argparse.ArgumentParser(description='Execute ls on remote host') | |
parser.add_argument('--host', dest='host', type=str, default=None, help='Remote host') | |
parser.add_argument('--user', dest='user', type=str, default=None, help='Remote user') | |
parser.add_argument('--passwd', dest='passwd', type=str, default=None, help='Remote pass') | |
_args = parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#platform=x86, AMD64, or Intel EM64T | |
#version=DEVEL | |
# Keyboard layouts | |
keyboard 'us' | |
# Root password | |
rootpw --iscrypted $1$tvvGFEPf$rRtRXMNAteB4KjEAZ2s4Z/ | |
# System language | |
lang en_US | |
# Reboot after installation | |
reboot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import argparse | |
import json | |
import re | |
import requests | |
import sys | |
import time | |
import warnings | |
import yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
vhid=$(pgrep virt-handler) | |
vcid=$(pgrep virt-controller) | |
vaid=$(pgrep virt-api) | |
for id in $vhid $vcid $vaid; do | |
if [ -f /proc/$id/smaps ]; then | |
echo | |
if (( $id == $vhid )); then | |
proc="Virt-handler" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"__inputs": [ | |
{ | |
"name": "DS_PROMETHEUS", | |
"label": "Prometheus", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "prometheus", | |
"pluginName": "Prometheus" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: prom-k8s | |
data: | |
alerting.rules: | | |
groups: | |
- name: example-rules | |
interval: 30s # defaults to global interval | |
rules: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
TOKEN=$(oc whoami -t) | |
podman login docker-registry.default.svc:5000 -u test_admin -p $TOKEN | |
git clone https://github.com/ansibleplaybookbundle/import-vm-apb.git && cd import-vm-apb | |
docker build -t docker-registry.default.svc:5000/openshift/import-vm-apb:latest . | |
docker save docker-registry.default.svc:5000/openshift/import-vm-apb:latest -o import-vm-apb.tar | |
podman import import-vm-apb.tar docker-registry.default.svc:5000/openshift/import-vm-apb:latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio, asyncssh, sys | |
class MySSHClientSession(asyncssh.SSHClientSession): | |
def data_received(self, data, datatype): | |
print(data, end='') | |
def connection_lost(self, exc): | |
if exc: | |
print('SSH session error: ' + str(exc), file=sys.stderr) |