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

RSS

ya-piwik (1) Versions 0.1.0

Installs/Configures ya-piwik

Berkshelf/Librarian
Policyfile
Knife
cookbook 'ya-piwik', '~> 0.1.0'
cookbook 'ya-piwik', '~> 0.1.0', :supermarket
knife cookbook site install ya-piwik
knife cookbook site download ya-piwik
README
Dependencies
Quality

ya-piwik cookbook

This cookbook is install and management for piwik.

ya-piwik is an abbreviation for Yet Another Piwik.

Now, this cookbook you can in the following list:

  • install piwik
  • site management (create and update)

Requirements

Environment

  • MySQL - piwik needs MySQL

Cookbooks

  • php - ya-piwik needs php.
  • nginx - ya-piwik needs nginx if node['ya-piwik']['fpm']['enable'] was true.

Operating Systems

  • CentOS 6.0 or later

Attributes

ya-piwik::default

<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['ya-piwik']['home']</tt></td> <td>String</td> <td>piwik install directory</td> <td><tt>'/var/www/html/piwik/'</tt></td> </tr> <tr> <td><tt>['ya-piwik']['fpm']['enable']</tt></td> <td>Boolean</td> <td>php-fpm enable <strong>(required <a href="https://github.com/priestjim/chef-php">php</a> cookbook)</strong></td> <td><tt>true</tt></td> </tr> <tr> <td><tt>['ya-piwik']['fpm']['user']</tt></td> <td>String</td> <td>php-fpm usarname</td> <td><tt>true</tt></td> </tr> <tr> <td><tt>['ya-piwik']['fpm']['group']</tt></td> <td>String</td> <td>php-fpm group</td> <td><tt>''</tt></td> </tr> <tr> <td><tt>['ya-piwik']['fpm']['socket']</tt></td> <td>String</td> <td>php-fpm socket name</td> <td><tt>'/var/run/php-fpm/piwik.php-fpm.sock'</tt></td> </tr> <tr> <td><tt>['ya-piwik']['database']['host']</tt></td> <td>String</td> <td>database server host name</td> <td><tt>'127.0.0.1'</tt></td> </tr> <tr> <td><tt>['ya-piwik']['database']['user']</tt></td> <td>String</td> <td>database user name</td> <td><tt>'root'</tt></td> </tr> <tr> <td><tt>['ya-piwik']['database']['pass']</tt></td> <td>String</td> <td>database password</td> <td><tt>'secret-password-here'</tt></td> </tr> <tr> <td><tt>['ya-piwik']['database']['name']</tt></td> <td>String</td> <td>database name</td> <td><tt>'piwik'</tt></td> </tr> <tr> <td><tt>['ya-piwik']['database']['prefix']</tt></td> <td>String</td> <td>database table prefix</td> <td><tt>''</tt></td> </tr> <tr> <td><tt>['ya-piwik']['database']['adapter']</tt></td> <td>String</td> <td>database adapter <tt>'MYSQL'</tt> or <tt>'MYSQLI'</tt></td> <td><tt>'MYSQLI'</tt></td> </tr> <tr> <td><tt>['ya-piwik']['root']['user']</tt></td> <td>String</td> <td>username of root user</td> <td><tt>'root'</tt></td> </tr> <tr> <td><tt>['ya-piwik']['root']['pass']</tt></td> <td>String</td> <td>password of root user</td> <td><tt>'secret-password-here'</tt></td> </tr> <tr> <td><tt>['ya-piwik']['root']['email']</tt></td> <td>String</td> <td>email of root user</td> <td><tt>'piwik@example.net'</tt></td> </tr> </table>

LWRP

ya_piwik_site

this LWRP is create new or overwrite site to piwik.

Actions

<table> <tr> <th>Name</th> <th>Description</th> </tr> <tr> <td><tt>:create</tt></td> <td>create site configuration</td> </tr> </table>

Parameters

<table> <tr> <th>Name</th> <th>Type</th> <th>Required</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>idsite</tt></td> <td>Fixnum</td> <td>false</td> <td>site id of site</td> <td><tt>0</tt></td> </tr> <tr> <td><tt>siteName</tt></td> <td>String</td> <td>true</td> <td>site name of new site</td> <td><tt> </tt></td> </tr> <tr> <td><tt>urls</tt></td> <td>String | String of Array</td> <td>true</td> <td>url of new site, Overwrite the site that matches the URL if not <tt>idsite</tt> specified</td> <td><tt> </tt></td> </tr> <tr> <td><tt>timezone</tt></td> <td>String</td> <td>false</td> <td>timezone of new site</td> <td><tt>'Asia/Tokyo'</tt></td> </tr> <tr> <td><tt>ecommerce</tt></td> <td>String</td> <td>false</td> <td>promote e-commerce of new site</td> <td><tt>'0'</tt></td> </tr> </table>

Example

ya_piwik_site 'make piwik main site' do
  idsite 1
  siteName 'My blog'
  urls 'http://blog.example.net/'
  action :create
end

Libraries

YaPiwik::API class is call piwik API helper.

Example

  api = YaPiwik::API.new(node.run_context)
  idsite = api.site_id_from_site_url('http://blog.example.net/') # idsite => 1

Usage

ya-piwik::default

Just include ya-piwik in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[ya-piwik]"
  ]
}

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Copyright (c) 2014 sharkpp

This cookbook is under The MIT License.

Full license text, please refer to the LICENSE.

Dependent cookbooks

php >= 0.0.0
nginx >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.1.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of http://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

License Metric
            

0.1.0 failed this metric

ya-piwik does not have a valid open source license.
Acceptable licenses include Apache-2.0, apachev2, Apache 2.0, MIT, mit, GPL-2.0, gplv2, GNU Public License 2.0, GPL-3.0, gplv3, GNU Public License 3.0.

Publish Metric
            

0.1.0 passed this metric

Supported Platforms Metric
            

0.1.0 passed this metric

Testing File Metric
            

0.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of http://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.0 passed this metric