Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mind the Gap

Robb Kidd
April 17, 2014
110

Mind the Gap

Deploying an on-premises, multi-node product with chef on networks you don't control.

Robb Kidd

April 17, 2014
Tweet

Transcript

  1. Ever Better: Put It in the Chef Cache # v-------------------------------v

    * remote_file "#{Chef::Config[:file_cache_path]}/sauce_#{node[:sauce][:version]}.tgz" do source "#{node[:sauce][:url]}/awesome_sauce_#{node[:sauce][:version]}.tgz" checksum node[:sauce][:checksum] end
  2. fpm

  3. Example Packaging Step fpm -s dir \ -t deb \

    --name awesome_sauce \ --version "$(shell git describe --always --tag)" \ --before-install ./etc/preinst.sh \ --deb-upstart ./etc/saucy \ --config-files /etc/saucy.yml \ ./bin/saucy=/usr/bin/ \ saucy.yml.sample=/etc/saucy/
  4. RVM 4 custom RVM install ahead of chef-rvm 4 install

    RVM via tarball according to the offline steps 4 rvm mount ruby-version.tgz 4 carry on with our uses of chev-rvm 4 rvm-shell mostly
  5. python_shim.rb %w(python-pip python-virtualenv).each do |pkg| package pkg do action :install

    end end link "/usr/local/bin/pip" do to "/usr/bin/pip" end directory "/root/.pip/" file "/root/.pip/pip.conf" do content "[global]\ntimeout = 1\n" end
  6. class ::Chef class Provider class RemoteFile class Content < Chef::FileContentManagement::ContentBase

    private def current_resource_matches_target_checksum? ::Chef::Log.info("Airgapped - skipping content checksum for #{@new_resource}") true end end end end end
  7. Payoff 4 works without access to network resources 4 chef

    convergence is faster! 4 chef convergence is predictable!
  8. 4 Mind the Gap photo by Clicsouris 4 Vagrant -

    Mitchell Hashimoto/Hashicorp 4 vagrant-cachier - Fabio Rehm 4 fpm - Jordan Sissell 4 knife-solo - Mat Schaffer