cookbook 'lampp_platform', '~> 0.1.0', :supermarket
lampp_platform (1) Versions 0.1.0 Follow0
Configures a web platform with Apache, PHP, and MariaDB or PostgreSQL
cookbook 'lampp_platform', '~> 0.1.0'
knife supermarket install lampp_platform
knife supermarket download lampp_platform
LAMPP Platform Cookbook
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 tonil
. 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 tonil
. 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 tonil
. The URL slug of the download. If nil, defaults to download_file_name.node['lampp_platform']['app']['archive']['download_file_name']
. Defaults tonil
. The archive file to be downloaded. Must be set or an exception is raised.node['lampp_platform']['app']['archive']['extract_root_directory']
. Defaults tonil
. 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 tonil
. 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 tonil
. 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 tofalse
. 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
yum-ius >= 0.0.0 |
yum-epel >= 0.0.0 |
http_platform >= 0.0.0 |
database_application >= 0.0.0 |
chef_run_recorder >= 0.0.0 |
checksum_file >= 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 passed this metric
Foodcritic Metric
0.1.0 passed this metric
No Binaries Metric
0.1.0 passed this metric
Publish Metric
0.1.0 passed this metric
Supported Platforms Metric
0.1.0 passed this metric
Testing File Metric
0.1.0 passed this metric
Version Tag Metric
0.1.0 passed this metric
0.1.0 failed this metric
0.1.0 passed this metric
Foodcritic Metric
0.1.0 passed this metric
No Binaries Metric
0.1.0 passed this metric
Publish Metric
0.1.0 passed this metric
Supported Platforms Metric
0.1.0 passed this metric
Testing File Metric
0.1.0 passed this metric
Version Tag Metric
0.1.0 passed this metric
0.1.0 passed this metric
0.1.0 passed this metric
Publish Metric
0.1.0 passed this metric
Supported Platforms Metric
0.1.0 passed this metric
Testing File Metric
0.1.0 passed this metric
Version Tag Metric
0.1.0 passed this metric
0.1.0 passed this metric
0.1.0 passed this metric
Testing File Metric
0.1.0 passed this metric
Version Tag Metric
0.1.0 passed this metric
0.1.0 passed this metric
0.1.0 passed this metric