-
Collect information about your environment.
❯ oc get nodes NAME STATUS ROLES AGE VERSION cp0 Ready control-plane,master,worker 66d v1.29.8+f10c92d
{ config, lib, pkgs, ... }: | |
with lib; | |
{ | |
imports = | |
[ | |
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix> | |
./machine-config.nix | |
]; |
This is just a crude, simple script to help users run the most basic of Redfish commands like power On/Off the system, and mount ISO files (via web URL). The only tools required to run this script are curl
and jq
(for json pretty printing and better json readability). The script will also allow users to explore Redfish API endpoints, which is my primary use for it.
Leave questions or comments below. I'm happy to take suggestions if anyone really finds it useful. For the most part, I'm going to suggest better tooling as this script is just supposed to be pretty basic. This tool is supposed to be a butter-knife, not a scalpel.
Usage:
curl -L https://gist.githubusercontent.com/v1k0d3n/252d6761e041043f1a88910f8c79fabf/raw/f4cef77613fac2450f929814d377bc55b318f570/redfish-helper.sh -o redfish-helper.sh
Use the Red Hat Console to stand up a bare metal cluster using the Assisted-Installer. Use the following recommendations as you progress the installer:
- Be sure that your cluster has at least 2 physical interfaces (or more) and that at least one of those interfaces is provided by a supported SR-IOV capable NIC.
- Be sure that your cluster has 2 physical disks (or more).
- Be sure that you have a trunked VLAN interface going to one of the two interfaces.
- Do not install the storage or virtualization operators as part of the installation progress. This these guides will tell you how to install and configure each operator manually. This offers more control and provides admins with a better understanding of how to install and manage these services.
Using oc debug
commands, this AI-generated gobbledygook script will collect all of the relevant useful information that can be gathered about attached physical disks. This script will evolve over time, but will use a custom image for running oc debug
commands.
While you're here, I would suggest checking out my other dirty hack for getting NIC information!
NOTE: *By default, the variable is used for an SNO. If you want to use another node, just change it to the standard node/<node-name>
syntax and this script will work just fine.
NODE_NAME=$(oc get no -o name)
Running the following script to get a nice summary of all network interface information which includes the Interface Name, IP Address, MAC Address, Link State, Link Speed, MTU, Vendor, Device ID, Driver, Total VFs, Configured VFs, and PCIe Address.
curl -sL https://tinyurl.com/net-print | bash
Using oc debug
commands, this AI-generated gobbledygook script will collect all of the relevant useful information that can be gathered for an SriovNetworkNodePolicy
. It's helpful for general NIC information as well.
#!/bin/bash | |
# https://guifreelife.com/blog/2021/08/13/RHACM-Recover-Created-Cluster-Credentials-and-Kubeconfig/ | |
# | |
# If an OpenShift cluster was created by RHACM this script will extract the | |
# kubeconfig and the default kubeadmin credentials. | |
# | |
# Prereqs: | |
# - Authenticated to hub cluster | |
# - Managed cluster name is the sames as the hosting namespace on hub cluster |
- install docker
- in order to run keycloak in a docker container, run the below command:
docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:latest start-dev
If you are using podman then just replace docker with podman in above bash command
This is just a simple script that I use to generate self-signed certificates. It's suited for general use of course, however it also includes v3 extensions which are required for container registries like Quay. This is my "easy button" for PoCs that can use temporary self-signed certificates.
- Download the script
curl -L https://gist.githubusercontent.com/v1k0d3n/08b9a1d37a06e90ff39646e1b09417d8/raw/certgen.sh -o certgen.sh
- Make it executable
You may run into an issue (at some point) where your directories are "insucure" either through a homebrew install or update. If this happens, you can do the following to fix the issue correctly, wihtout setting compinit to ignore errors (which I've seen recommended in some forums).
Example:
Last login: $D $MO $H:$M%S on $TTYS
[WARNING]: Console output during zsh initialization detected.
When using Powerlevel10k with instant prompt, console output during zsh
initialization may indicate issues.