Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

hello_world_website (3) Versions 0.1.0

Installs Caddy and serves a Hello World page proving this cookbook is deployed

Policyfile
Berkshelf
Knife
cookbook 'hello_world_website', '= 0.1.0', :supermarket
cookbook 'hello_world_website', '= 0.1.0'
knife supermarket install hello_world_website
knife supermarket download hello_world_website
README
Dependencies
Changelog

hello_world_website

A small, production-shaped Chef cookbook that installs Caddy
from its official package repositories and serves a single Hello World page.
The page and its response headers prove that this cookbook was deployed, on
which host, and in which cookbook version.

Caddy is installed from the vendor's own channels, never from a distro
package:

Platform Repository
Debian 13, Ubuntu 26.04 Cloudsmith caddy/stable APT repository, key dearmored into /usr/share/keyrings
Rocky Linux 10.2 Official @caddy/caddy COPR repository

Supported platforms

  • Debian 13 (trixie)
  • Ubuntu 26.04 LTS
  • Rocky Linux 10.2

Requirements

  • Cinc Client or Chef Infra Client 18 or newer (chef_version '>= 18.0').
  • systemd as the service manager.
  • Outbound HTTPS to dl.cloudsmith.io (Debian/Ubuntu) or download.copr.fedorainfracloud.org (Rocky) during the converge.
  • Port 80 free on the node.
  • No external cookbook dependencies; everything uses core Chef resources.

The cookbook expects to own the Caddyfile and the document root. It replaces a
distribution-default Caddyfile, and reloads Caddy rather than restarting it.

Attributes

Attribute Default Purpose
node['hello_world_website']['caddy']['version'] nil Optional package version pin; nil installs the latest from the repository.
node['hello_world_website']['caddy']['config_path'] /etc/caddy/Caddyfile Managed Caddyfile.
node['hello_world_website']['caddy']['site_address'] :80 Caddy site address.
node['hello_world_website']['caddy']['copr_repo_file'] /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:group_caddy:caddy.repo COPR repository file used to keep enabling the repository idempotent.
node['hello_world_website']['site']['root'] /var/www/hello_world_website Document root.
node['hello_world_website']['site']['title'] Hello World Page heading.
node['hello_world_website']['site']['message'] The hello_world_website cookbook is deployed. Page message.

Title, message, hostname, and FQDN are HTML-escaped before they reach the page.

Usage

The cookbook is designed for a Policyfile, but works with any run list:

# Policyfile.rb
name 'hello_world_website'

default_source :supermarket

run_list 'hello_world_website::default'

cookbook 'hello_world_website', path: '.'

Pin a version when reproducibility matters:

default['hello_world_website']['caddy']['version'] = '2.11.9'

On Debian and Ubuntu the package starts Caddy by itself; on Rocky the cookbook
enables and starts it explicitly.

What gets deployed

  • The Caddyfile at /etc/caddy/Caddyfile is written from a template and only replaces the live file after caddy validate --adapter caddyfile succeeds.
  • /var/www/hello_world_website/index.html is a self-contained page showing the cookbook name, its version, and the node's hostname, FQDN, and platform.
  • Every response carries:
  X-Cookbook: hello_world_website
  X-Cookbook-Version: 
  X-Hostname: 

The headers are set on every response of the site block, including errors,
so X-Hostname also varies per node in shared caches.

  • Caddy is reloaded (never restarted) when the Caddyfile or the page changes. Access logs are emitted as JSON to the journal.
  • A systemd drop-in at /etc/systemd/system/caddy.service.d/10-config-path.conf points ExecStart and ExecReload at config_path, so overriding the attribute actually moves the file Caddy reads.
  • After starting Caddy the converge re-checks that the unit stays active, so a unit that dies right after start (for example because port 80 is already in use) fails the run instead of reporting a successful deploy.

The page content is deterministic: no timestamps, so a second converge changes
nothing. Cookbook version is read from metadata.rb at converge time, so it
cannot drift.

Testing

The tests need Cinc Workstation and Docker.

chef exec rake               # Cookstyle + ChefSpec
chef exec rake integration   # full three-platform Kitchen matrix
chef exec rake cleanup       # destroy leftover instances and artifacts

kitchen test destroys each instance after a run, including on failure. If a
run is interrupted, rake cleanup removes leftover containers, sandboxes,
.kitchen/, and test artifacts.

ChefSpec covers the Debian, Ubuntu, and RHEL branches, plus the
unsupported-family failure. Fauxhai bundles no Debian 13, Ubuntu 26.04, or
Rocky 10 data, so the examples use Debian 12, Ubuntu 24.04, and Rocky 9
stubs, which keeps the unit suite offline; the recipe branches on platform
family only. Kitchen runs the real target versions.

The InSpec profile is at test/integration/default/controls/default_test.rb
and asserts the package, the enabled and running service, a valid Caddyfile,
the document root's ownership and mode, port 80, the page body, and all three
provenance headers.

For local Kitchen runs against Docker Desktop, point dokken at the user socket:

DOCKER_HOST=unix://$HOME/.docker/run/docker.sock chef exec kitchen test

License

Apache-2.0. See [LICENSE](LICENSE).

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog

All notable changes to this cookbook are documented here. The format follows
Keep a Changelog and this project
adheres to Semantic Versioning.

Unreleased

0.1.0 - 2026-11-11

Added

  • Initial cookbook: installs Caddy from the official Cloudsmith APT repository (Debian 13, Ubuntu 26.04) or the official @caddy/caddy COPR repository (Rocky Linux 10.2).
  • Validated Caddyfile, deterministic deployment-proof page with HTML escaping, and X-Cookbook / X-Cookbook-Version / X-Hostname response headers.
  • ChefSpec unit tests, an InSpec profile with seven controls, a three-platform Kitchen matrix, and a GitHub Actions pipeline.
  • Optional Caddy version pin, configurable site address, document root, title, and message.
Copyright © 2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.

Progress and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.
See Trademarksfor appropriate markings. All rights in any other trademarks contained herein are reserved by their respective owners and their inclusion does not imply an endorsement, affiliation, or sponsorship as between Progress and the respective owners.

Code of Conduct Terms and Conditions of Use Privacy Policy Cookie Policy Trademark Policy Status