Module: ChefWorkstationInitialize::SelfBootstrap::NoChef::KitchenHelpers
- Includes:
- ChefHelpers, ProvisionersHelpers
- Included in:
- ChefRepoHelpers
- Defined in:
- lib/selfbootstrap/nochef/kitchen.rb
Instance Method Summary collapse
- #building_kitchen ⇒ Object
- #generate_kitchen(machine_name) ⇒ Object
- #generate_machine(machine_name) ⇒ Object
- #is_kitchen_command? ⇒ Boolean
- #kitchen(*args, **run_opts) ⇒ Object
- #kitchen_machine(machine_name, kitchen_user, kitchen_group, kitchen_dir) ⇒ Object
- #kitchen_root ⇒ Object
Methods included from ProvisionersHelpers
#chef_zero_provisioner, #provisioners
Methods included from PlatformsHelpers
Methods included from SuitesHelpers
Methods included from VerifiersHelpers
Methods included from ChefHelpers
#chef, #chef_client, #install_chef_workstation, #is_chef_cli_command?, #is_chef_client_command?, #is_chef_command?, #is_chef_enabled?, #is_chef_installed?, #is_chef_profile_set?, #is_chefworkstation_available?, #is_knife_gem_install?
Methods included from BerksHelpers
#berks, #berks_vendor, #berks_vendor_all_cookbook, #berks_vendor_cookbook, #berks_vendor_init, #delete_all_berkslock, #delete_cookbook_berkslock, #reset_berks_vendor_dir, #self_berks_vendor
Methods included from GitHelpers
#all_cookbooks, #generate_git_submodules, #generate_json_repo, #get_git_path, #get_git_relative_path, #get_git_server, #get_git_submodule, #get_self_git, #git_exec, #git_submodule_init, #repository_list
Methods included from SSHHelpers
#delete_hostkey, #delete_hostkey_ip_or_name, #generate_private_key, #ssh, #ssh_command, #ssh_keygen
Methods included from CommandlineHelpers
#base_command, #get_homedir, #is_mixlib_disabled?, #main_command, #run_options
Methods included from DefaultMethodsHelpers
#analyse_object, #check_install_dir, #debug_worklog, #default_chefzero_portrange, #default_hostname, #default_install_dir, #define_resource_requirements, #error_worklog, #generate_default_install_dir, #generate_directory, #get_out_of_cache_path, #get_out_of_folder, #get_out_of_local_chef_path, #get_path, #is_chef_constant_enabled?, #parent_nil?, #require_implement_method, #search_local_project_folder, #warning_worklog, #worklog, #worklog_counter
Instance Method Details
#building_kitchen ⇒ Object
52 53 54 55 |
# File 'lib/selfbootstrap/nochef/kitchen.rb', line 52 def building_kitchen worklog 'kitchen converge' kitchen 'converge', cwd: workstation_chef_repo_path end |
#generate_kitchen(machine_name) ⇒ Object
44 45 46 |
# File 'lib/selfbootstrap/nochef/kitchen.rb', line 44 def generate_kitchen(machine_name) kitchen_machine(machine_name, workstation_resource[:user], workstation_resource[:group], workstation_chef_repo_path) end |
#generate_machine(machine_name) ⇒ Object
48 49 50 |
# File 'lib/selfbootstrap/nochef/kitchen.rb', line 48 def generate_machine(machine_name) kitchen_machine(machine_name, workstation_resource[:user], workstation_resource[:group], workstation_chef_repo_path) end |
#is_kitchen_command? ⇒ Boolean
31 32 33 |
# File 'lib/selfbootstrap/nochef/kitchen.rb', line 31 def is_kitchen_command? ::File.basename($PROGRAM_NAME).eql?('kitchen') end |
#kitchen(*args, **run_opts) ⇒ Object
35 36 37 38 |
# File 'lib/selfbootstrap/nochef/kitchen.rb', line 35 def kitchen(*args, **run_opts) write_kitchen_file unless args.eql? ['init'] base_command('kitchen', args, run_opts) end |
#kitchen_machine(machine_name, kitchen_user, kitchen_group, kitchen_dir) ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/selfbootstrap/nochef/kitchen.rb', line 57 def kitchen_machine(machine_name, kitchen_user, kitchen_group, kitchen_dir) worklog "kitchen converge #{machine_name}" kitchen "converge #{machine_name}" end |
#kitchen_root ⇒ Object
40 41 42 |
# File 'lib/selfbootstrap/nochef/kitchen.rb', line 40 def kitchen_root get_path(workstation_chef_repo_path) end |