Infrastrcuture settings of HeartBeatLive application. It using terraform to deploy infrastracture and Google Cloud Platform as cloud provider.
- Terraform
gcloud
CLI
- Deploy backend application image.
You may use following steps:- Set up docker credentials using
$ gcloud auth configure-docker
. - Tag docker image using
$ docker tag image_name gcr.io/${project_id}/${image_name}:${tag}
. - Push container using
$ docker push gcr.io/${project_id}/${image_name}:${tag}
.
- Set up docker credentials using
- Authenticate Google Cloud provider.
See authentication solutions here. - Specify required environment variables.
- Deploy infrastructure using
$ terraform apply
command. - Additionaly you need to manualy enable Firebase Authentication and deploy Firebase Functions.
Name | Description |
---|---|
MONGODB_ATLAS_PUBLIC_KEY |
MongoDB Atlas public key to manage specified in variables atlas project. |
MONGODB_ATLAS_PRIVATE_KEY |
MongoDB Atlas private key to manage specified in variables atlas project. |
Name | Description |
---|---|
google_project_id |
Google Project ID to use. |
google_region |
Google Region, where we should deploy resources. Default: europe-west3 . |
config_url |
URL to configuration file. See configuration properties. |
config_access_token |
Access token to request a configuration file. GitHub example. |
backend_application_image |
Backend application image URL. For example: gcr.io/heartbeatlive/backend_server:v1 . |
Name | Description |
---|---|
backendApplication.scale.min |
Minimum instances limit of backend application. |
backendApplication.scale.max |
Maximum instances limit of backend application. |
backendApplication.configSecret.id |
GCP secret identifier of application configuration (should be in yaml format). |
backendApplication.configSecret.version |
GCP secret version of application configuration. Possible value: latest . |
backendApplication.vpcConnector.machineType |
Machine type of VPC connector. f1-micro , e2-micro , or e2-standard-4 . Docs |
backendApplication.vpcConnector.minInstances |
Minimum instances number of VPC connector. From 2 to 9. |
backendApplication.vpcConnector.maxInstances |
Minimum instances number of VPC connector. From 3 to 10. |
backendRedis.memorySizeGb |
Memory size of Backend Redis cluster. |
backendRedis.tier |
Tier of Backend Redis cluster. BASIC or STANDARD_HA . Docs |
backendAtlasMongodb.projectId |
MongoDB Atlas project identifier. |
backendAtlasMongodb.cluster.mode |
MongoDB cluster mode. DEDICATED or SERVERLESS . Use DEDICATED on production. You need to manualy provide access for backend application when using SERVERLESS cluster mode. |
backendAtlasMongodb.cluster.name |
MongoDB new cluster name to use. |
backendAtlasMongodb.cluster.type |
MongoDB cluster type. |
backendAtlasMongodb.cluster.cloudBackup |
Enable/disable MongoDB cluster backup. |
backendAtlasMongodb.cluster.instanceSizeName |
MongoDB cluster size name. Docs. |
backendAtlasMongodb.cluster.regionName |
MongoDB cluster region name. Choose from GCP regions. Docs. |
backendAtlasMongodb.cluster.autoscaling.enabled |
Enable/disable MongoDB cluster autoscaling. |
backendAtlasMongodb.cluster.autoscaling.scaleDownEnabled |
Enable/disable MongoDB cluster scaling down. |
backendAtlasMongodb.cluster.autoscaling.maxInstanceSize |
MongoDB cluster maximum instances size for autoscaling. Docs. |
backendAtlasMongodb.cluster.autoscaling.minInstanceSize |
MongoDB cluster minimum instances size for autoscaling. Docs. |
backendAtlasMongodb.cluster.disk.autoScalingEnabled |
Enable/disable MongoDB cluster disk autoscaling. |
backendAtlasMongodb.cluster.disk.sizeGb |
MongoDB cluster disk size. |
Name | Description |
---|---|
rest_api_url |
Base URL, on which REST API is availiable. |
backend_egress_ip_address |
IP Address from which backend application doing it's all IP requests. |