Skip to content

Instantly share code, notes, and snippets.

View arif-ali's full-sized avatar

Arif Ali arif-ali

View GitHub Profile
#!/usr/bin/gawk -f
#
# Usage: ./rabbit-tell.awk <rabbitmqctl_report>
#
# Common RabbitMQ issues that this script can be used to identify
#
# - Partitioned cluster
#
# - High binary/queue memory usage. There are mainly two causes of this:
#
@cnewcome
cnewcome / rbac.txt
Last active July 16, 2020 15:12
RBAC
juju bootstrap --debug --config bootstrap-series=bionic --config agent-stream=devel localhost lxd-controller
juju add-model test
juju deploy cs:~openstack-charmers/ldap-test-fixture-4
unit="0"
ldap_ip=$(juju run --unit=ldap-test-fixture/${unit} 'unit-get private-address')
ldapsearch -h $ldap_ip -x -w crapper -D"cn=admin,dc=test,dc=com" -b dc=test,dc=com -s sub '(objectclass=*)' cn sn
juju ssh ldap-test-fixture/${unit}
sudo reboot
@pertoft
pertoft / ceph-commands.txt
Last active April 25, 2024 10:37
Ceph command cheatsheet
ceph -w
ceph health detail
ceph osd df
ceph osd find
ceph osd blocked-by
ceph osd pool ls detail
ceph osd pool get rbd all
ceph pg dump | grep pgid
ceph pg pgid
@ThinGuy
ThinGuy / fcb-image-server.sh
Last active February 3, 2024 21:21
For offline use: This script mirrors images for maas, lxd, cloud, along with juju agents and gui's. Meant to be used in a lxd container.
#!/bin/bash
#### NOTE: This is a combined image file for maas images, lxd images, and Juju Steams.
#### The server name defaults to "images"
#### If creating a ssl cert, the following Subject Alternate Names should be used:
# DNS:$(hostname -f), DNS: $(hostname -s), DNS: maas-images, DNS: lxd-images, DNS: cloud-images, DNS: juju-images, DNS:images.linuxcontainers.org, DNS: us.images.containers.org, DNS: uk.images.containers.org, DNS: canonical.imagecontainers.org, DNS:cloud-images.ubuntu.com, DNS: streams.canonical.com
#### If using DNS poisoning/hijacking, ensure all the above domains resolve to the images contaier's IP address
@djoreilly
djoreilly / ovs-cheat.md
Last active June 13, 2024 17:05
OVS cheat sheet

DB

ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl list interface vxlan-ac000344
ovs-vsctl --columns=options list interface vxlan-ac000344
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl -f csv --no-heading --columns=_uuid list controller
ovs-vsctl -f csv --no-heading -d bare --columns=other_config list port
@niedbalski
niedbalski / recover-lost-agent.py
Last active October 10, 2022 04:51
recover a lost Juju agent
#!/usr/bin/env python
"""
This is a tool for recovering a lost juju unit
Usage:
{0} controller-ip unit-from unit-to basedir
"""
import subprocess
import shlex