layout | group | subgroup | title | menu_title | menu_order | menu_node | version | github_link |
---|---|---|---|---|---|---|---|---|
default |
cloud |
170_trouble |
Component deployment failure |
Component deployment failure |
50 |
2.0 |
cloud/trouble/trouble_comp-deploy-fail.md |
This topic discusses how to recover from a failed component deployment. Typical examples are components that have dependencies that are not met by your environment; for example, incompatible {% glossarytooltip bf703ab1-ca4b-48f9-b2b7-16a81fd46e02 %}PHP{% endglossarytooltip %} versions.
You can recover from a failed deployment in any of the following ways:
- Restore a snapshot if you have one
- Remove the component from your environment's
composer.json
and redeploy the environment
This section discusses how to remove the component from the root composer.json
in your environment and redeploy the environment:
{% collapsible Click to expand/collapse content %}
{% include cloud/cli-get-started.md %}
{% endcollapsible %}
{% collapsible Click to expand/collapse content %}
{% include cloud/composer-name.md %}
{% endcollapsible %}
To clean up from the previous deployment, you must SSH to the environment and manually clear the contents of the Magento var
directory.
-
Enter the following command to SSH to the current environment:
magento-cloud environment:ssh
-
Clear the
var
directory:rm -rf var/*
{% collapsible Click to expand/collapse content %}
To remove the component:
-
Change to your environment's root directory if you haven't already done so.
-
Enter the following command:
composer remove <component-name>:<version>
If the following message displays, you don't need to do anything further:
Package "<name>:<version>" listed for update is not installed. Ignoring.
-
Wait while dependencies are updated.
-
Enter the following commands in the order shown to commit the changes and deploy the project:
git add -A git commit -m "<message>" git push origin <environment ID>
{% endcollapsible %}