Installation of Survey Solutions on Amazon AWS
The installation consists of the following steps:
- Create security group for web server and RDS to be able to communicate
- Create PostgreSQL instance
- Create EC2 instance for running Survey Solutions
- Install Survey Solutions
Create security group
In order to have connection between Survey Solutions and PostgreSQL you can create new security group as described in here.
From the AWS Management Console:
- Click on
EC2
under theCompute
heading - Scroll down the left-hand navigation to
Network & Security
- Click on
Security Groups
- Click on
Create security group
In the create security group specify name and description:
In the rules page add single required rule:
- Type: PostgreSQL
- Source: Start typing “Survey Solutions” and select just created security group
Create PostgreSQL RDS instance
Create an RDS PostgreSQL instance using this documentation, you don’t need to install a database client, but it can be used to test the database connection.
During creation process expand Additional connectivity configuration section and assign created “Survey Solutions” security group
Keep database port to be default one (5432)
After database is started copy endpoint address
Be sure to retain the following information for accessing the PostgreSQL:
- login
- password
- endpoint
These details will be needed in a later step to connect the RDS with the EC2 instance.
To find the endpoint:
- Navigate to
RDS
from the Amazon Management Console - Click on
DB Instances
underResources
in the main pane - Click on the RDS instance DB identifier of the desired RDS
- Click on the
Connectivity & security
tab - Copy the endpoint under
Endpoint & port
Create EC2 instance
- In the services list Compute section select EC2
- Find “Launch instance menu”
- In search bar type “Windows”
- Select Microsoft Windows Server 2019 Base
- In tier selection pick one that suites your needs. You can check for server requirements here.
- After instance is created right click on it, select Networking -> Change Security Groups and assign group Survey Solutions
- Launch selected instance
Survey Solutions installation
Connect to the EC2 instance
When your instance is running, connect to it with RDP using instructions.
Download Survey Solutions installer
Once connected, download the Survey Solutions installer. Before doing so, you may need to change the security settings of Internet Explorer (IE) on the EC2 instance to make download possible. To do so:
- Open IE
- Navigate to Settings>Internet>Security>Trusted Sites
- Add
https://mysurvey.solutions
as a trusted site - Reduce the security level for this zone to
Medium-low
- Click
Apply
andOK
To download the Survey Solutions installer:
- Navigate to installer download page in a browser outside of the RDP connection
- Right-click the
DOWNLOAD
button - Select
Copy link address
- Paste the link into the address bar of IE in the RDP connection in order to download the installation file on the EC2 instance
Install Survey Solutions
Once the installer is downloaded, perform these installation steps (skip PostgreSQL part). When asked for the database connection, enter the endpoint from RDS setup and database credentials.
Change port from 9700 to 80
Delete default web site from IIS web sites list and add :80 port binding to Survey Solutions web site:
- Right-click on
start menu
->run
- Execute
inetmgr
to start IIS manager - Look in the left-hand
Connections
panel - Expand the entry
- Expand
Sites
- Right-click on
Default Web Site
and selectremove
- Select Survey Solutions site
- In the right panel under
Edit Site
, click onBindings
- Select the existing site binding
- Change
Port
from 9700 to 80 - Leave host name empty for now
Expose 80 port to external users
- In the AWS console EC2 running instances find security group where only web server is included (for me it is “launch-wizard-1”):
- Navigate to Network & Security -> Security Groups in the left panel
- Find group of the web server and click on it
- Click Edit Inbound Rules
- Add Rule
- Type: HTTP
- Select:
0.0.0.0/0
as Source
- Save rules
In Survey Solutions installation location Site
folder find appsettings.production.ini
file, and remove :9700
from BaseUrl
.
When done correctly you should be able to access Survey Solutions application from your browser by using public DNS:
Copy value from your console to browser address bar:
DNS and SSL
Also we recommend enabling public DNS name for your survey solutions instance. Choose any DNS registrar you like, or maybe you already have domain name. When it is resolved to public IP address of Amazon EC2 instance change BaseURL
setting in appsettings.production.ini
file. If SSL is used, set BaseUrl
to https://%your dns name%
.
S3 Configuration
Survey Solutions can store multimedia data (images, audio audit, etc) in Amazon S3 storage to reduce load on database instance.
In order to enable S3 storage open S3 service console and create new bucket (you will need to pick name according to naming rules):
Now to enable Survey Solutions access to that bucket new IAM role will be required. In order to create it in services list find IAM, then go to Roles
->Create new role
:
Provide name, and attach appropriate policy:
In order to attach this role to EC2 instance open EC2 console, find the appropriate image and select Attach/Replace IAM role
:
Then select the created role:
In Survey Solutions installation location Site
folder find appsettings.production.ini
file.
- Change storage options. In configuration file replace
AppData
key value toAppData=s3://%Your bucket name%/survey-solutions
- Add section with region configuration (use same region as your S3 bucket)
Your configuration file should contain such configuration:
[FileStorage]
AppData=s3://%Your bucket name%/survey-solutions
TempData=..\Data_Site
[AWS]
Region=us-east-1 # replace with your region
Restart Windows image for changes to take effect.
Survey Solutions will create folder with configured tenant name where it will store the binary data for the interviews.