Skip to content

Instantly share code, notes, and snippets.

View laidbackware's full-sized avatar

Matt laidbackware

View GitHub Profile
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@laidbackware
laidbackware / instructions.md
Created January 19, 2024 18:37
Set default PSA on vSphere with Tanzu 1.26+ clusters

Set default PSA on vSphere with Tanzu 1.26+ clusters

Warning

Taken from the vSphere with Tanzu docs.

"Custom ClusterClass is an experimental Kubernetes feature per the upstream Cluster API documentation. Due to the range of customizations available with custom ClusterClass, VMware cannot test or validate all possible customizations. Customers are responsible for testing, validating, and troubleshooting their custom ClusterClass clusters. Customers can open support tickets regarding their custom ClusterClass clusters, however, VMware support is limited to a best effort basis only and cannot guarantee resolution to every issue opened for custom ClusterClass clusters. Customers should be aware of these risks before deploying custom ClusterClass clusters in production environments."

The procedure is based on the {vSphere docs](https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-with-tanzu-tkg/GUID-EFE7DB40-8748-42B5-9694-DBC21F9FB76A.html), which you should always reference to check for changes.

P

@laidbackware
laidbackware / instructions.md
Last active January 19, 2024 09:28
How to update the control plane disks of a workload cluster on vSphere with Tanzu

How to update the control plane disks of a workload cluster on vSphere with Tanzu

THIS PROCEDURE IS NOT SUPPORTED BY VMWARE AND MUST BE USED WITH CAUTION! THE AUTHOR CANNOT BE HELD RESPONSIBLE FOR ANY ISSUES.

Running without the update validation webhook is risky as no control plane update actions will be validated, so should be done for the minimum amount of time.

Connect to a Supervisor VM

SSH into the vCenter as root and enter a shell.

@laidbackware
laidbackware / README.md
Last active November 20, 2023 13:33
ASDF install/update function

Instructions

This function is used to install and switch versions of CLI plugins.

You must source the script containing the funciton. E.g.

source asdfu.sh

The function will:

@laidbackware
laidbackware / ip_hacking_playbook.yml
Last active July 3, 2023 17:05
Ansible IP manipulation cheatsheet
---
- hosts: localhost
gather_facts: false
tasks:
- name: Set constants
ansible.builtin.set_fact:
cidr_source: 10.0.0.0/16
cidr_divide_bits: 4
cidr_divide_position: 2
@laidbackware
laidbackware / sh
Created December 9, 2022 15:23
Expand Ubuntu VM disk
sudo fdisk -l
# number is the partition number
sudo growpart /dev/sda 3
sudo pvresize /dev/sda3
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
@laidbackware
laidbackware / tanzu.md
Last active August 30, 2023 12:35
Tanzu CLI install one liner

Tanzu CLI Install One liner

Pre-reqs

  • Export your customerconnect.vmware.com credentials as VCC_USER and VCC_PASS
  • (optional) Specify the Tanzu CLI version with TANZU_VERSION, defaults to latest.
  • (optional) Specify Tanzu CLI directory with $TANZU_DIR. Defaults to $HOME/tanzu.

Upgrade/Downgrade

This one-liner can be used to upgrade and downgrade the Tanzu CLI. The only consideration is that during downgrades you will need to remove the contents of the $HOME/.config/tanzu directory, as the CLI will not handle downgrading of the content.

@laidbackware
laidbackware / asdfu.sh
Created January 7, 2022 14:32
Bash function to update an ASDF plugin
# This file must be sourced from your shell
function asdfu() {
product_name=${1:-}
if [ -z $product_name ]; then
>&2 echo "You must pass in a product name. E.g. asdfu kubectl"
return 1
fi
asdf plugin add $product_name
# SSH
username is capv for vsphere
Kubeconf at `/etc/kubernetes/admin.conf`
@laidbackware
laidbackware / Dockerfile
Created June 10, 2021 10:24
Powershell Docker with PowerCLI
FROM ubuntu:20.04
RUN set -xe \
&& echo "Update the list of packages" \
&& apt-get update \
&& echo "Install pre-requisite packages." \
&& apt-get install -y wget apt-transport-https software-properties-common \
&& echo "Download the Microsoft repository GPG keys" \
&& wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb \
&& echo "Register the Microsoft repository GPG keys" \