Class: BuckKnife::Commands::Bootstrap
- Inherits:
-
Struct
- Object
- Struct
- BuckKnife::Commands::Bootstrap
- Includes:
- Base
- Defined in:
- lib/buckknife/commands/bootstrap.rb
Overview
Takes a Project and Node instance Returns the knife command to bootstrap this server
NOTE: This does not add the roles and recipes of the node. This is because currently there are some dependency issues across nodes with some recipes. The current strategy is to add roles manually one by one running the chef client as needed.
Instance Attribute Summary collapse
-
#node ⇒ Object
Returns the value of attribute node.
-
#project ⇒ Object
Returns the value of attribute project.
Instance Method Summary collapse
Methods included from Base
#base_run_list, #build_run_list, #to_s
Instance Attribute Details
#node ⇒ Object
Returns the value of attribute node
10 11 12 |
# File 'lib/buckknife/commands/bootstrap.rb', line 10 def node @node end |
#project ⇒ Object
Returns the value of attribute project
10 11 12 |
# File 'lib/buckknife/commands/bootstrap.rb', line 10 def project @project end |
Instance Method Details
#command ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/buckknife/commands/bootstrap.rb', line 13 def command super.tap do |c| c.arg 'bootstrap' c.arg node.address c.opt '-N', node.name c.opt '-x', node.ssh_username c.opt '-P', node.ssh_password c.opt '-r', base_run_list c.opt '-d', project.distro c.opt '--sudo' end end |