Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 10 additions & 90 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,115 +19,35 @@ jobs:

integration:
needs: lint-unit
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
strategy:
matrix:
os:
- almalinux-9
- almalinux-10
- amazonlinux-2023
- centos-stream-9
- centos-stream-10
- debian-12
- ubuntu-2204
- ubuntu-2404
suite:
- "installation-package"
- "installation-tarball"
- "installation-script"
- "install-and-stop"
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v6

- name: Test Kitchen
uses: ./.github/actions/test-kitchen
with:
kitchen-yaml: kitchen.dokken.yml
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
license-id: ${{ secrets.CHEF_LICENSE_KEY }}

installation-script:
needs: lint-unit
runs-on: ubuntu-24.04
strategy:
matrix:
os:
- centos-stream-9
- centos-stream-10
- debian-12
- ubuntu-2204
- ubuntu-2404
suite: ["installation-script"]
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v6

- name: Test Kitchen
uses: ./.github/actions/test-kitchen
with:
kitchen-yaml: kitchen.dokken.yml
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
license-id: ${{ secrets.CHEF_LICENSE_KEY }}

swarm:
needs: lint-unit
runs-on: ubuntu-24.04
strategy:
matrix:
os: ["ubuntu-2204"]
suite: ["swarm"]
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v6

- name: Setup VirtualBox & Vagrant
uses: ./.github/actions/virtualbox-setup

- name: Test Kitchen
uses: ./.github/actions/test-kitchen
with:
kitchen-yaml: kitchen.yml
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
license-id: ${{ secrets.CHEF_LICENSE_KEY }}

smoke:
needs: lint-unit
runs-on: ubuntu-latest
strategy:
matrix:
os:
- "almalinux-8"
- "almalinux-9"
- "debian-12"
- "ubuntu-2004"
- "ubuntu-2204"
- "ubuntu-2404"
suite:
- "resources"
- "network"
- "volume"
- "registry"
- "swarm"
- "smoke"
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v6

- name: Setup VirtualBox & Vagrant
uses: ./.github/actions/virtualbox-setup

- name: Test Kitchen
uses: ./.github/actions/test-kitchen
with:
kitchen-yaml: kitchen.yml
kitchen-yaml: kitchen.exec.yml
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
os: "ubuntu-latest"
license-id: ${{ secrets.CHEF_LICENSE_KEY }}

final:
needs: [lint-unit, installation-script, integration, swarm, smoke]
needs: [lint-unit, integration]
runs-on: ubuntu-latest
steps:
- name: Complete
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ _Store
.rvmrc
Gemfile.lock
.bundle
/bin/
*.gem
coverage
spec/reports
Expand Down
4 changes: 3 additions & 1 deletion .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ config:
line-length: false # MD013
no-duplicate-heading: false # MD024
reference-links-images: false # MD052
no-multiple-blanks: false # MD032
no-multiple-blanks:
maximum: 2
ignores:
- .github/copilot-instructions.md
- .windsurf/**
2 changes: 2 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[env]
_.path = ["{{config_root}}/bin", "/opt/chef-workstation/bin"]
1 change: 0 additions & 1 deletion .tool-versions

This file was deleted.

3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'cookstyle'
28 changes: 28 additions & 0 deletions LIMITATIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Docker Cookbook Limitations

## Supported Platforms

This cookbook supports the following platforms:

- Amazon Linux 2023
- AlmaLinux 9/10
- CentOS Stream 9/10
- Debian 12/13
- Fedora
- Oracle Linux 8/9
- Rocky Linux 9/10
- Red Hat Enterprise Linux 8/9
- Ubuntu 22.04/24.04

## Supported Architectures

- x86_64
- aarch64 (arm64)
- armv7l (armhf)
- ppc64le (ppc64el)
- s390x (IBM Z)

## Requirements

- Chef Infra Client 16.5 or later
- `docker-api` gem
56 changes: 56 additions & 0 deletions conductor/future_resources_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Plan: Implement Missing Docker Resources (2025-2026 Features)

This plan outlines the implementation of resources for Docker features that are currently unsupported in the `docker` cookbook, focusing on Swarm management and AI-native capabilities.

## Objective

- Add support for core Swarm resources: `docker_secret` and `docker_config`.
- Add support for AI-native Docker features: `docker_model` and `docker_mcp`.
- Enhance `docker_container` to support `type=image` mounts.
- Add `docker_context` for endpoint management.

## Proposed Resources

### 1. Swarm Management

- **`docker_secret`**: Manage Docker secrets (`docker secret create/rm/inspect`).
- **`docker_config`**: Manage Docker configs (`docker config create/rm/inspect`).

### 2. AI & Model Management (Docker v28+)

- **`docker_model`**: Resource to pull and manage local LLMs using the new `docker model` CLI.
- **`docker_mcp`**: Manage Model Context Protocol (MCP) servers and configurations.

### 3. Storage Enhancements

- **`docker_container` updates**: Add support for `image` type in the `mounts` property to leverage direct layer mounting.

### 4. Utility Resources

- **`docker_context`**: Manage Docker contexts for switching between local and remote engines.

## Implementation Steps

### Phase 1: Swarm Secrets and Configs

1. Create `resources/secret.rb`.
2. Create `resources/config.rb`.
3. Add corresponding unit tests in `spec/unit/resources/`.
4. Add integration tests in a new `test/cookbooks/docker_test/recipes/swarm_resources.rb`.

### Phase 2: AI-Native Features

1. Research the `docker-api` gem's support for the new model and MCP endpoints.
2. Implement `resources/model.rb` if CLI execution is required or API is available.
3. Implement `resources/mcp.rb`.

### Phase 3: Container & Context

1. Update `resources/container.rb` properties.
2. Create `resources/context.rb`.

## Verification & Testing

- **Unit Tests**: Ensure 100% coverage for new resources using ChefSpec.
- **Integration Tests**: Expand Swarm suites to exercise secrets and configs.
- **Documentation**: Add new files to `documentation/` for each resource.
66 changes: 66 additions & 0 deletions conductor/modernization_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Plan: Modernize Docker Cookbook

This plan outlines the steps to modernize the `docker` cookbook by removing EOL platforms, adding support for newer distributions, and cleaning up legacy code.

## Objective

- Sync supported platforms across `metadata.rb`, Kitchen files, and CI.
- Remove EOL platforms (Ubuntu 20.04, Debian 11, AlmaLinux 8, Rocky Linux 8).
- Add support for new platforms (Debian 13, AlmaLinux 10, Rocky Linux 10).
- Remove legacy `sysvinit` and `upstart` templates.
- Ensure all resources follow modern Sous Chefs patterns.

## Key Files & Context

- `metadata.rb`: Supported platforms and version.
- `kitchen.yml`, `kitchen.dokken.yml`: Integration test platforms.
- `.github/workflows/ci.yml`: CI matrix.
- `resources/installation_package.rb`: Platform-specific installation logic.
- `templates/default/`: Legacy init templates.

## Implementation Steps

### Phase 1: Platform Modernization

1. **Update `metadata.rb`**:
- Refine `supports` to be more specific if possible, or ensure it accurately reflects the current state.
- Update `chef_version` to `>= 16.0`.
2. **Update `kitchen.yml`**:
- Remove `ubuntu-20.04`, `almalinux-8`, `rockylinux-8`.
- Add `almalinux-10`, `rockylinux-10`, `debian-13`.
3. **Update `kitchen.dokken.yml`**:
- Remove `ubuntu-20.04`, `almalinux-8`, `rockylinux-8`, `opensuse-leap-15` (if EOL).
- Ensure it matches `kitchen.yml`.
4. **Update `.github/workflows/ci.yml`**:
- Sync the `integration` and `smoke` matrices with the updated kitchen platforms.

### Phase 2: Resource Updates

1. **Modernize `resources/installation_package.rb`**:
- Add `trixie?` helper for Debian 13.
- Update `version_string` to handle Debian 13.
- Update `apt_repository` `signed_by` logic for newer Debian/Ubuntu.
2. **Cleanup Legacy Code**:
- Delete `templates/default/sysvinit/` directory.
- Delete `templates/default/upstart/` directory.

### Phase 3: Documentation & Maintenance

1. **Version Bump**: Increment version in `metadata.rb`.
2. **Verify Docs**: Ensure Swarm resources and other new features are accurately documented in `documentation/`.

## Verification & Testing

### Unit Testing

- Run `chef exec rspec` to ensure all unit tests pass after changes.
- Add or update specs for `installation_package` to cover Debian 13.

### Integration Testing

- Run `kitchen list` to verify updated platform list.
- Run `kitchen test default-ubuntu-2404` (or other current platform) to ensure basic functionality.

### Linting

- Run `cookstyle -a` to fix any style offenses.
Loading
Loading