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
root@dragonflybsd-600-hammer2:~ # fsck_hammer2 /dev/vbd0s3 | |
volume header | |
zone.0 0000000000000010 (best) | |
zone.1 exceeds volume size | |
freemap | |
zone.0 0000000000000010 (best) | |
1 blockref (0 node, 1 leaf), 32.00KB | |
zone.1 exceeds volume size |
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 | |
set -x | |
server='https://vcenter.test' | |
password=$(crudini --get /tmp/inventory-vmware_rest 'vmware_rest:vars' 'vcenter_password') | |
session_id=$(curl -q --http1.1 -X POST -k -u "administrator@vsphere.local:${password}" ${server}/rest/com/vmware/cis/session|jq -r .value) | |
function get() { | |
path=$1 | |
curl -ik -H vmware-api-session-id:${session_id} -X GET ${server}$path | |
echo "" |
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
#!/usr/bin/env fish | |
# License: GPLv3+ | |
# Usage: | |
# To start a venv with the default python3 and Ansible devel: | |
# . ~/bin/ansible-venv.fish | |
# | |
# To start a venv with a specific version: | |
# . ~/bin/ansible-venv.fish 3.4 stable-2.9 | |
# See: https://goneri.lebouder.net/2021/06/02/ansible-collections-and-venv/ |
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 | |
set -eux | |
vl start fedora-34 --memory 2000 --name kind-vm | |
target=$(vl status|awk '/kind-vm/ {print $4}') | |
public_ip=$(vl status|awk '/kind-vm/ {print $4}'|sed 's,.\+@,,') | |
rc_file=/tmp/k8s_rc | |
ssh $target ' | |
curl -L -o /tmp/kubectl "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" | |
chmod +x /tmp/kubectl |
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
- hosts: localhost | |
gather_facts: false | |
tasks: | |
- k8s_info: | |
kind: Pod | |
with_sequence: count=100 |
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
- name: Collect the list of the existing VM | |
vcenter_vm_info: | |
register: existing_vms | |
until: existing_vms is not failed | |
- name: Turn off the VM | |
vcenter_vm_power: | |
state: stop | |
vm: '{{ item.vm }}' | |
with_items: "{{ existing_vms.value }}" |
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 | |
set -eux | |
aws --version |grep aws-cli || pip install awscli | |
bucket_name="nodepool-images-test" | |
if ! aws s3 ls s3://${bucket_name}; then | |
aws s3 mb s3://${bucket_name} --region us-east-2 | |
fi | |
for image_local_path in $(find /opt/nodepool/images -maxdepth 1 -name 'centos-8-0000002059.raw'); do |
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 | |
set -eux | |
# https://virt-lightning.org/ | |
vl fetch ubuntu-18.04 | |
vl start --memory 2048 ubuntu-18.04 | |
target=$(vl status| awk '/ubuntu-1804/ {print$4}') | |
ssh $target sudo chsh -s /bin/bash goneri | |
ssh $target sudo apt update | |
# My stuff | |
ssh $target sudo apt install -y silversearcher-ag |
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
# No compression/unsecure | |
xfreerdp /u:goneri /w:1880 /h:1000 /v:localhost:3389 /sound:sys:pulse -compression -encryption +home-drive | |
# Compression/Secure | |
xfreerdp /u:goneri /w:1880 /h:1000 /v:localhost:3389 /sound:sys:pulse +home-drive |
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 | |
server='https://vcenter.test' | |
password='z!Zq4Y&`/!E(o<br?:L>' | |
session_id=$(curl -q -X POST -k -u "administrator@vsphere.local:${password}" ${server}/rest/com/vmware/cis/session|jq -r .value) | |
for i in $(seq 10); do | |
curl -ik -H 'Accept:application/json' -H "vmware-api-session-id:${session_id}" -X GET ${server}/rest/vcenter/cluster | |
done |