Class: Dapp::Builder::Chef

Inherits:
Base
  • Object
show all
Defined in:
lib/dapp/builder/chef.rb,
lib/dapp/builder/chef/berksfile.rb,
lib/dapp/builder/chef/cookbook_metadata.rb

Overview

Chef

Defined Under Namespace

Classes: Berksfile, CookbookMetadata

Constant Summary collapse

LOCAL_COOKBOOK_CHECKSUM_PATTERNS =
%w(
  attributes/**/*
  recipes/**/*
  files/**/*
  templates/**/*
).freeze
DEFAULT_CHEFDK_IMAGE =

TODO: config, DSL, DEFAULT_CHEFDK_IMAGE

'dappdeps/chefdk:0.17.3-1'.freeze

Instance Attribute Summary

Attributes inherited from Base

#application

Instance Method Summary collapse

Methods inherited from Base

#app_install, #app_install_checksum, #app_setup, #app_setup_checksum, #infra_install, #infra_install_checksum, #infra_setup, #infra_setup_checksum, #initialize

Constructor Details

This class inherits a constructor from Dapp::Builder::Base

Instance Method Details

#chef_cookbooks(image) ⇒ Object



34
35
36
37
38
39
40
41
# File 'lib/dapp/builder/chef.rb', line 34

def chef_cookbooks(image)
  image.add_volume "#{cookbooks_vendor_path}:#{application.container_dapp_path('chef_vendored_cookbooks')}"
  image.add_commands(
    'mkdir -p /usr/share/dapp/chef_repo',
    ["cp -a #{application.container_dapp_path('chef_vendored_cookbooks')} ",
     '/usr/share/dapp/chef_repo/cookbooks'].join
  )
end

#chef_cookbooks_checksum ⇒ Object



30
31
32
# File 'lib/dapp/builder/chef.rb', line 30

def chef_cookbooks_checksum
  stage_cookbooks_checksum(:chef_cookbooks)
end