Skip to content

Latest commit

History

365 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Overview

Terraform deployment scripts for Beekeeper.

Includes support for deploying Beekeeper on ECS and Kubernetes. Also includes deployment scripts for a Lambda which notifies Slack when Beekeeper's dead letter queue receives a message (this module is not required to run Beekeeper).

Dependencies

A database password is defined in aws-secrets-manager. The terraform module will use that password for the database (see property k8s_db_password_secret ).

Providers

NameVersion
archiven/a
awsn/a
kubernetesn/a
randomn/a
templaten/a

Inputs

NameDescriptionTypeDefaultRequired
allowed_s3_bucketsList of S3 Buckets to which Beekeeper will have read-write access.list(string)[]no
apiary_metastore_listener_arnARN of the Apiary Metastore Listener.stringn/ayes
aws_regionAWS region to use for resources.stringn/ayes
beekeeper_tagsA map of tags to apply to resources.map(string)n/ayes
path_cleanup_docker_imageBeekeeper Path Cleanup docker image.string"expediagroup/beekeeper-path-cleanup"no
path_cleanup_docker_image_versionBeekeeper Path Cleanup docker image version.string"latest"no
path_cleanup_ecs_cpuThe amount of CPU used to allocate for the Beekeeper Path Cleanup ECS task.
Valid values: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html
number2048no
path_cleanup_ecs_memoryThe amount of memory (in MiB) used to allocate for the Beekeeper Path Cleanup container.
Valid values: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html
number4096no
metadata_cleanup_docker_imageBeekeeper Metadata Cleanup docker image.string"expediagroup/beekeeper-metadata-cleanup"no
metadata_cleanup_docker_image_versionBeekeeper Metadata Cleanup docker image version.string"latest"no
db_backup_retentionThe number of days to retain backups for the RDS Beekeeper DB.number10no
db_backup_windowPreferred backup window for the RDS Beekeeper DB in UTC.string"02:00-03:00"no
db_maintenance_windowPreferred maintenance window for the RDS Beekeeper DB in UTC.string"wed:03:00-wed:04:00"no
db_apply_immediatelySpecifies whether any database modifications are applied immediately, or during the next maintenance window.boolfalseno
db_performance_insights_enabledSpecifies whether Performance Insights are enabled.booltrueno
db_password_keyKey to acquire the database password for the strategy specified.stringn/ayes
db_usernameUsername for the master DB user.string"beekeeper"no
docker_registry_auth_secret_nameDocker Registry authentication SecretManager secret name.string""no
path_cleanup_dry_run_enabledEnable Path Cleanup to perform dry runs of deletions only.string"false"no
metadata_cleanup_dry_run_enabledEnable Metadata Cleanup to perform dry runs of deletions only.string"false"no
graphite_enabledEnable to produce Graphite metrics - true or false.string"false"no
graphite_hostGraphite metrics host.string"localhost"no
graphite_portGraphite port.number2003no
graphite_prefixPrefix for Graphite metrics.string""no
metastore_uriURI of the metastore where tables to be cleaned-up are located. Required for Beekeeper Metadata Cleanup.string""yes
instance_nameBeekeeper instance name to identify resources in multi-instance deployments.string""no
instance_typeService to run Beekeeper on. Supported services: ecs (default), k8s. Leaving this blank will still deploy auxiliary components (e.g. RDS, SQS etc.).string"ecs"no
k8s_app_nameName to give to all Kubernetes resources that are deployed.string"beekeeper"no
k8s_path_cleanup_cpuTotal cpu to allot to the Beekeeper Path Cleanup pod.string"500m"no
k8s_path_cleanup_ingress_hostIngress host name for Beekeeper Path Cleanup.string""no
k8s_path_cleanup_ingress_pathIngress path regex for Beekeeper Path Cleanup.string""no
k8s_path_cleanup_liveness_delayLiveness delay (in seconds) for the Beekeeper Path Cleanup service.number60no
k8s_path_cleanup_memoryTotal memory to allot to the Beekeeper Path Cleanup pod.string"2Gi"no
k8s_path_cleanup_portInternal port that the Beekeeper Path Cleanup service runs on.number8008no
k8s_metadata_cleanup_cpuTotal cpu to allot to the Beekeeper Metadata Cleanup pod.string"500m"no
k8s_metadata_cleanup_ingress_hostIngress host name for Beekeeper Metadata Cleanup.string""no
k8s_metadata_cleanup_ingress_pathIngress path regex for Beekeeper Metadata Cleanup.string""no
k8s_metadata_cleanup_liveness_delayLiveness delay (in seconds) for the Beekeeper Metadata Cleanup service.number60no
k8s_metadata_cleanup_memoryTotal memory to allot to the Beekeeper Metadata Cleanup pod.string"2Gi"no
k8s_metadata_cleanup_portInternal port that the Beekeeper Metadata Cleanup service runs on.number9008no
k8s_image_pull_policyPolicy for the Kubernetes orchestrator to pull images.string"Always"no
k8s_ingress_enabledBoolean flag to determine if we should create an ingress or not. (0 = off, 1 = on).number0no
k8s_ingress_tls_hostsList of hosts for TLS configuration of a Kubernetes ingress.list(string)[]no
k8s_ingress_tls_secretSecret name for TLS configuration of a Kubernetes ingress.string""no
k8s_kiam_role_arnKIAM role arn to use for creating a K8S IAM role with the correct assume role permissions.string""no
k8s_db_password_secretName of the Kubernetes secret that would store the db password for beekeeper.string"beekeeper-db-password"no
k8s_namespaceNamespace to deploy all Kubernetes resources to.string"beekeeper"no
k8s_node_affinityFull node_affinity object as per terraform/Kubernetes docs.object({}){}no
k8s_node_selectorFull node_selector object as per terraform/Kubernetes docs.object({}){}no
k8s_node_tolerationsFull k8s_node_tolerations object as per terraform/Kubernetes docs.object({}){}no
k8s_scheduler_apiary_cpuTotal cpu to allot to the Beekeeper Scheduler Apiary pod.string"500m"no
k8s_scheduler_apiary_ingress_hostIngress host name for Beekeeper Scheduler Apiary.string""no
k8s_scheduler_apiary_ingress_pathIngress path regex for Beekeeper Scheduler Apiary.string""no
k8s_scheduler_apiary_liveness_delayLiveness delay (in seconds) for the Beekeeper Scheduling service.number60no
k8s_scheduler_apiary_memoryTotal memory to allot to the Beekeeper Scheduler Apiary pod.string"2Gi"no
k8s_scheduler_apiary_portInternal port that the Beekeeper Scheduler Apiary service runs on.number8080no
message_retention_secondsSQS message retention (s).number604800no
scheduler_apiary_docker_imageBeekeeper Scheduler Apiary image.string"expediagroup/beekeeper-scheduler-apiary"no
scheduler_apiary_docker_image_versionBeekeeper Scheduler Apiary image version.string"latest"no
scheduler_apiary_ecs_cpuThe amount of CPU used to allocate for the Beekeeper Scheduler Apiary ECS task.
Valid values: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html
number2048no
scheduler_apiary_ecs_memoryThe amount of memory (in MiB) used to allocate for the Beekeeper Scheduler Apiary container.
Valid values: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html
number4096no
k8s_api_memoryTotal memory to allot to the Beekeeper API podstring"1Gi"no
k8s_api_cpuTotal cpu to allot to the Beekeeper API podstring"500m"no
k8s_beekeeper_api_portInternal port that the Beekeeper API service runs onnumber7008yes
k8s_api_liveness_delayLiveness delay (in seconds) for the Beekeeper API servicenumber60no
k8s_api_ingress_hostIngress host name for Beekeeper APIstring""no
k8s_api_ingress_pathIngress path regex for Beekeeper APIstring""no
api_docker_imageBeekeeper API imagestring"expediagroup/beekeeper-api"yes
api_docker_image_versionBeekeeper API docker image versionstring"latest"no
prometheus_enabledEnable to pull metrics using Prometheus - true or false.string"false"no
queue_nameBeekeeper SQS Queue name.string"apiary-beekeeper"no
queue_stale_messages_timeoutBeekeeper SQS Queue Cloudwatch Alert timeout for messages older than this number of seconds.number1209600no
rds_allocated_storageRDS allocated storage in GBs.string10no
rds_engine_versionRDS engine version.string"8.0"no
rds_instance_classRDS instance class.string"db.t2.micro"no
rds_max_allocated_storageRDS max allocated storage (autoscaling) in GBs.string100no
rds_parameter_group_nameRDS parameter group.string"default.mysql8.0"no
rds_storage_typeRDS storage type.string"gp3"no
rds_subnetsSubnets in which to provision Beekeeper RDS DB.list(string)n/ayes
receive_wait_time_secondsSQS receive wait time (s).number20no
scheduler_apiary_delay_msDelay between each cleanup job that is scheduled in milliseconds.number300000no
slack_channelSlack channel to which alerts about messages landing on the dead letter queue should be sent.string""no
slack_lambda_enabledBoolean flag to determine if Beekeeper should create a Slack notifying Lambda for the dead letter queue. (0 = off, 1 = on).number0no
slack_webhook_urlSlack URL to which alerts about messages landing on the dead letter queue should be sent.string""no
subnetsSubnets in which to install Beekeeper.list(string)n/ayes
vpc_idVPC in which to install Beekeeper.stringn/ayes

Outputs

No output.

Legal

This project is available under the Apache 2.0 License.

Copyright 2019 Expedia, Inc.

About

Terraform deployment scripts for Beekeeper

Topics

Resources

Code of conduct

Contributing

Stars

4 stars

Watchers

6 watching

Forks

Releases

Used by

Contributors

Languages