Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How-To Install Magento 2 on OpenShift – II

Magento 2

Magento 2

Last week we posted a guide to Install Magento 2 on OpenShift. It was just an experiment, and we didn’t intend to do anything else after we showed the proof of concept. However, since the guide has become very popular, we’ve decided to dig out a bit more into this and see if there was a less hacky way of install Magento 2 in OpenShift, and there  we are glad to say that we’ve managed to get it up and running with MySQL 5.7, by using another community cartridge.

It’s been very challenging due the hard disk limitation of 1GB, and we’ve had to delete everything that wasn’t absolutely necessary, as well as give up on performance in MySQL settings to squeeze a few more extra space, but eventually it worth the effort!

The steps to spot a new instance are almost the same as in our previous post, but this time we’ve simplified them even more within a simple bash script.


myapp='myapp' #App name
# Database settings, change them if you want

regex='Git remote: \K(.*) (?=Cloned)'
echo Creating app...
newapp=$(rhc create-app $myapp
echo $newapp
GIT_REMOTE=`echo $newapp | grep -Po "$regex"`

echo Setting env variables

echo Installing cartridges
rhc cartridge add -a $myapp
rhc cartridge add -a $myapp

echo Cloning repository
git clone
cd magento2-openshift
git pull
git checkout magento-2

echo Deploying!
git remote add $myapp $GIT_REMOTE
git push $myapp magento-2:master -f

That’s it, your Magento 2 instance should be up and running on http://$myapp-$

The admin url and credentials are the same (/admin123 with admin / OpenShiftAdmin123)

Please, note that after deploying the app, the gear is almost out of space, so you would only be able to add minor data/changes to it. Hopefully, it should be enough for you to test it and see how it performs, and if you like it you could always upgrade your account to get some more space.


Show me the code

The post How-To Install Magento 2 on OpenShift – II appeared first on The Developer World Is Yours.

This post first appeared on The Developer World Is Yours. Android, Magento & E, please read the originial post: here

Share the post

How-To Install Magento 2 on OpenShift – II


Subscribe to The Developer World Is Yours. Android, Magento & E

Get updates delivered right to your inbox!

Thank you for your subscription