Service

Service specifies an executable entity. For service entities it is required a Dockerfile to be in the same directory as the Berliozfile. This enables automatic build and deployment of all docker images within the project.

mysvc/
    Berliozfile
    Dockerfile

Definition

kind: service
name: <service-name>
cluster: <cluster-name>

code:
    kind: docker
    image: <image-name>

provides:
    <provided-endpoint-name>:
        port: <port>
        protocol: http|https|tcp|udp
        load-balance: true|false

consumes:
    - service: <other-service-name>
      endpoint: <other-service-endpoint>
    - database: <other-database-name>
    - queue: <other-queue-name>
    - cluster: <other-cluster-name>
      endpoint: <other-cluster-endpoint>

resources:
    memory:
        min: <memory-in-megabytes>
Property Description
name Service name. Contain alpha-numeric characters. No symbols. Keep under 6 characters.
cluster Cluster name.

Code

Optional code attribute specifies the source of the service code.

Property Description
kind Optional. Currently only docker is supported.
image Optional. If specified particular image from DockerHub would be used. Otherwise docker image based on local Dockerfile would be used.

Provides

provides attribute specifies exposed endpoints.

Property Description
provided-endpoint-name Endpoint name. When set as default it can be referred to by service name only. Contain alpha-numeric characters. No symbols. Keep under 6 characters.
port IP port
protocol Supported values are http, https, tcp, and udp
load-balance Optional. Indicates if the endpoint should be behind a load balancer.

Consumes

consumes attribute defines which endpoints of other services are used by the current service. This definition would control how firewall security rules are defined, and also enable automatic service discovery entries. Possible consumables include:

Consumed Description
service Name of other service to consume. Service is in the same cluster. Optionally endpoint can be specified, otherwise default service endpoint will be used.
cluster Name of other cluster to consume. Optionally endpoint can be specified, otherwise default cluster endpoint will be used.
database Name of database to consume.
queue Name of queue to consume.

Resources

Consumed resources of the service are specified under resources attribute.