Azure Deployment
This page describes how to deploy a new Qrvey MultiPlatform Environment in Azure.
Requirements
- Registry User and Password: Provided by the Qrvey Support team.
OWNER
Access Permissions: Required for an Azure subscription or resource group to create a service principal and assign it a contributor role to the resource group being used.- Minimum CIDR: The VPC (or equivalent) used to deploy the Qrvey Platform must have a minimum CIDR of
/22
. - Docker: Required to run the auto-deploy script.
- Docker Image: The Docker Image for the desired version, found in the release notes.
- Azure Portal Subscription: Needed for billing and resource installation in Azure.
- Azure Resource Group: Groups all Qrvey resources.
- Azure Storage Account: Stores an Azure container.
- Azure Container: Stores Terraform state.
- SMTP Server: Used to send emails.
- DNS Hosted Zone (Optional): Generates valid SSL certificates for the Qrvey Composer domain. If no domain is set up, a default domain will be generated in the format:
$deployment_id.mp.qrveyapp.com
.
Installation
Create Service Principal
Run the following command in a terminal within your Azure account. Ensure the account has OWNER
access permissions.
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/20000000-0000-0000-0000-000000000000"
The output will contain your Service Principal details, similar to the following:
{
"appId": "00000000-0000-0000-0000-000000000000", # ARM_CLIENT_ID
"displayName": "azure-cli-2017-60-05-10-42-15",
"name": "http://azure-cli-2017-60-05-10-42-15",
"password": "0000-0000-0000-0000-000000000000", # ARM_CLIENT_SECRET
"tenant": "00000000-0000-0000-0000-000000000000" # ARM_TENANT_ID
}
Create Azure Resources
Using default configurations, create the following resources:
- Create a Resource Group in Azure.
- Within the Resource Group, create a Storage Account.
- Inside the Storage Account, create a Container.
Ensure these resources are created in the same datacenter region as your Qrvey application.
This is what your Resource Group should look like before installing Qrvey.
Prepare Installation Files
To install Qrvey in your Azure account, create the following file:
{
"account_config": {
"resource_group_name": "resourceGroupName",
"storage_account_name": "statestorageaccount",
"container_name": "statecontainer",
"key": "terraform.tfstate",
"ARM_CLIENT_ID": "$sp.appId",
"ARM_CLIENT_SECRET": "$sp.password",
"ARM_TENANT_ID": "$sp.tenant",
"ARM_SUBSCRIPTION_ID": "$subscription_id"
},
"variables": {
"dns_zone_name": "", // (Optional)
"registry_user": "registry username provided by qrvey",
"registry_key": "registry password provided by qrvey",
"qrvey_chart_version": "9.0.1",
"location": "eastus2", // Azure location for resources
"enable_location_services": true,
"enable_trino": true,
"managed_nat_gateway": false,
"es_config": { // ElasticSearch Config
"size": "large",
"count": 1
},
"customer_info": {
"firstname": "",
"lastname": "",
"email": "email@company.com",
"company": "Company Name"
},
"initial_admin_email": "admin@company.tld",
"globalization": {
"google_client_email": "",
"google_client_private_key": "",
"google_document_id": "",
"google_document_sheet_title": ""
}
}
}
Installation
Once these prerequisites are ready, install Qrvey.
- Navigate to the directory containing the configuration files.
- Log in to the Qrvey Registry:
docker login qrvey.azurecr.io --username $registry_user --password-stdin <<< $registry_key
- Run the installation command with the desired Terraform option (
plan
,apply
,output
, ordestroy
). For installation, useapply
. The installation process should take about 45 minutes to an hour.
docker run -v $(pwd)/config.json:/app/qrvey/config.json -it --rm qrvey.azurecr.io/qrvey-terraform:9.0.1 apply
After running the apply
command, wait until the process finishes and review the resources created. You should see something similar to the following image:
At the end of the installation, you will find the following output:
##########
### ####
### ### +++ +++ +++ +++++ +++ ++
## ### ++++ +++ +++ +++ +++ ++ +++
## ### ++ ++ +++ +++ ++++ ++ +++
## ### ++ ++ ++ ++++++++ +++ ++
### ### ++ ++++++ +++ ++++++
#### ##### ++ ++++ +++ +++ ++++
######## ++ ++ +++++++ +++
##### # ++
######## ++++
============================================================
Qrvey Environment Details
============================================================
Deployment ID: deployment-id
Environment URL: https://deployment-id.mp.qrveyapp.com
Admin Portal URL: https://deployment-id.mp.qrveyapp.com/admin/app/
Admin User: admin@company.tld
Admin Password: generated_admin_password
Qrvey API Key: qrvey_api_key
------------------------------------------------------------
PostgreSQL Connection: postgres://qrvey_usr:db_password@deployment-id-qrvey-db.postgres.database.azure.com:5432/postgres
------------------------------------------------------------
Elasticsearch Host: https://1.2.3.4:9200/
Elasticsearch User: elastic
Elasticsearch Password: elastic_password
------------------------------------------------------------
RabbitMQ Host: http://Qrvey:rabbit_password@rabbit_host:15672/#/
============================================================
- For the first login, use the admin username and password provided in the deployment output.