Skip to content

Commit

Permalink
reduced cpu requirements; added deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
kvncrw committed Jun 8, 2018
1 parent 012a828 commit f0357bf
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 32 deletions.
4 changes: 4 additions & 0 deletions DCOS/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

cd manifest && \
for i in *.json; do dcos marathon app add $i; done
13 changes: 13 additions & 0 deletions DCOS/destroy.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions DCOS/cart.json → DCOS/manifest/cart.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/cart",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [
{
Expand All @@ -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": [
Expand Down
6 changes: 3 additions & 3 deletions DCOS/catalogue.json → DCOS/manifest/catalogue.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/catalogue",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [
{
Expand All @@ -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": [
Expand Down
6 changes: 3 additions & 3 deletions DCOS/dispatch.json → DCOS/manifest/dispatch.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/dispatch",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [],
"type": "DOCKER",
Expand All @@ -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": [
Expand Down
6 changes: 3 additions & 3 deletions DCOS/mongodb.json → DCOS/manifest/mongodb.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/mongodb",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [
{
Expand All @@ -21,10 +21,10 @@
"parameters": []
}
},
"cpus": 0.5,
"cpus": 0.2,
"disk": 0,
"instances": 1,
"maxLaunchDelaySeconds": 3600,
"maxLaunchDelaySeconds": 900,
"mem": 256,
"gpus": 0,
"networks": [
Expand Down
6 changes: 3 additions & 3 deletions DCOS/mysql.json → DCOS/manifest/mysql.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/mysql",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [
{
Expand All @@ -21,10 +21,10 @@
"parameters": []
}
},
"cpus": 0.5,
"cpus": 0.2,
"disk": 0,
"instances": 1,
"maxLaunchDelaySeconds": 3600,
"maxLaunchDelaySeconds": 900,
"mem": 512,
"gpus": 0,
"networks": [
Expand Down
6 changes: 3 additions & 3 deletions DCOS/payment.json → DCOS/manifest/payment.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/payment",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [
{
Expand All @@ -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": [
Expand Down
6 changes: 3 additions & 3 deletions DCOS/rabbitmq.json → DCOS/manifest/rabbitmq.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/rabbitmq",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [
{
Expand All @@ -28,10 +28,10 @@
"parameters": []
}
},
"cpus": 0.5,
"cpus": 0.2,
"disk": 0,
"instances": 1,
"maxLaunchDelaySeconds": 3600,
"maxLaunchDelaySeconds": 900,
"mem": 256,
"gpus": 0,
"networks": [
Expand Down
6 changes: 3 additions & 3 deletions DCOS/redis.json → DCOS/manifest/redis.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/redis",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [
{
Expand All @@ -21,10 +21,10 @@
"parameters": []
}
},
"cpus": 0.5,
"cpus": 0.2,
"disk": 0,
"instances": 1,
"maxLaunchDelaySeconds": 3600,
"maxLaunchDelaySeconds": 900,
"mem": 128,
"gpus": 0,
"networks": [
Expand Down
4 changes: 2 additions & 2 deletions DCOS/shipping.json → DCOS/manifest/shipping.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/shipping",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [
{
Expand All @@ -28,7 +28,7 @@
"CART_ENDPOINT": "robotshopcart.marathon.l4lb.thisdcos.directory:8080"
},
"instances": 1,
"maxLaunchDelaySeconds": 3600,
"maxLaunchDelaySeconds": 900,
"mem": 512,
"gpus": 0,
"networks": [
Expand Down
6 changes: 3 additions & 3 deletions DCOS/user.json → DCOS/manifest/user.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/user",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [
{
Expand All @@ -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": [
Expand Down
6 changes: 3 additions & 3 deletions DCOS/web.json → DCOS/manifest/web.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/robotshop/web",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"backoffSeconds": 30,
"container": {
"portMappings": [
{
Expand All @@ -21,7 +21,7 @@
"parameters": []
}
},
"cpus": 0.5,
"cpus": 0.1,
"disk": 0,
"env": {
"PAYMENT_HOST": "robotshoppayment.marathon.l4lb.thisdcos.directory",
Expand All @@ -31,7 +31,7 @@
"SHIPPING_HOST": "robotshopshipping.marathon.l4lb.thisdcos.directory"
},
"instances": 1,
"maxLaunchDelaySeconds": 3600,
"maxLaunchDelaySeconds": 900,
"mem": 128,
"gpus": 0,
"networks": [
Expand Down

0 comments on commit f0357bf

Please sign in to comment.