Class: Dash::Cli::App::Boot
- Inherits:
-
Object
- Object
- Dash::Cli::App::Boot
- Defined in:
- lib/dash/cli/app/boot.rb
Constant Summary collapse
- SHORT_CONTAINER_ID_LENGTH =
What
docker container ls --quietprints, and so what dash-proxy has always been handed as a target.docker run --detachprints the full 64-character id, so the target is its first twelve characters rather than a round trip of its own. 12
Instance Attribute Summary collapse
-
#barrier ⇒ Object
readonly
Returns the value of attribute barrier.
-
#cli ⇒ Object
readonly
Returns the value of attribute cli.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#sshkit ⇒ Object
readonly
Returns the value of attribute sshkit.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(host, role, sshkit, version, barrier, cli) ⇒ Boot
constructor
A new instance of Boot.
- #run ⇒ Object
Constructor Details
#initialize(host, role, sshkit, version, barrier, cli) ⇒ Boot
Returns a new instance of Boot.
12 13 14 15 16 17 18 19 |
# File 'lib/dash/cli/app/boot.rb', line 12 def initialize(host, role, sshkit, version, , cli) @host = host @role = role @version = version @barrier = @sshkit = sshkit @cli = cli end |
Instance Attribute Details
#barrier ⇒ Object (readonly)
Returns the value of attribute barrier.
7 8 9 |
# File 'lib/dash/cli/app/boot.rb', line 7 def @barrier end |
#cli ⇒ Object (readonly)
Returns the value of attribute cli.
7 8 9 |
# File 'lib/dash/cli/app/boot.rb', line 7 def cli @cli end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
7 8 9 |
# File 'lib/dash/cli/app/boot.rb', line 7 def host @host end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
7 8 9 |
# File 'lib/dash/cli/app/boot.rb', line 7 def role @role end |
#sshkit ⇒ Object (readonly)
Returns the value of attribute sshkit.
7 8 9 |
# File 'lib/dash/cli/app/boot.rb', line 7 def sshkit @sshkit end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
7 8 9 |
# File 'lib/dash/cli/app/boot.rb', line 7 def version @version end |
Instance Method Details
#run ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/dash/cli/app/boot.rb', line 21 def run DASH.timings.phase("#{role} #{host}", depth: 1) do |timing| @timing = timing old_version = old_version_renamed_if_clashing if queuer? begin start_new_version rescue => e if gatekeeper? stop_new_version raise end if gatekeeper? if old_version stop_old_version(old_version) end end end |