Subtenant Service Instances

In a site, each service in an application runs in one or more instances. A service instance is the smallest scheduled unit, which means that all containers in a service are always scheduled together.

Retrieve all service instances

Valid when: ../locally-deployed = "true"

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

name of tenant

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

The name of the application.

query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

site
string

Send the request to the specfifed site

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}/applications/{application-name}/service-instances
Response samples
- name: popcorn-systems.myapp.cr-1
  application-version: 2.4.2
  oper-status: running
  ready: true
  host: host-001
  application-network:
    shared-application-network: mynetwork
    ips:
      - 172.19.0.1/16
    dns-records:
      - cr-1.myapp.internal. 15 IN A 172.19.0.1
      - cr.myapp.internal. 15 IN A 172.19.0.1
  gateway-network:
    ips:
      - 172.23.255.2/24
    outbound-access:
      inherited-policy:
        default-action: deny
        rules:
          192.0.2.0/24: allow
      application-policy:
        deny-all: true
      combined-policy:
        deny-all: true
  ingress:
    interface: eth0
    ips:
      - 192.168.100.97
    dns-records:
      - cr-1.myapp.stockholm-sergel.trial.avassa.net. 15 IN A 192.168.100.97
      - cr.myapp.stockholm-sergel.trial.avassa.net. 15 IN A 192.168.100.97
    inbound-access:
      inherited-policy:
        default-action: deny
        rules:
          192.0.2.0/24: allow
      application-policy:
        allow-all: true
      combined-policy:
        default-action: deny
        rules:
          192.0.2.0/24: allow
  ephemeral-volumes:
    - name: fast-storage
      size: 1GB
      host-volume: fast-host-storage
  persistent-volumes:
    - name: persistent-storage
      size: 1GB
      host-volume: fast-host-storage
  init-containers:
    - name: setup
      id: 189d9234f12c
      oper-status: completed
      start-time: 2021-02-17T12:08:39.100Z
      current-restarts: 0
      total-restarts: 0
      devices:
        - /dev/rtc0
      gpus:
        - id: GPU-de663f3f-856c-4e48-9269-c2269169bfda
  containers:
    - name: popcorn-systems.myapp.cr-1.mydb
      id: 75be6d60d41f
      oper-status: running
      ready: true
      start-time: 2021-02-17T12:08:39.202Z
      current-restarts: 0
      total-restarts: 0
      probes:
        startup:
          status: success
        readiness:
          status: success
        liveness:
          status: success
      devices:
        - /dev/rtc0
      gpus:
        - id: GPU-de663f3f-856c-4e48-9269-c2269169bfda
  

Retrieve a service instance

Valid when: ../locally-deployed = "true"

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

name of tenant

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

The name of the application.

service-instance-name
required
string

The name of the service instance. This name is on the form <service-name>-<N>, where N is an integer, different for each running replica.

query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

site
string

Send the request to the specfifed site

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

get/v1/state/tenants/{tenant-name}/applications/{application-name}/service-instances/{service-instance-name}
Response samples
name: popcorn-systems.myapp.cr-1
application-version: 2.4.2
oper-status: running
ready: true
host: host-001
application-network:
  shared-application-network: mynetwork
  ips:
    - 172.19.0.1/16
  dns-records:
    - cr-1.myapp.internal. 15 IN A 172.19.0.1
    - cr.myapp.internal. 15 IN A 172.19.0.1
gateway-network:
  ips:
    - 172.23.255.2/24
  outbound-access:
    inherited-policy:
      default-action: deny
      rules:
        192.0.2.0/24: allow
    application-policy:
      deny-all: true
    combined-policy:
      deny-all: true
ingress:
  interface: eth0
  ips:
    - 192.168.100.97
  dns-records:
    - cr-1.myapp.stockholm-sergel.trial.avassa.net. 15 IN A 192.168.100.97
    - cr.myapp.stockholm-sergel.trial.avassa.net. 15 IN A 192.168.100.97
  inbound-access:
    inherited-policy:
      default-action: deny
      rules:
        192.0.2.0/24: allow
    application-policy:
      allow-all: true
    combined-policy:
      default-action: deny
      rules:
        192.0.2.0/24: allow
ephemeral-volumes:
  - name: fast-storage
    size: 1GB
    host-volume: fast-host-storage
persistent-volumes:
  - name: persistent-storage
    size: 1GB
    host-volume: fast-host-storage
init-containers:
  - name: setup
    id: 189d9234f12c
    oper-status: completed
    start-time: 2021-02-17T12:08:39.100Z
    current-restarts: 0
    total-restarts: 0
    devices:
      - /dev/rtc0
    gpus:
      - id: GPU-de663f3f-856c-4e48-9269-c2269169bfda
containers:
  - name: popcorn-systems.myapp.cr-1.mydb
    id: 75be6d60d41f
    oper-status: running
    ready: true
    start-time: 2021-02-17T12:08:39.202Z
    current-restarts: 0
    total-restarts: 0
    probes:
      startup:
        status: success
      readiness:
        status: success
      liveness:
        status: success
    devices:
      - /dev/rtc0
    gpus:
      - id: GPU-de663f3f-856c-4e48-9269-c2269169bfda

Invoke the debug operation

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

name of tenant

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

The name of the application.

service-instance-name
required
string

The name of the service instance. This name is on the form <service-name>-<N>, where N is an integer, different for each running replica.

query Parameters
site
string

Send the request to the specfifed site

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

post/v1/state/tenants/{tenant-name}/applications/{application-name}/service-instances/{service-instance-name}/gateway-network/outbound-access/debug
Response samples
inherited-policy:
  allow-all: true
assigned-policy:
  tenant: acme
  source: assigned-site-profile
  profile-name: restricted-outbound
  default-action: deny
  rules:
    192.0.2.0/24: allow
subtenants-policy:
  allow-all: true
application-policy:
  allow-all: true
combined-policy:
  default-action: deny
  rules:
    192.0.2.0/24: allow

Invoke the debug operation

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

name of tenant

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

The name of the application.

service-instance-name
required
string

The name of the service instance. This name is on the form <service-name>-<N>, where N is an integer, different for each running replica.

query Parameters
site
string

Send the request to the specfifed site

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

post/v1/state/tenants/{tenant-name}/applications/{application-name}/service-instances/{service-instance-name}/ingress/inbound-access/debug
Response samples
inherited-policy:
  allow-all: true
assigned-policy:
  tenant: acme
  source: tenant-profile
  profile-name: restricted-inbound
  default-action: deny
  rules:
    192.0.2.0/24: allow
subtenants-policy:
  allow-all: true
application-policy:
  allow-all: true
combined-policy:
  default-action: deny
  rules:
    192.0.2.0/24: allow

Invoke the restart operation

Force a restart of the service instance.

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

name of tenant

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

The name of the application.

service-instance-name
required
string

The name of the service instance. This name is on the form <service-name>-<N>, where N is an integer, different for each running replica.

query Parameters
site
string

Send the request to the specfifed site

Request Body schema:
no-delayed-shutdown
boolean

Must have the value true.

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict

503

Service Unavailable (strongbox sealed)

post/v1/state/tenants/{tenant-name}/applications/{application-name}/service-instances/{service-instance-name}/restart
Request samples
no-delayed-shutdown: true