Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap: multi-OS Docker install #205

Merged
merged 3 commits into from
May 2, 2023
Merged

Bootstrap: multi-OS Docker install #205

merged 3 commits into from
May 2, 2023

Conversation

jeremy
Copy link
Member

@jeremy jeremy commented Apr 10, 2023

  • Limit auto-install to root users; otherwise, give manual install guidance
  • Support non-Debian/Ubuntu with the multi-OS get.docker.com installer
  • Drop native curl dependency by running it with a small Docker image
  • Fix up healthcheck test mocks to reflect actual operations

lib/mrsk/cli/healthcheck.rb Outdated Show resolved Hide resolved
lib/mrsk/cli/healthcheck.rb Outdated Show resolved Hide resolved
lib/mrsk/cli/healthcheck.rb Outdated Show resolved Hide resolved
lib/mrsk/cli/healthcheck.rb Outdated Show resolved Hide resolved
lib/mrsk/cli/healthcheck.rb Outdated Show resolved Hide resolved
lib/mrsk/commands/healthcheck.rb Outdated Show resolved Hide resolved
assert_match "Health check against /up failed to run: unknown, retrying in 3s...", output
assert_match "Health check succeeded with 200 OK!", output
end
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked tests to demonstrate actual failure output and sequencing.

test/cli/healthcheck_test.rb Outdated Show resolved Hide resolved
SSHKit::Backend::Abstract.any_instance.expects(:execute).with(:docker, :info, raise_on_non_zero_exit: false).returns(false).at_least_once

assert_raise RuntimeError, "Docker is not running on 1.1.1.1, 1.1.1.3, 1.1.1.4, 1.1.1.2. Install it first: https://docs.docker.com/engine/install/" do
run_command("bootstrap")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New bootstrap output indicates where Docker isn't running and how to install it.

test/commands/healthcheck_test.rb Outdated Show resolved Hide resolved
@jeremy jeremy changed the title Bootstrap: check for Docker readiness but don't auto-install Bootstrap: multi-OS Docker install Apr 13, 2023
@jeremy
Copy link
Member Author

jeremy commented Apr 13, 2023

Updated to attempt an auto-install—but for root users only—using the multi-OS install script.

It's not foolproof, but it relieves MRSK of trying to drive multiple OS and packaging systems.

@dhh
Copy link
Member

dhh commented Apr 28, 2023

Think we need a rebase after the new health check strategy right?

jeremy and others added 3 commits May 1, 2023 13:26
* Limit auto-install to root users; otherwise, give manual install guidance
* Support non-Debian/Ubuntu with the multi-OS get.docker.com installer
* main:
  Simplify domain language to just "boot" and unscoped config keys
  Retain a fixed number of containers when pruning
  Don't assume rolling back in message
  Check all hosts before rolling back
  Ensure Traefik service name is consistent
  Extend traefik delay by 1 second
  Include traefik access logs
  Check if we are still getting a 404
  Also dump load balancer logs
  Dump traefik logs when app not booted
  Fix missing for apt-get
  Report on container health after failure
  Fix the integration test healthcheck
  Allow percentage-based rolling deployments
  Move `group_limit` & `group_wait` under `boot`
  Limit rolling deployment to boot operation
  Allow performing boot & start operations in groups
@dhh dhh merged commit 1e8edc2 into basecamp:main May 2, 2023
@dhh dhh deleted the docker-readiness branch May 2, 2023 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants