Application Manifest Reference

Application manifest describes how an application is provisioned on top of Magalix. Resources are created in the same order of the manifest and in accordance to their level. For example, top level artifacts, such as application, volumes, secrets, etc., are created before services and container structures. Once these are done, Magalix

Manifest File Structure and Examples

--- 
description: "The application consists of a web front-end, Redis master for storage, and replicated set of Redis slaves"
kpi_policies: 
  - 
    definition: 
      max_latency: 800ms
    name: basic-policy
labels: 
  - 
    label: environment
    value: dev
name: my-guestbook-with-policy-23
services: 
  - 
    containers: 
      - 
        commands: []
        description: "Master container of the redis cache "
        image_url: "redis:2.8.23"
        labels: 
          - 
            label: environment
            value: dev
          - 
            label: role
            value: master
        name: redis-master
        ports: 
          - 
            container_port: 6379
            name: port-master
    description: "This service hosts the redis master container"
    labels: 
      - 
        label: environment
        value: dev
      - 
        label: app
        value: redis
      - 
        label: role
        value: master
    name: redis-master
    ports: 
      - 
        is_public: false
        port: 6379
        target_port: port-master
    resources: 
      io: 10
      memory: 512
      replicas: 1
      vcpu: 1
  - 
    containers: 
      - 
        commands: []
        description: "slave container of the redus application "
        image_url: "kubernetes/redis-slave:v2"
        labels: 
          - 
            label: environment
            value: dev
          - 
            label: role
            value: slave
        name: redis-slave
        ports: 
          - 
            container_port: 6379
            name: port-slave
    description: "This service hosts the redis slave containers"
    labels: 
      - 
        label: environment
        value: dev
      - 
        label: app
        value: redis
      - 
        label: role
        value: slave
    name: redis-slave
    ports: 
      - 
        is_public: false
        port: 6379
        target_port: port-slave
    resources: 
      io: 10
      memory: 512
      replicas: 2
      vcpu: 1
  - 
    containers: 
      - 
        commands: []
        description: "guestbook application written in go"
        image_url: "gcr.io/google_containers/guestbook:v3"
        labels: 
          - 
            label: environment
            value: dev
          - 
            label: app
            value: guestbook
        name: guestbook
        ports: 
          - 
            container_port: 3000
            name: http-server
    description: "guestbook application"
    labels: 
      - 
        label: environment
        value: dev
      - 
        label: app
        value: guestbook
    name: guestbook
    ports: 
      - 
        is_public: true
        kpi_policy: basic-policy
        port: 8001
        target_port: http-server
    resources: 
      io: 10
      memory: 512
      replicas: 3
      vcpu: 1
target_cloud: 
  region: us-east-1
  type: aws
  zone: us-east-1a

The root object of a manifest file is the application. Application structure is the first to be created after the file is validated by Magalix gateway. Refer to the application configuration reference below to learn more about configuration options. A manifest file can define only one application.

One or more entities can be defined under an application. These are mainly services, volumes, secrets or configurations maps. There is virtually no limit on the number of entities you can have under one application. Services are created in the order specified in the manifest file. If you have some dependencies between your services, you should create base services at the beginning of your services definition section to make sure they are created first. The order guarantees creation order but does not guarantee service readiness order. A base service may not be in running state before your other services even though it was initiated before them.

Application Configuration Reference

Name

Application name is a friendly name that does not impact how it is accessed from outside or identified in Magalix. It cannot container special characters or start with a number.

  • Required: Yes
  • Min length: 3 characters
  • Max length: 256 characters

    Description

It is a free text input for a user friendly description. Including scripts or html tags will generate an error.

  • Required: No
  • Min length: 0 characters
  • Max length: 1024 characters.

Cloud Provider

This entry dictates where an application should be deployed. It should be within the supported providers. Read Supported Cloud Providers page for more details. It consists of:

  • Type, which represents one of the major cloud providers, such as AWS, GCP or Azure
  • Region, which is the region at which an application will be deployed to.
  • zone, which is the specific data center an application will run at.

KPI Policy

A KPI policy represents how application's health is defined. Details of a policy are used by Magalix AI models to optimize resources and performance of application. Read the Key Performance Indicators page for more details about how it is used to optimize and configure an application.

Sample Policy

kpi_policies:
-
name: basic-policy
definition:
max_latency: 800ms

NAME

A friendly policy name

Required: Yes
Min length: 3
Max length: 256
DEFNITION

KPI policy specifications section

MAX LATENCY

Maximum latency in milliseconds

Min value: 400 milliseconds
Max value: 100,000 milliseconds
Service Configuration Reference

An application can have one or more services defined in the manifest file. Services are created in the same order they are configured in the manifest file.

Name

Application name is a friendly name that does not impact how it is accessed from outside or identified in Magalix. It cannot container special characters or start with a number.

Required: Yes
Min length: 3 characters
Max length: 256 characters
Description

It is a free text input for a user friendly description. Including scripts or html tags will generate an error.

Required: No
Min length: 0 characters
Max length: 1024 characters.
Resources

Resources section provide initial hints on amount of cpu, memory, and I/O service containers should initially get from the underlying infrastructure. Each container gets identical resources. For example, if a service consists of two containers, and 1 vCPU, 512 MB memory, and 10 MBits of I/O rate allocated in services resource, the service will end up using 2 vCPUs, 1024 MB memory, and 20 MBits of I/O rate.

resources:
replicas: 2
vcpu: 1
memory: 512
io: 10

Replicas

Number of replicas each defined container gets.

Min: 1
Max: 20 (configurable)
Required: yes
vCPU

Number of vCPU units each container receives at a given second. Read vCPUs, memory, I/O, and ICUs page to learn more about vCPUs

Required: yes
Min: 1
Max: 10 vCPUs
Memory

Memory in Mega Bytes allocated to each container. Magalix currently offer memory in 512 MBs. Read vCPUs, memory, I/O, and ICUs page to learn more about allocated memory at the container level.

Required: yes
Min value: 512
Max value: 16384 (16 GBs)
IO

I/O in Mega bits per second per container. Magalix currently offers I/O in 10 Mbits/s increments. Read vCPUs, memory, I/O, and ICUs page to learn more about allocated memory at the container level.

Required: yes
Min value: 10
Max value 100
Ports

A service can expose zero or more ports. Any of these ports can be either accessible only from within the application, i.e. by other services, or publicly accessible from the Internet. A service port has to be mapped to a container port, otherwise, it will throw HTTP 502 (bad gateway) error.


ports:
-
port: 8001
target_port: http-server
is_public: true
kpi_policy: basic-policy

PORT

Port number that a service will expose to other services or to the Internet.

Required: yes
Min value: 1025
Max value: 20000
TARGET_PORT

Name of the target container port. It will be an error if port is not defined at any of the containers.

Required: yes
IS_PUBLIC

A flag to set the port public or not. If set to true, Magalix will place the service behind a load balancer and start collecting statistics. Making an endpoint publicly accessible also makes it eligible to be a KPI endpoint. A KPI endpoint means that Magalix AI can use it to set optimization goals and analysis.

required: no
Default value: false
KPI_POLICY

Name of the KPI policy defined at the application level.

Required: no
Containers

A service can have one or more containers. A container is the smallest building unit of an application. Most of its configurations are around how it will behave at runtime and where its image will be pulled from.

Name

Application name is a friendly name that does not impact how it is accessed from outside or identified in Magalix. It cannot container special characters or start with a number.

Required: Yes
Min length: 3 characters
Max length: 256 characters
Description

It is a free text input for a user-friendly description. Including scripts or HTML tags will generate an error.

Required: No
Min length: 0 characters
Max length: 1024 characters.
commands

Application Manifest Reference