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

application_zf (9) Versions 0.4.0

Installs/Configures ZendSkeletonApplication

Policyfile
Berkshelf
Knife
cookbook 'application_zf', '~> 0.4.0', :supermarket
cookbook 'application_zf', '~> 0.4.0'
knife supermarket install application_zf
knife supermarket download application_zf
README
Dependencies
Quality 33%

Description

This cookbook installs and configures Zend Skeleton Application according to
the instructions at https://github.com/zendframework/ZendSkeletonApplication

Requirements

This project is platform independent application_zf::install_skeleton.

The recipe application_zf::default install a typical system (Apache2 - PHP5 - ZF Skeleton).

Platform

  • Debian
  • Ubuntu
  • Rhel (not tested)
  • Fedora (not tested)
  • CentOS (not tested)

Cookbooks

  • apt
  • yum
  • build-essential
  • php
  • apache2
  • openssl

Attributes

  • node['zf']['version'] - Set the version (Skeleton) to download. Using 'latest' (the default) will install the most current version.
  • node['zf']['dir'] - Set the location to place zend skeleton application files. Default is /var/www.
  • node['zf']['server_aliases'] - Array of ServerAliases used in apache vhost. Default is [node['fqdn']].
  • node['zf']['modules'] - Array of Module names that you want to enable in your application.config.php
  • node['zf']['composer']['packages'] - Array of composer modules to install see dedicated section
  • node['zf']['dev']['version'] - Set the version of ZendDeveloperTools module. Default is dev-master
  • node['zf']['skeleton']['repository'] - Repository used to download Skeleton App. Default is https://github.com/zendframework/ZendSkeletonApplication)
  • node['zf']['deploy']['modules']['git'] - Array of git zf2 module repositories that you want to deploy

Getting Started

This group of recipes install and configure a Zend Framework Standard Skeleton
application or something based on it.

Essentially you have to use the application_zf::default to install a standard
system (Apache2 + PHP + ZendFramework/SkeletonApplication). If you prefer, you
can use single recipes in order to create your personal infrastructure.

Deploy cycles

  • application_zf::deploy_git_modules
    • Deploy your git modules in module folder
  • application_zf::deploy_composer_packages
    • Deploy composer packages vendor folder
  • application_zf::deploy_modules_list
    • Deploy your module list application.config.php configuration file

Example of usage in Vagrant

# ...
config.vm.provision :chef_solo do |chef|
# ...
chef.add_recipe "application_zf"
    chef.json = {
        :zf => {
            :version => 'zf/release-2.1.0',
            :server_aliases => 'my.local'
        }
    }
end
# ...

Vagrant, develop your module using shared folders

Always is your Vagrantfile

config.vm.share_folder("my-name-module", "/var/www/zend/module/MyNameModule", "../MyNameModule")

Add your module in the configuration

chef.json = {
    :zf => {
        :modules => [
            "Application",
            "MyNameModule"
        ],
# ...

To update your module list you have to use the application_zf::deploy_module_list

Add third parties libraries with Composer

You can use the

chef.json = {
    :zf => {
        :modules => [
            "Application",
            "ZfcBase",
            "ZfcUser"
        ],
        :composer => {
            :packages => [
                {
                    :version => "0.1.*",
                    :name => "zf-commons/zfc-user"
                }
            ]
        }
    }
}

To deploy your additional composer packages you have to use application_zf::deploy_composer_packages

Deploy your modules

If you want to deploy your module you have to add the application_zf::deploy_module_git recipe.

chef.json = {
    :zf => {
        :deploy => {
            :modules => {
                :git => [
                    {
                        :name => "YourDevModule",
                        :uri => "http://github.com/username/YourDevModule.git",
                        :branch => "master"
                    }
                ]
            }
        }
    }
}

The branch key, is in fact the revision, for that reason you can also use a
git commit id.

To deploy your additional module you have to use application_zf::deploy_module_git

ZendDeveloperTools integration

If want to enable the Zend Developer Tools you can add application_zf::dev_tools in your
configuration

chef.add_recipe "application_zf::dev_tools"

And remember to add the ZendDeveloperTools in your module list

chef.json = {
    :zf => {
        :modules => [
            "ZendDeveloperTools",
            "Application"
        ]
    }
}

Tune the ZendDeveloperTools version

Set the dev version

node['zf']['dev']['version'] = "dev-master"

Add Zend\Db profiler

Is simple, add the bjyoungblood/BjyProfiler package

:composer => {
    :packages =>[
        {
            :version => "dev-master",
            :name => "bjyoungblood/BjyProfiler"
        }
    ]
}

And also enable module BjyProfiler after ZendDeveloperTools

:modules => [
    "ZendDeveloperTools",
    "BjyProfiler"

Dependent cookbooks

php >= 0.0.0
openssl >= 0.0.0
build-essential >= 0.0.0
apt >= 0.0.0
apache2 >= 0.99.4

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.4.0 failed this metric

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

Contributing File Metric
            

0.4.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 https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.4.0 failed this metric

FC007: Ensure recipe dependencies are reflected in cookbook metadata: application_zf/recipes/default.rb:22
FC022: Resource condition within loop may not behave as expected: application_zf/recipes/deploy_composer_packages.rb:24
FC022: Resource condition within loop may not behave as expected: application_zf/recipes/deploy_git_modules.rb:32
FC022: Resource condition within loop may not behave as expected: application_zf/recipes/deploy_git_modules.rb:38
FC064: Ensure issues_url is set in metadata: application_zf/metadata.rb:1
FC065: Ensure source_url is set in metadata: application_zf/metadata.rb:1
FC066: Ensure chef_version is set in metadata: application_zf/metadata.rb:1
FC069: Ensure standardized license defined in metadata: application_zf/metadata.rb:1
FC070: Ensure supports metadata defines valid platforms: application_zf/metadata.rb:1
FC072: Metadata should not contain "attribute" keyword: application_zf/metadata.rb:1
FC121: Cookbook depends on cookbook made obsolete by Chef 14: application_zf/metadata.rb:1
FC122: Use the build_essential resource instead of the recipe: application_zf/recipes/default.rb:27
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.4.0 passed this metric

Testing File Metric
            

0.4.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 https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.4.0 passed this metric