Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

magento/devdocs#5245: Hard tabs. Folder: guides/cloud #5471

18 changes: 9 additions & 9 deletions guides/v2.2/cloud/basic-information/starter-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,19 @@ The Production and Staging environments include the following technologies. You

Each service runs in its own secure container. Containers are managed together in the project. Some services are built-in, such as the following:

* HTTP router (handling incoming requests, but also caching and redirects)
* PHP application server
* Git
* Secure Shell (SSH)
* HTTP router (handling incoming requests, but also caching and redirects)
* PHP application server
* Git
* Secure Shell (SSH)

You can even have multiple applications running in the same project. Building a microservice oriented architecture with {{site.data.var.ee}} is as easy as managing a monolithic application.

### Software versions {#cloud-arch-software}

{{site.data.var.ece}} uses:

* Operating system: Debian GNU/Linux 8 (jessie)
* Web server: [nginx](https://glossary.magento.com/nginx) 1.8
* Operating system: Debian GNU/Linux 8 (jessie)
* Web server: [nginx](https://glossary.magento.com/nginx) 1.8

You cannot upgrade the operating system and web server software to a new version, but you can configure versions for the following software:

Expand All @@ -100,9 +100,9 @@ In the Staging and Production environments, you use Fastly for CDN and caching.

You use the following files to configure the software versions that you want to use in your implementation.

* [`.magento.app.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_magento-app.html)
* [`routes.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_routes.html)
* [`services.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_services.html)
* [`.magento.app.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_magento-app.html)
* [`routes.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_routes.html)
* [`services.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_services.html)

### Backup and disaster recovery {#backup}

Expand Down
12 changes: 6 additions & 6 deletions guides/v2.2/cloud/before/before-setup-env-2_clone.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The {{site.data.var.ece}} project is a Git repository of Magento code. Each **ac

The following instructions use a combination of Magento Cloud CLI commands and Git commands to clone a `master` environment from your project to your local workstation. To see a full list of Magento Cloud CLI commands, use the `magento-cloud list` command.

{:.bs-callout-info }
{: .bs-callout-info }
Some Git commands cannot complete an action in your {{site.data.var.ece}} project. For example, you can create a new branch using a Git command, but you cannot create and activate a new environment using the `git checkout -b <branch-name>` command. You must create an environment using the `magento-cloud environment:branch <branch-name>` command for the environment to become _active_. Alternatively, you can use the Project Web UI to create active environments. See [Magento CLI reference]({{page.baseurl}}/cloud/reference/cli-ref-topic.html).

{:.procedure}
Expand Down Expand Up @@ -56,7 +56,7 @@ To clone a project master environment:
magento-cloud environment:list
```

{:.bs-callout-info}
{: .bs-callout-info }
The `magento-cloud environment:list` command displays environment hierarchies, whereas the `git branch` command does not.

1. Fetch the remote branches.
Expand All @@ -80,7 +80,7 @@ We recommend changing the environment-level variables for the Magento Admin URL
- **ADMIN_PASSWORD**—A password for the administrative user. When the project was created, the License Owner received a default password in email.
- **ADMIN_URL**— The relative URL to access the Admin panel, such as `<domain>/admin`. For security reasons, we recommend you choose a value other than `admin` or `backend` or another term that is easy to guess.

{:.bs-callout .bs-callout-info}
{: .bs-callout-info }
Make note of any updated values so that you can use them to install Magento from the command line and to verify the installation. The values for the `ADMIN_EMAIL`, `ADMIN_USERNAME`, and `ADMIN_PASSWORD` variables are used only for installation.

If you are not sure that the `master` branch has all Magento Admin variables and settings configured, you can view a list of existing variables:
Expand Down Expand Up @@ -120,7 +120,7 @@ You can use the `magento-cloud` CLI to set a variable:
magento-cloud vset <variable-name> <variable-value>
```

{:.bs-callout-warning}
{: .bs-callout-warning }
Every time you add or modify a variable using the web interface or the CLI, the branch automatically redeploys.

{:.procedure}
Expand All @@ -146,8 +146,8 @@ To add variables using the Project Web Interface:

After cloning your project and updating the Magento administrator account configuration, you can branch for development. As stated earlier, you must create an environment using the `magento-cloud environment:branch <branch-name>` command or the Project Web Interface for the environment to become _active_.

- For [Starter]({{ page.baseurl }}/cloud/basic-information/starter-develop-deploy-workflow.html#clone-branch), consider creating a branch for `staging`, then create a development branch based on the `staging` branch.
- For [Pro]({{ page.baseurl }}/cloud/architecture/pro-develop-deploy-workflow.html), create development branches based on the Integration environment.
- For [Starter]({{ page.baseurl }}/cloud/basic-information/starter-develop-deploy-workflow.html#clone-branch), consider creating a branch for `staging`, then create a development branch based on the `staging` branch.
- For [Pro]({{ page.baseurl }}/cloud/architecture/pro-develop-deploy-workflow.html), create development branches based on the Integration environment.

{:.procedure}
To branch from master:
Expand Down
34 changes: 17 additions & 17 deletions guides/v2.2/cloud/before/before-workspace-file-sys-owner.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ passwd <username>

Follow the prompts on your screen to create a password for the user.

{: .bs-callout .bs-callout-warning}
{: .bs-callout-warning }
If you do not have `root` privileges on your Magento server, you can use another local user account. Confirm that the user has a strong password and continue with [Put the Magento file system owner in the web server group](#install-update-depend-user-add2group).

For example, to create a user named `magento_user` and give the user a password, enter:
Expand All @@ -46,37 +46,37 @@ sudo adduser magento_user
sudo passwd magento_user
```

{: .bs-callout .bs-callout-warning}
{: .bs-callout-warning }
Because the point of creating this user is to provide added security, it is essential that you create a strong password.

## Find the web server user's group {#install-update-depend-user-findgroup}

To find the web server user's group:

* CentOS:
* CentOS:

```bash
grep -E -i '^user|^group' /etc/httpd/conf/httpd.conf
```
```bash
grep -E -i '^user|^group' /etc/httpd/conf/httpd.conf
```

or
or

```bash
grep -Ei '^user|^group' /etc/httpd/conf/httpd.conf
```
```bash
grep -Ei '^user|^group' /etc/httpd/conf/httpd.conf
```

Typically, the user and group name are both `apache`
Typically, the user and group name are both `apache`

* Ubuntu: `ps aux | grep apache` to find the apache user, then `groups <apache user>` to find the group
* Ubuntu: `ps aux | grep apache` to find the apache user, then `groups <apache user>` to find the group

Typically, the username and the group name are both `www-data`
Typically, the username and the group name are both `www-data`

## Put the Magento file system owner in the web server's primary group {#install-update-depend-user-add2group}

Assuming the typical Apache group name for CentOS and Ubuntu, enter the following command as a user with `root` privileges:

* CentOS: `usermod -g apache <username>`
* Ubuntu: `usermod -g www-data <username>`
* CentOS: `usermod -g apache <username>`
* Ubuntu: `usermod -g www-data <username>`

For example, to add the user `magento_user` to the `apache` primary group on CentOS:

Expand All @@ -98,8 +98,8 @@ magento_user : apache

To complete the task, restart the web server:

* Ubuntu: `service apache2 restart`
* CentOS: `service httpd restart`
* Ubuntu: `service apache2 restart`
* CentOS: `service httpd restart`

**Next step:**
[Clone and branch the project]({{ page.baseurl }}/cloud/before/before-setup-env-2_clone.html)
148 changes: 73 additions & 75 deletions guides/v2.2/cloud/before/before-workspace-magento-prereqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To begin, install and set up a VM on your host computer (Windows, Mac OS, Linux-

When you install and configure software on your local (or VM), you will first SSH into the VM and then complete installations. Follow the SSH instructions and commands for the VM software you install. For example, you would install PHP, Nginx, and database on the VM via SSH.

{:.bs-callout .bs-callout-info}
{: .bs-callout-info }
Magento documentation provides installation instructions for installing software on CentOS or Ubuntu only. For installation information on Windows or MacOS, consult a community resource.

## Virtual machine or container (host) {#vm}
Expand All @@ -35,10 +35,8 @@ When using Vagrant, we also recommend the package [hostmanager](https://github.c

jeff-matthews marked this conversation as resolved.
Show resolved Hide resolved
## Development tools {#devtools}

* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Provides code branching and management for accessing {{site.data.var.ee}} and your code repositories. Use Git command-line commands or applications of your choice to work with Git. You can install this on your local VM or on your host.
For more information, see [How Cloud uses Git]({{ page.baseurl }}/cloud/reference/git-integration.html).
* [Composer](https://getcomposer.org/download/) - Used for dependency management. Composer enables us to manage the Magento components and their dependencies. Install on your local VM.
For more information, see [How Cloud uses Composer]({{ page.baseurl }}/cloud/reference/cloud-composer.html).
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Provides code branching and management for accessing {{site.data.var.ee}} and your code repositories. Use Git command-line commands or applications of your choice to work with Git. You can install this on your local VM or on your host. For more information, see [How Cloud uses Git]({{ page.baseurl }}/cloud/reference/git-integration.html).
* [Composer](https://getcomposer.org/download/) - Used for dependency management. Composer enables us to manage the Magento components and their dependencies. Install on your local VM. For more information, see [How Cloud uses Composer]({{ page.baseurl }}/cloud/reference/cloud-composer.html).

## Web server (local) {#webserver}

Expand Down Expand Up @@ -72,74 +70,74 @@ Before working with your {{site.data.var.ece}} project, set the PHP `memory_limi
{:.procedure}
To set a memory limit:

1. Find your `php.ini` file using the following command:
1. Find your `php.ini` file using the following command:

```bash
php --ini
```
```bash
php --ini
```

Use the value of `Loaded Configuration File`.
Use the value of `Loaded Configuration File`.

2. As a user with `root` privileges, open `php.ini` in a text editor.
3. Change the value of `memory_limit` to at least `1G` for normal use or at least `2G` for debugging.
4. Save your changes to `php.ini` and exit the text editor.
5. Restart your web server:
1. As a user with `root` privileges, open `php.ini` in a text editor.
1. Change the value of `memory_limit` to at least `1G` for normal use or at least `2G` for debugging.
1. Save your changes to `php.ini` and exit the text editor.
1. Restart your web server:

* Apache:
* CentOS: `service httpd restart`
* Ubuntu: `service apache2 restart`
* Nginx: `service nginx restart`
* Apache:
* CentOS: `service httpd restart`
* Ubuntu: `service apache2 restart`
* Nginx: `service nginx restart`

## Database (local) {#database}

You have multiple options for databases to use for your local. One database option you may want to consider is MariaDB. The {{site.data.var.ee}} environments use [MariaDB](https://mariadb.org/), with a [Galera Cluster](http://galeracluster.com/) with triple redundancy in the Production environment.

Regardless of database, for **Pro plans** you need to modify the `auto_increment_increment` value.

{: .bs-callout .bs-callout-warning}
{: .bs-callout-warning }
For **Pro plans**, the Production environment has a three node infrastructure that uses auto-incrementing by 3 for all data IDs. Do not develop using hard-coded database IDs in your development. Due to the incremented data IDs, the referenced data will differ across the three nodes in Production.

{:.procedure}
To install and create a MariaDB database for Magento on your local:

1. Use this command to create the database:

```bash
apt-get install mariadb-server
```
```bash
apt-get install mariadb-server
```

2. Secure the database with the following command and completing all prompts:
1. Secure the database with the following command and completing all prompts:

```bash
mysql_secure_installation
```
```bash
mysql_secure_installation
```

3. Access the MariaDB database.
4. Grant all privileges to the Magento account you created for the local:
1. Access the MariaDB database.
1. Grant all privileges to the Magento account you created for the local:

```shell
grant all privileges on <database> to '<account>'@'localhost' identified by '<password>';
```
```bash
grant all privileges on <database> to '<account>'@'localhost' identified by '<password>';
```

5. Finally create the database:
1. Finally create the database:

```shell
create database magento;
```
```bash
create database magento;
```

```shell
use magento;
```
```bash
use magento;
```

6. Exit when done.
1. Exit when done.

### Pro: Set up the auto-increment for MariaDB

You need to set an auto-increment value for the MariaDB installation.

1. As a user with `root` privileges, open `/etc/mysql/mariadb.conf.d/50-server.cnf` in a text editor.
2. In the Basic Settings section, add `auto_increment_increment = 3`.
3. Restart the service: `service mysql restart`.
1. As a user with `root` privileges, open `/etc/mysql/mariadb.conf.d/50-server.cnf` in a text editor.
1. In the Basic Settings section, add `auto_increment_increment = 3`.
1. Restart the service: `service mysql restart`.

### Pro: Set up the auto-increment for MySQL {#cloud-mysql}

Expand All @@ -156,24 +154,24 @@ mysqladmin variables -u <root username> -p | grep 'auto_increment'
{:.procedure}
To set `auto_increment_increment` to 3:

1. As a user with `root` privileges, open `/etc/my.cnf` in a text editor.
1. As a user with `root` privileges, open `/etc/my.cnf` in a text editor.

{:.bs-callout .bs-callout-info}
On Ubuntu 16, the path is typically `/etc/mysql/mysql.conf.d/mysqld.cnf`.
{: .bs-callout-info }
On Ubuntu 16, the path is typically `/etc/mysql/mysql.conf.d/mysqld.cnf`.

2. Add or edit the following line in the `[mysqld]` section:
1. Add or edit the following line in the `[mysqld]` section:

```conf
auto_increment_increment=3
```
```conf
auto_increment_increment=3
```

{{site.data.var.ece}} supports a High Availability configuration. This setting increments the database IDs in increments of three to ensure row uniqueness for Galera databases on each of the three HA nodes in production.
{{site.data.var.ece}} supports a High Availability configuration. This setting increments the database IDs in increments of three to ensure row uniqueness for Galera databases on each of the three HA nodes in production.

3. Restart MySQL:
1. Restart MySQL:

```bash
service mysqld restart
```
```bash
service mysqld restart
```

## Magento Cloud CLI (local) {#cloud-ssh-cli-cli-install}

Expand All @@ -184,39 +182,39 @@ These instructions discuss installation using commands for a Unix environment. F
{:.procedure}
To install the Magento Cloud CLI:

1. Log in to your local development machine or switch to the [Magento file system owner]({{ page.baseurl }}/cloud/before/before-workspace-file-sys-owner.html).
1. Log in to your local development machine or switch to the [Magento file system owner]({{ page.baseurl }}/cloud/before/before-workspace-file-sys-owner.html).

2. Change to a directory to which the [Magento file system owner](https://glossary.magento.com/magento-file-system-owner) has write access, such as the home directory.
1. Change to a directory to which the [Magento file system owner](https://glossary.magento.com/magento-file-system-owner) has write access, such as the home directory.

3. Enter the following command:
1. Enter the following command:

```bash
curl -sS https://accounts.magento.cloud/cli/installer | php
```
```bash
curl -sS https://accounts.magento.cloud/cli/installer | php
```

4. After the CLI downloads, an operating system-specific command displays.
1. After the CLI downloads, an operating system-specific command displays.

For example, on Ubuntu and CentOS, the command is similar to:
For example, on Ubuntu and CentOS, the command is similar to:

```bash
source $HOME/.bashrc
```
```bash
source $HOME/.bashrc
```

For more information about the user shell profile, see [.bash_profile vs .bashrc](https://apple.stackexchange.com/questions/51036/what-is-the-difference-between-bash-profile-and-bashrc)
For more information about the user shell profile, see [.bash_profile vs .bashrc](https://apple.stackexchange.com/questions/51036/what-is-the-difference-between-bash-profile-and-bashrc)

You can also add the `$HOME/.magento-cloud/bin` to the Magento user's `PATH`:
You can also add the `$HOME/.magento-cloud/bin` to the Magento user's `PATH`:

```bash
export PATH=$PATH:$HOME/.magento-cloud/bin
```
```bash
export PATH=$PATH:$HOME/.magento-cloud/bin
```

Consult operating system documentation for details.
Consult operating system documentation for details.

5. Verify the `magento-cloud` command is in your path by entering the following command:
1. Verify the `magento-cloud` command is in your path by entering the following command:

```bash
magento-cloud list
```
```bash
magento-cloud list
```

## Additional requirements for Magento Commerce {#commerce}

Expand Down
Loading