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

flywaydb (30) Versions 2.0.0

Installs and configures flywaydb database migration tool

Policyfile
Berkshelf
Knife
cookbook 'flywaydb', '= 2.0.0', :supermarket
cookbook 'flywaydb', '= 2.0.0'
knife supermarket install flywaydb
knife supermarket download flywaydb
README
Dependencies
Changelog
Quality 100%

Flywaydb Cookbook

Cookbook Version
Build Status

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

Requirements

  • Chef 11+

Platforms

  • CentOS/RedHat
  • Debian/Ubuntu
  • Windows

Usage

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

Attributes

  • 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.

Resources

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

Attributes

  • 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.
  • ext_conf - Path or array of paths to external Configuration file(s). The conf attribute will be ignored if this is set.
  • params - A hash of command-line parameters to pass to flyway command. Command-line parameters override Configuration files.
  • 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 false.

Examples

Single flyway conf migration

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

Multiple flyway conf migrations with command-line parameters

flywaydb 'myapp' do
  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'
    }
  )
  sensitive true
  action :migrate
end

Multiple flyway ext_conf migrations with command-line parameters

flywaydb 'myapp' do
  params(
    user: 'root',
    password: password,
    url: 'jdbc:mysql/localhost/mysql'
  )
  ext_conf(
    '/opt/myapp/custA.properties',
    '/opt/myapp/custB.properties'
  )
  sensitive true
  action :migrate
end

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

Contributing

Please refer to CONTRIBUTING.

License

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.

CHANGELOG

2.0.0 2016-02-10

  • Remove command recipes

1.0.0 2016-02-04

  • Initial release

Foodcritic Metric
            

2.0.0 passed this metric