Magento Deployment Scripts

Overview

Magento Deployment Scripts

Author: Fabrizio Branca

This is a collection of scripts used to build/package, deploy and install Magento projects.

Import note: Never use the master branch in your build jobs. Instead clone a specific tag:

git clone -b v1.0.0 https://github.com/AOEpeople/magento-deployscripts.git

Since these scripts might change significantly and your deployment process might fail otherwise.

Overview

Usage

Add the magento-deployment scripts to your project using Composer. Checkout composer.json example file below.

Introduction

build vs. provisioning vs. deployment vs. installation

Checkout http://www.slideshare.net/aoepeople/rock-solid-magento/91 (and the next slides after that)

TODO: add more information here

build.sh

Usage:
 ./deploy.sh -r 
   
     -t 
    
      -e 
     
       [-u 
      
       ] [-p 
       
        ] [-a 
        
         ] [-d] -r Package url (http, S3 or local file) -t Target dir -u Download username -p Download password -a aws cli profile (defaults to 'default') -d Also download and install .extra.tar.gz package 
        
       
      
     
    
   

Generated files

  • projectName.tar.gz
  • projectName.extra.tar.gz
  • MD5SUMS

Base package vs extra package

Checkout http://www.slideshare.net/aoepeople/rock-solid-magento/55 (and the next slides after that)

Example Configuration/tar_excludes.txt content

.git*
./htdocs/install.php
./htdocs/includes
./htdocs/downloader
./htdocs/pkginfo
./htdocs/LICENSE*
./htdocs/RELEASE_NOTES.txt
./htdocs/phpunit.xml*
./htdocs/*.sample
./htdocs/var
./htdocs/media
./tools/composer.phar
./.modman/Aoe_TemplateHints
./.modman/EcomDev_PHPUnit

Expected project files/directories

  • composer.json
  • tools/composer.phar (This should be part of your project repo. Obviously this can't be pulled in via Composer. Chicken and egg, problem... :)
  • tools/modman (This is part of https://github.com/AOEpeople/magento-deployscripts which is being pulled in via composer)
  • htdocs/index.php
  • .modman directory: The modules located here can be directly committed to the main project repository (e.g. if they're project specific) or they can be pulled in via Composer)
  • .modman/ProjectName_Base: There's no exclipict check for this base module to be present, but this is a recommendation. Add the basic project setup (local.xml, htaccess,...) to this base module.
  • .modman/.basedir
  • Configuration/tar_excludes.txt (this file controls what goes in the base package and what goes in the extra package. See below)

Additionally install.sh expects/checks these files:

  • tools/systemstorage_import.sh (This is part of https://github.com/AOEpeople/magento-deployscripts which is being pulled in via composer)
  • tools/apply (This is part of https://github.com/AOEpeople/EnvSettingsTool which is being pulled in via composer)
  • tools/n98-magerun.phar (This is part of https://github.com/AOEpeople/magento-deployscripts which is being pulled in via composer)
  • Configuration/settings.csv (This is being used by EnvSettingsTool to apply all environment specific settings during the installation process)
  • Configuration/mastersystem.txt (Defines which system is the master system. E.g. "production". This is required to determine if the systemstorage backup needs to be imported during the installation process.)
  • Configuration/project.txt (project name. E.g. "acme")

These files and folders can easily be constructud by using following composer.json as a basis for your project

{
    "name": "my/project",
    "minimum-stability": "dev",
    "require": {
        "aoepeople/composer-installers": "*",
        "aoepeople/envsettingstool": "*",
        "tmp/magento_community": "1.9.0.1"
        "aoepeople/magento-deployscripts": "1.0.3"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/AOEpeople/composer-installers.git"
        },
        {
            "type": "vcs",
            "url": "https://github.com/AOEpeople/EnvSettingsTool.git"
        },
        {
            "type": "package",
            "package": {
                "name": "tmp/magento_community",
                "type": "magento-source",
                "version": "1.9.0.1",
                "dist": {
                    "url": "https://github.com/OpenMage/magento-mirror/archive/1.9.0.1.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "vcs",
            "url": "https://github.com/AOEpeople/magento-deployscripts.git"
        }
    ],
    "config" : {
        "bin-dir": "tools"
    }
}

Auto-generated meta files

Following files will be stored inside the base package

  • build.txt
  • htdocs/version.txt (will be accessible from the web)

deploy.sh

install.sh

opsworks_*.sh

systemstorage_import.sh

*lint.sh

Tools

n98-magerun

modman

You might also like...
Run PHP scripts on the fly at runtime on a PocketMine-MP server (useful for debugging)

Scripter Run PHP scripts on the fly at runtime on a PocketMine-MP server. This is useful for runtime debugging, when you don't want to restart the ser

Composer plugin replacing placeholders in the scripts section by dynamic values

Composer Substitution Plugin The Composer Substitution plugin replaces placeholders in the scripts section by dynamic values. It also permits to cache

Scripts-dev directive for composer

scriptsdev for Composer It's like require-dev, but for scripts Installation Just run composer require neronmoon/scriptsdev --dev Usage After installin

One-file composer scripts

Melody - One-file composer scripts Create a file named test.php: ?php CONFIG packages: - "symfony/finder: ~2.8" CONFIG; $finder = Symfony\Com

A set of PHP scripts which leverage MySQL INFORMATION_SCHEMA to create log tables and insert / update triggers

mysql-logtable-php mysql-logtable-php is a set of PHP scripts which leverage MySQL INFORMATION_SCHEMA to create log tables and insert / update trigger

A lot of scripts and packages in modern PHP demand one or more configuration classes

A lot of scripts and packages in modern PHP demand one or more configuration classes. Mostly, those are a set of properties that can be set, changed or retrieved. However, some of the configurations have a peculiar behaviour - such as boolean properties.

Pug Renderer - a (heavily based on the PhpRenderer) renderer for rendering Pug view scripts into a PSR-7 Response object

Pug Renderer This is a (heavily based on the PhpRenderer) renderer for rendering Pug view scripts into a PSR-7 Response object. It works well with Sli

This Magento 2 extension integrates EasyTranslate into Magento 2.
This Magento 2 extension integrates EasyTranslate into Magento 2.

EasyTranslate Magento 2 Connector This Magento 2 extension integrates EasyTranslate into Magento 2. Mind that you need to have an account with EasyTra

Magento-Functions - A Resource of Magento Functions

Magento-Functions A Resource of Magento Functions Table of Contents Category Product User Cart Checkout General Account [Working w/ URL's] (#urls) Cat

Comments
  • Readme and Compass

    Readme and Compass

    Thank you very much for sharing this stuff (and other). I wish you could update Readme to make things more explicit to use.

    BTW, i saw compass compile is missing un this process. According to build / deploy logic, it would occur in deploy (install) just after modman run. Any suggestion ?

    opened by Seb2nim 1
  • Issue with tmp folder

    Issue with tmp folder

    I ran into an issue with the line in https://github.com/AOEpeople/magento-deployscripts/blob/master/build.sh#L74

    The problem is caused by missing tmp folder in the folder script is running from. I understand the build was designed to run on a CI server. But if someone runs the build from a location where tmp folder doesn't exists it will fail.

    My suggestion is to create the tmp folder if it doesn't exists and delete afterward.

    opened by raminv80 0
Releases(v1.0.16)
Owner
AOE
AOE is a leading global provider of services for digital transformation and business models. AOE relies exclusively on established Enterprise Open Source...
AOE
Magento-bulk - Bulk Import/Export helper scripts and CLI utilities for Magento Commerce

Magento Bulk Bulk operations for Magento. Configuration Copy config.php.sample to config.php and edit it. Product Attribute Management List All Attrib

Bippo Indonesia 23 Dec 20, 2022
Laradeploy offers you to automate deployment using a GitHub webhook.

Introduction Laradeploy offers you to automate deployment using a GitHub webhook. Simple and fast just make a git push to GitHub deploy the new modifi

Gentrit Abazi 10 Feb 21, 2022
Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.

Nextcloud All In One Beta This is beta software and not production ready. But feel free to use it at your own risk! We expect there to be rough edges

Nextcloud 1.1k Jan 4, 2023
Magento2 Deployment with Deployer (Skeleton)

MageDeploy2 Base Magento2 Deployment Setup using Robo and Deployer. This is the base project you should base your deployments on. It provides an confi

Matthias Walter 44 Jul 18, 2022
Deployer is a PHP Application deployment system powered by Laravel

Deployer is a PHP Application deployment system powered by Laravel 5.5, written & maintained by Stephen Ball.

Stephen Ball 886 Dec 15, 2022
A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2

Simple Import / Export tool A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2. Table data

EcomDev B.V. 51 Dec 5, 2022
Block malicious scripts using botscout.com protection for your laravel app

Laravel BotScout Protect your website against automated scripts using the botscout.com API. Installation You can install the package via composer: com

Nicolas Beauvais 64 Jul 30, 2022
The simplest way to create a dynamic sitemap for your self-coded website which you have made by using PHP/HTML/CSS/Js etc... Scripts.

Sitemap_index.xml The simplest way to create a dynamic sitemap for your self-coded website which you have made by using PHP/HTML/CSS/Js etc... Scripts

Tanish Raj 1 Oct 16, 2021