Sha256: 6fc029a656ae343743783123002269fd1c12d6d24c40d3ae2776ddaa62e899cd

Contents?: true

Size: 1.22 KB

Versions: 12

Compression:

Stored size: 1.22 KB

Contents

module Kontena
  module Callbacks
    class SuggestInvitingYourself < Kontena::Callback

      include Kontena::Cli::Common

      matches_commands 'master create'

      def after
        return unless current_master
        return unless command.exit_code == 0
        return if current_master.username.to_s == 'admin'

        puts
        puts Kontena.pastel.green("Protip:")

        if config.find_server("#{current_master.name}-admin")
          puts "  You are currently using the Kontena Master '#{Kontena.pastel.yellow(current_master.name)}' as"
          puts "  #{Kontena.pastel.yellow(current_master.username)}. To switch to the Kontena Master internal"
          puts "  administrator you can use:"
          puts "  #{Kontena.pastel.green.on_black("  kontena master use #{current_master.name}-admin  ")}"
          puts
        end
        puts "  To invite more users you can use:"
        puts "  #{Kontena.pastel.green.on_black("  kontena master user invite email_address@example.com  ")}"
        puts
        puts "  The users can then join the master by using the invite code: "
        puts "  #{Kontena.pastel.green.on_black("  kontena master join #{current_master.url} <invite_code>  ")}"
        puts
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kontena-cli-1.3.0.pre1 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.2 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.2.rc2 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.2.rc1 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.1 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.1.rc1 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.0 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.0.rc3 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.0.rc2 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.0.rc1 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.0.pre3 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb
kontena-cli-1.2.0.pre2 lib/kontena/callbacks/master/deploy/90_proptip_after_deploy.rb