This is the documentation for how to use our Terraform for AWS to set up Cobrowse Enterprise in your cloud.
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:
You can choose between MongoDB and AWS DocumentDB as your data storage for Cobrowse Enterprise.
We do not provide MongoDB as part of the Terraform environment. We recommend using a hosted service such as MongoDB Atlas. They have a range of certifications required by many enterprises with compliance requirements. Alternatively, you can run your own MongoDB cluster 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.
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.
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.
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.
Note: During the first attempt of the following deployment an SSL certificate will be generated by Amazon Certificate Manager. During deployment you will need to head to ACM and perform the manual steps required to approve the certificate request; this is an Amazon process that requires adding a DNS record to validate domain ownership. If the deployment fails here you can safely re-run
terraform applyonce the certificate request has been approved. You should only need to complete this approval once for your Cobrowse domain.
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.
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.
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
dns_namevalue shown in the output from
Your deployment should now be available. Open up a web browser to your Cobrowse domain and check the 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:
Next, learn about managing and upgrading your deployment.