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

Commit e6475ff

Browse files
jeff-matthewsdrpayynedavid-ziffityandrewbesseduard13
authored
Small changes (#6295)
* Added a proper example, modified content for clarity * Added a new Section to Getting a CMS Block in phtml * DEVDOCS-6160: Fixed pages - fixed page "Prepare your existing Magento Commerce install" - fixed page "Import Magento Commerce code into a Cloud project" - update picture to latest branch * DEVDOCS-6160: Fixed pages - fixed page "Prepare your existing Magento Commerce install" - fixed page "Import Magento Commerce code into a Cloud project" - update picture to latest branch * Providing some useful information on how to provide classes to blocks and containers * Added cache types cache clean command * Added layout block example * Magento file system owner not need sudo. * DEVDOCS-6160: Fixed bullets according to recommendations * Update src/guides/v2.2/frontend-dev-guide/templates/template-override.md Co-Authored-By: Jeff Matthews <matthews.jeffery@gmail.com> * Update documentation for the Button UI component * Removing 2.2 changes * Adding additional step in checkout customization * Update the documentation for the Column UI component * Update documentation for the HtmlContent UI component * Removed unnecessary sentence * Improving the requirejs documentation * Small adjustments * Copy edit * Small adjustments * small changes * Apply changes from editorial review * Fixed typo * Fixed formatting * Applied changes to 2.3 * Fixed linting errors Co-authored-by: Adarsh Manickam <adarsh.apple@icloud.com> Co-authored-by: david-ziffity <david.francis@ziffity.com> Co-authored-by: Andrii Beziazychnyi <a.beziazychnyi@atwix.com> Co-authored-by: Eduard Chitoraga <e.chitoraga@atwix.com> Co-authored-by: Mohamed-Asar <56036656+Mohamed-Asar@users.noreply.github.com> Co-authored-by: Margaret Eker <meker@adobe.com> Co-authored-by: chandru-199 <51230988+chandru-199@users.noreply.github.com> Co-authored-by: Serhiy Zhovnir <31502344+serhiyzhovnir@users.noreply.github.com> Co-authored-by: vinoth <50227665+VinothKumar361@users.noreply.github.com>
1 parent c4b1703 commit e6475ff

File tree

21 files changed

+452
-272
lines changed

21 files changed

+452
-272
lines changed

src/_includes/install/file-system-perms-twouser_22.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws
136136
```
137137

138138
```bash
139-
sudo chown -R :<web server group> .
139+
chown -R :<web server group> .
140140
```
141141

142142
```bash

src/cloud/setup/first-time-setup-import-import.md

Lines changed: 119 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ functional_areas:
66
- Setup
77
---
88

9-
Use the following instructions to import your {{site.data.var.ee}} code into your current {{ site.data.var.ece }} project code.
9+
Use the following instructions to import your {{site.data.var.ee}} code into a current {{ site.data.var.ece }} environment.
1010

1111
{:.bs-callout-warning}
12-
When you force push code from an existing Git branch to your {{site.data.var.ece}} project, you overwrite the project code in `master` which removes all data, sites, stores, and other development work you have done on the project. If you want to keep any files or directories, copy them to a directory outside of your project.
12+
When you force push code from an existing Git branch to the branch for your {{site.data.var.ece}} environment, you overwrite the project code in the `master` branch which removes all data, sites, stores, and other development work you have done in the Cloud environment. If you want to keep any files or directories, copy them to a directory outside of your project.
1313

1414
## Required information
1515

@@ -27,88 +27,94 @@ Create a remote Git reference from your Cloud Git repository to the repository c
2727

2828
1. Copy `composer.json` to a _non-tracked directory_ so it does not get overwritten.
2929

30-
```
31-
cp composer.json ../composer.json.cloud
32-
```
30+
```bash
31+
cp composer.json ../composer.json.cloud
32+
```
3333

3434
1. Rename your Cloud Git remote from `origin` to `cloud-project` to make it clear which repository is which:
3535

36-
```
37-
git remote rename origin cloud-project
38-
```
36+
```bash
37+
git remote rename origin cloud-project
38+
```
3939

4040
1. Add a remote upstream for your existing {{site.data.var.ee}} installation:
4141

42-
```
43-
git remote add prev-project <git url>
44-
```
42+
```bash
43+
git remote add prev-project <git url>
44+
```
4545

4646
1. Review the remote branch configuration.
4747

48-
```
49-
git remote -v
50-
```
48+
```bash
49+
git remote -v
50+
```
5151

52-
Verify that the remote branch configuration matches the following sample configuration, with your project name instead of `ikyyrqvlgnrai`.
52+
Verify that the remote branch configuration matches the following sample configuration, with your project name instead of `ikyyrqvlgnrai`.
5353

54-
```
55-
cloud-project ikyyrqvlgnrai@git.us.magento.cloud:ikyykimjgnrao.git (fetch)
56-
cloud-project ikyyrqvlgnrai@git.us.magento.cloud:ikyykimjgnrao.git (push)
57-
magento ikyyrqvlgnrai@git.us.magento.cloud:ikyykimjgnrao.git (fetch)
58-
magento ikyyrqvlgnrai@git.us.magento.cloud:ikyykimjgnrao.git (push)
59-
prev-project git@github.com:mygitusername/myeereponame.git (fetch)
60-
prev-project git@github.com:mygitusername/myeereponame.git (push)
54+
```terminal
55+
cloud-project ikyyrqvlgnrai@git.us.magento.cloud:ikyykimjgnrao.git (fetch)
56+
cloud-project ikyyrqvlgnrai@git.us.magento.cloud:ikyykimjgnrao.git (push)
57+
magento ikyyrqvlgnrai@git.us.magento.cloud:ikyykimjgnrao.git (fetch)
58+
magento ikyyrqvlgnrai@git.us.magento.cloud:ikyykimjgnrao.git (push)
59+
prev-project git@github.com:mygitusername/myeereponame.git (fetch)
60+
prev-project git@github.com:mygitusername/myeereponame.git (push)
6161
```
6262
6363
1. Checkout the Cloud project `master` branch.
6464
65-
```
66-
magento-cloud environment:checkout master
67-
```
65+
```bash
66+
magento-cloud environment:checkout master
67+
```
6868

6969
1. Set the `cloud-project` branch as an upstream tracking branch for `master`.
7070

71-
```
72-
git fetch cloud-project
73-
git branch -u cloud-project/master
74-
```
71+
```bash
72+
git fetch cloud-project
73+
```
74+
75+
```bash
76+
git branch -u cloud-project/master
77+
```
7578

7679
## Import your {{site.data.var.ee}} code to your Cloud project {#cloud-import-imp}
7780

81+
{:.bs-callout-info}
82+
Before you begin the import process, make sure that you have completed the steps to [prepare your existing Magento Commerce system]({{ site.baseurl }}/cloud/setup/first-time-setup-import-prepare.html).
83+
7884
After you have completed the git reference configuration, you can import the {{site.data.var.ee}} code.
7985

8086
1. Fetch the {{site.data.var.ee}} branch.
8187

82-
```
83-
git fetch prev-project
84-
```
88+
```bash
89+
git fetch prev-project
90+
```
8591

8692
1. Reset your Cloud `master` branch to contain the code and the commit history of your {{site.data.var.ee}} branch.
8793

88-
```
89-
git reset --hard prev-project/<branch name>
90-
```
94+
```bash
95+
git reset --hard prev-project/<branch name>
96+
```
9197

9298
1. Push code from your {{site.data.var.ee}} project to your {{site.data.var.ece}} project, overwriting the previous contents and commit history with that of your project.
9399

94-
```
95-
git push -f cloud-project master
96-
```
100+
```bash
101+
git push -f cloud-project master
102+
```
97103

98-
If the import succeeds, the {{site.data.var.ece}} environment redeploys.
104+
If the import succeeds, the {{site.data.var.ece}} environment redeploys.
99105

100-
```
101-
Re-deploying environment 43biovskhelhy-master-l5ut8gq.
102-
Environment configuration:
103-
mymagento (type: php:7.0, size: S, disk: 2048)
104-
mysql (type: mysql:10.0, size: S, disk: 2048)
105-
redis (type: redis:3.0, size: S)
106-
solr (type: solr:4.10, size: S, disk: 1024)
107-
108-
Environment routes:
109-
http://master-o9gv6gq-43biovskhelhy.us.magentosite.cloud/ is served by application `mymagento`
110-
https://master-o9gv6gq-43biovskhelhy.us.magentosite.cloud/ is served by application `mymagento`
111-
```
106+
```bash
107+
Re-deploying environment 43biovskhelhy-master-l5ut8gq.
108+
Environment configuration:
109+
mymagento (type: php:7.0, size: S, disk: 2048)
110+
mysql (type: mysql:10.0, size: S, disk: 2048)
111+
redis (type: redis:3.0, size: S)
112+
solr (type: solr:4.10, size: S, disk: 1024)
113+
114+
Environment routes:
115+
http://master-o9gv6gq-43biovskhelhy.us.magentosite.cloud/ is served by application `mymagento`
116+
https://master-o9gv6gq-43biovskhelhy.us.magentosite.cloud/ is served by application `mymagento`
117+
```
112118

113119
## Import the Magento database {#cloud-import-db}
114120

@@ -128,41 +134,41 @@ To drop and re-create the Cloud database:
128134

129135
1. SSH to the Integration environment.
130136

131-
```
132-
magento-cloud ssh
133-
```
137+
```bash
138+
magento-cloud ssh
139+
```
134140

135141
1. Connect to the database.
136142

137-
```
138-
mysql -h <db-host> -P <db-port> -p -u <db-user> <db-name>
139-
```
143+
```bash
144+
mysql -h <db-host> -P <db-port> -p -u <db-user> <db-name>
145+
```
140146

141147
1. Drop the database. At the `MariaDB [main]>` prompt, enter:
142148

143-
```
144-
drop database main;
145-
```
149+
```shell
150+
drop database main;
151+
```
146152

147153
1. Re-create the database:
148154

149-
```
150-
create database main;
151-
```
155+
```shell
156+
create database main;
157+
```
152158

153159
1. At the `MariaDB [main]>` prompt, enter `exit`.
154160

155161
1. At the shell command prompt, enter the following command to re-create the database.
156162

157-
```
158-
zcat var/db.sql.tgz | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h <db-host> -P <db-port> -p -u <db-user> <db-name>
159-
```
163+
```bash
164+
zcat var/db.sql.tgz | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h <db-host> -P <db-port> -p -u <db-user> <db-name>
165+
```
160166

161-
For example,
167+
For example,
162168

163-
```
164-
zcat var/db.sql.tgz | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h database.internal -p -u user main
165-
```
169+
```bash
170+
zcat var/db.sql.tgz | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h database.internal -p -u user main
171+
```
166172

167173
### Update base URLs {#baseurl}
168174

@@ -174,38 +180,38 @@ To update the unsecure base URL:
174180

175181
1. If you haven't already done so, SSH to the Cloud integration server.
176182

177-
```
178-
magento-cloud ssh
179-
```
183+
```bash
184+
magento-cloud ssh
185+
```
180186

181187
1. Connect to the database.
182188

183-
```
184-
mysql -h <db-host> -P <db-port> -p -u <db-user> <db-name>
185-
```
189+
```bash
190+
mysql -h <db-host> -P <db-port> -p -u <db-user> <db-name>
191+
```
186192

187193
1. Show the contents of the `core_config_data` table.
188194

189-
```
190-
SELECT * from core_config_data;
191-
```
195+
```shell
196+
SELECT * from core_config_data;
197+
```
192198

193-
Note the `path` of `web/unsecure/base_url`; this is the value you'll change.
199+
Note the `path` of `web/unsecure/base_url`; this is the value you'll change.
194200

195201
1. Enter the following command to change the value of `path` to your integration server's unsecure base URL:
196202

197-
```
198-
UPDATE core_config_data SET value='<Cloud unsecure base URL>' WHERE path='web/unsecure/base_url';
199-
```
203+
```shell
204+
UPDATE core_config_data SET value='<Cloud unsecure base URL>' WHERE path='web/unsecure/base_url';
205+
```
200206

201-
{:.bs-callout-warning}
202-
The base URL _must_ end with a `/` character.
207+
{:.bs-callout-warning}
208+
The base URL _must_ end with a `/` character.
203209

204210
1. Confirm the change by entering the following command:
205211

206-
```
207-
SELECT * from core_config_data;
208-
```
212+
```shell
213+
SELECT * from core_config_data;
214+
```
209215

210216
1. If the change was successful, enter `exit` to exit the `[Maria DB]` prompt.
211217
1. Continue with the next section.
@@ -223,48 +229,48 @@ To add your {{site.data.var.ee}} encryption key:
223229

224230
1. If you haven't done so already, SSH to the Cloud environment.
225231

226-
```
227-
magento-cloud environment:ssh
228-
```
232+
```bash
233+
magento-cloud environment:ssh
234+
```
229235

230236
1. Open `app/etc/env.php` in a text editor.
231237
1. Replace the existing value of `key` with your [{{site.data.var.ee}} key]({{ site.baseurl }}/cloud/setup/first-time-setup-import-prepare.html#encryption-key).
232238

233-
```php
234-
return array (
235-
'crypt' =>
236-
array (
237-
'key' => '<your encryption key>',
238-
),
239-
);
240-
```
239+
```php
240+
return array (
241+
'crypt' =>
242+
array (
243+
'key' => '<your encryption key>',
244+
),
245+
);
246+
```
241247

242248
1. Save your changes to `env.php` and exit the text editor.
243249

244-
{:.bs-callout-info}
245-
You must add this key to the `env.php` file for all environments: Integration, Staging, and Production.
250+
{:.bs-callout-info}
251+
You must add this key to the `env.php` file for all environments: Integration, Staging, and Production.
246252

247253
## Import media {#media}
248254

249255
To import media files into your Cloud environment:
250256

251257
1. If you haven't done so already, SSH to the Cloud environment.
252258

253-
```
254-
magento-cloud ssh -p <project ID> -e <environment ID>
255-
```
259+
```bash
260+
magento-cloud ssh -p <project ID> -e <environment ID>
261+
```
256262

257263
1. Enter the following command to clear existing media files:
258264

259-
```
260-
rm -rf pub/media/*
261-
```
265+
```bash
266+
rm -rf pub/media/*
267+
```
262268

263269
1. Enter the following command to extract the media files to the `pub/media` directory:
264270

265-
```
266-
tar -xzf var/media.tgz pub/media
267-
```
271+
```bash
272+
tar -xzf var/media.tgz pub/media
273+
```
268274

269275
## Clear the cache {#cache}
270276

@@ -290,9 +296,9 @@ To verify everything imported properly, perform the following tasks in your loca
290296

291297
1. On your Cloud environment, enter the following commands to find the information to log in to the [Magento Admin](https://glossary.magento.com/magento-admin) and to view the storefront:
292298

293-
```
294-
magento-cloud environment:url
295-
```
299+
```bash
300+
magento-cloud environment:url
301+
```
296302

297303
1. Log in to the Magento [Admin](https://glossary.magento.com/admin) using the username and password of your {{site.data.var.ee}} system.
298304
1. Verify that the settings in the Admin are the same as your {{site.data.var.ee}} system.

0 commit comments

Comments
 (0)