lib/kontena/cli/registry/create_command.rb in kontena-cli-1.0.1 vs lib/kontena/cli/registry/create_command.rb in kontena-cli-1.0.2.pre1
- old
+ new
@@ -1,10 +1,12 @@
+require_relative '../stacks/stacks_helper'
+
module Kontena::Cli::Registry
class CreateCommand < Kontena::Command
include Kontena::Cli::Common
include Kontena::Cli::GridOptions
- include Kontena::Cli::Services::ServicesHelper
+ include Kontena::Cli::Stacks::StacksHelper
REGISTRY_VERSION = '2.2'
option '--node', 'NODE', 'Node name'
option '--s3-bucket', 'S3_BUCKET', 'S3 bucket'
@@ -107,12 +109,10 @@
}
client(token).post("grids/#{current_grid}/stacks", data)
deployment = client(token).post("stacks/#{current_grid}/registry/deploy", {})
spinner "Deploying #{data[:name].colorize(:cyan)} stack " do
- deployment['service_deploys'].each do |service_deploy|
- wait_for_deploy_to_finish(token, service_deploy)
- end
+ wait_for_deploy_to_finish(deployment)
end
puts "\n"
puts "Docker Registry #{REGISTRY_VERSION} is now running at registry.#{current_grid}.kontena.local."
puts "Note: "
puts " - OpenVPN connection is needed to establish connection to this registry. See http://www.kontena.io/docs/using-kontena/vpn-access for details"