From f0357bfeb46c6379d89e193f2fa5c1c2f947e2a0 Mon Sep 17 00:00:00 2001 From: kevin crawley Date: Fri, 8 Jun 2018 09:24:52 -0500 Subject: [PATCH] reduced cpu requirements; added deploy script --- DCOS/deploy.sh | 4 ++++ DCOS/destroy.sh | 13 +++++++++++++ DCOS/{ => manifest}/cart.json | 6 +++--- DCOS/{ => manifest}/catalogue.json | 6 +++--- DCOS/{ => manifest}/dispatch.json | 6 +++--- DCOS/{ => manifest}/mongodb.json | 6 +++--- DCOS/{ => manifest}/mysql.json | 6 +++--- DCOS/{ => manifest}/payment.json | 6 +++--- DCOS/{ => manifest}/rabbitmq.json | 6 +++--- DCOS/{ => manifest}/redis.json | 6 +++--- DCOS/{ => manifest}/shipping.json | 4 ++-- DCOS/{ => manifest}/user.json | 6 +++--- DCOS/{ => manifest}/web.json | 6 +++--- 13 files changed, 49 insertions(+), 32 deletions(-) create mode 100644 DCOS/deploy.sh create mode 100644 DCOS/destroy.sh rename DCOS/{ => manifest}/cart.json (93%) rename DCOS/{ => manifest}/catalogue.json (93%) rename DCOS/{ => manifest}/dispatch.json (92%) rename DCOS/{ => manifest}/mongodb.json (92%) rename DCOS/{ => manifest}/mysql.json (92%) rename DCOS/{ => manifest}/payment.json (93%) rename DCOS/{ => manifest}/rabbitmq.json (93%) rename DCOS/{ => manifest}/redis.json (92%) rename DCOS/{ => manifest}/shipping.json (95%) rename DCOS/{ => manifest}/user.json (93%) rename DCOS/{ => manifest}/web.json (94%) diff --git a/DCOS/deploy.sh b/DCOS/deploy.sh new file mode 100644 index 0000000..c3d6c0b --- /dev/null +++ b/DCOS/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cd manifest && \ + for i in *.json; do dcos marathon app add $i; done \ No newline at end of file diff --git a/DCOS/destroy.sh b/DCOS/destroy.sh new file mode 100644 index 0000000..dc195f5 --- /dev/null +++ b/DCOS/destroy.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +dcos marathon app remove robotshop/cart +dcos marathon app remove robotshop/catalogue +dcos marathon app remove robotshop/dispatch +dcos marathon app remove robotshop/mongodb +dcos marathon app remove robotshop/mysql +dcos marathon app remove robotshop/payment +dcos marathon app remove robotshop/rabbitmq +dcos marathon app remove robotshop/redis +dcos marathon app remove robotshop/shipping +dcos marathon app remove robotshop/user +dcos marathon app remove robotshop/web diff --git a/DCOS/cart.json b/DCOS/manifest/cart.json similarity index 93% rename from DCOS/cart.json rename to DCOS/manifest/cart.json index 28b8e4e..ff8c62b 100644 --- a/DCOS/cart.json +++ b/DCOS/manifest/cart.json @@ -1,7 +1,7 @@ { "id": "/robotshop/cart", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [ { @@ -21,14 +21,14 @@ "parameters": [] } }, - "cpus": 0.5, + "cpus": 0.2, "disk": 0, "env": { "REDIS_HOST": "robotshopredis.marathon.l4lb.thisdcos.directory", "CATALOGUE_HOST": "robotshopcatalogue.marathon.l4lb.thisdcos.directory" }, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 128, "gpus": 0, "networks": [ diff --git a/DCOS/catalogue.json b/DCOS/manifest/catalogue.json similarity index 93% rename from DCOS/catalogue.json rename to DCOS/manifest/catalogue.json index 717b949..51f9d55 100644 --- a/DCOS/catalogue.json +++ b/DCOS/manifest/catalogue.json @@ -1,7 +1,7 @@ { "id": "/robotshop/catalogue", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [ { @@ -21,13 +21,13 @@ "parameters": [] } }, - "cpus": 0.5, + "cpus": 0.2, "disk": 0, "env": { "MONGO_URL": "mongodb://robotshopmongodb.marathon.l4lb.thisdcos.directory:27017/catalogue" }, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 256, "gpus": 0, "networks": [ diff --git a/DCOS/dispatch.json b/DCOS/manifest/dispatch.json similarity index 92% rename from DCOS/dispatch.json rename to DCOS/manifest/dispatch.json index a06b63d..b041540 100644 --- a/DCOS/dispatch.json +++ b/DCOS/manifest/dispatch.json @@ -1,7 +1,7 @@ { "id": "/robotshop/dispatch", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [], "type": "DOCKER", @@ -13,13 +13,13 @@ "parameters": [] } }, - "cpus": 0.5, + "cpus": 0.2, "disk": 0, "env": { "AMQP_HOST": "robotshoprabbitmq.marathon.l4lb.thisdcos.directory" }, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 128, "gpus": 0, "networks": [ diff --git a/DCOS/mongodb.json b/DCOS/manifest/mongodb.json similarity index 92% rename from DCOS/mongodb.json rename to DCOS/manifest/mongodb.json index 0e3ae7e..b7d47e5 100644 --- a/DCOS/mongodb.json +++ b/DCOS/manifest/mongodb.json @@ -1,7 +1,7 @@ { "id": "/robotshop/mongodb", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [ { @@ -21,10 +21,10 @@ "parameters": [] } }, - "cpus": 0.5, + "cpus": 0.2, "disk": 0, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 256, "gpus": 0, "networks": [ diff --git a/DCOS/mysql.json b/DCOS/manifest/mysql.json similarity index 92% rename from DCOS/mysql.json rename to DCOS/manifest/mysql.json index a3a947e..4e41b29 100644 --- a/DCOS/mysql.json +++ b/DCOS/manifest/mysql.json @@ -1,7 +1,7 @@ { "id": "/robotshop/mysql", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [ { @@ -21,10 +21,10 @@ "parameters": [] } }, - "cpus": 0.5, + "cpus": 0.2, "disk": 0, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 512, "gpus": 0, "networks": [ diff --git a/DCOS/payment.json b/DCOS/manifest/payment.json similarity index 93% rename from DCOS/payment.json rename to DCOS/manifest/payment.json index 55986da..7cff885 100644 --- a/DCOS/payment.json +++ b/DCOS/manifest/payment.json @@ -1,7 +1,7 @@ { "id": "/robotshop/payment", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [ { @@ -21,13 +21,13 @@ "parameters": [] } }, - "cpus": 0.5, + "cpus": 0.2, "disk": 0, "env": { "AMQP_HOST": "robotshoprabbitmq.marathon.l4lb.thisdcos.directory" }, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 128, "gpus": 0, "networks": [ diff --git a/DCOS/rabbitmq.json b/DCOS/manifest/rabbitmq.json similarity index 93% rename from DCOS/rabbitmq.json rename to DCOS/manifest/rabbitmq.json index 17163e1..0ce4e3d 100644 --- a/DCOS/rabbitmq.json +++ b/DCOS/manifest/rabbitmq.json @@ -1,7 +1,7 @@ { "id": "/robotshop/rabbitmq", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [ { @@ -28,10 +28,10 @@ "parameters": [] } }, - "cpus": 0.5, + "cpus": 0.2, "disk": 0, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 256, "gpus": 0, "networks": [ diff --git a/DCOS/redis.json b/DCOS/manifest/redis.json similarity index 92% rename from DCOS/redis.json rename to DCOS/manifest/redis.json index 04df872..2a2c186 100644 --- a/DCOS/redis.json +++ b/DCOS/manifest/redis.json @@ -1,7 +1,7 @@ { "id": "/robotshop/redis", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [ { @@ -21,10 +21,10 @@ "parameters": [] } }, - "cpus": 0.5, + "cpus": 0.2, "disk": 0, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 128, "gpus": 0, "networks": [ diff --git a/DCOS/shipping.json b/DCOS/manifest/shipping.json similarity index 95% rename from DCOS/shipping.json rename to DCOS/manifest/shipping.json index b87c1b2..8b2a681 100644 --- a/DCOS/shipping.json +++ b/DCOS/manifest/shipping.json @@ -1,7 +1,7 @@ { "id": "/robotshop/shipping", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [ { @@ -28,7 +28,7 @@ "CART_ENDPOINT": "robotshopcart.marathon.l4lb.thisdcos.directory:8080" }, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 512, "gpus": 0, "networks": [ diff --git a/DCOS/user.json b/DCOS/manifest/user.json similarity index 93% rename from DCOS/user.json rename to DCOS/manifest/user.json index bbbf8d0..006e988 100644 --- a/DCOS/user.json +++ b/DCOS/manifest/user.json @@ -1,7 +1,7 @@ { "id": "/robotshop/user", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [ { @@ -21,14 +21,14 @@ "parameters": [] } }, - "cpus": 0.5, + "cpus": 0.2, "disk": 0, "env": { "REDIS_HOST": "robotshopredis.marathon.l4lb.thisdcos.directory", "MONGO_URL": "mongodb://robotshopmongodb.marathon.l4lb.thisdcos.directory:27017/users" }, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 128, "gpus": 0, "networks": [ diff --git a/DCOS/web.json b/DCOS/manifest/web.json similarity index 94% rename from DCOS/web.json rename to DCOS/manifest/web.json index 1672087..38b07ab 100644 --- a/DCOS/web.json +++ b/DCOS/manifest/web.json @@ -1,7 +1,7 @@ { "id": "/robotshop/web", "backoffFactor": 1.15, - "backoffSeconds": 1, + "backoffSeconds": 30, "container": { "portMappings": [ { @@ -21,7 +21,7 @@ "parameters": [] } }, - "cpus": 0.5, + "cpus": 0.1, "disk": 0, "env": { "PAYMENT_HOST": "robotshoppayment.marathon.l4lb.thisdcos.directory", @@ -31,7 +31,7 @@ "SHIPPING_HOST": "robotshopshipping.marathon.l4lb.thisdcos.directory" }, "instances": 1, - "maxLaunchDelaySeconds": 3600, + "maxLaunchDelaySeconds": 900, "mem": 128, "gpus": 0, "networks": [