Subtenant Application Deployments

Specifies how an application is deployed and upgraded in the system.

It is not possible to have more than one application deployment referring to the same application.

Create a new application deployment

SecurityaccessToken
Request
path Parameters
tenant-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of tenant

query Parameters
validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
Request Body schema:
name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application deployment.

application
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application.

application-version
string <* | version>
Default: "*"
  • ***: - \*
  • version

Selects the application version that this deployment is used for.

The special value '*' matches all application versions. If an explicit version is given, the application deployment specification is used to deploy the given version of the application.

If a new version of the application is added, it won't be deployed until the version specified in this field equals the application's version, or has the value '*'.

required
all-sites (object) or match-site-labels (object)

Selects the sites where the application will be placed. Only sites that have called home and are assigned to the tenant can be selected. Note that sites that are temporarily down or offline can be selected.

canary-healthy-time (object) or canary-continue-by-action (object)
Default: "canary-healthy-time"

If present and the application-version is changed, the new version of the application is upgraded according to this specification.

Otherwise, if the application deployment is modified, the application is immediately deployed according to the new specification.

If an application's version is changed, without changing the application deployment's version, then nothing happens.

Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict (instance exists)

503

Service Unavailable (strongbox sealed)

post/v1/config/tenants/{tenant-name}/application-deployments
Request samples
name: myapp-deployment
application: myapp
application-version: "1.2"
placement:
  match-site-labels: |
    system/type = edge and move-theater-owner.com/with-storage
deploy-to-sites:
  canary-sites:
    match-site-labels: |
      popcorn-systems.com/canary
  canary-healthy-time: 1h
  sites-in-parallel: 10
  healthy-time: 15m

Retrieve the configuration of all application deployments

SecurityaccessToken
Request
path Parameters
tenant-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of tenant

query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
keys
string <enumeration>

Retrieve only the keys for the list

Value: "true"
count
string <enumeration>

Retrieve only the number of elements in the list

Value: "true"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

412

Precondition Failed

503

Service Unavailable (strongbox sealed)

get/v1/config/tenants/{tenant-name}/application-deployments
Response samples
- name: myapp-deployment
  application: myapp
  application-version: "1.2"
  placement:
    match-site-labels: |
      system/type = edge and move-theater-owner.com/with-storage
  deploy-to-sites:
    canary-sites:
      match-site-labels: |
        popcorn-systems.com/canary
    canary-healthy-time: 1h
    sites-in-parallel: 10
    healthy-time: 15m
  

Update an application deployment

SecurityaccessToken
Request
path Parameters
tenant-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of tenant

application-deployment-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application deployment.

query Parameters
validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
Request Body schema:
name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application deployment.

application
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application.

application-version
string <* | version>
Default: "*"
  • ***: - \*
  • version

Selects the application version that this deployment is used for.

The special value '*' matches all application versions. If an explicit version is given, the application deployment specification is used to deploy the given version of the application.

If a new version of the application is added, it won't be deployed until the version specified in this field equals the application's version, or has the value '*'.

required
all-sites (object) or match-site-labels (object)

Selects the sites where the application will be placed. Only sites that have called home and are assigned to the tenant can be selected. Note that sites that are temporarily down or offline can be selected.

canary-healthy-time (object) or canary-continue-by-action (object)
Default: "canary-healthy-time"

If present and the application-version is changed, the new version of the application is upgraded according to this specification.

Otherwise, if the application deployment is modified, the application is immediately deployed according to the new specification.

If an application's version is changed, without changing the application deployment's version, then nothing happens.

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

412

Precondition Failed

503

Service Unavailable (strongbox sealed)

patch/v1/config/tenants/{tenant-name}/application-deployments/{application-deployment-name}
Request samples
name: myapp-deployment
application: myapp
application-version: "1.2"
placement:
  match-site-labels: |
    system/type = edge and move-theater-owner.com/with-storage
deploy-to-sites:
  canary-sites:
    match-site-labels: |
      popcorn-systems.com/canary
  canary-healthy-time: 1h
  sites-in-parallel: 10
  healthy-time: 15m

Delete an application deployment

SecurityaccessToken
Request
path Parameters
tenant-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of tenant

application-deployment-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application deployment.

query Parameters
validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

412

Precondition Failed

503

Service Unavailable (strongbox sealed)

delete/v1/config/tenants/{tenant-name}/application-deployments/{application-deployment-name}

Replace or create a new application deployment

SecurityaccessToken
Request
path Parameters
tenant-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of tenant

application-deployment-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application deployment.

query Parameters
validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
Request Body schema:
name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application deployment.

application
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application.

application-version
string <* | version>
Default: "*"
  • ***: - \*
  • version

Selects the application version that this deployment is used for.

The special value '*' matches all application versions. If an explicit version is given, the application deployment specification is used to deploy the given version of the application.

If a new version of the application is added, it won't be deployed until the version specified in this field equals the application's version, or has the value '*'.

required
all-sites (object) or match-site-labels (object)

Selects the sites where the application will be placed. Only sites that have called home and are assigned to the tenant can be selected. Note that sites that are temporarily down or offline can be selected.

canary-healthy-time (object) or canary-continue-by-action (object)
Default: "canary-healthy-time"

If present and the application-version is changed, the new version of the application is upgraded according to this specification.

Otherwise, if the application deployment is modified, the application is immediately deployed according to the new specification.

If an application's version is changed, without changing the application deployment's version, then nothing happens.

Responses
201

Created

204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

412

Precondition Failed

503

Service Unavailable (strongbox sealed)

put/v1/config/tenants/{tenant-name}/application-deployments/{application-deployment-name}
Request samples
name: myapp-deployment
application: myapp
application-version: "1.2"
placement:
  match-site-labels: |
    system/type = edge and move-theater-owner.com/with-storage
deploy-to-sites:
  canary-sites:
    match-site-labels: |
      popcorn-systems.com/canary
  canary-healthy-time: 1h
  sites-in-parallel: 10
  healthy-time: 15m

Retrieve the configuration of an application deployment

SecurityaccessToken
Request
path Parameters
tenant-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of tenant

application-deployment-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application deployment.

query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

412

Precondition Failed

503

Service Unavailable (strongbox sealed)

get/v1/config/tenants/{tenant-name}/application-deployments/{application-deployment-name}
Response samples
name: myapp-deployment
application: myapp
application-version: "1.2"
placement:
  match-site-labels: |
    system/type = edge and move-theater-owner.com/with-storage
deploy-to-sites:
  canary-sites:
    match-site-labels: |
      popcorn-systems.com/canary
  canary-healthy-time: 1h
  sites-in-parallel: 10
  healthy-time: 15m

Retrieve the state of all application deployments

SecurityaccessToken
Request
path Parameters
tenant-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of tenant

query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

site
string

Send the request to the specfifed site

content
string <enumeration>

Filter descendant nodes in the response

Enum: "config" "nonconfig"
keys
string <enumeration>

Retrieve only the keys for the list

Value: "true"
count
string <enumeration>

Retrieve only the number of elements in the list

Value: "true"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

get/v1/state/tenants/{tenant-name}/application-deployments
Response samples
- name: myapp-deployment
  application: myapp
  application-version: "1.2"
  placement:
    match-site-labels: |
      system/type = edge and move-theater-owner.com/with-storage
  deploy-to-sites:
    canary-sites:
      match-site-labels: |
        popcorn-systems.com/canary
    canary-healthy-time: 1h
    sites-in-parallel: 10
    healthy-time: 15m
  config-modified-time: 2021-12-13T09:50:21Z
  status:
    oper-status: deploying
    deploying-status: waiting-for-healthy-timeout
    deployment-stage: rolling
    wait-healthy-timeout: 32m30s
    images:
      - name: myapp/app1
        status: present
        digest: sha256:518f07726e8b
        last-pull: 2021-12-13T09:44:15.885Z
        pull-time: 2s
    selected-canary-sites:
      - udc-001
    selected-sites:
      - udc-001
      - udc-003
      - udc-004
    application-versions:
      - version: "1.2"
        deploying-to:
          - site: udc-003
            time: 2021-12-13T09:50:21Z
        deployed-to:
          - site: udc-001
            time: 2021-12-13T09:51:21Z
        deploy-failed:
          - site: udc-004
            time: 2021-12-13T09:51:13Z
            error-message: failed to download image
  history:
    - time: 2021-11-10T14:51:03Z
      reason: redeploy-invoked
      version: "1.1"
      result: deployed
      added-sites: []
      removed-sites: []
    - time: 2021-11-10T12:45:21Z
      reason: application-deployment-updated
      version: "1.1"
      result: deploying
      added-sites: []
      removed-sites: []
      not-deployed-to:
        - udc3
    - time: 2021-11-08T12:45:21Z
      reason: new-application-version
      version: "1.1"
      result: deployed
      added-sites: []
      removed-sites:
        - udc4
    - time: 2021-10-10T12:45:21Z
      reason: application-updated
      version: "1.0"
      result: deploy-failed
      added-sites: []
      removed-sites: []
      deploy-failed:
        - udc2
      deployed-to:
        - udc1
    - time: 2021-10-08T12:45:21Z
      reason: new-application-version
      version: "1.0"
      result: deployed
      added-sites:
        - udc1
        - udc2
        - udc3
        - udc4
      removed-sites: []
  

Retrieve the state of an application deployment

SecurityaccessToken
Request
path Parameters
tenant-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of tenant

application-deployment-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application deployment.

query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

site
string

Send the request to the specfifed site

content
string <enumeration>

Filter descendant nodes in the response

Enum: "config" "nonconfig"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

get/v1/state/tenants/{tenant-name}/application-deployments/{application-deployment-name}
Response samples
name: myapp-deployment
application: myapp
application-version: "1.2"
placement:
  match-site-labels: |
    system/type = edge and move-theater-owner.com/with-storage
deploy-to-sites:
  canary-sites:
    match-site-labels: |
      popcorn-systems.com/canary
  canary-healthy-time: 1h
  sites-in-parallel: 10
  healthy-time: 15m
config-modified-time: 2021-12-13T09:50:21Z
status:
  oper-status: deploying
  deploying-status: waiting-for-healthy-timeout
  deployment-stage: rolling
  wait-healthy-timeout: 32m30s
  images:
    - name: myapp/app1
      status: present
      digest: sha256:518f07726e8b
      last-pull: 2021-12-13T09:44:15.885Z
      pull-time: 2s
  selected-canary-sites:
    - udc-001
  selected-sites:
    - udc-001
    - udc-003
    - udc-004
  application-versions:
    - version: "1.2"
      deploying-to:
        - site: udc-003
          time: 2021-12-13T09:50:21Z
      deployed-to:
        - site: udc-001
          time: 2021-12-13T09:51:21Z
      deploy-failed:
        - site: udc-004
          time: 2021-12-13T09:51:13Z
          error-message: failed to download image
history:
  - time: 2021-11-10T14:51:03Z
    reason: redeploy-invoked
    version: "1.1"
    result: deployed
    added-sites: []
    removed-sites: []
  - time: 2021-11-10T12:45:21Z
    reason: application-deployment-updated
    version: "1.1"
    result: deploying
    added-sites: []
    removed-sites: []
    not-deployed-to:
      - udc3
  - time: 2021-11-08T12:45:21Z
    reason: new-application-version
    version: "1.1"
    result: deployed
    added-sites: []
    removed-sites:
      - udc4
  - time: 2021-10-10T12:45:21Z
    reason: application-updated
    version: "1.0"
    result: deploy-failed
    added-sites: []
    removed-sites: []
    deploy-failed:
      - udc2
    deployed-to:
      - udc1
  - time: 2021-10-08T12:45:21Z
    reason: new-application-version
    version: "1.0"
    result: deployed
    added-sites:
      - udc1
      - udc2
      - udc3
      - udc4
    removed-sites: []

Invoke the canary-continue operation

Continue the deployment of a canary deployment with canary-continue-by-action is set.

SecurityaccessToken
Request
path Parameters
tenant-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of tenant

application-deployment-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application deployment.

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

post/v1/state/tenants/{tenant-name}/application-deployments/{application-deployment-name}/canary-continue

Invoke the redeploy operation

Force a redeploy of the application deployment.

SecurityaccessToken
Request
path Parameters
tenant-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of tenant

application-deployment-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

The name of the application deployment.

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

post/v1/state/tenants/{tenant-name}/application-deployments/{application-deployment-name}/redeploy