Skip To Content
ArcGIS Developers
Dashboard

Edit Deployment

Description

This operation allows you to edit the scaling (replicas) and resource allocation (resources) for a specific microservice within your deployment.

Note:

This operation should not be used to update the scaling for a GIS service microservice replicas and resources (cpuMin, cpuMax, memoryMin, memoryMax) properties. These properties should be updated using the scaling operation.

Request parameters

ParameterDetails
deploymentJson

The microservice properties, represented as a JSON object.

Example

deploymentJson={
  "mode": "Primary",
  "configuredState": "STARTED",
  "provider": "Postgres",
  "deploymentId": "ke84ls9uva6t7fvck8q5p",
  "name": "relational-store-primary",
  "type": "RelationalStore",
  "spec": {
    "replicas": {
      "min": 1,
      "max": 1
    },
    "containers": [
      {
        "name": "filebeat",
        "resources": {
          "memoryMin": "32Mi",
          "memoryMax": "50Mi",
          "cpuMin": "0.05",
          "cpuMax": "0.25"
        },
        "containerImageUrl": "container.image.com/info:1082",
        "containerImageKey": "FILEBEAT"
      },
      {
        "name": "main-container",
        "resources": {
          "memoryMin": "2Gi",
          "memoryMax": "8Gi",
          "cpuMin": "0.5",
          "cpuMax": "4"
        },
        "containerImageUrl": "container.image.com/info:1082",
        "containerImageKey": "STORE_POSTGRES"
      }
    ]
  },
  "labels": {},
  "revision": 1618223097333
}
f

The response format. The default format is html.

Values: html | json | pjson

Microservice properties

The example below demonstrates a full JSON object of a microservice:

{
  "mode": "Primary",
  "configuredState": "STARTED",
  "provider": "Postgres",
  "deploymentId": "ke84ls9uva6t7fvck8q5p",
  "name": "relational-store-primary",
  "type": "RelationalStore",
  "spec": {
    "replicas": {
      "min": 1,
      "max": 1
    },
    "containers": [
      {
        "name": "filebeat",
        "resources": {
          "memoryMin": "32Mi",
          "memoryMax": "50Mi",
          "cpuMin": "0.05",
          "cpuMax": "0.25"
        },
        "containerImageUrl": "container.image.com/info:1082",
        "containerImageKey": "FILEBEAT"
      },
      {
        "name": "main-container",
        "resources": {
          "memoryMin": "2Gi",
          "memoryMax": "8Gi",
          "cpuMin": "0.5",
          "cpuMax": "4"
        },
        "containerImageUrl": "container.image.com/info:1082",
        "containerImageKey": "STORE_POSTGRES"
      }
    ]
  },
  "labels": {},
  "revision": 1618223097333
}

The following sections outline the individual properties included in the microservice JSON object that can, and cannot, be updated using this operation

Editable properties

The following properties can be updated using the edit operation.

Note:

When updating the resource allocations for the microserivce (cpuMin, cpuMax, memoryMin, memoryMax), it is the main-container resources object that must be updated to affect the change.

PropertyDetails
replicas

The number of replicas for the microservice. Both min and max values will need to be the same, as there is no auto-scaling. The default value for both min and max are 1.

Example

"replicas": {
  "min": 1,
  "max": 1
},
resources

The minimum and maximum resource allocations for the microservice, including the minimum memory (memoryMin) and minimum CPU (cpuMin) resources required for the microservice to start. The default values for memoryMin, cpuMin, memoryMax, and cpuMax are outlined in the example below.

Example

"resources": {
  "memoryMin": "500Mi",
  "memoryMax": "2Gi",
  "cpuMin": "0.125",
  "cpuMax": "2"
},

Uneditable properties

The following properties are unable to be edited, but are required to be passed through in the deploymentJson object.

PropertyDetails
mode

The microservice mode. A mode type of Undefined is used when the microservice is system related (Admin API, Portal Sharing, ingress controller, etc.). Only microservices related to an ArcGIS service type will return either Dedicated or Shared for this property.

Values: Shared | Dedicated | Undefined | Primary | Standby | Coordinator

provider

The microservice provider. Only microservices related to an ArcGIS service type will have a provider type. A provider type of Undefined is used for non-service related microservices (Admin API, Portal Sharing, ingress controller, etc.)

Values: SDS | ArcObjects11 | DMaps | Undefined | Postgres | Tiles | Ignite | MinIO | Elasticsearch | RabbitMQ

id

The template ID.

Example

"id": "9375dd81-30d1-41c0-a802-cabb425159a9",
type

The microservice type. For example, if the microservice is a shared feature server containing feature services, the type will be FeatureServer. For non-service related microservices, the type will be System.

Values: FeatureServer | GeometryServer | GPServer | GPSyncServer | MapServer | TileServer | System | InMemoryStore | ObjectStore | SpatiotemporalIndexStore | QueueServer | RelationalStore

spec

The JSON object representation of the template's specifications, including replicas and container resources.

Example

"spec": {
  "replicas": {
    "min": 1,
    "max": 1
  },
  "containers": [
    {
      "name": "main-container",
      "resources": {
        "memoryMin": "1.5Gi",
        "memoryMax": "4Gi",
        "cpuMin": "0.125",
        "cpuMax": "2"
      },
      "containerImageKey": "GP_SERVER"
    },
    {
      "name": "filebeat",
      "resources": {
        "memoryMin": "32Mi",
        "memoryMax": "50Mi",
        "cpuMin": "0.05",
        "cpuMax": "0.25"
      },
      "containerImageKey": "FILEBEAT"
    }
  ]
},
revision

The date, in milliseconds from epoch format, of the latest revision to the template.

Example

"revision": 1598217421474

Example usage

Caution:

Currently, auto-scaling is not supported. This means that both the min and max values need to be the same.

The following is a sample POST request for the edit operation, formatted for readability, that demonstrates the workflow stated above:

POST /context/admin/system/deployments/d23ae35d2-e81a-4e79-93de-90fcf1388908/edit HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

deploymentJson={
  "mode": "Primary",
  "configuredState": "STARTED",
  "provider": "Postgres",
  "deploymentId": "ke84ls9uva6t7fvck8q5p",
  "name": "relational-store-primary",
  "type": "RelationalStore",
  "spec": {
    "replicas": {
      "min": 2,
      "max": 2
    },
    "containers": [
      {
        "name": "filebeat",
        "resources": {
          "memoryMin": "32Mi",
          "memoryMax": "50Mi",
          "cpuMin": "0.05",
          "cpuMax": "0.25"
        },
        "containerImageUrl": "container.image.com/info:1082",
        "containerImageKey": "FILEBEAT"
      },
      {
        "name": "main-container",
        "resources": {
          "memoryMin": "2Gi",
          "memoryMax": "8Gi",
          "cpuMin": "0.5",
          "cpuMax": "4"
        },
        "containerImageUrl": "container.image.com/info:1082",
        "containerImageKey": "STORE_POSTGRES"
      }
    ]
  },
  "labels": {},
  "revision": 1618223097333
}&f=pjson&token=B4SGXu8PifZbfOJxpbr-i3X66FvpOuDtp4UdaBqmodRHAxxI-El280UH26TsC9YBct-6TJ_6wYH8iJB39SCwJIB6Vl8_DXmhvROZxjWMk_boLq6J-hurAvVdsOwYLlE7uy7j5t7lpQBAOqvnXS1lxGCy1vwnr3OPLoKmOWY8S8dxP1ZNrRx_SlTSfshlnMP7yoYIArLIylO0Gga9gcyDa3DYsDeTKU8uKbkUQ6LEwo93g1cU9zAxFnxhlBdHw-9U

JSON Response example

{"status": "success"}