Running as root on CentOS 6
[root@private-chef ~]# cat .chef/knife.rb
log_level :info
log_location STDOUT
# Run as pivotal user
node_name 'pivotal'
client_key '/etc/opscode/pivotal.pem'
[root@private-chef ~]# gem install knife-opc | |
Fetching: knife-opc-0.0.1.gem (100%) | |
Successfully installed knife-opc-0.0.1 | |
1 gem installed | |
Installing ri documentation for knife-opc-0.0.1... | |
Installing RDoc documentation for knife-opc-0.0.1... | |
[root@private-chef ~]# cat .chef/knife.rb | |
log_level :info | |
log_location STDOUT |
Running as root on CentOS 6
[root@private-chef ~]# cat .chef/knife.rb
log_level :info
log_location STDOUT
# Run as pivotal user
node_name 'pivotal'
client_key '/etc/opscode/pivotal.pem'
EC 11.1.x has a bug [OC-11384] when an LDAP user attempts to create a new account | |
that has never existed in the Enterprise Chef database before, rather than linking | |
with an existing internal user. | |
Please apply the attached patch to your EC 11.1.x release: | |
$ cd /opt/opscode/embedded/service/gem/ruby/1.9.1/bundler/gems/mixlib-authorization-c03f584a371b | |
$ patch -p1 < /tmp/cache/ec11.1-ldap500error.patch | |
patching file lib/opscode/models/user.rb | |
$ private-chef-ctl restart opscode-account |
[root@backend1 ~]# vgcreate opscode /dev/sdb | |
Volume group "opscode" successfully created | |
[root@backend1 ~]# vgs | |
VG #PV #LV #SN Attr VSize VFree | |
VolGroup 1 2 0 wz--n- 39.51g 0 | |
opscode 1 0 0 wz--n- 2.00g 2.00g | |
[root@backend1 ~]# lvcreate -L 2G -T opscode/thinpool | |
Logical volume "lvol0" created | |
Volume group "opscode" has insufficient free space (510 extents): 512 required. | |
[root@backend1 ~]# lvcreate -L 2000M -T opscode/thinpool |
Please use: https://gist.github.com/jeremiahsnapp/9630765
# Orgmapper snippet to output all nodes with client versions in all organizations to a JSON file | |
# To Use: | |
# 1) Start orgmapper | |
# 2) Load the script | |
# eval(::File.read("/path/to/orgmapper_all_client_versions.rb")) | |
# 3) output will be printed to the screen and also written to JSON_OUTPUT_FILE | |
JSON_OUTPUT_FILE = 'chef_versions.json' |
#!/opt/chef/embedded/bin/ruby | |
require 'json' | |
class Checker | |
def check | |
check_cookbook_metadata | |
check_node_sizes | |
check_bad_platform_metadata | |
check_bad_invitations | |
check_duplicates_in_groups |
A customer has an OPC 1.4.x HA installation in Production. They want to test an in-place upgrade from OPC 1.4.x all the way through to EC11.1.6 using their current OPC Production data and config. This gives us a good chance to make corrections if we find that their data is too broken for the migrations to handle, and gives the customer experience in managing the upgrade in Production.
The sequence of events will broadly be these:
org_guids = ORGS.all.map {|o| o.guid} | |
sql.select(:checksum, :org_id).from(:nodes).exclude(:org_id => org_guids) | |
# sql.select(:checksum, :org_id).from(:nodes).exclude(:org_id => org_guids).delete | |
sql.select(:checksum, :org_id).from(:cookbook_version_checksums).exclude(:org_id => org_guids) | |
# sql.select(:checksum, :org_id).from(:cookbook_version_checksums).exclude(:org_id => org_guids).delete |