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

lampp_platform (1) Versions 0.1.0

Configures a web platform with Apache, PHP, and MariaDB or PostgreSQL

Policyfile
Berkshelf
Knife
cookbook 'lampp_platform', '~> 0.1.0', :supermarket
cookbook 'lampp_platform', '~> 0.1.0'
knife supermarket install lampp_platform
knife supermarket download lampp_platform
README
Dependencies
Changelog
Quality 33%

LAMPP Platform Cookbook

License
GitHub Tag
Build status

Maintainer: OIT Systems Engineering (ua-oit-se@alaska.edu)

Purpose

This cookbook configures a stack consisting of Linux, Apache, MariaDB and PostgreSQL (LAMPP).
Apache is configured using the http_platform cookbook.
The databases are configured using the database_application cookbook.

A PHP application is deployed from an archive.

Requirements

Chef

This cookbook requires Chef 14+.

Platforms

Supported Platform Families:

  • Debian
    • Ubuntu, Mint
  • Red Hat Enterprise Linux
    • Amazon, CentOS, Oracle
  • Fedora

Platforms validated via Test Kitchen:

  • Ubuntu
  • Debian
  • CentOS
  • Fedora

Dependencies

This cookbook does not constrain its dependencies because it is intended as a utility library.
It should ultimately be used within a wrapper cookbook.

Resources

This cookbook provides no custom resources.

Recipes

lampp_platform::default

This recipe configures a webserver and database.

lampp_platform::restore

If a both a local database is configured and backups are configured,
this recipe will restore the database from the latest snapshot.
Otherwise does nothing.

Attributes

default

  • node['lampp_platform']['database_host'].
    Defaults to 'localhost'.
    The host at which the database is located.
    If equal to 'localhost', servers and databases are installed per attributes of the database_application cookbook.
    Otherwise, only database clients are installed.

  • node['lampp_platform']['base_name'].
    Defaults to nil.
    The name used for scoping the application and name directories.
    Must be set or an exception is raised.

Note that node['http_platform']['apache']['mpm_module'] is set to 'prefork' to support PHP.

app

  • node['lampp_platform']['app']['archive']['download_base_url'].
    Defaults to nil.
    The URL of the directory from which to fetch the application archive.
    Must be set or an exception is raised.

  • node['lampp_platform']['app']['archive']['download_file_link'].
    Defaults to nil.
    The URL slug of the download.
    If nil, defaults to download_file_name.

  • node['lampp_platform']['app']['archive']['download_file_name'].
    Defaults to nil.
    The archive file to be downloaded.
    Must be set or an exception is raised.

  • node['lampp_platform']['app']['archive']['extract_root_directory'].
    Defaults to nil.
    The name of the directory created by extracting the archive.
    Must be set or an exception is raised.

  • node['lampp_platform']['app']['archive']['extract_creates_file'].
    Defaults to nil.
    The relative path to a file that is created by extraction.
    Used for idempotence.
    Must be set or an exception is raised.

  • node['lampp_platform']['app']['sync']['exclude_paths'].
    Defaults to [].
    Set of paths to exclude when the application code is synced from the download to the library location.
    Commonly used to avoid clobbering in-source configuration files.

  • node['lampp_platform']['app']['serve_path'].
    Defaults to nil.
    The path at which the application is served.
    For example, 'wiki' or 'app'.
    The URL of the application will then be 'https://host.domain/serve_path'.
    See the mediawiki_application cookbook for an example of configuring redirects, rewrites, and pretty URLs.
    Must be set or an exception is raised.

  • node['lampp_platform']['app_updated'].
    Defaults to false.
    Set to true in a recipe if the application repo changed.
    Can be used to gate non-idempotent configuration code.

install

For some operations, like installing mod_php, the version of PHP on the system must be known.
This will be the version in the standard repos for Debian- and Fedora-based systems, and the version provided by EPEL+IUS on RHEL-based distros.
The defaults match the latest repos when this cookbook was updated, but will need to be set for older or newer distros.

  • node['lampp_platform']['install']['debian_php_version'].
    Defaults to '7.2'.
    The version of PHP installed on Debian-based distros.

  • node['lampp_platform']['install']['rhel_php_version'].
    Defaults to '7.3'.
    The version of PHP to install on RHEL- or Fedora-based distros.

Examples

This is an application cookbook; no custom resources are provided.
See recipes and attributes for details of what this cookbook does.

See test/cookbooks/test_harness for example usage of this cookbook.
See the mediawiki_application cookbook for a more full-fledged example.

Development

See CONTRIBUTING.md and TESTING.md.

Dependent cookbooks

checksum_file >= 0.0.0
chef_run_recorder >= 0.0.0
database_application >= 0.0.0
http_platform >= 0.0.0
yum-epel >= 0.0.0
yum-ius >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog for LAMPP Platform Cookbook

0.1.0

  • Initial release

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

Foodcritic Metric
            

0.1.0 passed this metric

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

Version Tag 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 https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number