Cobrowse.io Docs
  • Getting started
  • SDK Installation
    • Web
    • iOS
    • Android
    • React Native
    • Flutter
    • .NET Mobile
    • macOS
    • Windows
  • SDK Features
    • Account config
    • Identify your devices
    • Use 6-digit codes
    • Redact sensitive data
    • Viewing PDFs
    • Universal Cobrowse
    • Customize the interface
      • Active session controls
      • 6-digit code screen
      • User consent dialog
      • Remote control consent dialog
      • Full device consent dialog
      • Localization / translation
    • Initiate sessions with push
    • Listening for events
    • Full device capabilities
      • Full device screen sharing
      • Full device remote control
      • Managing full device mode
    • Advanced configuration
      • Starting and stopping the SDK
      • Declaring capabilities
      • Intercepting mobile SDK network requests
      • Web
        • IFrames support
        • IE 11 polyfills
        • Cross-domain session support
        • Ignore Views
      • iOS
        • Alternate render method
        • Custom touch handling
      • Android
        • Backporting TLS to older Android versions
  • Agent-side integrations
    • Agent-side overview
    • Platform integrations
      • Zendesk
      • Salesforce
        • Migrating from legacy to v2
        • Salesforce (Legacy)
      • Genesys
        • Genesys Cloud
        • Engage Workspace Web Edition (WWE)
        • Engage Workspace Desktop Edition (WDE)
      • Intercom
      • Freshworks
      • Talkdesk
      • NICE
    • Custom integrations
    • Agent SDK
      • API Reference
      • Sample code snippets
    • Authentication (JWTs)
      • JWT Policies
    • Authentication (SAML 2.0)
    • IFrame embeds
  • Enterprise self-hosting
    • Self-hosting overview
    • Docker Compose
    • Helm chart
      • Image Pull Secret
      • Environment Variables
      • Optional recording components
      • Pod Annotations
    • AWS terraform
      • AWS metrics configuration
    • Azure terraform
      • Azure metrics configuration
    • GCP terraform
      • GCP metrics configuration
    • Sizing guidelines
    • Running your instance
      • Adding a superuser
      • Limiting account creation
      • Limiting magic link recipients
      • Configuring SMTP
      • Managing your deployment
    • Monitoring your instance
      • Available metrics
      • Self-Hosted Prometheus
    • Advanced configuration
      • Air gap configuration
      • Pin web SDK version
      • L7 firewall configuration
      • Docker proxy configuration
    • Troubleshooting
Powered by GitBook
On this page
  • Initial Setup
  • Installation steps
  • 1. Choose your database
  • 2. Create an S3 bucket
  • 3. Generate the config directory
  • 4. Deploy the Terraform
  • 5. Configure your DNS provider
  • 6. Check your deployment
  • Monitoring your Deployment
  • Managing your deployment

Was this helpful?

  1. Enterprise self-hosting

AWS terraform

This is the documentation for how to use our Terraform for AWS to set up Cobrowse Enterprise in your cloud.

PreviousPod AnnotationsNextAWS metrics configuration

Last updated 1 year ago

Was this helpful?

Initial Setup

Make sure you have installed (on your local machine) the required tools to manage and deploy the Cobrowse infrastructure to AWS. You'll need these installed before running the setup scripts:

  • – at least

You'll also need an AWS account with credentials available to the setup script through the environment. This is most easily managed via the official .

Installation steps

1. Choose your database

You can choose between MongoDB and AWS DocumentDB as your data storage for Cobrowse Enterprise.

Using MongoDB

We do not provide MongoDB as part of the Terraform environment. We recommend using a hosted service such as . They have a required by many enterprises with compliance requirements. Alternatively, you can and manage the deployment and backups yourself.

When using MongoDB, the Cobrowse setup process will ask for a connection URL containing the address and authentication information for your MongoDB cluster.

Using AWS Document DB

If you wish to use AWS DocumentDB, you don't have to manually create a storage cluster. The Cobrowse Terraform environment will create the cluster and configure it into the application for you. You will have an option during the automated setup process to choose an AWS-managed DocumentDB database cluster.

Document DB backups and management are supported directly by AWS. It's recommended that you subscribe to an AWS Business (or better) support package to ensure you have support for your data and backups.

2. Create an S3 bucket

Terraform will be configured to save the state of the resources it creates to an S3 bucket. This bucket must be created manually. Its access should be completely private as the terraform state may contain sensitive information.

3. Generate the config directory

We have provided a small command line utility to help you get started. This utility will gather the required config for your deployment. Run the following command from your terminal:

npx cobrowse-enterprise create aws ./example

You can replace "./example" with the directory where you wish to save the configuration data. The directory will be created if it does not exist yet.

4. Deploy the Terraform

Once you have successfully generated a configuration directory via our command line utility you are then ready to deploy the terraform to AWS.

Navigate to the configuration directory you created and run the following commands:

terraform init

This will instruct terraform to prepare the resources it needs to deploy.

Run the following command to start the deployment of resources to AWS:

terraform apply

This will list the modifications that terraform will make to your AWS account. If that looks good, type 'yes' to continue the deployment.

Apply complete! Resources: 144 added, 0 changed, 0 destroyed.

Outputs:

dns_name = "Ingress endpoint not created. Please check Amazon Certificate Manager."
domain = "example.com"

It can take up to 30 minutes until the ingress is created. Run the following command to get an updated status:

terraform refresh

Configure kubectl

aws eks update-kubeconfig --name cobrowse-enterprise

When configured, test that it works by running:

kubectl get pod

5. Configure your DNS provider

Once the terraform managed resources have been deployed to AWS, you should have an output similar to this:

Apply complete! Resources: 144 added, 0 changed, 0 destroyed.

Outputs:

dns_name = "k8s-default-apiingre-38e727b290-XXXXXXXXXX.eu-west-1.elb.amazonaws.com"
domain = "example.com"

The last step is to configure the required DNS record with your DNS provider (e.g. Route 53). We will not do this automatically.

Create a CNAME to direct the domain to the dns_name value shown in the output from terraform apply.

6. Check your deployment

Your deployment should now be available. Open up a web browser to your Cobrowse domain and check the deployment!

Monitoring your Deployment

Here we've listed a few useful resources created by our Terraform. These can be used to check on the health of your deployment, or dig into any errors you might be experiencing:

Managing your deployment

Next, learn about managing and upgrading your deployment.

See the AWS documentation on if you are unsure about how to do this.

Note: During the first attempt of the following deployment an SSL certificate will be generated by . During deployment you will need to head to and approve the certificate request by required by AWS. This is an Amazon process that requires adding a DNS record to validate domain ownership. You should only need to complete this approval once for your Cobrowse domain.

If the output of terraform shows that the ingress endpoint was not created as in the example below, please verify the state of the generated certificate in . Make sure that the certificate is issued or proceed with the .

You should have an output as described in .

kubectl is a utility for managing the Kubernetes clusters. If you have not configured kubectl to talk to your new EKS cluster, you can do so using the :

View your cluster in . There should be several Kubernetes Deployments and StatefulSets running. Each should have at least one stably running pod.

for application level logging. Note: we recommend using a command line tool like to make viewing the aggregated log stream easier. Standard kubectl logs commands will also work to view application logging.

Our Kubernetes deployment also support Prometheus application metrics, however this is not configured automatically. See our docs on configuring the .

Terraform
NodeJS
minimum LTS version
AWS CLI
kubectl
AWS cli tools
MongoDB Atlas
range of certifications
run your own MongoDB cluster
how to create a bucket
Amazon Certificate Manager
ACM
performing the manual steps
ACM
validation
AWS CLI
Running your instance
EKS
CloudWatch Logs
awslogs
Prometheus integration for CloudWatch
Managing your deployment
Section 5