Sha256: 1e3b0848f960f7e548121b2a571ba2a4ce5a59bb8f6dfaca52a55da7120d83bc

Contents?: true

Size: 662 Bytes

Versions: 31

Compression:

Stored size: 662 Bytes

Contents

require_relative 'services_helper'

module Kontena::Cli::Services
  class ScaleCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions
    include ServicesHelper

    parameter "NAME", "Service name"
    parameter "INSTANCES", "Scales service to given number of instances"
    option '--[no-]wait', :flag, 'Wait for service deployment', default: true

    def execute
      token = require_token
      spinner "Scaling #{pastel.cyan(name)} to #{instances} instances " do
        deployment = scale_service(token, name, instances)
        wait_for_deploy_to_finish(token, deployment) if wait?
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
krates-1.7.11 lib/kontena/cli/services/scale_command.rb
krates-1.7.10 lib/kontena/cli/services/scale_command.rb
krates-1.7.9 lib/kontena/cli/services/scale_command.rb
krates-1.7.8 lib/kontena/cli/services/scale_command.rb
krates-1.7.7 lib/kontena/cli/services/scale_command.rb
krates-1.7.6 lib/kontena/cli/services/scale_command.rb
krates-1.7.5 lib/kontena/cli/services/scale_command.rb
krates-1.7.4 lib/kontena/cli/services/scale_command.rb
krates-1.7.3 lib/kontena/cli/services/scale_command.rb
krates-1.7.2 lib/kontena/cli/services/scale_command.rb
krates-1.7.1 lib/kontena/cli/services/scale_command.rb
krates-1.7.0 lib/kontena/cli/services/scale_command.rb
krates-1.6.9 lib/kontena/cli/services/scale_command.rb
krates-1.6.8 lib/kontena/cli/services/scale_command.rb
krates-1.6.7 lib/kontena/cli/services/scale_command.rb
krates-1.6.6 lib/kontena/cli/services/scale_command.rb
krates-1.6.5 lib/kontena/cli/services/scale_command.rb
krates-1.6.4 lib/kontena/cli/services/scale_command.rb
krates-1.6.3 lib/kontena/cli/services/scale_command.rb
krates-1.6.2 lib/kontena/cli/services/scale_command.rb