Import

LayerOps offers users the capability to define and deploy services using YML files.

You can either paste the YML configuration of your service directly or click on "import from CI". This allows you to initialize a service that's initially empty and ready to be populated later with actions via the API.

import YML

To access the complete schema for the YML file, click on the bullet point next to the title "YML configuration". Or you can call /api/v1/services/exampleImportYml to get the schema.

For example, You can create a service from the following YML:

name: my service
dockerConfiguration:
  image: nginx
  imageVersion: latest
countMin: 1
countMax: 1
ports:
  - listeningPort: 80
    healthCheckType: HTTP
    healthCheckMethod: GET
    loadBalancerRules:
      - publicPort: 443
    healthCheckEnabled: true
    healthCheckTimeoutSeconds: 30
    healthCheckPath: /
    healthCheckIntervalSeconds: 60

This definition will create a service with the Nginx image and expose port 80 on the internet.