dash 3.2.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/bin/dash +2 -2
  4. data/lib/{kamal → dash}/cli/accessory.rb +24 -24
  5. data/lib/dash/cli/alias/command.rb +10 -0
  6. data/lib/{kamal → dash}/cli/app/assets.rb +2 -2
  7. data/lib/{kamal → dash}/cli/app/boot.rb +15 -15
  8. data/lib/{kamal → dash}/cli/app/error_pages.rb +6 -6
  9. data/lib/{kamal → dash}/cli/app/rollout_boot.rb +6 -6
  10. data/lib/{kamal → dash}/cli/app/ssl_certificates.rb +3 -3
  11. data/lib/{kamal → dash}/cli/app.rb +86 -86
  12. data/lib/{kamal → dash}/cli/base.rb +71 -47
  13. data/lib/dash/cli/build/clone.rb +59 -0
  14. data/lib/{kamal → dash}/cli/build/port_forwarding.rb +1 -1
  15. data/lib/{kamal → dash}/cli/build.rb +45 -45
  16. data/lib/{kamal → dash}/cli/doctor/config_checks.rb +3 -3
  17. data/lib/{kamal → dash}/cli/doctor/endpoint_checks.rb +25 -7
  18. data/lib/{kamal → dash}/cli/doctor/host_checks.rb +18 -18
  19. data/lib/{kamal → dash}/cli/doctor.rb +9 -9
  20. data/lib/{kamal → dash}/cli/healthcheck/barrier.rb +2 -2
  21. data/lib/{kamal → dash}/cli/healthcheck/drift_error.rb +2 -2
  22. data/lib/dash/cli/healthcheck/error.rb +2 -0
  23. data/lib/{kamal → dash}/cli/healthcheck/poller.rb +7 -7
  24. data/lib/{kamal → dash}/cli/lock.rb +1 -1
  25. data/lib/dash/cli/main/migrate.rb +77 -0
  26. data/lib/{kamal → dash}/cli/main.rb +77 -66
  27. data/lib/{kamal → dash}/cli/proxy/drift.rb +3 -3
  28. data/lib/{kamal → dash}/cli/proxy/loadbalancer_claim.rb +3 -3
  29. data/lib/{kamal → dash}/cli/proxy/loadbalancer_reboot.rb +22 -22
  30. data/lib/{kamal → dash}/cli/proxy/reboot.rb +15 -15
  31. data/lib/{kamal → dash}/cli/proxy.rb +166 -154
  32. data/lib/{kamal → dash}/cli/prune.rb +10 -10
  33. data/lib/{kamal → dash}/cli/registry.rb +11 -11
  34. data/lib/{kamal → dash}/cli/secrets.rb +3 -3
  35. data/lib/{kamal → dash}/cli/server.rb +14 -14
  36. data/lib/{kamal → dash}/cli/templates/deploy.yml +4 -4
  37. data/lib/dash/cli/templates/sample_hooks/docker-setup.sample +3 -0
  38. data/lib/dash/cli/templates/sample_hooks/post-app-boot.sample +3 -0
  39. data/lib/dash/cli/templates/sample_hooks/post-app-stop.sample +9 -0
  40. data/lib/dash/cli/templates/sample_hooks/post-deploy.sample +14 -0
  41. data/lib/dash/cli/templates/sample_hooks/post-proxy-deploy.sample +3 -0
  42. data/lib/dash/cli/templates/sample_hooks/post-proxy-reboot.sample +3 -0
  43. data/lib/dash/cli/templates/sample_hooks/pre-app-boot.sample +3 -0
  44. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-app-stop.sample +2 -2
  45. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-build.sample +8 -8
  46. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-connect.sample +8 -8
  47. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-deploy.sample +9 -9
  48. data/lib/dash/cli/templates/sample_hooks/pre-proxy-deploy.sample +3 -0
  49. data/lib/dash/cli/templates/sample_hooks/pre-proxy-reboot.sample +3 -0
  50. data/lib/{kamal → dash}/cli/templates/secrets +6 -6
  51. data/lib/{kamal → dash}/cli.rb +2 -2
  52. data/lib/{kamal → dash}/commander/specifics.rb +2 -2
  53. data/lib/{kamal → dash}/commander.rb +31 -23
  54. data/lib/{kamal → dash}/commands/accessory/proxy.rb +1 -1
  55. data/lib/{kamal → dash}/commands/accessory.rb +2 -2
  56. data/lib/{kamal → dash}/commands/app/assets.rb +1 -1
  57. data/lib/{kamal → dash}/commands/app/containers.rb +1 -1
  58. data/lib/{kamal → dash}/commands/app/error_pages.rb +2 -2
  59. data/lib/{kamal → dash}/commands/app/execution.rb +1 -1
  60. data/lib/{kamal → dash}/commands/app/images.rb +1 -1
  61. data/lib/{kamal → dash}/commands/app/logging.rb +1 -1
  62. data/lib/{kamal → dash}/commands/app/proxy.rb +1 -1
  63. data/lib/{kamal → dash}/commands/app.rb +1 -1
  64. data/lib/{kamal → dash}/commands/auditor.rb +3 -7
  65. data/lib/{kamal → dash}/commands/base.rb +39 -3
  66. data/lib/{kamal → dash}/commands/builder/base.rb +2 -2
  67. data/lib/{kamal → dash}/commands/builder/clone.rb +3 -3
  68. data/lib/{kamal → dash}/commands/builder/cloud.rb +1 -1
  69. data/lib/{kamal → dash}/commands/builder/hybrid.rb +1 -1
  70. data/lib/{kamal → dash}/commands/builder/local.rb +1 -1
  71. data/lib/{kamal → dash}/commands/builder/pack.rb +1 -1
  72. data/lib/{kamal → dash}/commands/builder/remote.rb +1 -1
  73. data/lib/{kamal → dash}/commands/builder.rb +7 -7
  74. data/lib/{kamal → dash}/commands/docker.rb +1 -1
  75. data/lib/{kamal → dash}/commands/hook.rb +1 -1
  76. data/lib/{kamal → dash}/commands/loadbalancer.rb +9 -8
  77. data/lib/{kamal → dash}/commands/lock.rb +2 -2
  78. data/lib/{kamal → dash}/commands/proxy/cert_transfer.rb +2 -2
  79. data/lib/{kamal → dash}/commands/proxy.rb +20 -10
  80. data/lib/{kamal → dash}/commands/prune.rb +1 -1
  81. data/lib/dash/commands/registry.rb +44 -0
  82. data/lib/{kamal → dash}/commands/server.rb +1 -5
  83. data/lib/dash/commands.rb +2 -0
  84. data/lib/{kamal → dash}/configuration/accessory.rb +11 -11
  85. data/lib/{kamal → dash}/configuration/alias.rb +3 -3
  86. data/lib/{kamal → dash}/configuration/boot.rb +2 -2
  87. data/lib/{kamal → dash}/configuration/builder.rb +7 -7
  88. data/lib/{kamal → dash}/configuration/docs/builder.yml +3 -3
  89. data/lib/{kamal → dash}/configuration/docs/configuration.yml +12 -5
  90. data/lib/{kamal → dash}/configuration/docs/env.yml +10 -10
  91. data/lib/{kamal → dash}/configuration/docs/proxy.yml +31 -8
  92. data/lib/{kamal → dash}/configuration/docs/registry.yml +5 -5
  93. data/lib/{kamal → dash}/configuration/env/tag.rb +2 -2
  94. data/lib/{kamal → dash}/configuration/env.rb +5 -5
  95. data/lib/{kamal → dash}/configuration/loadbalancer.rb +3 -3
  96. data/lib/{kamal → dash}/configuration/logging.rb +3 -3
  97. data/lib/{kamal → dash}/configuration/output.rb +4 -4
  98. data/lib/{kamal → dash}/configuration/proxy/acme.rb +4 -3
  99. data/lib/{kamal → dash}/configuration/proxy/boot.rb +7 -7
  100. data/lib/{kamal → dash}/configuration/proxy/run.rb +11 -11
  101. data/lib/{kamal → dash}/configuration/proxy.rb +15 -15
  102. data/lib/{kamal → dash}/configuration/registry.rb +3 -3
  103. data/lib/{kamal → dash}/configuration/role/healthcheck.rb +3 -3
  104. data/lib/{kamal → dash}/configuration/role.rb +12 -12
  105. data/lib/{kamal → dash}/configuration/servers.rb +4 -4
  106. data/lib/{kamal → dash}/configuration/ssh.rb +2 -2
  107. data/lib/{kamal → dash}/configuration/sshkit.rb +2 -2
  108. data/lib/{kamal → dash}/configuration/validation.rb +2 -2
  109. data/lib/{kamal → dash}/configuration/validator/accessory.rb +1 -1
  110. data/lib/{kamal → dash}/configuration/validator/alias.rb +2 -2
  111. data/lib/{kamal → dash}/configuration/validator/builder.rb +1 -1
  112. data/lib/dash/configuration/validator/configuration.rb +6 -0
  113. data/lib/{kamal → dash}/configuration/validator/env.rb +2 -2
  114. data/lib/{kamal → dash}/configuration/validator/proxy.rb +8 -8
  115. data/lib/{kamal → dash}/configuration/validator/registry.rb +1 -1
  116. data/lib/{kamal → dash}/configuration/validator/role.rb +1 -1
  117. data/lib/{kamal → dash}/configuration/validator/servers.rb +1 -1
  118. data/lib/{kamal → dash}/configuration/validator.rb +4 -4
  119. data/lib/{kamal → dash}/configuration/volume.rb +2 -2
  120. data/lib/{kamal → dash}/configuration.rb +39 -29
  121. data/lib/{kamal → dash}/docker.rb +1 -1
  122. data/lib/{kamal → dash}/env_file.rb +1 -1
  123. data/lib/{kamal → dash}/git.rb +1 -1
  124. data/lib/{kamal → dash}/otel_shipper.rb +3 -3
  125. data/lib/{kamal → dash}/output/base_logger.rb +1 -1
  126. data/lib/{kamal → dash}/output/file_logger.rb +1 -1
  127. data/lib/{kamal → dash}/output/formatter.rb +1 -1
  128. data/lib/{kamal → dash}/output/otel_logger.rb +3 -3
  129. data/lib/dash/project_directory.rb +28 -0
  130. data/lib/{kamal → dash}/secrets/adapters/aws_secrets_manager.rb +1 -1
  131. data/lib/{kamal → dash}/secrets/adapters/base.rb +2 -2
  132. data/lib/{kamal → dash}/secrets/adapters/bitwarden.rb +1 -1
  133. data/lib/{kamal → dash}/secrets/adapters/bitwarden_secrets_manager.rb +1 -1
  134. data/lib/{kamal → dash}/secrets/adapters/doppler.rb +1 -1
  135. data/lib/{kamal → dash}/secrets/adapters/enpass.rb +1 -1
  136. data/lib/{kamal → dash}/secrets/adapters/gcp_secret_manager.rb +1 -1
  137. data/lib/{kamal → dash}/secrets/adapters/last_pass.rb +1 -1
  138. data/lib/{kamal → dash}/secrets/adapters/one_password.rb +2 -2
  139. data/lib/{kamal → dash}/secrets/adapters/passbolt.rb +1 -1
  140. data/lib/{kamal → dash}/secrets/adapters/test.rb +1 -1
  141. data/lib/{kamal → dash}/secrets/adapters.rb +2 -2
  142. data/lib/{kamal → dash}/secrets/dotenv/inline_command_substitution.rb +2 -2
  143. data/lib/{kamal → dash}/secrets.rb +6 -6
  144. data/lib/{kamal → dash}/tags.rb +8 -3
  145. data/lib/{kamal → dash}/utils/sensitive.rb +1 -1
  146. data/lib/{kamal → dash}/utils.rb +15 -5
  147. data/lib/dash/version.rb +3 -0
  148. data/lib/{kamal.rb → dash.rb} +4 -4
  149. metadata +156 -154
  150. data/lib/kamal/cli/alias/command.rb +0 -10
  151. data/lib/kamal/cli/build/clone.rb +0 -59
  152. data/lib/kamal/cli/healthcheck/error.rb +0 -2
  153. data/lib/kamal/cli/templates/sample_hooks/docker-setup.sample +0 -3
  154. data/lib/kamal/cli/templates/sample_hooks/post-app-boot.sample +0 -3
  155. data/lib/kamal/cli/templates/sample_hooks/post-app-stop.sample +0 -9
  156. data/lib/kamal/cli/templates/sample_hooks/post-deploy.sample +0 -14
  157. data/lib/kamal/cli/templates/sample_hooks/post-proxy-deploy.sample +0 -3
  158. data/lib/kamal/cli/templates/sample_hooks/post-proxy-reboot.sample +0 -3
  159. data/lib/kamal/cli/templates/sample_hooks/pre-app-boot.sample +0 -3
  160. data/lib/kamal/cli/templates/sample_hooks/pre-proxy-deploy.sample +0 -3
  161. data/lib/kamal/cli/templates/sample_hooks/pre-proxy-reboot.sample +0 -3
  162. data/lib/kamal/commands/registry.rb +0 -38
  163. data/lib/kamal/commands.rb +0 -2
  164. data/lib/kamal/configuration/validator/configuration.rb +0 -6
  165. data/lib/kamal/version.rb +0 -3
  166. /data/lib/{kamal → dash}/configuration/docs/accessory.yml +0 -0
  167. /data/lib/{kamal → dash}/configuration/docs/alias.yml +0 -0
  168. /data/lib/{kamal → dash}/configuration/docs/boot.yml +0 -0
  169. /data/lib/{kamal → dash}/configuration/docs/logging.yml +0 -0
  170. /data/lib/{kamal → dash}/configuration/docs/output.yml +0 -0
  171. /data/lib/{kamal → dash}/configuration/docs/role.yml +0 -0
  172. /data/lib/{kamal → dash}/configuration/docs/servers.yml +0 -0
  173. /data/lib/{kamal → dash}/configuration/docs/ssh.yml +0 -0
  174. /data/lib/{kamal → dash}/configuration/docs/sshkit.yml +0 -0
  175. /data/lib/{kamal → dash}/sshkit_with_ext.rb +0 -0
@@ -1,28 +1,28 @@
1
- class Kamal::Cli::Proxy < Kamal::Cli::Base
1
+ class Dash::Cli::Proxy < Dash::Cli::Base
2
2
  desc "boot", "Boot proxy on servers"
3
3
  def boot
4
4
  modify(lock: true, server_lock: true) do
5
- on(KAMAL.hosts) do |host|
6
- execute *KAMAL.docker.create_network
5
+ on(DASH.hosts) do |host|
6
+ execute *DASH.docker.create_network
7
7
  rescue SSHKit::Command::Failed => e
8
8
  raise unless e.message.include?("already exists")
9
9
  end
10
10
 
11
11
  # Skip proxy on loadbalancer host - the loadbalancer will handle it
12
- proxy_hosts = KAMAL.proxy_hosts
13
- if KAMAL.config.proxy.loadbalancer_on_proxy_host?
14
- proxy_hosts = proxy_hosts - [ KAMAL.config.proxy.effective_loadbalancer ]
12
+ proxy_hosts = DASH.proxy_hosts
13
+ if DASH.config.proxy.loadbalancer_on_proxy_host?
14
+ proxy_hosts = proxy_hosts - [ DASH.config.proxy.effective_loadbalancer ]
15
15
  end
16
16
 
17
17
  drifted_hosts = Concurrent::Array.new
18
18
  stale_hosts = Concurrent::Array.new
19
- auto_reboot = KAMAL.config.proxy.reboot_on_deploy?
19
+ auto_reboot = DASH.config.proxy.reboot_on_deploy?
20
20
 
21
21
  on(proxy_hosts) do |host|
22
- execute *KAMAL.registry.login
22
+ execute *DASH.registry.login
23
23
 
24
- proxy = KAMAL.proxy(host)
25
- drift = Kamal::Cli::Proxy::Drift.new(host, self)
24
+ proxy = DASH.proxy(host)
25
+ drift = Dash::Cli::Proxy::Drift.new(host, self)
26
26
 
27
27
  if drift.drifted? && auto_reboot
28
28
  # Leave the old proxy serving until its serial reboot slot below.
@@ -32,8 +32,8 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
32
32
 
33
33
  version = capture_with_info(*proxy.version).strip.presence
34
34
 
35
- if version && Kamal::Utils.older_version?(version, Kamal::Configuration::Proxy::Run::MINIMUM_VERSION)
36
- raise "kamal-proxy version #{version} is too old, run `dash proxy reboot` in order to update to at least #{Kamal::Configuration::Proxy::Run::MINIMUM_VERSION}"
35
+ if version && Dash::Utils.older_version?(version, Dash::Configuration::Proxy::Run::MINIMUM_VERSION)
36
+ raise "kamal-proxy version #{version} is too old, run `dash proxy reboot` in order to update to at least #{Dash::Configuration::Proxy::Run::MINIMUM_VERSION}"
37
37
  end
38
38
 
39
39
  if (run_config = proxy.proxy_run_config)&.secrets?
@@ -59,56 +59,56 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
59
59
  say "kamal-proxy configuration changed, rebooting on #{host}...", :magenta
60
60
  run_hook "pre-proxy-reboot", hosts: host
61
61
  on(host) do |h|
62
- Kamal::Cli::Proxy::Reboot.new(h, self).run
62
+ Dash::Cli::Proxy::Reboot.new(h, self).run
63
63
  end
64
64
  run_hook "post-proxy-reboot", hosts: host
65
65
  end
66
66
 
67
- if KAMAL.config.proxy.load_balancing?
67
+ if DASH.config.proxy.load_balancing?
68
68
  lb_drifted = Concurrent::Array.new
69
69
  lb_stale = Concurrent::Array.new
70
70
 
71
- on(KAMAL.config.proxy.effective_loadbalancer) do |host|
71
+ on(DASH.config.proxy.effective_loadbalancer) do |host|
72
72
  info "Starting loadbalancer on #{host}..."
73
- execute *KAMAL.registry.login
73
+ execute *DASH.registry.login
74
74
 
75
75
  # The load balancer terminates TLS and owns the cache, so its host
76
76
  # needs the proxy secrets (acme credentials, cache store) just like
77
77
  # the proxy hosts do.
78
- if (lb_run = KAMAL.loadbalancer_config.run).secrets?
79
- execute *KAMAL.loadbalancer.ensure_proxy_directory
78
+ if (lb_run = DASH.loadbalancer_config.run).secrets?
79
+ execute *DASH.loadbalancer.ensure_proxy_directory
80
80
  upload! lb_run.secrets_io, lb_run.secrets_path, mode: "0600"
81
81
  else
82
- execute *KAMAL.loadbalancer.remove_proxy_secrets_file, raise_on_non_zero_exit: false
82
+ execute *DASH.loadbalancer.remove_proxy_secrets_file, raise_on_non_zero_exit: false
83
83
  end
84
84
 
85
- execute *KAMAL.loadbalancer.ensure_apps_config_directory
85
+ execute *DASH.loadbalancer.ensure_apps_config_directory
86
86
 
87
87
  # TLS terminates at the load balancer, so the TLS material the app
88
88
  # hosts get - custom certificates and the mTLS client CA - must
89
89
  # reach this host too; the LB container reads it through the same
90
90
  # apps-config mount the per-host proxies use.
91
- KAMAL.config.roles.select(&:running_proxy?).each do |role|
92
- Kamal::Cli::App::SslCertificates.new(host, role, self).run
91
+ DASH.config.roles.select(&:running_proxy?).each do |role|
92
+ Dash::Cli::App::SslCertificates.new(host, role, self).run
93
93
  end
94
94
 
95
95
  # The same drift detection the proxy hosts get: a loadbalancer booted
96
96
  # with a different config digest reboots below (or warns, when
97
97
  # automatic reboot is off) instead of serving a stale config forever.
98
- container_id = capture_with_info(*KAMAL.loadbalancer.container_id, raise_on_non_zero_exit: false).strip
99
- current_digest = capture_with_info(*KAMAL.loadbalancer.config_digest, raise_on_non_zero_exit: false).strip
98
+ container_id = capture_with_info(*DASH.loadbalancer.container_id, raise_on_non_zero_exit: false).strip
99
+ current_digest = capture_with_info(*DASH.loadbalancer.config_digest, raise_on_non_zero_exit: false).strip
100
100
 
101
- if container_id.present? && current_digest != KAMAL.loadbalancer_config.run_config_digest
101
+ if container_id.present? && current_digest != DASH.loadbalancer_config.run_config_digest
102
102
  if auto_reboot
103
103
  # Leave the old loadbalancer serving until its reboot below.
104
104
  lb_drifted << host.to_s
105
105
  else
106
106
  lb_stale << host.to_s
107
- execute *KAMAL.loadbalancer.start_or_run
107
+ execute *DASH.loadbalancer.start_or_run
108
108
  end
109
109
  else
110
- Kamal::Cli::Proxy::LoadbalancerClaim.new(host, self).claim_run_config
111
- execute *KAMAL.loadbalancer.start_or_run
110
+ Dash::Cli::Proxy::LoadbalancerClaim.new(host, self).claim_run_config
111
+ execute *DASH.loadbalancer.start_or_run
112
112
  end
113
113
  end
114
114
 
@@ -121,7 +121,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
121
121
  say "Loadbalancer configuration changed, rebooting on #{host}...", :magenta
122
122
  run_hook "pre-loadbalancer-reboot", hosts: host
123
123
  on(host) do |h|
124
- Kamal::Cli::Proxy::LoadbalancerReboot.new(h, self).run
124
+ Dash::Cli::Proxy::LoadbalancerReboot.new(h, self).run
125
125
  end
126
126
  run_hook "post-loadbalancer-reboot", hosts: host
127
127
  end
@@ -132,9 +132,9 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
132
132
  desc "boot_config <set|get|reset>", "Manage kamal-proxy boot configuration"
133
133
  option :publish, type: :boolean, default: true, desc: "Publish the proxy ports on the host"
134
134
  option :publish_host_ip, type: :string, repeatable: true, default: nil, desc: "Host IP address to bind HTTP/HTTPS traffic to. Defaults to all interfaces"
135
- option :http_port, type: :numeric, default: Kamal::Configuration::Proxy::Run::DEFAULT_HTTP_PORT, desc: "HTTP port to publish on the host"
136
- option :https_port, type: :numeric, default: Kamal::Configuration::Proxy::Run::DEFAULT_HTTPS_PORT, desc: "HTTPS port to publish on the host"
137
- option :log_max_size, type: :string, default: Kamal::Configuration::Proxy::Run::DEFAULT_LOG_MAX_SIZE, desc: "Max size of proxy logs"
135
+ option :http_port, type: :numeric, default: Dash::Configuration::Proxy::Run::DEFAULT_HTTP_PORT, desc: "HTTP port to publish on the host"
136
+ option :https_port, type: :numeric, default: Dash::Configuration::Proxy::Run::DEFAULT_HTTPS_PORT, desc: "HTTPS port to publish on the host"
137
+ option :log_max_size, type: :string, default: Dash::Configuration::Proxy::Run::DEFAULT_LOG_MAX_SIZE, desc: "Max size of proxy logs"
138
138
  option :registry, type: :string, default: nil, desc: "Registry to use for the proxy image"
139
139
  option :repository, type: :string, default: nil, desc: "Repository for the proxy image"
140
140
  option :image_version, type: :string, default: nil, desc: "Version of the proxy to run"
@@ -143,7 +143,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
143
143
  option :docker_options, type: :array, default: [], desc: "Docker options to pass to the proxy container", banner: "option=value option2=value2"
144
144
  def boot_config(subcommand)
145
145
  say "The proxy boot_config command is deprecated - set the config in the deploy YAML at proxy/run instead", :yellow
146
- proxy_boot_config = KAMAL.config.proxy_boot
146
+ proxy_boot_config = DASH.config.proxy_boot
147
147
 
148
148
  case subcommand
149
149
  when "set"
@@ -163,10 +163,10 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
163
163
  image_version = options[:image_version]
164
164
 
165
165
  run_command_options = { debug: options[:debug] || nil, "metrics-port": options[:metrics_port] }.compact
166
- run_command = "kamal-proxy run #{Kamal::Utils.optionize(run_command_options).join(" ")}" if run_command_options.any?
166
+ run_command = "kamal-proxy run #{Dash::Utils.optionize(run_command_options).join(" ")}" if run_command_options.any?
167
167
 
168
- on(KAMAL.proxy_hosts) do |host|
169
- proxy = KAMAL.proxy(host)
168
+ on(DASH.proxy_hosts) do |host|
169
+ proxy = DASH.proxy(host)
170
170
  execute(*proxy.ensure_proxy_directory)
171
171
  if boot_options != proxy_boot_config.default_boot_options
172
172
  upload! StringIO.new(boot_options.join(" ")), proxy_boot_config.options_file
@@ -194,12 +194,12 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
194
194
  end
195
195
  when "get"
196
196
 
197
- on(KAMAL.proxy_hosts) do |host|
198
- puts "Host #{host}: #{capture_with_info(*KAMAL.proxy(host).boot_config)}"
197
+ on(DASH.proxy_hosts) do |host|
198
+ puts "Host #{host}: #{capture_with_info(*DASH.proxy(host).boot_config)}"
199
199
  end
200
200
  when "reset"
201
- on(KAMAL.proxy_hosts) do |host|
202
- proxy = KAMAL.proxy(host)
201
+ on(DASH.proxy_hosts) do |host|
202
+ proxy = DASH.proxy(host)
203
203
  execute *proxy.reset_boot_options, raise_on_non_zero_exit: false
204
204
  execute *proxy.reset_image, raise_on_non_zero_exit: false
205
205
  execute *proxy.reset_image_version, raise_on_non_zero_exit: false
@@ -217,9 +217,9 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
217
217
  confirming "This will cause a brief outage on each host. Are you sure?" do
218
218
  modify(lock: true, server_lock: true) do
219
219
  # Skip proxy on loadbalancer host - it will be handled by loadbalancer reboot
220
- proxy_hosts = KAMAL.proxy_hosts
221
- if KAMAL.config.proxy.loadbalancer_on_proxy_host?
222
- proxy_hosts = proxy_hosts - [ KAMAL.config.proxy.effective_loadbalancer ]
220
+ proxy_hosts = DASH.proxy_hosts
221
+ if DASH.config.proxy.loadbalancer_on_proxy_host?
222
+ proxy_hosts = proxy_hosts - [ DASH.config.proxy.effective_loadbalancer ]
223
223
  end
224
224
 
225
225
  host_groups = options[:rolling] ? proxy_hosts : [ proxy_hosts ]
@@ -230,17 +230,17 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
230
230
  run_hook "pre-proxy-reboot", hosts: host_list
231
231
  on(hosts) do |host|
232
232
  info "Rebooting kamal-proxy on #{host}..."
233
- Kamal::Cli::Proxy::Reboot.new(host, self).run
233
+ Dash::Cli::Proxy::Reboot.new(host, self).run
234
234
  end
235
235
  run_hook "post-proxy-reboot", hosts: host_list
236
236
  end
237
237
 
238
- if KAMAL.config.proxy.load_balancing?
239
- lb_host = KAMAL.config.proxy.effective_loadbalancer
238
+ if DASH.config.proxy.load_balancing?
239
+ lb_host = DASH.config.proxy.effective_loadbalancer
240
240
  run_hook "pre-loadbalancer-reboot", hosts: lb_host
241
241
 
242
242
  on(lb_host) do |host|
243
- Kamal::Cli::Proxy::LoadbalancerReboot.new(host, self).run
243
+ Dash::Cli::Proxy::LoadbalancerReboot.new(host, self).run
244
244
  end
245
245
 
246
246
  run_hook "post-loadbalancer-reboot", hosts: lb_host
@@ -253,18 +253,18 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
253
253
  option :rolling, type: :boolean, default: false, desc: "Reboot proxy on hosts in sequence, rather than in parallel"
254
254
  option :confirmed, aliases: "-y", type: :boolean, default: false, desc: "Proceed without confirmation question"
255
255
  def upgrade
256
- invoke_options = { "version" => KAMAL.config.latest_tag }.merge(options)
256
+ invoke_options = { "version" => DASH.config.latest_tag }.merge(options)
257
257
 
258
258
  confirming "This will cause a brief outage on each host. Are you sure?" do
259
- host_groups = options[:rolling] ? KAMAL.hosts : [ KAMAL.hosts ]
259
+ host_groups = options[:rolling] ? DASH.hosts : [ DASH.hosts ]
260
260
  host_groups.each do |hosts|
261
261
  host_list = Array(hosts).join(",")
262
262
  say "Upgrading proxy on #{host_list}...", :magenta
263
263
  run_hook "pre-proxy-reboot", hosts: host_list
264
264
  on(hosts) do |host|
265
- proxy = KAMAL.proxy(host)
266
- execute *KAMAL.auditor.record("Rebooted proxy"), verbosity: :debug
267
- execute *KAMAL.registry.login
265
+ proxy = DASH.proxy(host)
266
+ execute *DASH.auditor.record("Rebooted proxy"), verbosity: :debug
267
+ execute *DASH.registry.login
268
268
 
269
269
  info "Stopping and removing Traefik on #{host}, if running..."
270
270
  execute *proxy.cleanup_traefik
@@ -275,13 +275,13 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
275
275
  execute *proxy.remove_image
276
276
  end
277
277
 
278
- KAMAL.with_specific_hosts(hosts) do
279
- invoke "kamal:cli:proxy:boot", [], invoke_options
280
- reset_invocation(Kamal::Cli::Proxy)
281
- invoke "kamal:cli:app:boot", [], invoke_options
282
- reset_invocation(Kamal::Cli::App)
283
- invoke "kamal:cli:prune:all", [], invoke_options
284
- reset_invocation(Kamal::Cli::Prune)
278
+ DASH.with_specific_hosts(hosts) do
279
+ invoke "dash:cli:proxy:boot", [], invoke_options
280
+ reset_invocation(Dash::Cli::Proxy)
281
+ invoke "dash:cli:app:boot", [], invoke_options
282
+ reset_invocation(Dash::Cli::App)
283
+ invoke "dash:cli:prune:all", [], invoke_options
284
+ reset_invocation(Dash::Cli::Prune)
285
285
  end
286
286
 
287
287
  run_hook "post-proxy-reboot", hosts: host_list
@@ -293,15 +293,15 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
293
293
  desc "start", "Start existing proxy container on servers"
294
294
  def start
295
295
  modify(lock: true, server_lock: true) do
296
- on(KAMAL.proxy_hosts) do |host|
297
- execute *KAMAL.auditor.record("Started proxy"), verbosity: :debug
298
- execute *KAMAL.proxy(host).start
296
+ on(DASH.proxy_hosts) do |host|
297
+ execute *DASH.auditor.record("Started proxy"), verbosity: :debug
298
+ execute *DASH.proxy(host).start
299
299
  end
300
300
 
301
- if KAMAL.config.proxy.load_balancing?
302
- on(KAMAL.config.proxy.effective_loadbalancer) do
303
- execute *KAMAL.auditor.record("Started loadbalancer"), verbosity: :debug
304
- execute *KAMAL.loadbalancer.start, raise_on_non_zero_exit: false
301
+ if DASH.config.proxy.load_balancing?
302
+ on(DASH.config.proxy.effective_loadbalancer) do
303
+ execute *DASH.auditor.record("Started loadbalancer"), verbosity: :debug
304
+ execute *DASH.loadbalancer.start, raise_on_non_zero_exit: false
305
305
  end
306
306
  end
307
307
  end
@@ -310,18 +310,18 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
310
310
  desc "stop", "Stop existing proxy container on servers"
311
311
  def stop
312
312
  modify(lock: true, server_lock: true) do
313
- on(KAMAL.proxy_hosts) do |host|
314
- execute *KAMAL.auditor.record("Stopped proxy"), verbosity: :debug
315
- execute *KAMAL.proxy(host).stop, raise_on_non_zero_exit: false
313
+ on(DASH.proxy_hosts) do |host|
314
+ execute *DASH.auditor.record("Stopped proxy"), verbosity: :debug
315
+ execute *DASH.proxy(host).stop, raise_on_non_zero_exit: false
316
316
  end
317
317
 
318
318
  # `docker container prune` only collects stopped containers, so leaving the
319
319
  # loadbalancer running would also leave `dash proxy remove` unable to
320
320
  # remove it.
321
- if KAMAL.config.proxy.load_balancing?
322
- on(KAMAL.config.proxy.effective_loadbalancer) do
323
- execute *KAMAL.auditor.record("Stopped loadbalancer"), verbosity: :debug
324
- execute *KAMAL.loadbalancer.stop, raise_on_non_zero_exit: false
321
+ if DASH.config.proxy.load_balancing?
322
+ on(DASH.config.proxy.effective_loadbalancer) do
323
+ execute *DASH.auditor.record("Stopped loadbalancer"), verbosity: :debug
324
+ execute *DASH.loadbalancer.stop, raise_on_non_zero_exit: false
325
325
  end
326
326
  end
327
327
  end
@@ -338,11 +338,11 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
338
338
  desc "details", "Show details about proxy container from servers"
339
339
  def details
340
340
  quiet = options[:quiet]
341
- on(KAMAL.proxy_hosts) { |host| puts_by_host host, capture_with_info(*KAMAL.proxy(host).info), type: "Proxy", quiet: quiet }
341
+ on(DASH.proxy_hosts) { |host| puts_by_host host, capture_with_info(*DASH.proxy(host).info), type: "Proxy", quiet: quiet }
342
342
 
343
- if KAMAL.config.proxy.load_balancing?
344
- on(KAMAL.config.proxy.effective_loadbalancer) do |host|
345
- puts_by_host host, capture_with_info(*KAMAL.loadbalancer.info), type: "Loadbalancer"
343
+ if DASH.config.proxy.load_balancing?
344
+ on(DASH.config.proxy.effective_loadbalancer) do |host|
345
+ puts_by_host host, capture_with_info(*DASH.loadbalancer.info), type: "Loadbalancer"
346
346
  end
347
347
  end
348
348
  end
@@ -359,17 +359,17 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
359
359
 
360
360
  if options[:follow]
361
361
  run_locally do
362
- proxy = KAMAL.proxy(KAMAL.primary_host)
363
- info "Following logs on #{KAMAL.primary_host}..."
364
- info proxy.follow_logs(host: KAMAL.primary_host, timestamps: timestamps, grep: grep)
365
- exec proxy.follow_logs(host: KAMAL.primary_host, timestamps: timestamps, grep: grep)
362
+ proxy = DASH.proxy(DASH.primary_host)
363
+ info "Following logs on #{DASH.primary_host}..."
364
+ info proxy.follow_logs(host: DASH.primary_host, timestamps: timestamps, grep: grep)
365
+ exec proxy.follow_logs(host: DASH.primary_host, timestamps: timestamps, grep: grep)
366
366
  end
367
367
  else
368
368
  since = options[:since]
369
369
  lines = options[:lines].presence || ((since || grep) ? nil : 100) # Default to 100 lines if since or grep isn't set
370
370
 
371
- on(KAMAL.proxy_hosts) do |host|
372
- puts_by_host host, capture(*KAMAL.proxy(host).logs(timestamps: timestamps, since: since, lines: lines, grep: grep)), type: "Proxy"
371
+ on(DASH.proxy_hosts) do |host|
372
+ puts_by_host host, capture(*DASH.proxy(host).logs(timestamps: timestamps, since: since, lines: lines, grep: grep)), type: "Proxy"
373
373
  end
374
374
  end
375
375
  end
@@ -391,47 +391,47 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
391
391
  def loadbalancer(status)
392
392
  case status
393
393
  when "info"
394
- if KAMAL.config.proxy.load_balancing?
395
- on(KAMAL.config.proxy.effective_loadbalancer) do |host|
394
+ if DASH.config.proxy.load_balancing?
395
+ on(DASH.config.proxy.effective_loadbalancer) do |host|
396
396
  puts "Loadbalancer status on #{host}:"
397
- puts capture_with_info(*KAMAL.loadbalancer.info)
397
+ puts capture_with_info(*DASH.loadbalancer.info)
398
398
  end
399
399
  else
400
400
  puts "Load balancing is not configured"
401
401
  end
402
402
  when "start"
403
- if KAMAL.config.proxy.load_balancing?
404
- on(KAMAL.config.proxy.effective_loadbalancer) do |host|
405
- execute *KAMAL.registry.login
406
- execute *KAMAL.loadbalancer.start_or_run
403
+ if DASH.config.proxy.load_balancing?
404
+ on(DASH.config.proxy.effective_loadbalancer) do |host|
405
+ execute *DASH.registry.login
406
+ execute *DASH.loadbalancer.start_or_run
407
407
  end
408
408
  else
409
409
  puts "Load balancing is not configured"
410
410
  end
411
411
  when "stop"
412
- if KAMAL.config.proxy.load_balancing?
413
- on(KAMAL.config.proxy.effective_loadbalancer) do |host|
414
- execute *KAMAL.loadbalancer.stop, raise_on_non_zero_exit: false
412
+ if DASH.config.proxy.load_balancing?
413
+ on(DASH.config.proxy.effective_loadbalancer) do |host|
414
+ execute *DASH.loadbalancer.stop, raise_on_non_zero_exit: false
415
415
  end
416
416
  else
417
417
  puts "Load balancing is not configured"
418
418
  end
419
419
  when "logs"
420
- if KAMAL.config.proxy.load_balancing?
421
- on(KAMAL.config.proxy.effective_loadbalancer) do |host|
422
- puts_by_host host, capture(*KAMAL.loadbalancer.logs(timestamps: true)), type: "Loadbalancer"
420
+ if DASH.config.proxy.load_balancing?
421
+ on(DASH.config.proxy.effective_loadbalancer) do |host|
422
+ puts_by_host host, capture(*DASH.loadbalancer.logs(timestamps: true)), type: "Loadbalancer"
423
423
  end
424
424
  else
425
425
  puts "Load balancing is not configured"
426
426
  end
427
427
  when "deploy"
428
- if KAMAL.config.proxy.load_balancing?
429
- targets = KAMAL.loadbalancer_config.target_hosts
428
+ if DASH.config.proxy.load_balancing?
429
+ targets = DASH.loadbalancer_config.target_hosts
430
430
 
431
- on(KAMAL.config.proxy.effective_loadbalancer) do |host|
432
- Kamal::Cli::Proxy::LoadbalancerClaim.new(host, self).claim_service
431
+ on(DASH.config.proxy.effective_loadbalancer) do |host|
432
+ Dash::Cli::Proxy::LoadbalancerClaim.new(host, self).claim_service
433
433
  info "Deploying to loadbalancer on #{host} with targets: #{targets.join(', ')}"
434
- execute *KAMAL.loadbalancer.deploy(targets: targets)
434
+ execute *DASH.loadbalancer.deploy(targets: targets)
435
435
  end
436
436
  else
437
437
  puts "Load balancing is not configured"
@@ -453,29 +453,29 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
453
453
  # The cache lives where its policy applies: at the loadbalancer when
454
454
  # load balancing (cache is edge-only in the layering contract),
455
455
  # otherwise on each proxy host.
456
- if KAMAL.config.proxy.load_balancing?
457
- on(KAMAL.config.proxy.effective_loadbalancer) do |host|
458
- puts_by_host host, capture_with_info(*KAMAL.loadbalancer.cache_stats(count: count, json: json)), type: "Loadbalancer"
456
+ if DASH.config.proxy.load_balancing?
457
+ on(DASH.config.proxy.effective_loadbalancer) do |host|
458
+ puts_by_host host, capture_with_info(*DASH.loadbalancer.cache_stats(count: count, json: json)), type: "Loadbalancer"
459
459
  end
460
460
  else
461
- on(KAMAL.proxy_hosts) do |host|
462
- puts_by_host host, capture_with_info(*KAMAL.proxy(host).cache_stats(count: count, json: json)), type: "Proxy"
461
+ on(DASH.proxy_hosts) do |host|
462
+ puts_by_host host, capture_with_info(*DASH.proxy(host).cache_stats(count: count, json: json)), type: "Proxy"
463
463
  end
464
464
  end
465
465
  when "purge"
466
- if KAMAL.config.proxy.load_balancing?
466
+ if DASH.config.proxy.load_balancing?
467
467
  # The loadbalancer registers one service under the bare service name.
468
- on(KAMAL.config.proxy.effective_loadbalancer) do |host|
469
- execute *KAMAL.auditor.record("Purged the response cache"), verbosity: :debug
470
- puts_by_host host, capture_with_info(*KAMAL.loadbalancer.cache_purge(KAMAL.config.service, path_prefix: path_prefix)), type: "Loadbalancer"
468
+ on(DASH.config.proxy.effective_loadbalancer) do |host|
469
+ execute *DASH.auditor.record("Purged the response cache"), verbosity: :debug
470
+ puts_by_host host, capture_with_info(*DASH.loadbalancer.cache_purge(DASH.config.service, path_prefix: path_prefix)), type: "Loadbalancer"
471
471
  end
472
472
  else
473
473
  # Each proxied role registered its own service, so purge walks them.
474
- on(KAMAL.proxy_hosts) do |host|
475
- execute *KAMAL.auditor.record("Purged the response cache"), verbosity: :debug
474
+ on(DASH.proxy_hosts) do |host|
475
+ execute *DASH.auditor.record("Purged the response cache"), verbosity: :debug
476
476
 
477
- KAMAL.roles_on(host).select(&:running_proxy?).each do |role|
478
- puts_by_host host, capture_with_info(*KAMAL.proxy(host).cache_purge(role.container_prefix, path_prefix: path_prefix)), type: "Proxy"
477
+ DASH.roles_on(host).select(&:running_proxy?).each do |role|
478
+ puts_by_host host, capture_with_info(*DASH.proxy(host).cache_purge(role.container_prefix, path_prefix: path_prefix)), type: "Proxy"
479
479
  end
480
480
  end
481
481
  end
@@ -484,37 +484,49 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
484
484
  end
485
485
  end
486
486
 
487
- desc "domains SUBCOMMAND", "Manage dynamic TLS domains (refresh, list, stats)"
488
- def domains(subcommand)
487
+ desc "domains SUBCOMMAND [ARGS]", "Inspect TLS domains and their certificate issuance (refresh, list, stats, retry)"
488
+ long_desc <<~DESC
489
+ Inspect the TLS domains this proxy serves, and the state of their certificates.
490
+
491
+ `list` shows every domain — both those learned from a domain source and the
492
+ hosts named in deploy.yml — with whether it holds a certificate and, if
493
+ issuance is held, when the hold lifts and why.
494
+
495
+ A hold normally clears itself: the proxy re-checks held domains and issues as
496
+ soon as the domain points at it, so a DNS cutover needs no intervention.
497
+ `retry HOST` (or `retry --all`) is for when you already know the cause is
498
+ fixed and would rather not wait.
499
+ DESC
500
+ def domains(subcommand, *args)
489
501
  case subcommand
490
- when "refresh", "list", "stats"
502
+ when "refresh", "list", "stats", "retry"
491
503
  # TLS terminates at the load balancer when load balancing, so the
492
504
  # dynamic domain set lives there rather than on the per-host proxies.
493
- if KAMAL.config.proxy.load_balancing?
494
- on(KAMAL.config.proxy.effective_loadbalancer) do |host|
495
- puts_by_host host, capture_with_info(*KAMAL.loadbalancer.domains(subcommand)), type: "Loadbalancer"
505
+ if DASH.config.proxy.load_balancing?
506
+ on(DASH.config.proxy.effective_loadbalancer) do |host|
507
+ puts_by_host host, capture_with_info(*DASH.loadbalancer.domains(subcommand, *args)), type: "Loadbalancer"
496
508
  end
497
509
  else
498
- on(KAMAL.proxy_hosts) do |host|
499
- puts_by_host host, capture_with_info(*KAMAL.proxy(host).domains(subcommand)), type: "Proxy"
510
+ on(DASH.proxy_hosts) do |host|
511
+ puts_by_host host, capture_with_info(*DASH.proxy(host).domains(subcommand, *args)), type: "Proxy"
500
512
  end
501
513
  end
502
514
  else
503
- puts "Unknown domains subcommand: #{subcommand}. Available: refresh, list, stats"
515
+ puts "Unknown domains subcommand: #{subcommand}. Available: refresh, list, stats, retry"
504
516
  end
505
517
  end
506
518
 
507
519
  desc "export_certs LOCAL_PATH", "Export the TLS certificate store to a local archive (contains private keys)"
508
520
  def export_certs(local_path)
509
- load_balancing = KAMAL.config.proxy.load_balancing?
521
+ load_balancing = DASH.config.proxy.load_balancing?
510
522
 
511
523
  # Under the deploy lock: a concurrent deploy could boot or reboot the
512
524
  # proxy mid-export, and the offline read below would archive a torn store.
513
525
  modify(lock: true, server_lock: true) do
514
526
  on(cert_store_host) do |host|
515
- execute *KAMAL.auditor.record("Exported the proxy certificate store"), verbosity: :debug
527
+ execute *DASH.auditor.record("Exported the proxy certificate store"), verbosity: :debug
516
528
 
517
- commands = load_balancing ? KAMAL.loadbalancer : KAMAL.proxy(host)
529
+ commands = load_balancing ? DASH.loadbalancer : DASH.proxy(host)
518
530
  execute *commands.ensure_apps_config_directory
519
531
 
520
532
  # Running: export through the container's RPC socket, under the proxy's
@@ -523,7 +535,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
523
535
  if capture_with_info(*commands.container_id(only_running: true), raise_on_non_zero_exit: false).strip.present?
524
536
  puts capture_with_info(*commands.export_certs)
525
537
  else
526
- execute *KAMAL.registry.login
538
+ execute *DASH.registry.login
527
539
  puts capture_with_info(*commands.export_certs_offline)
528
540
  end
529
541
 
@@ -548,11 +560,11 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
548
560
  source = options[:traefik_acme] || options[:archive]
549
561
  traefik_acme, resolver = options[:traefik_acme].present?, options[:resolver]
550
562
  force, verify = options[:force], options[:verify]
551
- load_balancing = KAMAL.config.proxy.load_balancing?
563
+ load_balancing = DASH.config.proxy.load_balancing?
552
564
 
553
565
  modify(lock: true, server_lock: true) do
554
566
  on(cert_store_host) do |host|
555
- commands = load_balancing ? KAMAL.loadbalancer : KAMAL.proxy(host)
567
+ commands = load_balancing ? DASH.loadbalancer : DASH.proxy(host)
556
568
 
557
569
  # kamal-proxy import runs offline against the data directory - importing
558
570
  # under a live proxy risks a torn store. --verify only reads the archive.
@@ -564,8 +576,8 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
564
576
  end
565
577
  end
566
578
 
567
- execute *KAMAL.auditor.record("Imported certificates into the proxy certificate store"), verbosity: :debug
568
- execute *KAMAL.registry.login
579
+ execute *DASH.auditor.record("Imported certificates into the proxy certificate store"), verbosity: :debug
580
+ execute *DASH.registry.login
569
581
  execute *commands.ensure_proxy_directory
570
582
 
571
583
  # upload! inside the ensure's reach: a failed or partial upload must
@@ -584,15 +596,15 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
584
596
  desc "remove_container", "Remove proxy container from servers", hide: true
585
597
  def remove_container
586
598
  modify(lock: true, server_lock: true) do
587
- on(KAMAL.proxy_hosts) do
588
- execute *KAMAL.auditor.record("Removed proxy container"), verbosity: :debug
589
- execute *KAMAL.proxy(host).remove_container
599
+ on(DASH.proxy_hosts) do
600
+ execute *DASH.auditor.record("Removed proxy container"), verbosity: :debug
601
+ execute *DASH.proxy(host).remove_container
590
602
  end
591
603
 
592
- if KAMAL.config.proxy.load_balancing?
593
- on(KAMAL.config.proxy.effective_loadbalancer) do
594
- execute *KAMAL.auditor.record("Removed loadbalancer container"), verbosity: :debug
595
- execute *KAMAL.loadbalancer.remove_container
604
+ if DASH.config.proxy.load_balancing?
605
+ on(DASH.config.proxy.effective_loadbalancer) do
606
+ execute *DASH.auditor.record("Removed loadbalancer container"), verbosity: :debug
607
+ execute *DASH.loadbalancer.remove_container
596
608
  end
597
609
  end
598
610
  end
@@ -601,15 +613,15 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
601
613
  desc "remove_image", "Remove proxy image from servers", hide: true
602
614
  def remove_image
603
615
  modify(lock: true, server_lock: true) do
604
- on(KAMAL.proxy_hosts) do
605
- execute *KAMAL.auditor.record("Removed proxy image"), verbosity: :debug
606
- execute *KAMAL.proxy(host).remove_image
616
+ on(DASH.proxy_hosts) do
617
+ execute *DASH.auditor.record("Removed proxy image"), verbosity: :debug
618
+ execute *DASH.proxy(host).remove_image
607
619
  end
608
620
 
609
- if KAMAL.config.proxy.load_balancing?
610
- on(KAMAL.config.proxy.effective_loadbalancer) do
611
- execute *KAMAL.auditor.record("Removed loadbalancer image"), verbosity: :debug
612
- execute *KAMAL.loadbalancer.remove_image
621
+ if DASH.config.proxy.load_balancing?
622
+ on(DASH.config.proxy.effective_loadbalancer) do
623
+ execute *DASH.auditor.record("Removed loadbalancer image"), verbosity: :debug
624
+ execute *DASH.loadbalancer.remove_image
613
625
  end
614
626
  end
615
627
  end
@@ -618,15 +630,15 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
618
630
  desc "remove_proxy_directory", "Remove the proxy directory from servers", hide: true
619
631
  def remove_proxy_directory
620
632
  modify(lock: true, server_lock: true) do
621
- on(KAMAL.proxy_hosts) do
622
- execute *KAMAL.proxy(host).remove_proxy_directory, raise_on_non_zero_exit: false
633
+ on(DASH.proxy_hosts) do
634
+ execute *DASH.proxy(host).remove_proxy_directory, raise_on_non_zero_exit: false
623
635
  end
624
636
 
625
637
  # Otherwise the ownership registry outlives the load balancer and a later
626
638
  # boot would fail against an owner that no longer exists.
627
- if KAMAL.config.proxy.load_balancing?
628
- on(KAMAL.config.proxy.effective_loadbalancer) do
629
- execute *KAMAL.loadbalancer.remove_directory, raise_on_non_zero_exit: false
639
+ if DASH.config.proxy.load_balancing?
640
+ on(DASH.config.proxy.effective_loadbalancer) do
641
+ execute *DASH.loadbalancer.remove_directory, raise_on_non_zero_exit: false
630
642
  end
631
643
  end
632
644
  end
@@ -637,7 +649,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
637
649
  # host when load balancing (TLS terminates at the edge), else the primary
638
650
  # host - the same host `loadbalancer: true` would resolve to.
639
651
  def cert_store_host
640
- KAMAL.config.proxy.load_balancing? ? KAMAL.config.proxy.effective_loadbalancer : KAMAL.primary_host
652
+ DASH.config.proxy.load_balancing? ? DASH.config.proxy.effective_loadbalancer : DASH.primary_host
641
653
  end
642
654
 
643
655
  # Mirrors kamal-proxy's own flag groups (import.go), so a contradictory
@@ -664,14 +676,14 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
664
676
  # has to cover the load balancer host too - `remove_container` and
665
677
  # `remove_image` both act on it.
666
678
  def removal_hosts
667
- hosts = KAMAL.proxy_hosts.to_a
668
- hosts |= [ KAMAL.config.proxy.effective_loadbalancer ] if KAMAL.config.proxy.load_balancing?
679
+ hosts = DASH.proxy_hosts.to_a
680
+ hosts |= [ DASH.config.proxy.effective_loadbalancer ] if DASH.config.proxy.load_balancing?
669
681
  hosts
670
682
  end
671
683
 
672
684
  def removal_allowed?(force)
673
685
  on(removal_hosts) do |host|
674
- app_count = capture_with_info(*KAMAL.server.app_directory_count).chomp.to_i
686
+ app_count = capture_with_info(*DASH.server.app_directory_count).chomp.to_i
675
687
  raise "The are other applications installed on #{host}" if app_count > 0
676
688
  end
677
689