Class: Porkadot::Cmd::Install::Bootstrap::Cli
- Inherits:
-
SubCommandBase
- Object
- Thor
- SubCommandBase
- Porkadot::Cmd::Install::Bootstrap::Cli
- Includes:
- Utils
- Defined in:
- lib/porkadot/cmd/install/bootstrap.rb
Class Method Summary collapse
Instance Method Summary collapse
- #all ⇒ Object
- #cleanup ⇒ Object
-
#initialize(*arg) ⇒ Cli
constructor
A new instance of Cli.
- #kubernetes ⇒ Object
- #node ⇒ Object
Methods included from Utils
Methods inherited from SubCommandBase
Constructor Details
#initialize(*arg) ⇒ Cli
Returns a new instance of Cli.
6 7 8 |
# File 'lib/porkadot/cmd/install/bootstrap.rb', line 6 def initialize(*arg) super end |
Class Method Details
.subcommand_prefix ⇒ Object
45 46 47 |
# File 'lib/porkadot/cmd/install/bootstrap.rb', line 45 def self.subcommand_prefix 'install bootstrap' end |
Instance Method Details
#all ⇒ Object
12 13 14 15 16 |
# File 'lib/porkadot/cmd/install/bootstrap.rb', line 12 def all invoke :node invoke :kubernetes invoke :cleanup end |
#cleanup ⇒ Object
38 39 40 41 42 43 |
# File 'lib/porkadot/cmd/install/bootstrap.rb', line 38 def cleanup logger.info "Cleanup bootstrap node" bootstrap = Porkadot::Install::Bootstrap.new(self.config) bootstrap.cleanup "" end |
#kubernetes ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/porkadot/cmd/install/bootstrap.rb', line 29 def kubernetes logger.info "Installing bootstrap kubernetes" bootstrap = Porkadot::Install::Bootstrap.new(self.config) k8s = Porkadot::Install::Kubernetes.new(self.config) k8s.install(bootstrap.host) "" end |
#node ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/porkadot/cmd/install/bootstrap.rb', line 19 def node logger.info "Installing bootstrap node" bootstrap = Porkadot::Install::Bootstrap.new(self.config) kubelets = Porkadot::Install::KubeletList.new(self.config) kubelets.install hosts: [bootstrap.host] bootstrap.install "" end |