Version information
This version is compatible with:
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'alexggolovin-opencart', '1.1.5'
Learn more about managing modules with a PuppetfileDocumentation
alexggolovin-opencart
Table of Contents
- Overview
- Module Structure Description
- OpenCart Setup
- Classes Advanced Usage
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations
- Development
- Release Notes
- Module contributors
Overview
This module created for deploy amazing OpenCart opensource ecommerce CMS on the new installed Linux server. All required additional componenets: RedHat/CentOS RPM EPEL repository, web server, database server, php, will be installed and configured by this module automatically to get CMS working in seconds! (40.48 seconds on RHEL server with 1CPU and 1Gb of RAM). Operating systems supported: AWS RedHat/RedHat/CentOS/Debian/Ubuntu.
Module Structure Description
Be aware, this module installs required dependencies to the puppet master server: alexggolovin-lamp, puppetlabs-apache with puppetlabs-stdlib and puppetlabs-concat, puppetlabs-mysql with nanliu-staging, EPEL repo for RedHat based distros which required for php-mcrypt package and installed with help of stahnma-epel module. This modules were chosen as the core modules for lamp stack deploy because of their complex functionality and multiple configurations capacities. I trust to all modules created by "puppetlabs" team. And believe it's better to use the best modules created by professionals which is already exists and well tested, instead of spend a lot of time on creating the worse one.
OpenCart Setup
What opencart affects
- configuration files and directories (created and written to)
- WARNING: Configurations that are not managed by Puppet will be purged.
- package/service/configuration files for Apache
- Apache modules
- virtual hosts
- listened-to ports
- MySQL server and database creation
- PHP installations and configurations
- All posible OpenCart CMS deploy configurations
Setup Requirements
Debian,Ubuntu,RHEL or CentOS Linux operating system with puppet agent installed and configured on it, all other required components will be installed automatically.
Beginning with opencart
- All required params.pp parameters must be preconfigured before this module usage beginning.
- BY DEFAULT: opencart.local virtualhost on port "80" and site foloder with mysql "opencart" database (next usage with root user from localhost and empty password) will be created.
- The $sitename - apache virtual host folder and new site address name
- The $sitepath - site content location on the disk path
- The $siteowner - site username owner name who will have access to the site
- The $sitegroup - site group name which should has acces to the site
- The $content - "http" download link to the opencart ".zip" installation file
- The $zip_destination - local folder and filename for downloaded ".zip" opencart installation file
- The $unzip_destination - temporary folder for opencart installation file extraction
- The $mydb - name of the new created opencart's mysql database
- The $myuser - mysql database user owner of new created db (root on localhost by default)
- The $mypass - password of the new db user owner (not requried for root on localhost by default)
- To get OpenCart installed on your "mywebserver.dev.local" node, the opencart class needs to be added in site.pp configuration file:
node 'mywebserver.dev.local' {
include opencart
}
Classes Advanced Usage
The next module classes responsible for:
-
Class init - main class responsible for params and classes assignment with deploy sequence;
-
Class params - controls all main configuration changes, like site and db name or installation zip file download source;
-
Class opencart::servers - deploys LAMP stack, "::apache::vhost" section is responsible for all configurations of the new created sites include virtualhost parameters where just port, site foloder and name has been added by default, "mysql_database" controls opencart's database creation process. There are more options could be added when required, for example:
apache::vhost { 'opencartssl.local':
port => 443,
ssl => true,
docroot => $docroot,
scriptalias => $scriptalias,
serveradmin => $serveradmin,
access_log_file => "ssl_${access_log_file}",
}
mysql::db { 'mydb':
user => 'myuser',
password => 'mypass',
host => 'localhost',
grant => ['SELECT', 'UPDATE'],
}
More examples could be found in the parent puppetlabs-apache and mysql modules "/etc/puppet/modules/apache/README.md","/etc/puppet/modules/mysql/README.md" descriptions, which were used as a dependency parts of the "alexggolovin-opencart" module for apache and mysql servers deploy. This both modules configurations also could be changed directly in their own folders, to get opencart deployed with optional required configurations.
-
Class opencart::depend - installs additional php packages with configuration changes required by opencart There are additional packages required to be installed for successul OpenCart deploy: "php5-gd php5-curl php5-mysql php5-mcrypt" with "php5enmod mcrypt" apply action in case of Debian based distributions, and next apache service restart.
-
Class opencart::download - downloads opencart installation ".zip" pacakge from the internet
-
Class opencart::extract - exctarcts downloaded compressed file to the temporary folder
-
Class opencart::deploy - install opencart to the site folder with required read/write permissions changes and selinux changes in case of RedHat based distributions.
-
Class epel - installs required for RedHat and CentOS opencart components epel repo from stahnma-epel module
Reference
Look into the parent opencart's modules for review more available deploy configuration options: /etc/puppet/modules/lamp/README.md /etc/puppet/modules/apache/README.md /etc/puppet/modules/mysql/README.md
Limitations
Module tested and supposed to be used with AWS RedHat/RedHat/CentOS/Debian/Ubuntu operating systems;
Development
This module could be used by others puppet users as helpful "fast deploy" base for testing OpenCart itself or for creating deploy modules for other CMS systems like Drupal, Joomla or Wordpress, or whatever.
Release Notes
See ChangeLog for more release changes details OpenCart deploy for AWS RedHat/RedHat/CentOS/Debian/Ubuntu operating systems.
##Module contributors: ToonMeynen "https://github.com/ToonMeynen"
2015-06-07 - 1.1.5
- Issue with download cms install from github been solved by ToonMeynen with new added --no-check-certificate option to wget
2015-05-10 - 1.1.4
- -The $sitepath - site content location on the disk path added
- -The $siteowner - site username owner name who will have access to the site added
- -The $sitegroup - site group name which should has acces to the site added
2015-05-09 - 1.1.3
- EPEL repo installation changed with help of stahnma-epel module
- Now all EPEL installation opencart components supported and tested on CentOS/AWS RedHat/RHEL distributions
2015-05-08 - 1.1.2
- RedHat/CentOS EPEL repository added as dependency required for php-mcrypt package. Thanks ToonMeynen who tested this module and opened new issues on github, full information is available by this link: https://github.com/alexggolovin/alexggolovin-opencart/issues
- README.md file changed with description about required EPEL installation
2015-04-14 - 1.1.0
- OpenCart CMS deployed and tested on RedHat/CentOS/Debian/Ubuntu operating systems
Dependencies
- alexggolovin/lamp (1.x)
- stahnma/epel ()