Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. # Abstract
  2. { mkService, serviceArtifact, privateIfc, lbSource, authService, dataService, logService, logPath, secretsPath }:
  3. mkService {
  4. name = "service-name";
  5. version = "0.1.2";
  6. artifacts = [ serviceArtifact ];
  7. listens = [ { type = "tcp"; port = 9999; interface = privateIfc; } ];
  8. accepts = [ lbSource ]; # traffic sources to accept traffic from.
  9. talks = [ authService dataService logService ]; # this allows auto configuration given the service definitions of those in the specific environment.
  10. writes = [ logPath ];
  11. reads = [ secretsPath ];
  12. }
  13.  
  14. # Needs to built with a "target" definition for runnable output, e.g. AWS-ASG, AWS-AMI, VirutalBox-VM, or whatever.
  15. # Also needs list of constraints such as "stripe across available availability zones in region R0", or "multi-region where primary in R0 and forwarded secondary system in R1"
  16. # So we have a signature like: Service -> Constraints -> Target -> RunnableInfrastructure
  17. # The above will be codified into dependent types to ensure basic sanity (at least) prevails in your running infrastructure.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement