Sha256: ebed35c9f9ea5d77d3a8205bff0c6e01d7e6c0ddbf1941e9462ecd19fead06be

Contents?: true

Size: 686 Bytes

Versions: 2

Compression:

Stored size: 686 Bytes

Contents

module Kontena::Plugin::Vagrant::Master
  class StartCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::ShellSpinner

    def execute
      require_relative '../../../machine/vagrant'
      
      vagrant_path = "#{Dir.home}/.kontena/vagrant_master"
      abort("Cannot find Vagrant node kontena-master".colorize(:red)) unless Dir.exist?(vagrant_path)
      Dir.chdir(vagrant_path) do
        spinner "Starting Vagrant machine kontena-master " do
          Open3.popen2('vagrant up') do |stdin, output, wait|
            while o = output.gets
              print o if ENV['DEBUG']
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kontena-plugin-vagrant-0.2.0 lib/kontena/plugin/vagrant/master/start_command.rb
kontena-plugin-vagrant-0.2.0.pre2 lib/kontena/plugin/vagrant/master/start_command.rb