cookbook 'flywaydb', '= 2.0.0'
    flywaydb
    
      
        
          (30) Versions
        
        2.0.0
      
        - 
        
        
Follow3
  Installs and configures flywaydb database migration tool
cookbook 'flywaydb', '= 2.0.0', :supermarket
knife supermarket install flywaydb
knife supermarket download flywaydb
Flywaydb Cookbook
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. Default3.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/flywaywindows:C:\flyway.
- 
node['flywaydb']['user']- The owner of flywaydb. Defaultflyway.
- 
node['flywaydb']['group']- The group of flywaydb. Defaultflyway.
Resources
Use migrate, info, validate, baseline, or repair actions to install flywaydb and execute associated flyway command.
Attributes
- 
confA 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 ifext_confis set.
- 
ext_conf- Path or array of paths to external Configuration file(s). Theconfattribute 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. Defaultfalse.
- 
sensitive- Ensure that sensitive resource data is not logged by the chef-client. Defaultfalse.
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
- Ask specific questions on Stack Overflow.
- Report bugs and discuss potential features in Github issues.
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
        
  
2.0.0 passed this metric