You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
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.
10
10
11
11
{:.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.
13
13
14
14
## Required information
15
15
@@ -27,88 +27,94 @@ Create a remote Git reference from your Cloud Git repository to the repository c
27
27
28
28
1. Copy `composer.json` to a _non-tracked directory_ so it does not get overwritten.
29
29
30
-
```
31
-
cp composer.json ../composer.json.cloud
32
-
```
30
+
```bash
31
+
cp composer.json ../composer.json.cloud
32
+
```
33
33
34
34
1. Rename your Cloud Git remote from `origin` to `cloud-project` to make it clear which repository is which:
35
35
36
-
```
37
-
git remote rename origin cloud-project
38
-
```
36
+
```bash
37
+
git remote rename origin cloud-project
38
+
```
39
39
40
40
1. Add a remote upstream for your existing {{site.data.var.ee}} installation:
41
41
42
-
```
43
-
git remote add prev-project <git url>
44
-
```
42
+
```bash
43
+
git remote add prev-project <git url>
44
+
```
45
45
46
46
1. Review the remote branch configuration.
47
47
48
-
```
49
-
git remote -v
50
-
```
48
+
```bash
49
+
git remote -v
50
+
```
51
51
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`.
1. Set the `cloud-project` branch as an upstream tracking branch for `master`.
70
70
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
+
```
75
78
76
79
## Import your {{site.data.var.ee}} code to your Cloud project {#cloud-import-imp}
77
80
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
+
78
84
After you have completed the git reference configuration, you can import the {{site.data.var.ee}} code.
79
85
80
86
1. Fetch the {{site.data.var.ee}} branch.
81
87
82
-
```
83
-
git fetch prev-project
84
-
```
88
+
```bash
89
+
git fetch prev-project
90
+
```
85
91
86
92
1. Reset your Cloud `master` branch to contain the code and the commit history of your {{site.data.var.ee}} branch.
87
93
88
-
```
89
-
git reset --hard prev-project/<branch name>
90
-
```
94
+
```bash
95
+
git reset --hard prev-project/<branch name>
96
+
```
91
97
92
98
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.
93
99
94
-
```
95
-
git push -f cloud-project master
96
-
```
100
+
```bash
101
+
git push -f cloud-project master
102
+
```
97
103
98
-
If the import succeeds, the {{site.data.var.ece}} environment redeploys.
104
+
If the import succeeds, the {{site.data.var.ece}} environment redeploys.
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
+
```
112
118
113
119
## Import the Magento database {#cloud-import-db}
114
120
@@ -128,41 +134,41 @@ To drop and re-create the Cloud database:
128
134
129
135
1. SSH to the Integration environment.
130
136
131
-
```
132
-
magento-cloud ssh
133
-
```
137
+
```bash
138
+
magento-cloud ssh
139
+
```
134
140
135
141
1. Connect to the database.
136
142
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
+
```
140
146
141
147
1. Drop the database. At the `MariaDB [main]>` prompt, enter:
142
148
143
-
```
144
-
drop database main;
145
-
```
149
+
```shell
150
+
drop database main;
151
+
```
146
152
147
153
1. Re-create the database:
148
154
149
-
```
150
-
create database main;
151
-
```
155
+
```shell
156
+
create database main;
157
+
```
152
158
153
159
1. At the `MariaDB [main]>` prompt, enter `exit`.
154
160
155
161
1. At the shell command prompt, enter the following command to re-create the database.
156
162
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
+
```
160
166
161
-
For example,
167
+
For example,
162
168
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
+
```
166
172
167
173
### Update base URLs {#baseurl}
168
174
@@ -174,38 +180,38 @@ To update the unsecure base URL:
174
180
175
181
1. If you haven't already done so, SSH to the Cloud integration server.
176
182
177
-
```
178
-
magento-cloud ssh
179
-
```
183
+
```bash
184
+
magento-cloud ssh
185
+
```
180
186
181
187
1. Connect to the database.
182
188
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
+
```
186
192
187
193
1. Show the contents of the `core_config_data` table.
188
194
189
-
```
190
-
SELECT * from core_config_data;
191
-
```
195
+
```shell
196
+
SELECT * from core_config_data;
197
+
```
192
198
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.
194
200
195
201
1. Enter the following command to change the value of `path` to your integration server's unsecure base URL:
196
202
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
+
```
200
206
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.
203
209
204
210
1. Confirm the change by entering the following command:
205
211
206
-
```
207
-
SELECT * from core_config_data;
208
-
```
212
+
```shell
213
+
SELECT * from core_config_data;
214
+
```
209
215
210
216
1. If the change was successful, enter `exit` to exit the `[Maria DB]` prompt.
211
217
1. Continue with the next section.
@@ -223,48 +229,48 @@ To add your {{site.data.var.ee}} encryption key:
223
229
224
230
1. If you haven't done so already, SSH to the Cloud environment.
225
231
226
-
```
227
-
magento-cloud environment:ssh
228
-
```
232
+
```bash
233
+
magento-cloud environment:ssh
234
+
```
229
235
230
236
1. Open `app/etc/env.php` in a text editor.
231
237
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).
232
238
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' => '<yourencryptionkey>',
244
+
),
245
+
);
246
+
```
241
247
242
248
1. Save your changes to `env.php` and exit the text editor.
243
249
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.
246
252
247
253
## Import media {#media}
248
254
249
255
To import media files into your Cloud environment:
250
256
251
257
1. If you haven't done so already, SSH to the Cloud environment.
1. Enter the following command to clear existing media files:
258
264
259
-
```
260
-
rm -rf pub/media/*
261
-
```
265
+
```bash
266
+
rm -rf pub/media/*
267
+
```
262
268
263
269
1. Enter the following command to extract the media files to the `pub/media` directory:
264
270
265
-
```
266
-
tar -xzf var/media.tgz pub/media
267
-
```
271
+
```bash
272
+
tar -xzf var/media.tgz pub/media
273
+
```
268
274
269
275
## Clear the cache {#cache}
270
276
@@ -290,9 +296,9 @@ To verify everything imported properly, perform the following tasks in your loca
290
296
291
297
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:
292
298
293
-
```
294
-
magento-cloud environment:url
295
-
```
299
+
```bash
300
+
magento-cloud environment:url
301
+
```
296
302
297
303
1. Log in to the Magento [Admin](https://glossary.magento.com/admin) using the username and password of your {{site.data.var.ee}} system.
298
304
1. Verify that the settings in the Admin are the same as your {{site.data.var.ee}} system.
0 commit comments