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

Commit 10f64e7

Browse files
author
Lori Krell
authored
Merge pull request #1314 from magento/lk_1010_cloud-wings-deploy
Update git commands for deploy to stg and prod
2 parents 231808c + 9c0b108 commit 10f64e7

File tree

2 files changed

+66
-5
lines changed

2 files changed

+66
-5
lines changed

_data/toc/cloud-guide.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ pages:
225225
- label: Prepare to deploy to Staging and Production
226226
url: cloud/live/stage-prod-migrate-prereq.html
227227

228-
- label: Migrate and deploy static files and data
228+
- label: Migrate and deploy code, static files, and data
229229
url: cloud/live/stage-prod-migrate.html
230230

231231
- label: Test deployment

guides/v2.0/cloud/live/stage-prod-migrate.md

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
layout: default
33
group: cloud
44
subgroup: 160_deploy
5-
title: Migrate and deploy static files and data
6-
menu_title: Migrate and deploy static files and data
5+
title: Migrate and deploy code, static files, and data
6+
menu_title: Migrate and deploy code, static files, and data
77
menu_order: 50
88
menu_node:
99
version: 2.0
@@ -15,12 +15,73 @@ github_link: cloud/live/stage-prod-migrate.md
1515

1616
To migrate your database and static files to Staging and Production:
1717

18-
* [Deploy code and migrate static files](#cloud-live-migrate-static)
18+
* [Deploy code](#code)
19+
* [Migrate static files](#cloud-live-migrate-static)
1920
* [Migrate the database](#cloud-live-migrate-db)
2021

2122
If you encounter errors or need to make changes, complete those updates on your local. Push the code changes to the Integration environment. Deploy the updated `master` branch again. See instructions in the [previous step]({{ page.baseurl }}cloud/live/stage-prod-migrate.html).
2223

23-
## Deploy code and migrate static files {#cloud-live-migrate-static}
24+
## Deploy to Staging and Production {#code}
25+
The Project Web Interface provides full features to create, manage, and deploy code branches in your Integration, Staging, and Production environments for Starter and Pro plans. You can also use SSH and CLI commands to complete these process. Previously for Pro plans, you could only use SSH and CLI commands for Staging and Production.
26+
27+
For Pro projects created **after 10-23-2017**, deploy the Integration `master` branch you created to Staging and Production.
28+
29+
1. [Log in](https://accounts.magento.cloud) to your project.
30+
2. Select the Integration branch.
31+
3. Select the **Merge** option to deploy to Staging. Complete all testing.
32+
4. Select the Staging branch.
33+
5. Select the **Merge** option to deploy to Production.
34+
35+
{% include cloud/wings-management.md %}
36+
37+
For Starter, deploy your development branch you created to Staging and Production.
38+
39+
1. [Log in](https://accounts.magento.cloud) to your project.
40+
2. Select the prepared code branch.
41+
3. Select the **Merge** option to deploy to Staging. Complete all testing.
42+
4. Select the Staging branch.
43+
5. Select the **Merge** option to deploy to Production.
44+
45+
![Use the merge option to deploy]({{ site.baseurl }}common/images/cloud_project-merge.png)
46+
47+
## Deploy using SSH {#ssh}
48+
If you prefer to use CLI for deploying, you will need to configure additional SSH settings and Git remotes to use commands. You can SSH into the Staging and Production environments to push the `master` branch.
49+
50+
You'll need the SSH and Git access information for your project.
51+
52+
For Starter projects, locate the SSH and Git information through the Project Web Interface.
53+
54+
For Pro projects created **after 10-23-2017**, locate the SSH and Git information through the Project Web Interface.
55+
56+
For Pro projects created **before 10-23-2017**, the formats are as follows:
57+
58+
* Git URL format:
59+
60+
* Staging: `[email protected]:<project ID>_stg.git`
61+
* Production: `[email protected]:<project ID>.git`
62+
63+
* SSH URL format:
64+
65+
* Staging: `<project ID>_stg@<project ID>.ent.magento.cloud`
66+
* Production: `<project ID>@<project ID>.ent.magento.cloud`
67+
68+
After that is set up, you can SSH into the environment and use Git commands to push the branches.
69+
70+
### SSH and pull the Git branch {#git}
71+
This information is for Pro projects created **before 10-23-2017**.
72+
73+
1. Open an SSH connection to your Staging or Production environment:
74+
75+
* Staging: `ssh -A <project ID>_stg@<project ID>.ent.magento.cloud`
76+
* Production: `ssh -A <project ID>@<project ID>.ent.magento.cloud`
77+
2. Pull the `master` branch to the server.
78+
79+
git pull origin master
80+
81+
### SSH and merge the Git branch
82+
This information is for Pro projects created **after 10-23-2017**. The Integration branch is the `master` branch for your code base. To deploy to Staging and Production, you can merge or sync your `master` code to the `staging` and `production` branches.
83+
84+
## Deploy migrate static files {#cloud-live-migrate-static}
2485
You will migrate {% glossarytooltip 363662cb-73f1-4347-a15e-2d2adabeb0c2 %}static files{% endglossarytooltip %} from your `pub/media` directory to Staging or Production.
2586

2687
We recommend using the Linux remote synchronization and file transfer command [`rsync`](https://en.wikipedia.org/wiki/Rsync){:target="_blank"}. rsync uses an algorithm that minimizes the amount of data by moving only the portions of files that have changed; in addition, it supports compression.

0 commit comments

Comments
 (0)