Deploying service configurations and credentials to other instances
Key Takeaway
Code reaches other instances by code replication from Staging. Service, profile and credential configurations move by export and import. Private keys and certificates are not in that export, so you set them up by hand on each instance.
A B2C Commerce web service has two parts: a script in your cartridge and configuration records in Business Manager. When you deploy the integration to the Development and Production instances, the parts don't travel together. Code, service configurations, and private keys and certificates each reach the other instances by their own path, so you need to know which path each one takes.
What a web service needs
A B2C Commerce web service needs three configurations that you create in Business Manager:
- A service configuration
- A service profile, which holds the timeout, rate limit and circuit breaker settings
- A service credential, which holds the service URL, plus a user name and password for basic authentication
The configurations live in Business Manager on each instance, not in your cartridge. Your script gets the service by its Business Manager ID through LocalServiceRegistry.createService, which means the script relies on that configuration being present on the instance where it runs.
A credential password is masked after you type it. You can't retrieve it from Business Manager, so keep the value in a secure place outside Business Manager in case you need to enter it again.