Class: Chef::Knife::ServerBootstrapStandalone
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::ServerBootstrapStandalone
- Includes:
- ServerBootstrapBase
- Defined in:
- lib/chef/knife/server_bootstrap_standalone.rb
Overview
Provisions a standalone server that is reachable on the network and sets up an Open Source Chef Server.
Instance Method Summary collapse
Methods included from ServerBootstrapBase
Instance Method Details
#run ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/chef/knife/server_bootstrap_standalone.rb', line 48 def run super check_ssh_connection standalone_bootstrap.run fetch_validation_key create_root_client install_client_key end |
#standalone_bootstrap ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/chef/knife/server_bootstrap_standalone.rb', line 57 def standalone_bootstrap setup_environment bootstrap = Chef::Knife::Bootstrap.new bootstrap.name_args = [config[:host]] Chef::Knife::Bootstrap..keys.each do |attr| val = config_val(attr) next if val.nil? bootstrap.config[attr] = val end bootstrap.ui = ui bootstrap.config[:distro] = bootstrap_distro bootstrap.config[:use_sudo] = true if config_val(:ssh_user) != "root" bootstrap end |