Import
LayerOps offers users the capability to define and deploy services using YAML files.
To import a service, click on the "Import service" button on the service list page. A modal window will open where you can paste the YAML configuration. This allows you to create new services or update existing ones (by providing the "id" of the service to update).
To access the complete schema for the YAML file, click on "Show YAML structure".
You can import one or multiple services at once. For example, you can create a service from the following YAML:
services:
- name: my service
dockerConfiguration:
image: nginx
imageVersion: latest
countMin: 1
countMax: 1
ports:
- listeningPort: 80
loadBalancerRules:
- publicPort: 443
This definition will create a service with the Nginx image and expose port 80 on the internet.
To update an existing service, you need to include the service ID in your YAML configuration:
services:
- id: myservice
# ... rest of the configuration