Some test text!
This guide will show you how to build a highly reliable auto scaling server backend that will automatically work with your WebViewer based application to display documents. This server backend is offered through the Amazon Web Services Marketplace and makes use of CloudFormation to build the backend infrastructure.
Prior to starting this guide, you should already have an Amazon Web Services account that is able to use these features: EC2, VPC, Lambda, CloudWatch, CloudFormation, IAM, RDS, ACM and the Elastic Container Service.
Subscribe. Follow the directions from here until you are guided to a launch page. Launching will send you to CloudFormation, this is what will build your infrastructure. Follow the prompts and select next.
Stack Name- All resources will be prefixed with the stack name. Required.
EC2Key- The private key the infrastructure resources will use. Required.
AvailabilityZone (1 & 2)- The zones your resources are run in, must be two seperate zones. Required.
Path- The path of your resources in AWS, should be ‘/’ unless there are special considerations. Required.
PDFNetKey- Your PDFNet license. The server will continue to run in demo mode until a PDFNet key is provided.
SSLServerCertificateARN- required to run the server with HTTPS, to setup a SSL Certificate on AWS we suggest using the Certificate Manager: https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html
Annotation Cluster Configurationis for usage with our anonymous annotation feature (beta). If you do not wish to use this feature, set
DatabasePasswordmust be at least 8 characters.
EnableDebugModeset to true can be dangerous. Do not set this to true in a production environment. If any required options are missing - the stack will fail to be built and return with the cause of the issue. Click next to proceed.
I acknowledge that AWS CloudFormation might create IAM Resources. Click
Create. In approximately 15 minutes your stack will be created and ready to go.
Outputsin the dropdown menu on CloudFormation. This will show links to the resources created.
Now that your server has built you have a complete WebViewer backend for viewing documents. To direct your applications at this server you need to find the DNS name of the main load balancer. The load balancer will be prefixed with your stack name. It can be also found by:
Outputssection of your stack in CloudFormation.
Any certificates or domains you are using for the WebViewer Server should be tied to this DNS name. From here, you can use this DNS name in your WebViewer initializer as directed by the WebViewer Server guide.
A demo of the WebViewer Server’s capabilities can also be found at:
All logs for the pdftron server will be placed under a single log group in CloudWatch. This log group can be found in the Outputs of your stack under PDFTronCloudWatchGroup. The log group name will be prefixed with your stack name.
Contained within the group will be 3 types of log, one for each container. The logs within the group represent each ECS cluster and are as follows:
WebViewer Server does not come with built in alarms to notify users on server state changes. These can be user added. Below are some key metrics that could be used for your alarms and notifications:
While using SSH on this server, you will be able to access any private IP address used by your WebViewer Server stack using your EC2Key and SSH.
This section covers more in detail how the Marketplace Server functions. Below is an overview diagram of our architecture.
When you subscribe to the WebViewer Server on the Marketplace, you gain access to 2 items:
On first build of the WebViewer Server, the AMI will build and upload two container images to your Elastic Container Repository (ECR). These images will be titled ‘pdftron-balancer’ and ‘pdftron-webviewerserver’. The CloudFormation template is what controls this build process for the server and the surrounding infrastructure.
When using the CloudFormation template the build infrastructure is as follows:
The Elastic Container Service is the backbone of the system. Its container service manages 3 containers:
The Elastic Container Service, in tandem with Auto Scaling Groups - controls the autoscaling of the system. A series of Lambda functions manages performance measures, alarms and network mapping for these containers. This ensures high availability for the server.
At the front of everything sits a AWS Classic Load Balancer. The internal network is private and heavily restricted to ensure security. As a result, the AWS Classic Load Balancer is the only public facing part of the system and gives access to the main functionality required for application development with WebViewer.
The annotation server is a beta option offered that can easily be turned off and on by setting AnnotationsEnabled on Stack creation. It currently allows for anonymous browser session based document sharing and real time annotating. Enabling this will add a relational database for managing user annotations and another server cluster for managing annotation servers.