Skip to content

Setting Up Customer Deployments (BYOC)

Overview

This guide demonstrates how to set up a reference SaaS deployment in your own cloud account and then replicate that deployment into your customers' cloud environments using Coherence. This approach allows you to maintain a single application in Coherence, with each customer represented by a separate collection within that application. This pattern is sometimes called "bring your own cloud" (BYOC), "customer deployments", or "multi-tenant deployments", and is supported in Coherence as a first-class use case.

  • You can create multiple environments in one collection, for example, to offer staging and production deployments to your users.
  • You can also easily create multiple collections, and then separate them into different accounts as needed.

How to set up customer deployments

There are seven steps to setting up customer deployments for a SaaS app.

Step 1: Create the SaaS application in Coherence

  1. Log in to your Coherence account and click New app in the top-left dropdown menu.
  2. Name your application (for example, "SaaS-Multi-Tenant").
  3. Choose your cloud provider (AWS or Google Cloud).
  4. Select the appropriate deployment flavor for your SaaS application.
  5. Click Continue to create the application.

Step 2: Set up the reference collection and environment

  1. Create a new collection for your reference deployment (for example, "Reference-Collection").
  2. Within the collection, create a new environment (for example, "Reference-Env").
  3. Add the necessary services for your SaaS application:
  4. One or more backend services
  5. Frontend service
  6. Database service (if required)
  7. Configure each service with the appropriate settings:
  8. Build context and Dockerfile
  9. Environment variables
  10. Resource limits
  11. Health checks
  12. Database migrations (if applicable)

Step 3: Connect your cloud account and deploy the reference environment

  1. Follow the Coherence prompts to connect your cloud account to your collection.
  2. Once connected, provision the infrastructure for your reference environment.
  3. Build and deploy your SaaS application to the reference environment.
  4. Test the deployment thoroughly to ensure everything is working as expected.

Step 4: Prepare for customer deployments

  1. Ensure that your cnc.yml file is properly configured for easy replication.
  2. Document any customer-specific variables or configurations that may need to be adjusted for each deployment.

Step 5: Onboard a new customer

  1. Provide the customer with instructions for adding the Coherence IAM role to their account.
  2. This is the same thing you did when setting up your collection. Review the GCP or AWS examples if needed.
  3. In the Coherence dashboard, go to your SaaS-Multi-Tenant application.
  4. Create a new collection for the customer (for example, "Customer-A-Collection").
  5. Within the collection, create a new environment for the customer deployment.
  6. Use the Clone from option to copy the configuration from your template environment. You can also paste the template cnc.yml directly and edit as needed.

Step 6: Deploy to a customer's cloud

  1. Go to the Provisioning tasks tab in the customer's collection page.
  2. Start the provisioning task to set up the infrastructure in the customer's cloud.
  3. Once provisioning is complete, navigate to the Builds tab of the customer's environment.
  4. Initiate a new build to deploy your SaaS application to the customer's cloud.

Step 7: Verify and hand over

  1. Test the deployment in the customer's environment to ensure everything is functioning correctly.
  2. Provide the customer with access details and any necessary documentation.
  3. Set up monitoring and alerts for the customer's deployment as required.

Ongoing management

  • Use Coherence to manage updates and new feature deployments across all customer collections.
  • Leverage preview environments within each collection to test changes before deploying them to customer production environments.
  • Use Coherence's monitoring and logging features to maintain visibility into all customer deployments.
  • When updating the application, you can propagate changes across all customer collections by updating the services in each collection.

By following this guide, you can efficiently replicate your SaaS deployment across multiple customer cloud environments, while maintaining a single application structure in Coherence. This approach allows for centralized management and consistent deployment across all customer instances.