function vault-demo-ids() {
aws autoscaling \
describe-auto-scaling-groups --auto-scaling-group-names vault-provision |
jq -r '[.AutoScalingGroups[].Instances[].InstanceId] | join(" ")'
}
function vault-demo-ips() {
instance_ids=$(vault-demo-ids)
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 -e | |
# https://jamielinux.com/docs/openssl-certificate-authority/index.html | |
target=qdev.govready.com | |
mkdir -p private certs newcerts | |
function root() { | |
echo generate root key |
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
--- | |
driver: | |
name: vagrant | |
network: | |
- ["forwarded_port", {guest: 8000, host: 8080}] | |
provisioner: | |
name: shell | |
log_level: debug |
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
mysql_client 'default' do | |
version node['mysql']['version'] | |
action [:create] | |
end | |
file '/etc/my.cnf' do | |
content <<-END | |
[client] | |
default-character-set = utf8 | |
socket = /var/run/mysql-default/mysqld.sock |
LiME builds lime.ko -- See analytics.cheffian.com
insmod lets you export memory over port 4444, and then from workstation ssh ubuntu@chefserver.cheffian.com -L 4444:localhost:4444
insmod lime.....ko "path=tcp:4444 format=lime'
nc localhost 4444 > chefserver.lime
volatility stuff is in ~/Hacks/volatilty
Interesting commands to run inside a docker container
Try docker -i -t --name ubuntu:trusty --name trusty /bin/bash
and look at:
whoami
ps -ef # what is PID 1?
bash; ps -ef
df
uname -a
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
# save as /some/path/to/plugin/mycpu.rb | |
# ohai -d /some/path/to/plugin cpu | |
Ohai.plugin(:Cpu) do | |
provides "cpu" | |
collect_data do | |
cpu[:cores] = cpu[:total] * cpu["0"]["cores"].to_i | |
end | |
end |