Skip to content

Instantly share code, notes, and snippets.

View jeremymv2's full-sized avatar
🪂

Jeremy J. Miller jeremymv2

🪂
View GitHub Profile
@jeremymv2
jeremymv2 / cluster-admin-rolebinding.yaml
Created November 21, 2022 13:35
Make group cluster admins
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: qadev-team-cluster-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
@jeremymv2
jeremymv2 / usage.md
Last active August 31, 2022 14:11
saml2pf9 usage

How to use the saml2pf9 CLI

Extract

$ tar xvfz saml2pf9_0.2.1_Linux_x86_64.tar.gz

Install

$ sudo install ./saml2pf9 /usr/local/bin

Keybase proof

I hereby claim:

  • I am jeremymv2 on github.
  • I am jeremymv2 (https://keybase.io/jeremymv2) on keybase.
  • I have a public key ASAIkE2h5mpRV69XoYoCuAkRziqwwhiRi8qEoQoHY9_9MAo

To claim this, I am signing this object:

@jeremymv2
jeremymv2 / parallel-restorev2.rb
Last active August 21, 2019 17:55
Parrallel (backgrounded) knife ec restores with 1 thread per org
#!/usr/bin/env ruby
# Use this script if you have 3 or more Chef Organizations
# and wish to speed up restores by using parallelism.
require 'fileutils'
require 'optparse'
CONCURRENCY = 1
BACKUP_LOG = "restore_#{Time.now.strftime('%m%d%Y%H%M')}.log".freeze
@jeremymv2
jeremymv2 / client.rb
Last active July 24, 2018 19:34
supermarket-custom-credentials
# this is the secret used for encrypting/decryting encrypted databags
# https://docs.chef.io/data_bags.html#encrypt-a-data-bag-item
# defaults to /etc/chef/encrypted_data_bag_secret
encrypted_data_bag_secret '/path/to/file/with/secret'
@jeremymv2
jeremymv2 / gist:0acb98ab747fef3c04f4fe0522b3ce8a
Last active July 19, 2018 17:34
Running chef-zero on a chef-repo for canary testing

chef-zero

sudo -E /opt/chef/bin/chef-client --local-mode --config /tmp/client.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/dna.json --chef-zero-port 8889

/tmp/client.rb

node_name "default-ubuntu-1604"
checksum_path "/tmp/checksums"
file_cache_path "/tmp/cache"
@jeremymv2
jeremymv2 / gist:0013ec21d3fb0ab3ae33714c59e16425
Created June 4, 2018 16:20
elasticsearch system settings
/etc/security/limits.conf
elasticsearch - nofile 65535
elasticsearch - memlock unlimited
root - memlock unlimited
@jeremymv2
jeremymv2 / parallel-restore.rb
Last active March 30, 2018 04:55
Spread ec-restore across Front Ends
#!/usr/bin/env ruby
require 'fileutils'
require 'optparse'
ARGV << '-h' if ARGV.length != 6
$options = {}
OptionParser.new do |opts|
@jeremymv2
jeremymv2 / chef-server.rb
Created September 18, 2017 17:34 — forked from coderanger/chef-server.rb
ssd's config example for Chef Server external stuffs
fqdn "FQDN"
postgresql['external'] = true
postgresql['vip'] = 'EXTERNAL_PG_IP'
postgresql['db_superuser'] = 'DB_SUPERUSER'
postgresql['db_superuser_password'] = 'DB_SUPERUSER_PASSWORD'
opscode_solr4['external'] = true
opscode_solr4['external_url'] = 'http://EXTERNAL_ES_IP:9200'
opscode_erchef['search_provider'] = 'elasticsearch'
opscode_erchef['search_queue_mode'] = 'batch'
bookshelf['storage_type'] = :sql
@jeremymv2
jeremymv2 / 1important_links.md
Created August 2, 2017 01:38 — forked from irvingpop/1important_links.md
Operating the Chef Server at Scale - ChefConf Workshop 2016