Customize Deployment
A Qrvey instance uses five CloudFormation templates to create pipelines: Widgets, DataRouter, Worker, Microservices, and Admin. Each template has input parameters that configure the instance. To update an instance, change these parameters to update all related resources. Most changes require external setup, like email verification or CNAME record updates, followed by parameter updates in Qrvey. This document explains how to update a single pipeline's parameters and provides steps for specific changes.
Update a Single Pipeline
These steps will show you how to update the parameters for a single pipeline. In this example, we’ll be updating the QrveyCodePipeline but the same steps can be replicated for any of the other pipelines.
Step 1: Identify CloudFormation Stack
- Log into your AWS Account and select the region where your Qrvey instance is located.
- Navigate to the CloudFormation console.
- Identify the cloudFormation stack for the Pipeline you want to update. You can search for “CodePipeline” and you should see the 5 stacks as shown in this screenshot.
Step 2: Update CloudFormation Template Parameters
- From the CloudFormation screen, pick the CloudFormation stack matching the pipeline you want to update and click on the Update button.
- On the Prerequisites screen, pick “Use Current Template”. Click Next.
- On the parameters screen, find the option you would like to change and enter in the new value. Leave the rest of the parameters as they are. You can find the specific parameter for your use-case in later sections of this document. In this example we are updating the “From” email address by changing the parameter called “VerifiedEmail” (highlighted with yellow). Click Next after changing the value.
- Click on Next on the Configure Stack options screen.
- On the next screen (Review), review the changes you have made, select the Capabilities checkbox (if shown) and click on Update Stack to apply the changes.
- At this point, the CloudFormation stack will move to “UPDATE_IN_PROGRESS” state.
- Wait for the CloudFormation stack to finish updating. Once it’s done the status would change to “UPDATE_COMPLETE”.
Step 3: Trigger CodePipeline to Deploy Changes
- Once the CloudFormation stack has finished with the update, navigate to the AWS CodePipeline console.
- Identify the matching pipeline for the CloudFormation stack you updated in the last step. For the “QrveyCodePipeline” stack, the pipeline will be called “Qrvey_xxxxx_Worker”.
- Select the Pipeline and click on the Release Change button.
- This will change the Pipeline status to “In Progress” and once the Pipeline is done the status will change to “Succeeded”.
At this point, the changes are deployed and you can start using the Platform.
Change “From” Email Address
Qrvey platform uses AWS SES to send out all emails. These emails come from Automation or Page flows and also transactional emails like the “forgot password” feature.
To change the email address that is used under the “From” section you’ll need to add and verify the email address in AWS SES and then update the Qrvey deployment to use it. Here are the steps:
- Log into your AWS Account and navigate to the AWS SES console.
- Under the “Email Addresses” section click on Verify a New email address. Type in the new email address and click Verify. This will send an email to the specified address from AWS.
- Open your email client and click on the verification link under that email
- Go back to AWS SES to confirm that the “Verification status” for that email address has changed to “Verified”.
- Update the following CloudFormation Stacks and CodePipelines by following the steps mentioned here.
- a. Qrvey Worker
- CloudFormation Stack:
xxxxxQrveyCodePipeline
. Parameters:-
VerifiedEmail
- Enter the new email address
-
- CodePipeline:
Qrvey_xxxxx_Worker
- CloudFormation Stack:
- b. Microservices
- CloudFormation Stack:
xxxxxMicroservicesCodePipeline
. Parameters:-
VerifiedEmail
- Enter the new email address
-
- CodePipeline:
Qrvey_xxxxx_Microservices
- CloudFormation Stack:
- a. Qrvey Worker
- Once all Pipelines have finished updating you will start receiving emails using the specified “From” email address.
Change Composer URL
You can change the Composer URL to match your own domain. You would need access to DNS settings for that domain (Route 53 or similar) to be able to create a new CNAME record and SSL Certificate.
Step 1: Create New Public Certificate
- Identify two URLs associated with your Qrvey instance:
- The Composer URL — (e.g.,
https://qrveysample.yourdomain.com
) - The API Domain URL — (e.g.,
https://api-qrveysample.yourdomain.com
)
- The Composer URL — (e.g.,
- Log into your AWS account and navigate to the AWS Certificate Manager console.
- Create a new certificate matching the URL/domain you would like to use. You can create a specific certificate for the exact URL or a wildcard (*.yourdomain.com). You can also import or use an existing certificate if you already have one. Here’s the AWS documentation on creating certificates. We recommend using DNS validation.
- Once the certificate is verified (status changes to “Issued”), copy the ARN to be used in later steps.
Note: If your Qrvey Installation is in a region other than
us-east-1
then you will need to repeat steps 2-4 forus-east-1
.
Note: Starting on version 8.4 the Widget URL is the same as the Composer URL.
Step 2: Update MainTemplate
- Navigate to AWS Cloudformation console.
- Find the stack called
Qrvey-----MainTemplate
. - Navigate into Update > Use Existing Template > Update and replace parameters that use the old URLs (composer or API) to use the new ones:
WidgetsBucketPath
WidgetsBucketlauncherPath
sslCertificateNameDesired
- Apply the changes and wait for the update to finish.
Step 3: Update CloudFormation Stacks
Update the following CloudFormation Stacks and CodePipelines by following the steps from Update a Single Pipeline. Update any parameters with the old URL to the new URLs.
- Data Router
- CloudFormation Stack:
xxxxxDataRouterCodePipeline
.- Parameters:
APIDomainURL
- Set it to the API URL.QrveyURL
- Set it to the Composer URL.certificateARN
- SSL Certificate ARN from the local region.
- Parameters:
- CloudFormation Stack:
- Widgets
- CloudFormation Stack:
xxxxxWidgetsCodePipeline
.- Parameters:
APIDomainURL
- Set it to the API URL.ARNSSLCertificate
- Set it to the SSL Certificate ARN from the us-east-1 (N.Virginia) region.ComposerUrl
- Set it to the Composer URL.CustomDNS
- Set it to the Composer URL.
- Parameters:
- CloudFormation Stack:
- Qrvey Worker
- CloudFormation Stack:
xxxxxQrveyCodePipeline
.- Parameters:
sslCertificateNameDesired
- Set it to the Composer URL.APIDomainURL
- Set it to the API URL.
- Parameters:
- CloudFormation Stack:
- Microservices
- CloudFormation Stack:
xxxxxMicroserviceCodePipeline
.- Parameters:
APIDomainSSLCertARN
- Set it to the SSL Certificate in the local region that matches the API URL.APIDomainURL
- Set it to the API URL.AdminAppDomainURL
- Replace the part with the Composer URL and leave the rest as is.AdminServerURL
- Replace the part with the Composer URL and leave the rest as is.CertificateARN
- SSL Certificate ARN from the local region.QrveyURL
- Set it to the Composer URL.WidgetsBucketPath
- Set it to the Composer URL.WidgetsBucketlauncherPath
- Replace the part with the Composer URL and leave the rest as is.sslCertificateNameDesired
- Set it to the Composer URL.
- Parameters:
- CloudFormation Stack:
- Admin Center
- CloudFormation Stack:
xxxxxAdminAppCodePipeline
.- Parameters:
APIDomainURL
- Set it to the API URL.AdminAppDomainURL
- Replace the part with the Composer URL and leave the rest as is.AdmindrURL
- Replace the part with the Composer URL and leave the rest as is.certificateARN
- SSL Certificate ARN from the local region.widgetBucketURL
- Set it to the Composer URL.
- Parameters:
- CloudFormation Stack:
Step 4: Trigger CodePipelines
Run the Qrvey CodePipelines to apply template changes by following the steps from Trigger CodePipelines to deploy changes.
Qrvey_xxxxx_DataRouter
Qrvey_xxxxx_Widgets
Qrvey_xxxxx_Worker
Qrvey_xxxxx_Microservice
Qrvey_xxxxx_Admin
Step 5: Add New CNAME Values to DNS.
Find values for the CNAME records of the new domain and add them to your DNS.
- Navigate to AWS CloudFormation console.
- Find the stack called
Qrvey-----WidgetsCodePipeline
and select Outputs Tab. - Copy the value of the
CloudfrontDomainName
. Example:https://xxxxxxxxxxx.cloudfront.net
.
This will be the value for the Composer URL CNAME record. - Navigate to AWS API Gateway console and click on “Custom domain names”.
- Select the domain matching your new API Domain URL, for example:
api-qrveysample.yourdomain.com
. - Copy the value of the API Gateway domain name, for example:
x-xxxxxxx.execute-api.us-east-1.amazonaws.com
.
This will be the value for the API Domain URL CNAME record. - Login or navigate to your DNS provider (Route 53 or similar) and add or update the CNAME records for Composer URL and API URL with the values from the last steps, for example:
- Composer URL:
- CNAME record:
qrveysample.yourdomain.com
- CNAME value:
https://xxxxxxxxxxx.cloudfront.net
- CNAME record:
- API URL:
- CNAME record:
api-qrveysample.yourdomain.com
- CNAME value:
x-xxxxxxx.execute-api.us-east-1.amazonaws.com
- CNAME record:
- Composer URL:
Step 6: Update Bucket Path
Update Bucket Path values with new URLs.
- Navigate to AWS CloudFormation console.
- Find updated in previous steps
xxxxxMicroserviceCodePipeline
stack. - Copy the values of WidgetsBucketPath and
WidgetsBucketlauncherPath
. - Navigate to AWS Systems Manager console.
- Click on Parameter Store.
- Find
/qrvey/xxxxxx/WidgetsBucketPath
. - Update the value with the new value from the
xxxxxMicroserviceCodePipeline
stack. Example:https://qrveysample.yourdomain.com
- Find:
/qrvey/xxxxxx/WidgetsBucketlauncherPath
. - Update the value with the new value from the
xxxxxMicroserviceCodePipeline
stack. Example:https://qrveysample.yourdomain.com/widgets-launcher/app.js
Step 7: Run the Lambda Function
- Navigate to AWS Lambda console.
- Find the function called
-----_CreateEnvFile_LambdaFunction
and click the function name to open the details. - Select the Test tab:
- Enter any string in Event name.
- Add this JSON to the body:
{ "RequestType": "UpdateEnvFile" }
- Click Test.
- Select the Test tab:
- Enter any string in Event name.
- Add this JSON to the body:
{ "RequestType": "UpdateVariables" }
- Click Test.
- Wait for the functions to finish and then you can start using the new URL.
Step 8: Start Using New URL
Once all the pipelines have finished successfully, you can launch Composer using the new URL.