Skip to content

Instantly share code, notes, and snippets.

View galenemery's full-sized avatar

Galen E. galenemery

View GitHub Profile
knife azure server create --azure-dns-name galen-1235 --azure-vm-size Medium -I a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201412.01-en.us-127GB.vhd --azure-service-location 'North Central US' --winrm-user galen --winrm-password '@@@@@@@@' --bootstrap-protocol winrm --bootstrap-protocol cloud-api -r 'recipe[chef-client]'
@galenemery
galenemery / Winrm_setup.ps1
Last active February 9, 2020 05:24
WinRM config
# On the remote node/server:
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
# When NOT USING a domain-based authentication (i.e., from Linux/Unix to Windows node):
winrm set winrm/config/service/auth '@{Basic="true"}'
@galenemery
galenemery / ~\.berkshelf\config.json
Created June 24, 2015 17:46
Berkshelf config.json
{"ssl": {"verify": false}}
Verifying that +galenemery is my blockchain ID. https://onename.com/galenemery
@galenemery
galenemery / install_cert.rb
Created October 29, 2015 19:41
Install Certificate to a certificate store.
%W{ Root CA }.each do |cert_store|
powershell_script "import_cert_to_#{cert_store}" do
code <<-EOH
$certpath = "#{Chef::Config[:file_cache_path]}\\self_cert.cer"
$certstore = "cert:\\LocalMachine\\#{cert_store}"
Import-Certificate -FilePath $certpath -CertStoreLocation $certstore
EOH
end
end
@galenemery
galenemery / iim_install.rb
Created February 5, 2016 19:01
Modified iim_install resource.
iim_install 'ihs' do
#The idea here is to pass the responsefilepath directly into the iim_install resource.
#The response_file_install resource merely determines if the file exists, and if not creates it.
#Because the file already exists, we don't need to do this.
install_command_snippet "input #{::File.path(responseFilePath)}"
#all these default to null, and depending on your repositories security settings they might be able to remain that way.
master_password_file node[:ihs][:install][:masterPasswordFile]
secure_storage_file node[:ihs][:install][:secureStorageFile]
action :install
end
delivery setup --server=cad-delivery --ent=cad --org=ORG --user=chef
@galenemery
galenemery / _etc_opscode_chef-server.rb
Created April 27, 2016 17:39
chef-server + Analytics Combined
topology 'standalone'
api_fqdn 'cad-chef-server'
nginx['server_name'] = 'cad-chef-server'
oc_id['vip'] = 'cad-chef-server'
oc_id['applications'] = {
'analytics' => { 'redirect_uri' => 'https://cad-chef-server:8443/' },
'supermarket' => { 'redirect_uri' => 'https://cad-supermarket/auth/chef_oauth2/callback' }
}
rabbitmq['vip'] = '172.31.54.57'
@galenemery
galenemery / _etc_opscode_chef-server.rb
Last active April 27, 2016 17:46
chef-server + Analytics Combined
topology 'standalone'
api_fqdn 'cad-chef-server'
nginx['server_name'] = 'cad-chef-server'
oc_id['vip'] = 'cad-chef-server'
oc_id['applications'] = {
'analytics' => { 'redirect_uri' => 'https://cad-chef-server:8443/' },
'supermarket' => { 'redirect_uri' => 'https://cad-supermarket/auth/chef_oauth2/callback' }
}
rabbitmq['vip'] = '172.31.54.57'
@galenemery
galenemery / .kitchen.yml
Created June 23, 2016 13:16
motd_ubuntu_ec2_kitchen_yml
---
provisioner:
name: chef_zero
platforms:
- name: ec2-ubuntu-14.04
driver:
image_id: ami-4c7a3924
name: ec2