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/knife exec | |
# A knife exec script to change chef node's name, preserving all the attributes. | |
# | |
# Usage: knife exec rename-node.rb old-name new-name | |
# | |
# Script retrieves the Node object, changes its 'name' attribute, | |
# creates new Node object with updated name and rest of attributes | |
# untouched. Then it deletes old Node and Client objects from | |
# database, and logs into the server to update it: |
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/ruby | |
require 'openssl' | |
if ARGV.length != 2 | |
puts "Usage:" | |
puts "./cq_password.rb HASHED_PASSWORD PLAIN_PASSWORD" | |
abort | |
end |
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 -e | |
# Workaround for https://github.com/kubernetes-sigs/kind/issues/2045 | |
all_nodes=$(kind get nodes --name "${CLUSTER_NAME}" | tr "\n" " ") | |
declare -A nodes_table | |
ip_template="{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}" | |
echo "Saving original IPs from nodes" |