{
"jpsType": "install",
"jpsVersion": "0.3",
"application": {
"id": "magento",
"name": "Magento",
"version": "2.1.6",
"logo": "https://raw.githubusercontent.com/jelastic-jps/magento/master/magento21-apache-php56-mysql/images/magento.png",
"type": "php",
"categories": [
"apps/e-commerce",
"apps/sales-and-marketing"
],
"homepage": "http://www.magentocommerce.com/",
"description": {
"en": "Magento is the eCommerce software and platform trusted by the world's leading brands. Grow your online business with Magento!"
},
"env": {
"topology": {
"ha": false,
"engine": "php5.6",
"ssl": false,
"nodes": [
{
"extip": false,
"count": 1,
"cloudlets": 16,
"nodeType": "apache2",
"nodeGroup": "cp"
},
{
"nodeType": "mysql5",
"extip": false,
"count": 1,
"cloudlets": 16,
"nodeGroup": "sqldb"
}
]
}
},
"onInstall": {
"call": [
"deployApp",
"createDb",
"replaceInFiles",
"bindDomain"
]
},
"procedures": [
{
"id": "deployApp",
"onCall": [
{
"deploy": [
{
"nodeMission": "cp",
"archive": "https://github.com/jelastic-jps/magento/blob/master/magento21-apache-php56-mysql/dumps/Magento-CE-2.1.6-2017-03-29-12-40-05.zip?raw=true",
"name": "Magento-2.1.6.zip",
"context": "ROOT"
}
]
}
]
},
{
"id": "createDb",
"onCall": [
{
"prepareSqlDatabase": [
{
"nodeMission": "sqldb",
"loginCredentials": {
"user": "root",
"password": "${nodes.mysql5.password}"
},
"newDatabaseName": "magento",
"newDatabaseUser": {
"name": "magento",
"password": "magento"
}
}
]
}
]
},
{
"id": "replaceInFiles",
"onCall": [
{
"replaceInFile": [
{
"nodeMission": "cp",
"path": "${SYSTEM_ETC}/php.ini",
"replacements": [
{
"pattern": ";extension=gd.so",
"replacement": "extension=gd.so \rextension=intl.so \rextension=xsl.so"
}
]
}
]
},
{
"restartNodes": [
{
"nodeMission": "cp"
}
]
}
]
},
{
"id": "bindDomain",
"onCall": [
{
"executeShellCommands": [
{
"nodeMission": "cp",
"commands": [
"cd /var/www/webroot/ROOT/bin && chmod a+x magento",
"/usr/bin/php magento setup:install -s '--backend-frontname=admin' '--db-host=${nodes.mysql5.address}' '--db-name=magento' '--db-user=root' '--db-password=${nodes.mysql5.password}' '--base-url=${env.url}' '--admin-firstname=admin' '--admin-lastname=adminlast' '--admin-email=${user.email}' '--admin-user=admin' '--admin-password=${user.appPassword}' &> /dev/null",
"/usr/bin/php magento indexer:reindex && /usr/bin/php magento cache:flush &> /dev/null"
]
},
{
"nodeMission": "cp",
"commands": "sed -i \"162s/select]/select->limit(10000000000)]/\" /var/www/webroot/ROOT/vendor/magento/framework/Search/Adapter/Mysql/Mapper.php"
}
]
}
]
}
],
"success": {
"text": "Below you will find your admin panel link, username and password.
To add custom domain name for your Magento installation follow the steps described in our documentation",
"email": "Below you will find your admin panel link, username and password. To add custom domain name for your Magento installation follow the steps described in our documentation"
}
}
}