Class: Fhcap::CLI::Cluster

Inherits:
ThorBase show all
Defined in:
lib/fhcap/cluster.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, exit_on_failure?, #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_dirty_cookbooks, #get_entry_dependencies, #get_modified_cookbooks, #git_diff, #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

Methods included from Thor::Actions

#run

Constructor Details

This class inherits a constructor from Fhcap::ThorBase

Instance Method Details

#bootstrap_serverObject



186
187
188
189
# File 'lib/fhcap/cluster.rb', line 186

def bootstrap_server
  require 'fhcap/tasks/cluster/bootstrap_server'
  Tasks::Cluster::BootstrapServer.new(task_options(options.dup)).run
end

#chef_provisionObject



175
176
177
178
# File 'lib/fhcap/cluster.rb', line 175

def chef_provision
  require 'fhcap/tasks/cluster/chef_provisioning_task'
  Tasks::Cluster::ChefProvisioningTask.new(task_options(options.dup)).run
end

#createObject



52
53
54
55
56
57
# File 'lib/fhcap/cluster.rb', line 52

def create
  require "fhcap/tasks/cluster/generate"
  require "fhcap/tasks/cluster/create"
  Tasks::Cluster::Generate.new(task_options(options.dup)).run if options[:generate]
  Tasks::Cluster::Create.new(task_options(options.dup)).run
end

#create_dns_recordsObject



66
67
68
69
# File 'lib/fhcap/cluster.rb', line 66

def create_dns_records
  require "fhcap/tasks/cluster/create_dns_records"
  Tasks::Cluster::CreateDNSRecords.new(task_options(options.dup)).run
end

#destroyObject



122
123
124
125
# File 'lib/fhcap/cluster.rb', line 122

def destroy
  require "fhcap/tasks/cluster/destroy"
  Tasks::Cluster::Destroy.new(task_options(options.dup)).run
end

#generateObject



34
35
36
37
# File 'lib/fhcap/cluster.rb', line 34

def generate
  require "fhcap/tasks/cluster/generate"
  Tasks::Cluster::Generate.new(task_options(options.dup)).run
end

#infoObject



136
137
138
139
# File 'lib/fhcap/cluster.rb', line 136

def info
  require "fhcap/tasks/cluster/info"
  Tasks::Cluster::Info.new(task_options(options.dup)).run
end

#listObject



143
144
145
146
# File 'lib/fhcap/cluster.rb', line 143

def list
  require "fhcap/tasks/cluster/list"
  Tasks::Cluster::List.new(task_options(options.dup)).run
end

#promote_cookbooksObject



211
212
213
214
# File 'lib/fhcap/cluster.rb', line 211

def promote_cookbooks
  require 'fhcap/tasks/cluster/promote_cookbooks'
  Tasks::Cluster::PromoteCookbooks.new(task_options(options.dup)).run
end

#provisionObject



88
89
90
91
# File 'lib/fhcap/cluster.rb', line 88

def provision
  require "fhcap/tasks/cluster/provision"
  Tasks::Cluster::Provision.new(task_options(options.dup)).run
end

#statusObject



106
107
108
109
# File 'lib/fhcap/cluster.rb', line 106

def status
  require "fhcap/tasks/cluster/status"
  Tasks::Cluster::Status.new(task_options(options.dup)).run
end

#testObject



97
98
99
100
# File 'lib/fhcap/cluster.rb', line 97

def test
  require "fhcap/tasks/cluster/test"
  Tasks::Cluster::Test.new(task_options(options.dup)).run
end

#update_environment_attributesObject



200
201
202
203
# File 'lib/fhcap/cluster.rb', line 200

def update_environment_attributes
  require 'fhcap/tasks/cluster/update_environment_attributes'
  Tasks::Cluster::UpdateEnvironmentAttributes.new(task_options(options.dup)).run
end