This file contains 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 -xe | |
OSD_ID=${1} | |
# Turn off the OSD | |
systemctl stop ceph-osd@${OSD_ID} | |
# Loop over all placement groups | |
for PG in $(ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-${OSD_ID}/ --op list-pgs); do | |
ceph-objectstore-tool \ |
This file contains 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
apt -y install mstflint | |
for i in `lspci | grep Mellanox | cut -d' ' -f1`; do | |
mstconfig -d $i -y set EXP_ROM_UEFI_x86_ENABLE=1 EXP_ROM_PXE_ENABLE=1 UEFI_HII_EN=1; | |
mstconfig -d $i q | egrep (EXP_ROM|UEFI); | |
done; |
This file contains 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 | |
if ! command -v virsh; then | |
echo "virsh could not be found" | |
exit | |
fi | |
SECRET_UUID=$(virsh secret-list | grep 'client.cinder' | cut -d' ' -f2) | |
SECRET_VALUE=$(cat /etc/ceph/ceph.client.cinder.keyring | grep 'key' | cut -d'=' -f2 | cut -d' ' -f2) |
This file contains 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 | |
if ! command -v virsh; then | |
echo "virsh could not be found" | |
exit | |
fi | |
SECRET_UUID=$(virsh secret-list | grep 'client.cinder' | cut -d' ' -f2) | |
SECRET_VALUE=$(virsh secret-get-value ${SECRET_UUID}) |
This file contains 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 | |
if ! command -v virsh; then | |
echo "virsh could not be found" | |
exit | |
fi | |
SECRET_UUID=$(virsh secret-list | grep 'client.cinder' | cut -d' ' -f2) | |
SECRET_VALUE=$(virsh secret-get-value ${SECRET_UUID}) |
This file contains 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 | |
SECRET_UUID=$(virsh secret-list | grep 'client.cinder' | cut -d' ' -f2) | |
SECRET_VALUE=$(virsh secret-get-value ${SECRET_UUID}) | |
virsh secret-undefine ${SECRET_UUID} | |
virsh secret-define --file /dev/stdin <<EOF | |
<secret ephemeral='no' private='no'> | |
<uuid>457eb676-33da-42ec-9a8c-9293d545c337</uuid> | |
<usage type='ceph'> |
This file contains 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
DEVICE=br-ex | |
ONBOOT=yes | |
DEVICETYPE=ovs | |
TYPE=OVSBridge | |
OVSBOOTPROTO="dhcp" | |
OVSDHCPINTERFACES="bond0" | |
HOTPLUG=no |
This file contains 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 argparse | |
from datetime import datetime | |
import sys | |
import urllib.request | |
import json | |
import openstack | |
stack_name = sys.argv[1] |
This file contains 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 | |
cat <<EOF > /etc/kubernetes/kubeadm.conf | |
-- | |
apiVersion: kubeadm.k8s.io/v1beta2 | |
kind: InitConfiguration | |
localAPIEndpoint: | |
bindPort: 16443 | |
--- | |
apiVersion: kubeadm.k8s.io/v1beta2 |
This file contains 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 | |
sudo add-apt-repository ppa:gophers/archive | |
sudo apt-get update | |
sudo apt-get -y install docker.io libpcap-dev python-virtualenv golang-1.10-go git | |
sudo usermod -aG docker $USER | |
# logout and login for groups to update | |
export GOPATH="$HOME/go" |
NewerOlder