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

flyway-cli (7) Versions 0.5.0

Installs and execute flyway cli

Policyfile
Berkshelf
Knife
cookbook 'flyway-cli', '= 0.5.0', :supermarket
cookbook 'flyway-cli', '= 0.5.0'
knife supermarket install flyway-cli
knife supermarket download flyway-cli
README
Dependencies
Quality 50%

flyway-cli-cookbook

Build Status

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

Requirements

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

Usage

include_recipe "flyway-cli::default"

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

flyway_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",
    }

Attributes

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.
node[:flyway][:user] 
node[:flyway][:group] 

# 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

Recipes

default

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.

Authors

Giovanni Toraldo @gionn
Manuel Mazzuola @manuelmazzuola

Dependent cookbooks

java ~> 1.17
windows ~> 1.38

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.5.0 passed this metric

Foodcritic Metric
            

0.5.0 failed this metric

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