missing files.
This commit is contained in:
20
config/prod-background-worker.edn
Normal file
20
config/prod-background-worker.edn
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{:db {:server "database"}
|
||||||
|
:datomic-url "datomic:ddb://us-east-1/integreat/integreat-prod"
|
||||||
|
:scheme "https"
|
||||||
|
:jwt-secret "auto ap invoices are awesome"
|
||||||
|
:invoice-import-queue-url "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-prod"
|
||||||
|
:invoice-email "invoices@mail.app.integreatconsult.com"
|
||||||
|
:data-bucket "data.prod.app.integreatconsult.com"
|
||||||
|
:yodlee-cobrand-name "qstartus12"
|
||||||
|
:yodlee-cobrand-login "qstartus12"
|
||||||
|
:yodlee-cobrand-password "MPD@mg78hd"
|
||||||
|
:yodlee-user-login "integreat"
|
||||||
|
:yodlee-user-password "Import3transactions!"
|
||||||
|
:yodlee-base-url "https://quickstart2.api.yodlee.com/ysl"
|
||||||
|
:yodlee-app "10003600"
|
||||||
|
:yodlee-fastlink "https://quickstartus2node.yodleeinteractive.com/authenticate/qstartus12/?channelAppName=quickstartus2"
|
||||||
|
:yodlee-proxy-host "172.31.10.83"
|
||||||
|
:yodlee-proxy-port 8888
|
||||||
|
:run-background? true
|
||||||
|
:run-web? false
|
||||||
|
}
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
(mount/stop))
|
(mount/stop))
|
||||||
|
|
||||||
(defn -main [& args]
|
(defn -main [& args]
|
||||||
(let [without (cond-> #{}
|
(let [without (cond-> []
|
||||||
(not (env :run-web? )) (into [#'jetty])
|
(not (env :run-web? )) (into [#'jetty])
|
||||||
(not (env :run-background?)) (into [#'square/square-loader
|
(not (env :run-background?)) (into [#'square/square-loader
|
||||||
#'square/square-settlement-loader
|
#'square/square-settlement-loader
|
||||||
@@ -37,7 +37,8 @@
|
|||||||
#'ledger/ledger-reconciliation-worker
|
#'ledger/ledger-reconciliation-worker
|
||||||
#'yodlee/import-transaction-worker
|
#'yodlee/import-transaction-worker
|
||||||
#'migrate/migrate-start]))]
|
#'migrate/migrate-start]))]
|
||||||
|
(log/info "starting without " without)
|
||||||
|
|
||||||
(add-shutdown-hook! shutdown-mount)
|
(add-shutdown-hook! shutdown-mount)
|
||||||
(start-server :port 9000 :bind "0.0.0.0" #_#_:handler (cider-nrepl-handler))
|
(start-server :port 9000 :bind "0.0.0.0" #_#_:handler (cider-nrepl-handler))
|
||||||
(mount/start-without without)))
|
(apply mount/start-without without)))
|
||||||
|
|||||||
30
terraform/prod-background-worker-taskdef.json
Normal file
30
terraform/prod-background-worker-taskdef.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "integreat-background-worker",
|
||||||
|
"image": "679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat",
|
||||||
|
"portMappings": [
|
||||||
|
{
|
||||||
|
"containerPort": 9000,
|
||||||
|
"hostPort": 9000,
|
||||||
|
"protocol": "tcp"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"essential": true,
|
||||||
|
"environment": [
|
||||||
|
{
|
||||||
|
"name": "config",
|
||||||
|
"value": "/usr/local/config/prod-background-worker.edn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"mountPoints": [],
|
||||||
|
"volumesFrom": [],
|
||||||
|
"logConfiguration": {
|
||||||
|
"logDriver": "awslogs",
|
||||||
|
"options": {
|
||||||
|
"awslogs-group": "/ecs/integreat-app-prod",
|
||||||
|
"awslogs-region": "us-east-1",
|
||||||
|
"awslogs-stream-prefix": "ecs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": 4,
|
"version": 4,
|
||||||
"terraform_version": "0.13.3",
|
"terraform_version": "0.13.3",
|
||||||
"serial": 75,
|
"serial": 78,
|
||||||
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
||||||
"outputs": {
|
"outputs": {
|
||||||
"aws_access_key_id": {
|
"aws_access_key_id": {
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"attributes": {
|
"attributes": {
|
||||||
"account_id": "679918342773",
|
"account_id": "679918342773",
|
||||||
"arn": "arn:aws:iam::679918342773:user/bryce",
|
"arn": "arn:aws:iam::679918342773:user/bryce",
|
||||||
"id": "2020-12-09 05:22:32.641901 +0000 UTC",
|
"id": "2020-12-09 05:46:51.764295 +0000 UTC",
|
||||||
"user_id": "AIDAJPUJFTOKO4IRADMV4"
|
"user_id": "AIDAJPUJFTOKO4IRADMV4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
],
|
],
|
||||||
"deployment_maximum_percent": 200,
|
"deployment_maximum_percent": 200,
|
||||||
"deployment_minimum_healthy_percent": 100,
|
"deployment_minimum_healthy_percent": 100,
|
||||||
"desired_count": 1,
|
"desired_count": 2,
|
||||||
"enable_ecs_managed_tags": false,
|
"enable_ecs_managed_tags": false,
|
||||||
"force_new_deployment": null,
|
"force_new_deployment": null,
|
||||||
"health_check_grace_period_seconds": 600,
|
"health_check_grace_period_seconds": 600,
|
||||||
@@ -154,6 +154,74 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"mode": "managed",
|
||||||
|
"type": "aws_ecs_service",
|
||||||
|
"name": "integreat_background_worker",
|
||||||
|
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
||||||
|
"instances": [
|
||||||
|
{
|
||||||
|
"schema_version": 0,
|
||||||
|
"attributes": {
|
||||||
|
"capacity_provider_strategy": [],
|
||||||
|
"cluster": "arn:aws:ecs:us-east-1:679918342773:cluster/default",
|
||||||
|
"deployment_controller": [
|
||||||
|
{
|
||||||
|
"type": "ECS"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"deployment_maximum_percent": 200,
|
||||||
|
"deployment_minimum_healthy_percent": 100,
|
||||||
|
"desired_count": 1,
|
||||||
|
"enable_ecs_managed_tags": false,
|
||||||
|
"force_new_deployment": null,
|
||||||
|
"health_check_grace_period_seconds": 0,
|
||||||
|
"iam_role": "aws-service-role",
|
||||||
|
"id": "arn:aws:ecs:us-east-1:679918342773:service/default/integreat_background_worker_prod",
|
||||||
|
"launch_type": "FARGATE",
|
||||||
|
"load_balancer": [],
|
||||||
|
"name": "integreat_background_worker_prod",
|
||||||
|
"network_configuration": [
|
||||||
|
{
|
||||||
|
"assign_public_ip": true,
|
||||||
|
"security_groups": [
|
||||||
|
"sg-004e5855310c453a3",
|
||||||
|
"sg-02d167406b1082698"
|
||||||
|
],
|
||||||
|
"subnets": [
|
||||||
|
"subnet-5e675761",
|
||||||
|
"subnet-8519fde2",
|
||||||
|
"subnet-89bab8d4"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ordered_placement_strategy": [],
|
||||||
|
"placement_constraints": [],
|
||||||
|
"platform_version": "LATEST",
|
||||||
|
"propagate_tags": "NONE",
|
||||||
|
"scheduling_strategy": "REPLICA",
|
||||||
|
"service_registries": [
|
||||||
|
{
|
||||||
|
"container_name": "",
|
||||||
|
"container_port": 0,
|
||||||
|
"port": 0,
|
||||||
|
"registry_arn": "arn:aws:servicediscovery:us-east-1:679918342773:service/srv-m232jsqnpvd5e2xb"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": null,
|
||||||
|
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_prod:1",
|
||||||
|
"timeouts": {
|
||||||
|
"delete": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxMjAwMDAwMDAwMDAwfX0=",
|
||||||
|
"dependencies": [
|
||||||
|
"aws_ecs_task_definition.integreat_background_worker",
|
||||||
|
"aws_service_discovery_service.service"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"mode": "managed",
|
"mode": "managed",
|
||||||
"type": "aws_ecs_task_definition",
|
"type": "aws_ecs_task_definition",
|
||||||
@@ -214,7 +282,7 @@
|
|||||||
"FARGATE"
|
"FARGATE"
|
||||||
],
|
],
|
||||||
"revision": 1,
|
"revision": 1,
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": 4,
|
"version": 4,
|
||||||
"terraform_version": "0.13.3",
|
"terraform_version": "0.13.3",
|
||||||
"serial": 72,
|
"serial": 75,
|
||||||
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
||||||
"outputs": {
|
"outputs": {
|
||||||
"aws_access_key_id": {
|
"aws_access_key_id": {
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"attributes": {
|
"attributes": {
|
||||||
"account_id": "679918342773",
|
"account_id": "679918342773",
|
||||||
"arn": "arn:aws:iam::679918342773:user/bryce",
|
"arn": "arn:aws:iam::679918342773:user/bryce",
|
||||||
"id": "2020-09-26 05:35:11.176798 +0000 UTC",
|
"id": "2020-12-09 05:22:32.641901 +0000 UTC",
|
||||||
"user_id": "AIDAJPUJFTOKO4IRADMV4"
|
"user_id": "AIDAJPUJFTOKO4IRADMV4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -180,6 +180,40 @@
|
|||||||
"FARGATE"
|
"FARGATE"
|
||||||
],
|
],
|
||||||
"revision": 4,
|
"revision": 4,
|
||||||
|
"tags": {},
|
||||||
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
|
"volume": []
|
||||||
|
},
|
||||||
|
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ=="
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mode": "managed",
|
||||||
|
"type": "aws_ecs_task_definition",
|
||||||
|
"name": "integreat_background_worker",
|
||||||
|
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
||||||
|
"instances": [
|
||||||
|
{
|
||||||
|
"schema_version": 1,
|
||||||
|
"attributes": {
|
||||||
|
"arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_prod:1",
|
||||||
|
"container_definitions": "[{\"cpu\":0,\"environment\":[{\"name\":\"config\",\"value\":\"/usr/local/config/prod-background-worker.edn\"}],\"essential\":true,\"image\":\"679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat\",\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/ecs/integreat-app-prod\",\"awslogs-region\":\"us-east-1\",\"awslogs-stream-prefix\":\"ecs\"}},\"mountPoints\":[],\"name\":\"integreat-background-worker\",\"portMappings\":[{\"containerPort\":9000,\"hostPort\":9000,\"protocol\":\"tcp\"}],\"volumesFrom\":[]}]",
|
||||||
|
"cpu": "1024",
|
||||||
|
"execution_role_arn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole",
|
||||||
|
"family": "integreat_background-worker_prod",
|
||||||
|
"id": "integreat_background-worker_prod",
|
||||||
|
"inference_accelerator": [],
|
||||||
|
"ipc_mode": "",
|
||||||
|
"memory": "2048",
|
||||||
|
"network_mode": "awsvpc",
|
||||||
|
"pid_mode": "",
|
||||||
|
"placement_constraints": [],
|
||||||
|
"proxy_configuration": [],
|
||||||
|
"requires_compatibilities": [
|
||||||
|
"FARGATE"
|
||||||
|
],
|
||||||
|
"revision": 1,
|
||||||
"tags": null,
|
"tags": null,
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
@@ -509,8 +543,8 @@
|
|||||||
"path": "/api/health-check",
|
"path": "/api/health-check",
|
||||||
"port": "traffic-port",
|
"port": "traffic-port",
|
||||||
"protocol": "HTTP",
|
"protocol": "HTTP",
|
||||||
"timeout": 5,
|
"timeout": 14,
|
||||||
"unhealthy_threshold": 2
|
"unhealthy_threshold": 5
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"id": "arn:aws:elasticloadbalancing:us-east-1:679918342773:targetgroup/integreat-app-prod/d5b51736182d8407",
|
"id": "arn:aws:elasticloadbalancing:us-east-1:679918342773:targetgroup/integreat-app-prod/d5b51736182d8407",
|
||||||
|
|||||||
Reference in New Issue
Block a user