CiscoCloud / shipped-feedback

Feedback and issue tracking for the Cisco Shipped project.
1 stars 3 forks source link

Need ability to reference service deployment names in configuration #41

Open hpreston opened 8 years ago

hpreston commented 8 years ago

Use case.. I'm building a multi-service application/project where each service needs to find others based on configurations within Environment Variables with containers, or some other method for just code work. I need a way to refer to the API service when configuring/building the UI service that will be consistent across environments and build.

Example I have a data service, that is called "hpreston-myhero-data" in Shipped.

screen shot 2016-07-14 at 2 38 11 pm

In building an API service, I need to identify the URL for the data service as an environment variable. I'd like to use something like "{{hpreston-myhero-data.url}}" that can be filled in at deployment time.

screen shot 2016-07-14 at 2 38 56 pm

Right now, I'd need to know exactly what the URL will be and specify in the Compose Phase, which seems to be impossible...

In addition to URL, it would be great to expose other characteristics in the format that can be used in other services in the project.

Ideas and Examples:

Or basically anything we can learn from the under the hood systems.

mikeihbe commented 8 years ago

So you can follow along:

We're handling this in 2 phases: https://github.com/CiscoCloud/shipped/issues/1449 https://github.com/CiscoCloud/shipped/issues/1960

On Thu, Jul 14, 2016 at 2:44 PM, Hank Preston notifications@github.com wrote:

Use case.. I'm building a multi-service application/project where each service needs to find others based on configurations within Environment Variables with containers, or some other method for just code work. I need a way to refer to the API service when configuring/building the UI service that will be consistent across environments and build.

Example I have a data service, that is called "hpreston-myhero-data" in Shipped.

[image: screen shot 2016-07-14 at 2 38 11 pm] https://cloud.githubusercontent.com/assets/10178776/16856863/583406b0-49d1-11e6-9072-bb347686b6ab.png

In building an API service, I need to identify the URL for the data service as an environment variable. I'd like to use something like "{{hpreston-myhero-data.url}}" that can be filled in at deployment time.

[image: screen shot 2016-07-14 at 2 38 56 pm] https://cloud.githubusercontent.com/assets/10178776/16856859/5474f35e-49d1-11e6-8f7f-cc38ff66f888.png

Right now, I'd need to know exactly what the URL will be and specify in the Compose Phase, which seems to be impossible...

In addition to URL, it would be great to expose other characteristics in the format that can be used in other services in the project.

Ideas and Examples:

  • .url
  • .port
  • .status
  • .taskname

Or basically anything we can learn from the under the hood systems.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CiscoCloud/shipped-feedback/issues/41, or mute the thread https://github.com/notifications/unsubscribe/ALmOr1keexx7aMYjFK0hxljUHA4brNMZks5qVq3BgaJpZM4JM4ZR .

Mike Ihbe MustWin - Principal

mike@mustwin.com mikejihbe@gmail.com skype: mikeihbe Cell: 651.283.0815

npateriya commented 8 years ago

@hpreston shipped auto setup environment varaible HOST_SERVICENAME of all peer service in project. I made myhero app working on shipped sometime back, please refer https://github.com/npateriya/myhero-app2/blob/master/app.py#L207 for example api referring myherodata.

npateriya commented 8 years ago

@hpreston shipped auto setup environment varaible HOST_SERVICENAME of all peer service in project. I made myhero app working on shipped sometime back, please refer https://github.com/npateriya/myhero-app2/blob/master/app.py#L207 for example api referring myherodata. More dynamic variable key value assignment will be handled later as mike mentioned but this solution enables no hardcoding of endpoint.

hpreston commented 8 years ago

@mikeihbe those links give me 404 errors? Is that Private Repo I can get access to?

hpreston commented 8 years ago

@npateriya I recalled you'd gotten MyHero up in Shipped before, but didn't know where the example code was. Thanks for the pointer, I'll be able to use that method as a stopgap until more options become available.