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


flyway-cli (7) Versions 0.4.0

Installs and execute flyway cli

cookbook 'flyway-cli', '= 0.4.0'
cookbook 'flyway-cli', '= 0.4.0', :supermarket
knife cookbook site install flyway-cli
knife cookbook site download flyway-cli
Quality 50%


Build Status

This cookbook configure the CLI version of the flyway tool, and support multiple databases.


An already configured database, and a bunch of flyway migrations.


include_recipe "flyway-cli::default"

## put your migrations in node[:flyway][:migrations_path]
## run migrate


### (Optional) Setup the Encrypted Data Bag

Your data bag should look like this,

      "id": "[YOUR_ID_DONT_EDIT]",
      "jdbc_username": "USER",
      "jdbc_password": "PASSWORD",


node[:flyway][:version] = "2.1.1"
node[:flyway][:jdbc_driver][:postgresql][:version] = "9.3-1100-jdbc4"
node[:flyway][:jdbc_driver][:mysql][:version] = "5.1.28"
node[:flyway][:jdbc_driver][:jtds][:version] = "1.3.1"

# optional attributes to define the user/group for the properties files containing database login credentials. defaults to executing user.

# set the permissions for the properties files. defaults to '0640'
node[:flyway][:properties_permissions] = 0640

node[:flyway][:confs] = {
    :default => {
        :jdbc_url => "jdbc:postgresql://localhost:5432/database",
        :jdbc_username => "username",
        :jdbc_password => "password"
    :default2 => {
        :jdbc_url => "jdbc:jtds:sqlserver://localhost/database2",

        # if a data bag is used, data bag name and item must be configured
        :use_data_bag => true,
        :data_bag_name => "data_bag",
        :data_bag_item => "data_bag_item"

        # optionally provide the path to the data bags secret file
        :data_bag_secret_path => "/etc/chef/secret_file"

## Determines if the Opscode Java recipe is included
node[:flyway][:include_java_recipe] = true



Download flyway, extract it in a folder, download jdbc driver for mysql, postgres and sql server, generate configs for the requested databases.

migrate - DEPRECATED

Use flyway_migrate resource to launch migrations for every configured database.


Giovanni Toraldo @gionn Manuel Mazzuola @manuelmazzuola

Dependent cookbooks

windows ~> 1.38
java ~> 1.17

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric

0.4.0 passed this metric

Foodcritic Metric

0.4.0 failed this metric

FC015: Consider converting definition to a Custom Resource: /tmp/b95e7c8e3cd47e64c2aca8c2/flyway-cli/definitions/flyway_migrate.rb:1