Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FRW-8550 Dynamic Multistore documentation. #2919

Merged

Conversation

asmarovydlo
Copy link
Contributor

annakotiuk
annakotiuk previously approved these changes Nov 21, 2024
@dimitriyTsemma dimitriyTsemma added TW review needed PR needs Technical writer's review new PR contains a new document labels Nov 26, 2024
@@ -0,0 +1,173 @@
---
title: Difference in deployment files
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what context do I need to know these differences?

@@ -0,0 +1,56 @@
This document describes how to enable [Dynamic Multistore](/docs/pbc/all/dynamic-multistore/{{page.version}}/base-shop/dynamic-multistore-feature-overview.html) on the latest codebase.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by the latest codebase?

### Here are the steps that needs to be performed to enable Dynamic Multistore.

{% info_block warningBox "Staging environment" %}
Make sure that **all** steps above are performed (and fully tested) on staging before applying it on production setup, to avoid unexpected downtime and data loss.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you wanted to say "steps below"?

{% endinfo_block %}


1. Make sure that your custom Backoffice, MerchantPortal, Console Commands, Gateway, BackendAPI code do not use `StoreFacade::getCurrentStore()` as well as `StoreClient::getCurrentStore()` methods, they are no longer available in any other application except GlueStorefront and Storefront.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Make sure that your custom Backoffice, MerchantPortal, Console Commands, Gateway, BackendAPI code do not use `StoreFacade::getCurrentStore()` as well as `StoreClient::getCurrentStore()` methods, they are no longer available in any other application except GlueStorefront and Storefront.
1. `StoreFacade::getCurrentStore()` and `StoreClient::getCurrentStore()` methods are available only in GlueStorefront and Storefront applications. Replace them with other methods in the following entities:
* Backoffice
* MerchantPortal
* Console Commands
* Gateway
* BackendAPI

3. Be aware that after enabling Dynamic Multistore mode, your basic domain structure will change from store to region for all the applications(Example https://yves.de.mysprykershop.com => https://yves.eu.mysprykershop.com), make sure that it is expected. If external systems are impacted by this - necessary redirects are set, so SEO of your site is not impacted.
4. The Dynamic Store feature itself does not require any database changes, in case you've already migrated to the latest demoshop version.
5. Dynamic Multistore introduce some changes in RabbitMQ messages structure, so it is **important** that:
- During server migration we do not have unprocessed messages in the queue. Make sure that all messages are processed **before** enabling Maintenance Mode.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is server migration related to dynamic multistore?

## Enable Dynamic Multistore

{% info_block warningBox "Project version" %}
If your project version is below 202307.0, you need to update to the latest codebase first, see [Install Dynamic Multistore](/docs/pbc/all/dynamic-multistore/202410.0/base-shop/install-dynamic-multistore.html) page.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do I need to do with the linked document?

Copy link
Contributor Author

@asmarovydlo asmarovydlo Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrased, please take a look.
I would prefer not to merge those documents, those are different things.



1. Make sure that your custom Backoffice, MerchantPortal, Console Commands, Gateway, BackendAPI code do not use `StoreFacade::getCurrentStore()` as well as `StoreClient::getCurrentStore()` methods, they are no longer available in any other application except GlueStorefront and Storefront.
2. Make sure that you custom console commands (and the places where they are executed) updated to the new format, see [details](/docs/pbc/all/dynamic-multistore/{{page.version}}/base-shop/difference-between-modes.html#Deployment file difference).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain how to do it in this document, jumping between documents is not acceptable. Same for step 5

- All store aware commands should implement `Spryker\Zed\Kernel\Communication\Console\StoreAwareConsole` and execute actions for specific store if store parameter is provided, or for all the stores in the region otherwise.
- It is recommended to use `--store` parameter instead of `APPLICATION_STORE` env variable, despite the support of env variable still exists.
3. Be aware that after enabling Dynamic Multistore mode, your basic domain structure will change from store to region for all the applications(Example https://yves.de.mysprykershop.com => https://yves.eu.mysprykershop.com), make sure that it is expected. If external systems are impacted by this - necessary redirects are set, so SEO of your site is not impacted.
4. The Dynamic Store feature itself does not require any database changes, in case you've already migrated to the latest demoshop version.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who is this information useful for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the developer who enabled DMS ON mode

5. Dynamic Multistore introduce some changes in RabbitMQ messages structure, so it is **important** that:
- During the migration we do not have unprocessed messages in the queue. Make sure that all messages are processed **before** enabling Maintenance Mode.
- Make sure that `Maintainance Mode` is enabled during migration to make sure that no new messages are added to the queue before the migration is finished.
(Expected downtime is limited to the deployment time, normally it takes less than 1hr)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downtime of what?

@andriitserkovnyi andriitserkovnyi merged commit 865cc9b into master Dec 20, 2024
@andriitserkovnyi andriitserkovnyi deleted the feature/frw-8550-dynamic-multistore-documentation branch December 20, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new PR contains a new document TW review needed PR needs Technical writer's review
Development

Successfully merging this pull request may close these issues.

5 participants