Class: Fhcap::CLI::Misc

Inherits:
ThorBase show all
Defined in:
lib/fhcap/misc.rb

Instance Attribute Summary

Attributes inherited from ThorBase

#config, #thor

Instance Method Summary collapse

Methods inherited from ThorBase

add_shared_option, chef_server_names, cluster_template_names, config_key_collection, #initialize, provider_names, provider_names_for, repo_names, run_cmd, run_knife_cmd, shared_options

Methods included from ReposHelper

#find_cluster, #find_cluster_pwds, #find_cluster_pwds_with_repo, #find_cluster_with_repo, #find_data_bag, #find_data_bag_item, #find_environment, #find_repo_item, #find_role, #get_cookbook_deps, #get_cookbook_meta, #get_cookbook_versions, #get_cookbooks, #get_entry_dependencies, #get_modified_cookbooks, #is_dirty?, #modified?, #repo_cfg, #repo_clusters_dir, #repo_cookbook_paths, #repo_dir, #repo_names, #repo_paths, #repos_config, #repos_dir, #run_inside_repo_dir

Methods included from ProvidersHelper

#provider_availability_zones, #provider_config, #provider_credentials, #provider_for, #provider_names, #provider_names_for, #provider_regions, #provider_type, #providers_config

Constructor Details

This class inherits a constructor from Fhcap::ThorBase

Instance Method Details

#chef_provision ⇒ Object



56
57
58
59
# File 'lib/fhcap/misc.rb', line 56

def chef_provision
  require 'fhcap/tasks/chef/provisioning/chef_provisioning_task'
  Tasks::Chef::Provisioning::ChefProvisioningTask.new(task_options(options.dup)).run
end

#create_chef_environment ⇒ Object



33
34
35
36
# File 'lib/fhcap/misc.rb', line 33

def create_chef_environment
  require "fhcap/tasks/chef/environments/create"
  Tasks::Chef::Environments::Create.new(task_options(options.dup)).run
end

#create_cluster_environment ⇒ Object



70
71
72
73
# File 'lib/fhcap/misc.rb', line 70

def create_cluster_environment
  require "fhcap/tasks/cluster/create_environment"
  Tasks::Cluster::CreateEnvironment.new(task_options(options.dup)).run
end

#create_dns_record ⇒ Object



96
97
98
99
# File 'lib/fhcap/misc.rb', line 96

def create_dns_record
  require "fhcap/tasks/misc/create_dns_record"
  Tasks::Misc::CreateDNSRecord.new(task_options(options.dup)).run
end

#create_ssl_cert ⇒ Object



19
20
21
22
# File 'lib/fhcap/misc.rb', line 19

def create_ssl_cert
  require "fhcap/tasks/misc/create_ssl_cert"
  Tasks::Misc::CreateSslCert.new(task_options(options.dup)).run
end

#destroy_chef_environment ⇒ Object



44
45
46
47
# File 'lib/fhcap/misc.rb', line 44

def destroy_chef_environment
  require "fhcap/tasks/chef/environments/destroy"
  Tasks::Chef::Environments::Destroy.new(task_options(options.dup)).run
end

#destroy_cluster_environment ⇒ Object



82
83
84
85
# File 'lib/fhcap/misc.rb', line 82

def destroy_cluster_environment
  require "fhcap/tasks/cluster/destroy_environment"
  Tasks::Cluster::DestroyEnvironment.new(task_options(options.dup)).run
end