Skip to content

deployment_file

Davide Conzon edited this page Apr 14, 2020 · 11 revisions

Example of deployment file to be used to deploy a Simulation Manager, through the SOO

{
  "deployments": [ # the list of deployments
    {
      "metadata": {
        "name": "storage-manager",  # the name of the deployment
        "namespace": "default",
        "generation": 1,
        "labels": { # list of labels to be assigned
          "k8s-app": "storage-manager"
        }
      },
      "spec": {
        "replicas": 1,  # number of times the containers need to be deployed
        "selector": {
          "matchLabels": {
            "k8s-app": "storage-manager"
          }
        }
      },
      "template": {
        "metadata": {
          "name": "storage-manager",
          "labels": {
            "k8s-app": "storage-manager"
          }
        },
        "spec": {
          "containers": [ # list of containers to be deployed
            {
              "name": "storage-manager", # name of the container
              "image": "cpswarm/storage-simulation:latest",   # image to be deployed
              "stdin": "true",
   	      "env": [ 
                {
                  "name": "DISPLAY",
                  "value": "localhost:99"
                }
              ],
              "resources": { # resources to be used for the container
                "limits": { # max resources to be used for the container
                   "cpu": 7,
                   "memory": "14Gi"
                },
                "requests": { # minimum number of resources needed to run the container
                    "cpu": 6,
                    "memory": "12Gi"
                }
              },
              "imagePullPolicy": "IfNotPresent"
            },
            {
              "name": "xvfb",
              "image": "metal3d/xvfb",
              "resources": {
                "limits": {
                   "memory": "0.8Gi"
                },
                "requests": {
                   "memory": "600Mi"
                }
              },
              "imagePullPolicy": "IfNotPresent"
            }
          ],
          "nodeSelector": { # label that need to be present to allow a node of the cluster to host the container
            "component": "pert"
          }
        }
      }
    }
  ]
}

Getting Started

Clone this wiki locally