Forge Home

opencart

OpenCart CMS deploy and configuration module

10,964 downloads

9,207 latest version

2.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.1.5 (latest)
  • 1.1.4
  • 1.1.3
  • 1.1.2
  • 1.1.0
released Jun 7th 2015
This version is compatible with:
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'alexggolovin-opencart', '1.1.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add alexggolovin-opencart
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install alexggolovin-opencart --version 1.1.5

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

alexggolovin/opencart — version 1.1.5 Jun 7th 2015

alexggolovin-opencart

Table of Contents

  1. Overview
  2. Module Structure Description
  3. OpenCart Setup
  4. Classes Advanced Usage
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations
  7. Development
  8. Release Notes
  9. 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

  1. 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)
  1. 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:

  1. Class init - main class responsible for params and classes assignment with deploy sequence;

  2. Class params - controls all main configuration changes, like site and db name or installation zip file download source;

  3. 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.

  1. 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.

  2. Class opencart::download - downloads opencart installation ".zip" pacakge from the internet

  3. Class opencart::extract - exctarcts downloaded compressed file to the temporary folder

  4. Class opencart::deploy - install opencart to the site folder with required read/write permissions changes and selinux changes in case of RedHat based distributions.

  5. 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"