change on how we reference parameters, now using the service config

This commit is contained in:
Ryan Cahill 2019-12-05 17:34:08 -05:00
parent d5b43850c6
commit fdc542bf71
11 changed files with 120 additions and 79 deletions

View file

@ -1,11 +1,7 @@
{
"name": "architect/adservice",
"dependencies": {},
"parameters": {
"PORT": {
"description": "port to run the server"
}
},
"parameters": {},
"datastores": {},
"api": {
"type": "grpc",

View file

@ -2,14 +2,23 @@
"name": "architect/cartservice",
"dependencies": {},
"parameters": {
"REDIS_ADDR": {
"description": "location of redis cache"
},
"PORT": {
"description": "port to run the service on"
},
"LISTEN_ADDR": {
"description": "listen address of the server"
"description": "listen address of the server",
"default": {
"valueFrom": {
"dependency": "architect/cartservice:latest",
"value": "$HOST"
}
}
},
"REDIS_ADDR": {
"description": "location of redis cache",
"default": {
"valueFrom": {
"datastore": "primary",
"value": "$HOST:$PORT"
}
}
}
},
"datastores": {

View file

@ -9,26 +9,59 @@
"architect/cartservice": "latest"
},
"parameters": {
"PORT": {
"description": "port to run the server on"
},
"PRODUCT_CATALOG_SERVICE_ADDR": {
"description": "host and port of the product catalog service"
"description": "host and port of the product catalog service",
"default": {
"valueFrom": {
"dependency": "architect/productcatalogservice:latest",
"value": "$HOST:$PORT"
}
}
},
"SHIPPING_SERVICE_ADDR": {
"description": "host and port of the shipping service"
"description": "host and port of the shipping service",
"default": {
"valueFrom": {
"dependency": "architect/shippingservice:latest",
"value": "$HOST:$PORT"
}
}
},
"PAYMENT_SERVICE_ADDR": {
"description": "host and port of the payment service"
"description": "host and port of the payment service",
"default": {
"valueFrom": {
"dependency": "architect/paymentservice:latest",
"value": "$HOST:$PORT"
}
}
},
"EMAIL_SERVICE_ADDR": {
"description": "host and port of the email service"
"description": "host and port of the email service",
"default": {
"valueFrom": {
"dependency": "architect/emailservice:latest",
"value": "$HOST:$PORT"
}
}
},
"CURRENCY_SERVICE_ADDR": {
"description": "host and port of the currency service"
"description": "host and port of the currency service",
"default": {
"valueFrom": {
"dependency": "architect/currencyservice:latest",
"value": "$HOST:$PORT"
}
}
},
"CART_SERVICE_ADDR": {
"descrption": "host and port of the cart service"
"descrption": "host and port of the cart service",
"default": {
"valueFrom": {
"dependency": "architect/cartservice:latest",
"value": "$HOST:$PORT"
}
}
}
},
"datastores": {},

View file

@ -1,11 +1,7 @@
{
"name": "architect/currencyservice",
"dependencies": {},
"parameters": {
"PORT": {
"description": "port to run the service on"
}
},
"parameters": {},
"datastores": {},
"api": {
"type": "grpc",

View file

@ -1,11 +1,7 @@
{
"name": "architect/emailservice",
"dependencies": {},
"parameters": {
"PORT": {
"description": "port to run the service on"
}
},
"parameters": {},
"datastores": {},
"api": {
"type": "grpc",

View file

@ -3,9 +3,6 @@
"architect/adservice:latest": {
"debug": {
"path": "../adservice"
},
"parameters": {
"PORT": "$ARC_ARCHITECT_ADSERVICE_LATEST_PORT"
}
},
"architect/cartservice:latest": {
@ -14,7 +11,6 @@
},
"parameters": {
"LISTEN_ADDR": "$ARC_ARCHITECT_CARTSERVICE_LATEST_HOST",
"PORT": "$ARC_ARCHITECT_CARTSERVICE_LATEST_PORT",
"REDIS_ADDR": "$ARC_ARCHITECT_CARTSERVICE_PRIMARY_LATEST_HOST:$ARC_ARCHITECT_CARTSERVICE_PRIMARY_LATEST_PORT"
},
"datastores": {
@ -26,7 +22,6 @@
"path": "../checkoutservice"
},
"parameters": {
"PORT": "$ARC_ARCHITECT_CHECKOUTSERVICE_LATEST_PORT",
"PRODUCT_CATALOG_SERVICE_ADDR": "$ARC_ARCHITECT_PRODUCTCATALOGSERVICE_LATEST_HOST:$ARC_ARCHITECT_PRODUCTCATALOGSERVICE_LATEST_PORT",
"SHIPPING_SERVICE_ADDR": "$ARC_ARCHITECT_SHIPPINGSERVICE_LATEST_HOST:$ARC_ARCHITECT_SHIPPINGSERVICE_LATEST_PORT",
"PAYMENT_SERVICE_ADDR": "$ARC_ARCHITECT_PAYMENTSERVICE_LATEST_HOST:$ARC_ARCHITECT_PAYMENTSERVICE_LATEST_PORT",
@ -38,17 +33,11 @@
"architect/currencyservice:latest": {
"debug": {
"path": "../currencyservice"
},
"parameters": {
"PORT": "$ARC_ARCHITECT_CURRENCYSERVICE_LATEST_PORT"
}
},
"architect/emailservice:latest": {
"debug": {
"path": "../emailservice"
},
"parameters": {
"PORT": "$ARC_ARCHITECT_EMAILSERVICE_LATEST_PORT"
}
},
"architect/frontend:latest": {
@ -56,7 +45,6 @@
"path": "../frontend"
},
"parameters": {
"PORT": "$ARC_ARCHITECT_FRONTEND_LATEST_PORT",
"PRODUCT_CATALOG_SERVICE_ADDR": "$ARC_ARCHITECT_PRODUCTCATALOGSERVICE_LATEST_HOST:$ARC_ARCHITECT_PRODUCTCATALOGSERVICE_LATEST_PORT",
"CURRENCY_SERVICE_ADDR": "$ARC_ARCHITECT_CURRENCYSERVICE_LATEST_HOST:$ARC_ARCHITECT_CURRENCYSERVICE_LATEST_PORT",
"CART_SERVICE_ADDR": "$ARC_ARCHITECT_CARTSERVICE_LATEST_HOST:$ARC_ARCHITECT_CARTSERVICE_LATEST_PORT",
@ -69,17 +57,11 @@
"architect/paymentservice:latest": {
"debug": {
"path": "../paymentservice"
},
"parameters": {
"PORT": "$ARC_ARCHITECT_PAYMENTSERVICE_LATEST_PORT"
}
},
"architect/productcatalogservice:latest": {
"debug": {
"path": "../productcatalogservice"
},
"parameters": {
"PORT": "$ARC_ARCHITECT_PRODUCTCATALOGSERVICE_LATEST_PORT"
}
},
"architect/recommendationservice:latest": {
@ -87,7 +69,6 @@
"path": "../recommendationservice"
},
"parameters": {
"PORT": "$ARC_ARCHITECT_RECOMMENDATIONSERVICE_LATEST_PORT",
"PRODUCT_CATALOG_SERVICE_ADDR": "$ARC_ARCHITECT_PRODUCTCATALOGSERVICE_LATEST_HOST:$ARC_ARCHITECT_PRODUCTCATALOGSERVICE_LATEST_PORT",
"ENABLE_PROFILER": "0"
}
@ -95,9 +76,6 @@
"architect/shippingservice:latest": {
"debug": {
"path": "../shippingservice"
},
"parameters": {
"PORT": "$ARC_ARCHITECT_SHIPPINGSERVICE_LATEST_PORT"
}
}
}

View file

@ -11,25 +11,67 @@
},
"parameters": {
"PRODUCT_CATALOG_SERVICE_ADDR": {
"description": "host and port of product catalog service"
"description": "host and port of product catalog service",
"default": {
"valueFrom": {
"dependency": "architect/productcatalogservice:latest",
"value": "$HOST:$PORT"
}
}
},
"CURRENCY_SERVICE_ADDR": {
"description": "host and port of the currency service"
"description": "host and port of the currency service",
"default": {
"valueFrom": {
"dependency": "architect/currencyservice:latest",
"value": "$HOST:$PORT"
}
}
},
"CART_SERVICE_ADDR": {
"description": "host and port of the cart service"
"description": "host and port of the cart service",
"default": {
"valueFrom": {
"dependency": "architect/cartservice:latest",
"value": "$HOST:$PORT"
}
}
},
"RECOMMENDATION_SERVICE_ADDR": {
"desecription": "host and port of the recommendation service"
"description": "host and port of the recommendation service",
"default": {
"valueFrom": {
"dependency": "architect/recommendationservice:latest",
"value": "$HOST:$PORT"
}
}
},
"SHIPPING_SERVICE_ADDR": {
"description": "host and port of the shipping service"
"description": "host and port of the shipping service",
"default": {
"valueFrom": {
"dependency": "architect/shippingservice:latest",
"value": "$HOST:$PORT"
}
}
},
"CHECKOUT_SERVICE_ADDR": {
"description": "host and port of the checkout service"
"description": "host and port of the checkout service",
"default": {
"valueFrom": {
"dependency": "architect/checkoutservice:latest",
"value": "$HOST:$PORT"
}
}
},
"AD_SERVICE_ADDR": {
"description": "host and port of the ad service"
"description": "host and port of the ad service",
"default": {
"valueFrom": {
"dependency": "architect/adservice:latest",
"value": "$HOST:$PORT"
}
}
}
},
"datastores": {},

View file

@ -1,11 +1,7 @@
{
"name": "architect/paymentservice",
"dependencies": {},
"parameters": {
"PORT": {
"description": "port to run the service on"
}
},
"parameters": {},
"datastores": {},
"api": {
"type": "grpc",

View file

@ -1,11 +1,7 @@
{
"name": "architect/productcatalogservice",
"dependencies": {},
"parameters": {
"PORT": {
"description": "port to run the service on"
}
},
"parameters": {},
"datastores": {},
"api": {
"type": "grpc",

View file

@ -4,11 +4,14 @@
"architect/productcatalogservice": "latest"
},
"parameters": {
"PORT": {
"description": "port to run the service on"
},
"PRODUCT_CATALOG_SERVICE_ADDR": {
"description": "host and port of the product catalog service"
"description": "host and port of the product catalog service",
"default": {
"valueFrom": {
"dependency": "architect/productcatalogservice:latest",
"value": "$HOST:$PORT"
}
}
},
"ENABLE_PROFILER": {
"description": "whether or not to enable the profiler"

View file

@ -1,11 +1,7 @@
{
"name": "architect/shippingservice",
"dependencies": {},
"parameters": {
"PORT": {
"description": "port to run the service on"
}
},
"parameters": {},
"datastores": {},
"api": {
"type": "grpc",