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
- Log in to your Coherence account and click New app in the top-left dropdown menu.
- Name your application (for example, "SaaS-Multi-Tenant").
- Choose your cloud provider (AWS or Google Cloud).
- Select the appropriate deployment flavor for your SaaS application.
- Click Continue to create the application.
Step 2: Set up the reference collection and environment
- Create a new collection for your reference deployment (for example, "Reference-Collection").
- Within the collection, create a new environment (for example, "Reference-Env").
- Add the necessary services for your SaaS application:
- One or more backend services
- Frontend service
- Database service (if required)
- Configure each service with the appropriate settings:
- Build context and Dockerfile
- Environment variables
- Resource limits
- Health checks
- Database migrations (if applicable)
Step 3: Connect your cloud account and deploy the reference environment
- Follow the Coherence prompts to connect your cloud account to your collection.
- Once connected, provision the infrastructure for your reference environment.
- Build and deploy your SaaS application to the reference environment.
- Test the deployment thoroughly to ensure everything is working as expected.
Step 4: Prepare for customer deployments
- Ensure that your
cnc.yml
file is properly configured for easy replication. - Document any customer-specific variables or configurations that may need to be adjusted for each deployment.
Step 5: Onboard a new customer
- Provide the customer with instructions for adding the Coherence IAM role to their account.
- This is the same thing you did when setting up your collection. Review the GCP or AWS examples if needed.
- In the Coherence dashboard, go to your SaaS-Multi-Tenant application.
- Create a new collection for the customer (for example, "Customer-A-Collection").
- Within the collection, create a new environment for the customer deployment.
- 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
- Go to the Provisioning tasks tab in the customer's collection page.
- Start the provisioning task to set up the infrastructure in the customer's cloud.
- Once provisioning is complete, navigate to the Builds tab of the customer's environment.
- Initiate a new build to deploy your SaaS application to the customer's cloud.
Step 7: Verify and hand over
- Test the deployment in the customer's environment to ensure everything is functioning correctly.
- Provide the customer with access details and any necessary documentation.
- 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.