Deploy the integration
Learn to deploy the Digital River commercetools integration.
The Digital River commercetools integration is distributed as a container image and can be deployed to many providers. Use the instructions provided in this topic to deploy the connector for Google Cloud.
Deploy for Google Cloud
To deploy the integration for Google Cloud, you must have gcloud installed and configured so that it can be referenced in the deployment. It is also assumed that you have a Google Cloud project as well as access to the appropriate APIs.
Refer to the Google Cloud documentation and contact your Digital River representative to obtain the plugin container image used for deployment as well as installation instructions. If you do not have a Digital River representative, contact commercetools-Integration@digitalriver.com.
Create a secrets file
Perform this step only once unless values change in the future.
Create an
application.yml
file with the following values:Create a Google Cloud secret to store it. This only needs to be done once, even when updating.
Replace
<secret name>
with the name you will use for the secret. For example,gcloud secrets create <secret name> --replication-policy="automatic"
Set the secret content. For example:
gcloud secrets versions add <secret name> --data-file="path/to/application.yml"
Deploy to CloudRun
For this step, replace <instance name>
with the name that you want for your Cloud Run instance. Other values should be substituted as described in Understand integration environment variables.
Note: CPU throttling needs to be disabled with Cloud Run to allow for the running of manual synchronization of products.
Subscription setup
For real-time product synchronization, you must have a "topic" that will receive messages from commercetools ProductPublish
and ProductUnpublish.
The topic needs to be configured to forward messages along to the Publish endpoint in the integration. Use the following steps to do this:
Create a PubSub topic called
commercetools_product_publish
. The name can be anything of your choosing but must match the one you used in the setup procedure described in Install and configure the Digital River commercetools integration.Grant
roles/pubsub.publisher
tosubscriptions@commercetools-platform.iam.gserviceaccount.com
on this topic. See the commercetools documentation for details.Create a PubSub push subscription called
commercetools_product_publish.
The Push endpoint should be{base_url}/api/v1/products/publish
wherebase_url
is the location where the integration can be found. Use the following settings guidelines:The Acknowledgment deadline should be 60 seconds.
The name can be anything you choose. A meaningful name is recommended.
You should make sure the /api/vi/products/publish
endpoint is secure. See https://cloud.google.com/run/docs/triggering/pubsub-push for details on how to do this for CloudRun.
Use health endpoints
The integration image has 3 "health" endpoints you can use for startup and monitoring "status" purposes. These are:
/q/health/live
/q/health/ready
/q/health/started
Refer to the Digital River API documentation for more information on how to use these endpoints.
Last updated