Class: Porkadot::Cmd::Install::Cli

Inherits:
SubCommandBase show all
Includes:
Utils
Defined in:
lib/porkadot/cmd/install.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils

#config, #logger

Methods inherited from SubCommandBase

banner

Class Method Details

.subcommand_prefixObject



35
36
37
# File 'lib/porkadot/cmd/install.rb', line 35

def self.subcommand_prefix
  'install'
end

Instance Method Details

#allObject



8
9
10
11
# File 'lib/porkadot/cmd/install.rb', line 8

def all
  invoke :kubelet, [], options
  invoke :bootstrap, [], options
end

#kubeletObject



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/porkadot/cmd/install.rb', line 16

def kubelet
  logger.info "Installing kubelet"
  kubelets = Porkadot::Install::KubeletList.new(self.config)
  nodes = []
  if node = options[:node]
    nodes = kubelets[node]
  else
    nodes = kubelets.kubelets.values
  end
  kubelets.install hosts: nodes, force: options[:force]
  ""
end