-
Put your ESXi hosts into maintenance mode
-
Log into your ESXi host
-
Check to see what got left behind
# Check for vmknic's
esxcfg-vmknic -l
#! /usr/bin/env bash | |
# Check for requirements | |
function check_command { | |
if [ ! "$(command -v "$1")" ]; | |
then | |
echo "command $1 was not found" | |
return 1 | |
fi |
#!/usr/bin/env bash | |
for i in *.yml; do | |
WORD=$(head -n 1 "$i") | |
ENCODED_WORD=$(echo -ne "$WORD" | xxd -plain | tr -d '\n' | sed 's/\(..\)/%\1/g') | |
DEF=$(tail -n+2 "$i" | awk '{printf "%s\\n", $0}') | |
echo "Posting $WORD..." | |
curl -s -X POST \ | |
-H "Content-Type: application/json" \ | |
-d '{"def" : "'"$DEF"'"}' \ |
cat ~/.uaac.yml | ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))' | jq -r '.[].contexts[] | select(.client_id =="precreated-client") | .access_token' |
set -x | |
wget -O /usr/local/bin/rmate https://raw.github.com/aurora/rmate/master/rmate | |
chmod a+x /usr/local/bin/rmate | |
apt -y update | |
apt -y dist-upgrade | |
apt -y install docker.io | |
which minikube || (curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && mv minikube /usr/local/bin/) |
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
# Forked from the original to do the opposite: Switch ssh repo urls to https | |
# Original here: https://gist.github.com/m14t/3056747 | |
# Thanks to @m14t | |
#origin or upstream | |
REMOTE=${1-origin} | |
REPO_URL=`git remote -v | grep -m1 "^$REMOTE" | sed -Ene's#.*([email protected]:[^[:space:]]*).*#\1#p'` |
# BOSH Director credentials | |
cat installationSettings.json | jq 'del(.products[] | select(.identifier == "p-bosh") | .jobs[] | select(.identifier == "director") | .properties[] | select(.identifier == "director_credentials"))' > installationSettings.json.tmp && mv installationSettings.json.tmp installationSettings.json | |
# BOSH UAA admin user creds | |
cat installationSettings.json | jq 'del(.products[] | select(.identifier == "p-bosh") | .uaa_admin_user_credentials)' > installationSettings.json.tmp && mv installationSettings.json.tmp installationSettings.json | |
# BOSH UAA admin client creds | |
cat installationSettings.json | jq 'del(.products[] | select(.identifier == "p-bosh") | .uaa_admin_client_credentials)' > installationSettings.json.tmp && mv installationSettings.json.tmp installationSettings.json | |
# BOSH VM creds |
defaults write com.apple.PowerChime ChimeOnNoHardware -bool true | |
killall PowerChime |
Put your ESXi hosts into maintenance mode
Log into your ESXi host
Check to see what got left behind
# Check for vmknic's
esxcfg-vmknic -l
Set-PSReadlineOption -Colors @{member = "Cyan"} | |
Set-PSReadlineOption -Colors @{number = "Cyan"} | |
Set-PSReadlineOption -Colors @{type = "Cyan"} | |
Set-PSReadlineOption -Colors @{default = "Cyan"} | |
Set-PSReadlineOption -Colors @{continuationprompt = "Cyan"} |