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


flywaydb (30) Versions 3.0.1

Installs and configures flywaydb database migration tool

cookbook 'flywaydb', '= 3.0.1', :supermarket
cookbook 'flywaydb', '= 3.0.1'
knife supermarket install flywaydb
knife supermarket download flywaydb
Quality 100%

Flywaydb Cookbook

Cookbook Version
Build Status

Installs flywaydb and allows for execution of flyway commands via resource actions.


  • Chef 11+


  • CentOS/RedHat
  • Debian/Ubuntu
  • Windows


Include default recipe in cookbook or run list to install flywaydb.


  • node['flywaydb']['version'] - The flywaydb version to install. Default 3.2.1.
  • node['flywaydb']['sha256'] - The flywaydb SHA 256 checksum for linux or windows platform.
  • node['flywaydb']['install_dir'] - The base install directory. Default linux: /opt/flyway windows: C:\flyway.
  • node['flywaydb']['user'] - The owner of flywaydb. Default flyway.
  • node['flywaydb']['group'] - The group of flywaydb. Default flyway.


Use migrate, info, validate, baseline, or repair actions to install flywaydb and execute associated flyway command.


  • conf A hash or array of hashes used to create the default Configuration file(s) for the flyway conf file. Key values automatically get prefixed with flyway. This attribute will be ignored if ext_conf is set. Default: nil.
  • ext_conf - Path or array of paths to external Configuration file(s). The conf attribute will be ignored if this is set. Default: nil.
  • params - A hash of command-line parameters to pass to flyway command. Command-line parameters override Configuration files. Default: {}.
  • name - The name of the flyway conf file. Defaults to resource name.
  • debug - Print debug output during execution of flyway commands. Default: false.
  • sensitive - Ensure that sensitive resource data is not logged by the chef-client. Default: true.


Single flyway conf migration

flywaydb 'myapp' do
    url: 'jdbc:mysql/localhost/mydb',
    user: 'root',
    locations: 'filesystem:/opt/myapp/db/migration'
  action :migrate

Multiple flyway conf migrations with command-line parameters

flywaydb 'myapp' do
    user: 'root',
    password: password,
    url: 'jdbc:mysql/localhost/mysql'
      schemas: 'custA',
      locations: 'filesystem:/opt/myapp/db/migration/core,/opt/myapp/db/migration/custA'
       schemas: 'custB',
       locations: 'filesystem:/opt/myapp/db/migration/core,/opt/myapp/db/migration/custB'
  action :migrate

Multiple flyway ext_conf migrations with command-line parameters

flywaydb 'myapp' do
    user: 'root',
    password: password,
    url: 'jdbc:mysql/localhost/mysql'
  action :migrate

ChefSpec Matchers

This cookbook includes custom ChefSpec matchers you can use to test
your own cookbooks.

Example Matcher Usage

expect(chef_run).to migrate_flywaydb('flyway').with(
  params: {
      'user' => 'root',
      'password' => 'password',
      'url' => 'jdbc:mysql://localhost/mysql'
  conf: [
      'schemas' => 'custA',
      'locations' => 'filesystem:/opt/myapp/db/migration/core,/opt/myapp/db/migration/custA'
      'schemas' => 'custB',
      'locations' => 'filesystem:/opt/myapp/db/migration/core,/opt/myapp/db/migration/custB'
  debug: false,
  sensitive: true

Cookbook Matchers

  • migrate_flywaydb(resource_name)
  • clean_flywaydb(resource_name)
  • baseline_flywaydb(resource_name)
  • info_flywaydb(resource_name)
  • repair_flywaydb(resource_name)
  • validate_flywaydb(resource_name)

Getting Help


Please refer to CONTRIBUTING.


MIT - see the accompanying LICENSE file for details.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.


3.0.1 2016-02-08

  • Fix sensitive not defaulting to true
  • Fix clean action

3.0.0 2016-02-20

  • Remove global attributes ext_conf, conf, params, sensitive, and debug
  • Default sensitive to true

2.0.0 2016-02-10

  • Remove command recipes

1.0.0 2016-02-04

  • Initial release

Foodcritic Metric

3.0.1 passed this metric