Template (v20180702)

This page is still a work in progress.

The following is the proposed version of Ocean Template. By default, all keys are optional unless stated otherwise.

---
version: 20180702 # required

# Required. Name should be unique across your account. Should be alphanumeric.
name: string

description: string

---
credentials:
# Required. The name of the credential to use. This credential should already
# be registered to your Mobingi account. Name is unique at account level.
- name: string

  # See vendor codes for valid values.
  provider: string

---
# The list of applications to be deployed.
applications:
# Required. The name of the application to deploy. Should be unique at
# deployment level.
- name: string

  # This should correspond to the credential used in creating the stack
  # this application will be installed to. 
  credential: string

  # Number of initial container instances to run.
  replicas: number

  # Application autoscaling minimum and maximum.
  min: number
  max: number

  # Containers to run in this application.
  containers:
  - name: string
    image: string
    args:
    - string
    envVars:
    - key: string
      value: string
    # If ports is empty, default value is a random valid port from 49152 to 65535.
    ports:
    - number

  service:
    # Valid values: LoadBalancer
    # If not provided, defaults to NodePort type.
    type: string

    # If not provided, defaults to port 80.
    port: number

    # If not provided, defaults to the first port number provided in the
    # first container.
    targetPort: number

  # So far, all key-values above are Mobingi-defined defaults for an application.
  # Set this to true if you want to skip deploying the application above.
  skip: bool

  # Use this key if you want to deploy raw Kubernetes apps to
  # your stack. All k8s resources are supported here.
  k8sExtra: |
    {Insert Kubernetes application deployments here}

  # The list of stacks where you want to deploy this application.
  # The following names should correspond to a cluster under the
  # `stacks` key.
  stacks:
  - string

---
# The list of stacks where you want to deploy your applications.
stacks:
#  Required. Stack name should be unique per account per provider.
- name: string

  # Valid values (for now:
  #   k8s
  type: string

  # This should correspond to a credential name you provided
  # somewhere in this template.
  credential: string

  # Region values depends on what cloud this stack belongs.
  region: string

  # Whether or not keypair is created for nodes.
  keyPair: bool

  master:
    # Optional. When you need zones in master, you can use this key.
    zones:
    - string

    # Optional: if setting the number of nodes for master is required,
    # use this key.
    nodeCount: number

  # Definitions of worker node groups for this cluster.
  workerGroups:
  # Cloud provider specific instance type, i.e. t2.medium
  - type: string

    # Optional. When you need zones in your worker nodes, you can use this key.
    zones:
    - string

    # Node autoscaling minimum and maximum values.
    min: number
    max: number

    # If true, this node group will use the cloud provider's low-cost
    # instances, i.e. Spot (AWS), Preemptive (GCP), Low priority (Azure), etc.
    lowCost: bool

  # So far, all key-values above are Mobingi-defined defaults for a k8s cluster.
  # Set this to true if you want to skip provisioning the cluster defined above.
  skip: bool

  # This key is provided if you want to provision any AWS resources using
  # CloudFormation.
  cfnExtra: |
    {Insert CloudFormation template here}

  # This key is provided if you want to provision any GCP resources using
  # Deployment Manager.
  dmExtra:
  - {filename}: |
      {Insert GCP Deployment Manager template here}

  # This key is provided if you want to provision any Azure resources using
  # Azure Resource Manager.
  armExtra: |
    {Insert Azure Resource Manager template here}

  # This key is provided if you want to provision any Alibaba resources using
  # Resource Orchestration Service.
  aliExtra: |
    {Insert Alibaba ROS template here}

Last updated