loading...empty;done;/magento-cluster/:-uriMagento Deployment | iNET.elastic Dev Docs

How to Deploy Magento

Magento is an extremely popular open source e-commerce service powered by PHP. It provides a flexible modular architecture enhanced with agile ecosystem to continually adapt, customize and extend your platform. This allows Magento to be much more versatile than most e-commerce platforms at storing a large range of data.

With PaaS, you can not only integrate Magento instance to the platform but also get a clustered solution out-of-the-box. So, let’s have a better insight into these options:

Magento Cluster Automatic Installation

You can have a reliable and auto-scalable Magento Cluster solution for e-commerce websites up and running within minutes using the one-click installation package. If you already registered at the platform, it can be installed directly from your dashboard using platform Marketplace. Note that this clustered solution is available only for billing customers.

If you don’t have an account, you can automatically get it and, simultaneously, initiate Auto-Scalable Magento Cluster solution installation - just click the Get it hosted now button below and fill the form within the opened page.

deploy to PaaS

As a result, you’ll get a new environment with the following topology:

Magento auto-cluster topology

Read the Auto-Scalable Magento Cluster article for the detailed description or check the project repository at GitHub.

Instruction on Manual Magento Installation

In case you are intended to gain the full control over non-clustered Magento installation, we also prepared the detailed guide on its manual deployment. Follow the step-by-step instruction below to get your PHP Magento application inside the platform:

Create Environment

1. Log in to your PaaS account and click New Environment at the top left corner of the dashboard:

create new environment button

2. Within the opened topology wizard, switch to the PHP tab, add the Apache application server and the MySQL database.

Magento environment topology wizard

Note: MySQL 8 is not supported by Magento. Also, PHP 7.2.x is supported starting with the 2.3 release (currently in development).

Configure other parameters up to your needs (e.g. cloudlets limit or region) and click Create.

3. After creation, click the Config button next to your Apache server to check if the appropriate modules are activated.

Magento application server config button

4. Navigate to the /etc/php.ini file, locate and uncomment the following extensions as it is shown in the image below:

  • extension=gd.so
  • extension=xsl.so
  • extension=soap.so

Magento php.ini enable extensions

5. Save file and Restart nodes to apply changes.

Magento application server restart

Upload Application

1. Add Magento repository from GitHub to the Deployment Manager.

https://github.com/magento/magento2.git

add Magento github repository

2. Deploy Magento package into your environment. For the automatic dependencies installation, expand the Hooks section and add the Post script, which will run the Composer tool from your project directory:

1
2
cd $WEBROOT/ROOT
composer install

deploy Magento into environment

Tip: You can adjust the Branch field to provide the exact version of Magento (e.g. we set the 2.2.6 tag as the latest stable one at the moment).

In a minute your Magento project will be deployed.

Configure Database

1. While your project is deployed and dependencies installed, you can create a dedicated database with user. Click the Open in Browser button for your MySQL node.

Magento database open in browser

2. Log in with credentials you’ve received via email after environment creation. Switch to the User accounts tab and click the Add user account link.

Magento database add user account

3. Provide the desired User name and Password for your new account.

Magento database user credentials and privileges

Tick the Create database with same name and grant all privileges option and click Go at the bottom of the page.

Install Magento

1. Click the Open in Browser button for your application server.

Magento open in browser button

2. The process of installation is rather simple, just follow the displayed steps.

Magento installation page

3. Let’s pay attention to the Add a Database step. Fill in the fields by specifying your database host (for example can be seen in the appropriate email) and credentials of a user created in the previous section:

Magento configure database connection

4. Configure your Magento installation through the other steps and click Install Now on the last one to proceed.

Magento installation success

Tip: On the first connection to admin panel, you may see some warning notifications at the top of the admin panel:

  • invalid indexers - run the next command php $WEBROOT/ROOT/bin/magento indexer:reindex command via Web SSH to reindex
  • invalidated cache - select the appropriate cache (e.g. Page Cache) and refresh it via admin panel

That’s all! Now you can start working with Magento in the platform.

What’s next?