Class: Kontena::Plugin::Packet::Master::CreateCommand
- Inherits:
-
Command
- Object
- Command
- Kontena::Plugin::Packet::Master::CreateCommand
- Includes:
- Cli::Common, FacilityOption, ProjectOption, SshKeyOption, TokenOption, TypeOption
- Defined in:
- lib/kontena/plugin/packet/master/create_command.rb
Constant Summary
Constants included from SshKeyOption
Instance Method Summary collapse
Methods included from SshKeyOption
Methods included from FacilityOption
Methods included from TypeOption
Methods included from ProjectOption
Methods included from TokenOption
Instance Method Details
#execute ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/kontena/plugin/packet/master/create_command.rb', line 24 def execute require 'securerandom' require 'kontena/machine/packet' provisioner = provisioner(token) provisioner.run!( project: project, billing: billing, ssh_key: ssh_key, ssl_cert: ssl_cert, plan: plan, facility: facility, version: version, vault_secret: vault_secret || SecureRandom.hex(24), vault_iv: vault_iv || SecureRandom.hex(24), initial_admin_code: SecureRandom.hex(16), mongodb_uri: mongodb_uri ) end |
#provisioner(token) ⇒ Object
45 46 47 |
# File 'lib/kontena/plugin/packet/master/create_command.rb', line 45 def provisioner(token) Kontena::Machine::Packet::MasterProvisioner.new(token) end |