11. Managing Stateful Applications

Kubernetes is a framework for managing complex applications in a containerized environment. It provides various facilities for managing container placement, resource allocation, service discovery, load balancing, scaling, etc. Kubernetes does not, however, have a notion of what an application actually is, nor is there a Kubernetes resource called ‘application’.

On a Kubernetes cluster, the pod is the basic operational unit. Containers are grouped into pods and deployed as individual units, or they are deployed under the control of various resource controllers such as ReplicaSet, StatefulSet, Deployment, etc. How to define a set of related Kubernetes resources as a single unit is left for users to decide. Fortunately, a number of solutions that address this problem have evolved in recent times:

Helm Release

Helm is a tool that streamlines the installation and management of Kubernetes applications. A Helm chart is a collection of specifications describing a related set of Kubernetes resources. A Helm release is a specific instance of a Helm chart which has been deployed to a Kubernetes cluster.

Custom Operator

Custom Operators are specialized controllers that automate complex tasks beyond the scope of what Kubernetes itself provides. They provide a way to extend the cluster’s behavior without making modifications to Kubernetes itself. Many ISVs have developed Operators that deploy their software on Kubernetes.

Topics covered in this chapter:

robin app create

Create an application

robin app register

Register a stateful application

robin app unregister

Unregister a stateful application

robin app delete

Delete an application

robin app list

List applications

robin app info

Display detailed information about an app

robin app status

Display the status of the objects associated with an app

robin app attach-repo

Attach an external storage repo to an app

robin app detach-repo

Detaches a previously attached repo from an app

robin app snapshot-schedule

Configures a snapshot schedule for an app

robin app backup-schedule

Configures a backup schedule for an app

robin app start

Start an application instance

robin app stop

Stop an application instance

robin app restart

Restart an application instance

robin app restore

Revert an app to the point-in-time of specified snapshot or backup

robin app update

Configure application parameters

robin app upgrade

Upgrade an application

robin app config

Configure various attributes/schedules of an app

robin app share

Share an app with one or more tenant users

robin app unshare

Stop sharing an app with one or more tenant users

robin app list-shares

List application shares

robin app change-owner

Reassign ownership of an app

robin app expandvol

Expand the size of a volume associated with an app

11.1. Application life cycle management

The lack of a proper Application construct in Kubernetes poses a problem when it comes to managing the life cycle of a complex application made up of various Kubernetes resources. For example, how would one snapshot or clone an entire Helm release that spans PersistVolumeClaims, Secrets, ConfigMaps, SatefulSet, Pods, Services etc? Or how about snapshotting a web tier, app tier and database tier each deployed separately using three different kubectl manifest files?

11.2. Robin Applications

Robin provides a framework for managing stateful applications deployed on a Kubernetes cluster. All resources that together deliver a service to the end user are collected together into a single unit, which Robin calls an Application. Robin maintains metadata on each of the application’s associated resources in its configuration database. This allows Robin to perform life cycle management operations, such as snapshot, backup, restore, etc., that encompass all of an application’s data and metadata (state of each Kubernetes resource). Three types of applications can be managed by Robin:

11.2.1. ROBIN

Robin Platform provides the ability to deploy applications to a Kubernetes cluster using custom Application Bundles containing all specifications and resources necessary for application deployment. When Robin Platform deploys the application, it takes responsibility for creating all relevant Kubernetes resources, such as StatefulSets, PersistentVolumeClaims, etc. Robin Applications are automatically handled by the Robin Platform framework.

11.2.2. Helm

Helm provides the ability to deploy applications to a Kubernetes cluster using Helm charts containing all specifications and resources necessary for application deployment. When Helm deploys an application, it takes responsibility for creating all relevant Kubernetes resources. Helm Applications are not automatically known to Robin Platform. But they can be registered with the Robin Platform cluster. In order for this to work, all storage for the application must be from the Robin Platform. The application also needs to be registered with Robin Platform.

11.2.3. FlexApp

Robin Platform also provides a very flexible mechanism for registering any set of Kubernetes resources as a Robin Application. The FlexApp construct uses label selector rules to group the resources together. For example, --select app=apache --select app=mysql would select Pods and PVCs for a web and database tier together into a single FlexApp object. The command to create/register a FlexApp, is detailed in the sections below.

11.3. Limits on Non-bundle Applications for Tenants and Users

Robin CNP allows you to set limits on non-bundle applications for tenant and tenant users at Resource pools and application levels. For more information, see here.

By default, the following configurations are enabled for setting limits for non-bundle applications:

  • robin config update cluster k8s_check_rpool_limits true|false

    Note

    If you disable this configuration, the set limits will not be applicable.

  • robin config update cluster k8s_auto_registration true|false

    Note

    If this configuration is disabled manually before the upgrade to Robin CNP 5.4.1, you must enable it manually for limits to be applicable for non-bundle applications.

The set limits will be applicable, and application registration on Robin CNP will succeed only if Kubernetes objects (Pods, Deployment, DaemonSet, Statefulset, and PVCs) have any one of the following labels:

  • app, release

  • app.kubernetes.io/instance, app.kubernetes.io/name

11.4. Robin Application Bundles

Robin Platform offers a new type of application deployment framework called “Application Bundles”, which is ideally suited for complex workloads such as Cloudera, Oracle RAC, Splunk, SAP HANA, etc. An Application Bundle contains all resources necessary to deploy an application to a Kubernetes cluster, such as:

  • The list of services offered by the application. For example, services offered by MongoDB include ConfigServer, QueryRouter, Shards, ReplicaSets.

  • Which image to pull for each service. Note that images can be vendor published images, or they can be custom images hosted on a local registry.

  • Optionally, application specific placement constraints can also be specified. For example, anti/affinity policies for services.

All application configuration information is contained in a YAML file, called the ‘manifest’ file. The manifest file, icon file, and any application-specific life cycle hook scripts are packaged into a single tar file and uploaded to the Robin Platform as an Application Bundle.

Robin Platform’s Application Bundles enable an App Store-like experience for deploying any Application, with a special focus on the needs of complex distributed data-heavy Big Data, NoSQL and Databases. Once a bundle has been uploaded, a user can use it when deploying an application with a single click from the UI, a single command from the CLI, or a single REST call programmatically.

The highly flexible and customizable Robin Application Bundle framework offers application developers freedom from the underlying infrastructure. You define the application once and deploy it anywhere, on-prem or public clouds like AWS, Azure and Google Cloud.

Robin Platform comes pre-packaged with ready-to-use Application Bundles for several applications including:

  • Big Data: HortonWorks, Cloudera, Spark, ElasticSearch, ELK, Splunk

  • NoSQL: MongoDB, Cassandra, CouchDB

  • Databases: Oracle, Oracle RAC, SAP HANA, Microsoft SQL Server, IBM DB2, Postgres, MySQL, MariaDB

  • AI / machine learning: TensorFlow, Caffe, Theano, R, Jupyter

Users can onboard any application or database that runs on Linux very quickly. Refer to the Robin Application Bundle Guide for instructions.

11.4.1. Upload a Robin Application Bundle

Add a bundle to the Robin cluster with the following command:

# robin bundle add <bundle_name> <bundle_version> <bundle_file_pathname>

An example of its usage is shown below:

# robin bundle add mysql docker-8.0 docker-mysql-8.0-416_master.tar.gz
File upload: 100% -- (79763/79763)
Job:  118 Name: BundleAdd            State: VALIDATED       Error: 0
Job:  118 Name: BundleAdd            State: COMPLETED       Error: 0

Note

For more details on the above command refer to the documentation provided here.

11.4.2. Listing Application Bundles

List all the bundles currently present on the Robin cluster with the following command:

# robin bundle list

An example of its usage is shown below:

# robin bundle list
Bundle Id | Type  | Owner/Tenant         | Name     | Version    | Zone Id    | Content Id                       | Description | Group Id | #Templates | #Apps
----------+-------+----------------------+----------+------------+------------+----------------------------------+-------------+----------+------------+-------
1         | ROBIN | admin1/t1            | mysql2   | docker-8.0 | 1580884960 | f428eeefd6d08ddb7ea91f38e4755771 | -           | 4        | 0          | 0
2         | ROBIN | robin/Administrators | postgres | docker-9.5 | 1580884960 | 91120e615901bab8947b9d8380b186a1 | -           | 2        | 1          | 1
3         | HELM  | admin1/t1            | mysql    | helm-1.6.2 | 1580884960 | 00f4243a24cc74624d7272a6217d425f | -           | 3        | 0          | 0

Note

For more details on the above command refer to the documentation provided here.

11.4.3. Create an Application from a Robin Application Bundle

Create a Robin bundle based application with the following command:

# robin app create from-bundle <app_name> <bundle_id> <path_to_template> --rpool <rpool_name>

An example of its usage is shown below:

# robin app create from-bundle pgsql 2 postgres_template.json --rpool default --wait
Job:  115 Name: ApplicationCreate    State: VALIDATED       Error: 0
Job:  115 Name: ApplicationCreate    State: WAITING         Error: 0
Job:  115 Name: ApplicationCreate    State: COMPLETED       Error: 0

Note

For more details on the above command refer to the documentation provided here.

11.4.4. Advanced placement policies for Robin Application Bundles

One advantage of using Robin Application Bundles is that the Robin Platform, as the orchestrator, can enforce multiple placement policies. This is not a feature available in native Kubernetes deployers, such as Helm. This gives users additional control over the placement of pods, affinity rules, etc. for their deployment. Also, these placement policies can be applied independently on each service or role within the application. This fine-grained control helps optimize application performance, cluster utilization, and allows the user to easily customize their deployment based on their cluster configuration.

The placement policies that Robin Platform offers are:

  • Round-robin placement of pods within different nodes, racks, and datacenters. This rule makes sure that every deployed pod is placed on an a different instance within the specified infrastructure component, depending on available resources. This will spread the compute aspect of an application as much as possible.

  • Prevent placing more than one pod on the same node, rack, or datacenter. This rule makes sure that every deployed pod is strictly placed on an a different instance within the specified infrastructure. If that is not possible, the application creation will fail. This ensures that the compute aspect of the application is not piled up on one infrastructure piece alone.

  • Enforce Storage and Compute for all pods to be on same node, rack, or datacenter. This rule makes sure that every deployed pod has storage and compute affinity. As a consequence, each container and its associated volume(s) will be associated with the same infrastructure piece. Performance will obviously benefit.

  • Restrict the placement of pods to nodes tagged with specific tags ([key:value, …]). This rule makes sure that every deployed pod is placed only on hosts tagged with the specified key-value pairs (either via Kubernetes or Robin Platform). This allows a user to control exactly where a set of pods are spawned and thus optimize cluster utilization.

  • Do not place pods for service <A> on a node, rack, or datacenter which is also running service <B>. This rule makes sure that every pod deployed for a particular role will never be hosted by an infrastructure piece that is hosting any pods from a different, specified service. For example, the compute aspect of two different roles of an application could always be placed on separate pieces of infrastructure.

  • Always place pods for service <A> on a node, rack, or datacenter which is also running service <B>. This rule makes sure that every pod deployed for a particular role will always be hosted by an infrastructure piece that is hosting any pods from a different, specified service. For example, the compute aspect of two different roles of an application could always be co-located.

11.5. Helm Releases

A Helm chart is a collection of specifications describing a related set of Kubernetes resources. A Helm release is a specific instance of a Helm chart deployed to a Kubernetes cluster. Robin Platform supports the registration of a Helm release as a HELM Application, which allows the application to be managed using Robin Platform’s life cycle management facilities. In order for this to work, all storage for the application must be from the Robin Platform. The application also needs to be deployed to the user’s assigned Kubernetes namespace.

Moreover Robin allows for the auto-registration of Helm releases when the config attribute k8s_auto_registration is set to true. This results in any newly created instances of Helm charts being exposed to the lifecycle management features Robin provides without any user intervention. However there are certain caveats to utilizing this feature:

  • In order for an application to be auto registered there has to exist an underlying file collection with free space as a generic bundle for the release will be created and added.

  • Only Helm releases deployed in namespaces which are imported into Robin will be automatically registered.

  • One of the following combinations of labels must be present within the objects deployed by the release. Either both the app and release labels must be present within the aforementioned objects or both the app.kubernetes.io/name and app.kubernetes.io/instance labels must be present.

  • Releases that were created previously in namespaces that have since been imported into Robin will not be picked up immediately. As a result there will be an initial delay before the application is made visible to Robin users. Of course, one is always able to manually register the pre-existing application to hasten this process.

  • If two Helm releases with the same name are deployed in different imported namespaces, Robin CNP does not auto-register the second app with the same name. Instead it must be registered manually using the robin app register command as shown below.

    Note

    If you want to use storage-compute-affinity and network-planning features using Robin annotations, do not use the nodeName field in the spec.

11.5.1. Register a Helm3 Release

As Helm3 is configured on all hosts within the Robin cluster as part of the Robin Platform installation, there is no need for any additional setup. Thus the following example showcases user1, who is a member of Tenant t1 with namespace t003-u000004, registering a deployed Helm3 release.

Log in as user1:

# robin login user1
Password: <user1_password>
User user1 is logged into t1 tenant

Get the current user context for user1:

The robin whoami command returns useful information about the current Robin Platform user. It includes a list of tenants the user is a member of (user1 is only a member of one tenant) and which tenant they are currently logged into. Additionally, the whoami output includes the Kubernetes namespace that has been assigned to the user for their current tenant. This is the namespace the Helm chart needs to be installed into.

# robin whoami
       username: user1
         tenant: t1
        tenants: ['t1']
      namespace: t003-u000004
session_expires: 2020-01-24T11:53:02

Add the bitnami Helm repo for the current user:

# helm repo add bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories

Install the bitnami/mysql Helm chart:

With respect to the helm command line below, note that persistence.storageClass is set equal to ‘robin’. Using Robin Storage is a requirement for Helm release registration with Robin. Also note the inclusion of the current user’s assigned namespace in the Helm command line. The --namespace parameter specifies which Kubernetes namespace the application resources will be bound to.

 # helm install demo bitnami/mysql --set global.storageClass=robin --namespace t003-u000004
 NAME: demo
 LAST DEPLOYED: Thu Aug 19 22:23:54 2021
 NAMESPACE: t003-u000004
 STATUS: deployed
 REVISION: 1
 NOTES:
 MySQL can be accessed via port 3306 on the following DNS name from within your cluster:
 mysqldb.t003-u000004.svc.cluster.local

To get your root password run:

    MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace t003-u000004 mysqldb -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo)

To connect to your database:

1. Run an Ubuntu pod that you can use as a client:

    kubectl run -i --tty ubuntu --image=ubuntu:16.04 --restart=Never -- bash -il

2. Install the mysql client:

    $ apt-get update && apt-get install mysql-client -y

3. Connect using the mysql cli, then provide your password:
    $ mysql -h mysqldb -p

To connect to your database directly from outside the K8s cluster:
    MYSQL_HOST=127.0.0.1
    MYSQL_PORT=3306

    # Execute the following command to route the connection:
    kubectl port-forward svc/mysqldb 3306

    mysql -h ${MYSQL_HOST} -P${MYSQL_PORT} -u root -p${MYSQL_ROOT_PASSWORD}

Get the Helm3 release name:

# helm list --namespace t003-u000004
NAME     NAMESPACE    REVISION  UPDATED                                 STATUS    CHART       APP VERSION
mysqldb  t003-u000004 1         2020-10-06 03:37:21.126307438 +0000 UTC deployed  mysql-1.6.7 5.7.30

Manually register Helm3 release as a HELM Application:

# robin app register mysqldb --app helm/mysqldb -n t003-u000004
Job:  114 Name: K8SAppRegister       State: PREPARED        Error: 0
Job:  114 Name: K8SAppRegister       State: COMPLETED       Error: 0

Note

If the k8s_auto_registration config attribute is enabled and all of the aforementioned necessary conditions are met this step need not be performed.

Verify that the app is registered with Robin:

# robin app list
Helm/Flex Apps:

+----------+------+--------+----------------------+--------------+-----------+---------+
| Name     | Type | State  | Owner/Tenant         | Namespace    | Snapshots | Backups |
+----------+------+--------+----------------------+--------------+-----------+---------+
| mysqldb  | helm | ONLINE | user1/t1             | t003-u000004 | 0         | 0       |
+----------+------+--------+----------------------+--------------+-----------+---------+

Get detailed information about the resulting application:

# robin app info mysqldb
Name                              : mysqldb
Kind                              : helm
State                             : ONLINE
Number of repos                   : 0
Number of snapshots               : 0
Number of usable backups          : 0
Number of archived/failed backups : 0

Query:
-------
{'apps': ['helm/mysqldb@t003-u000004'], 'namespace': 't003-u000004', 'selectors': [], 'resources': []}

11.5.2. Register a Helm2 Release

Note

Support for Helm 2 and Tiller is deprecated. As a result no native Robin commands are provided to facilitate the deployment of Helm 2 and the onus is on the user to ensure Helm 2/Tiller are deployed appropriately. However charts deployed via Helm 2 can still be registered with Robin.

Following is a step-by-step walkthrough, detailing how the Helm environment needs to configured for a Robin user, how to install a Helm chart that generates a Helm release suitable for registration with Robin Platform, and how to perform a Helm release registration. Note that the initial steps must be performed by a superadmin user. The remaining steps are to be performed by the Robin Platform user.

The following example assumes superadmin user admin is setting up the Helm environment for Robin Platform user user1 who is a member of Tenant t1.

Log in as the superadmin user:

# robin login admin
Password: <admin_password>
User admin is logged into Administrators tenant

Generate a list of Robin Platform users:

# robin user list
ID | Username | Full Name     | Email | Tenants        | Current Tenant | Current Role | Current Namespace | Authentication
---+----------+---------------+-------+----------------+----------------+--------------+-------------------+----------------
3  | admin    | Robin Systems |       | Administrators | Administrators | superadmin   | t001-u000003      | local
4  | user1    |               |       | t1             | t1             | user         | t003-u000004      | local

Note the Current Namespace for user1: t003-u000004. The Kubernetes resources associated with Tiller (ServiceAccount and RoleBinding) need to be deployed within this namespace.

Log in as user1:

# robin login user1
Password: <user1_password>
User user1 is logged into t1 tenant

After logging in, ensure that the necessary CA cert and user cert/key are present within the .helm directory present in the user’s HOME directory. Once this is completely Helm 2 needs to be initialized within this namespace via the helm2 init command or otherwise in order to deploy Tiller into the user’s assigned namespace.

Wait for Tiller to be deployed:

The below command needs to be repeated until no errors are returned.

# helm2 list --tls --tiller-namespace=t003-u000004
Error: could not find tiller

Add the bitnami Helm repo for the current user:

# helm2 repo add bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories

Install the bitnami/mysql Helm chart:

With respect to the helm2 command line below, note that persistence.storageClass is set equal to ‘robin’. Using Robin Storage is a requirement for Helm release registration with Robin Platform. Also note the inclusion of the current user’s assigned namespace in two places in the Helm command line. The --namespace parameter specifies which Kubernetes namespace the application resources will be bound to. The --tiller-namespace parameter tells Helm which namespace Tiller has been deployed to. The namespace for both parameters must be the same and it must be the namespace assigned to the user by Robin Platform.

# helm2 install bitnami/mysql --tls --set persistence.storageClass=robin --namespace t003-u000004 --tiller-namespace=t003-u000004
NAME:   billowing-tortoise
LAST DEPLOYED: Wed Jan 22 21:55:24 2020
NAMESPACE: t003-u000004
STATUS: DEPLOYED

RESOURCES:
==> v1/ConfigMap
NAME                           AGE
billowing-tortoise-mysql-test  0s

==> v1/Deployment
NAME                      AGE
billowing-tortoise-mysql  0s

==> v1/PersistentVolumeClaim
NAME                      AGE
billowing-tortoise-mysql  0s

==> v1/Pod(related)
NAME                                      AGE
billowing-tortoise-mysql-d4f976d96-89x5c  0s

==> v1/Secret
NAME                      AGE
billowing-tortoise-mysql  0s

==> v1/Service
NAME                      AGE
billowing-tortoise-mysql  0s


NOTES:
MySQL can be accessed via port 3306 on the following DNS name from within your cluster:
billowing-tortoise-mysql.t003-u000004.svc.cluster.local

To get your root password run:

    MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace t003-u000004 billowing-tortoise-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo)

To connect to your database:

1. Run an Ubuntu pod that you can use as a client:

    kubectl run -i --tty ubuntu --image=ubuntu:16.04 --restart=Never -- bash -il

2. Install the mysql client:

    $ apt-get update && apt-get install mysql-client -y

3. Connect using the mysql cli, then provide your password:
    $ mysql -h billowing-tortoise-mysql -p

To connect to your database directly from outside the K8s cluster:
    MYSQL_HOST=127.0.0.1
    MYSQL_PORT=3306

    # Execute the following command to route the connection:
    kubectl port-forward svc/billowing-tortoise-mysql 3306

    mysql -h ${MYSQL_HOST} -P${MYSQL_PORT} -u root -p${MYSQL_ROOT_PASSWORD}

Get the Helm2 release name:

Note that the --tls flag is required for all Helm commands because Helm and Tiller were configured to require the user’s TLS cert and key (coped to the .helm directory in a previous step).

# helm list --tls --tiller-namespace=t003-u000004
NAME                    REVISION        UPDATED                         STATUS          CHART           APP VERSION     NAMESPACE
billowing-tortoise      1               Wed Jan 22 21:55:24 2020        DEPLOYED        mysql-1.6.2     5.7.28          t003-u000004

Manually register Helm2 release as a HELM Application:

# robin app register mysql --app helm/billowing-tortoise -n robinapps
Job:  114 Name: K8SAppRegister       State: PREPARED        Error: 0
Job:  114 Name: K8SAppRegister       State: COMPLETED       Error: 0

Note

If the k8s_auto_registration config attribute is enabled and all of the aforementioned necessary conditions are met this step need not be performed.

Get a listing of all Robin Platform applications:

Note that the Robin Platform CLI command to list applications returns two application groupings. It returns a list of applications that were deployed by Robin Platform from Application Bundles. It will also include a list of applications that were registered with the cluster (Helm releases and FlexApps).

Also note that RBAC control limits which applications a user is able to view. A user who has been assigned the user role (user1 in this example) will only be able to view applications they own (created/registered). A user who has been assigned the tenantadmin role will be able to view all applications created/registered by all members of their tenant. A user who has been assigned the superadmin role (admin in this example) will be able to see all applications created/registered by all users across the entire cluster (e.g., for all tenants). Note that a user can only be superadmin if they are logged into the Administrators tenant.

# robin app list
ROBIN Bundle Apps:

+-------+--------------+--------+--------+---------------+--------+-----+-----+-------------+--------+---------+-----------+-------+
|  Name | Owner/Tenant |  Type  | Parent | Resource Pool | Vnodes | CPU | GPU | Memory (GB) | Status | LastOpr |   Health  | Error |
+-------+--------------+--------+--------+---------------+--------+-----+-----+-------------+--------+---------+-----------+-------+
+-------+--------------+--------+--------+---------------+--------+-----+-----+-------------+--------+---------+-----------+-------+

Helm/Flex Apps:

+--------+------+--------+--------------+--------------+-----------+---------+
| Name   | Type | State  | Owner/Tenant | Namespace    | Snapshots | Backups |
+--------+------+--------+--------------+--------------+-----------+---------+
| mysql  | helm | ONLINE | user1/t1     | t003-u000004 | 0         | 0       |
+--------+------+--------+--------------+--------------+-----------+---------+

Get detailed information about the resulting application:

# robin app info mysql
Name                              : mysql
Kind                              : helm
State                             : ONLINE
Number of repos                   : 0
Number of snapshots               : 0
Number of usable backups          : 0
Number of archived/failed backups : 0

Query:
-------
{'namespace': 't003-u000004', 'apps': ['helm/billowing-tortoise'], 'resources': [], 'selectors': []}

11.6. Robin FlexApp Applications

Robin Platform provides a very flexible mechanism for registering any set of Kubernetes resources as a Robin Application. The FlexApp construct uses label selector rules to group the resources together. For example, --select app=apache --select app=mysql would select Pods and PVCs for a web and database tier together into a single FlexApp object. To create a FlexApp, use this command:

# robin app register <app-name>
                     --selector <label-name>=<label-value>
                     --resource <resource-type>/<resource-name>
                     --namespace <namespace>
                     --dry-run

<app-name>

Name to assign to FlexApp

--selector <label-name>=<label-value>

Resources with these Kubernetes labels would be selected to be part of this FlexApp

--resource <resource-type>/<resource-name>

Resources of the specified type and name would be selected to be part of this FlexApp

--namespace <namespace>

Namespace in which the Kubernetes resources are deployed.

--dry-run

Using this option would display the kind, name and status of the objects to be picked up. Note, this will not register the application.

Selecting resources that have more than one matching label (AND condition):

This is achieved by comma-seperating label name=value pairs as follows: --select tier=frontend,env=dev will select resources that have both tier = frontend AND env = dev labels on it.

Selecting resources that have at least one of the matching labels (OR condition):

This is achieved by specifying the --select option multiple times. For example: --select env=dev --select env=prod will select any resource that has either env = dev or env = prod labels on it.

Selecting resources of a certain type with matching labels:

Let’s say one wants to select only PersistentVolumeClaims and StatefulSelect type resources with matching labels. That is, any other resource with a matching label should not be selected. This is achieved by specifying the resource name as a prefix to the label name as follows: --select pvc,statefulset:tier=database

Explicitly selecting certain resources:

The --resource option is used to specify explicitly which Kubernetes resources are to be made part of the FlexApp. The format to specify this is as follows: --resource <resource-type>/<resource-name>, where <resource-name> is any of the resources (“Kind”) that the Kubernetes cluster recognizes, such as PersistentVolumeClaims (pvc), StatefulSets, Services, etc.

  • Running kubectl api-resources would list all valid values of <resource-type>

  • Running kubectl get <resource-type> would list all valid <resource-name> of that specific resource type

11.7. Create an Application

Robin supports the creation of applications from a number of sources:

from-bundle

Create an application from a ROBIN Application Bundle or Helm Bundle

from-snapshot

Create a clone of an existing application from one of the application’s snapshots

from-backup

Create a new application instance from an application backup

11.7.1. Create an application from a Bundle

An application instance can be created from either Robin Application or Helm based Bundle with the following command:

# robin app create from-bundle <app_name> <bundleid> [<template>]
                                                      --rpool <rpool_name>
                                                      --ip-pools <ip_pools>
                                                      --restart-attempts <restart_num>
                                                      --namespace <namespace>
                                                      --disable-hooks
                                                      --disable-auto-relocate
                                                      --genplan

app_name

Application instance name

bundleid

Unique ID of the Application Bundle

template

For Robin Bundle based applications the template name or pathname of template file can be specified. If not specified the default template generated from the bundle manifest will be used. For Helm based bundles, this parameter should point to the values.yaml equivalent for the respective chart. If not specified the default values for the chart will be used

--rpool <rpool_name>

Name of the resource pool to use. This is a mandatory parameter for Robin Application Bundle based applications

--ip-pools <ip_pools>

Name of IP pools from which to allocated IP addresses for the application

--restart-attempts <restart_num>

Number of restart attempts when the app is in a failed state

--namespace <namespace>

Kubernetes namespace in which the application will be deployed. If not specified, the application will be deployed within the users current namespace

--disable-hooks

Disable hook scripts such that they do not run

--disable-auto-relocate

Disable auto relocate upon failure

--genplan

Only generate a plan for an application instead of deploying it

Note

The following parameters are only applicable to Robin Application Bundle based applications: --rpool, --ip-pools, --restart-attempts, --disable-hooks, --disable-auto-relocate, and --genplan.

Example 1 (Creating a Robin Application Bundle based application):

# robin app create from-bundle mysql-a 1 mysql_template.json --rpool default --wait
Job:  178 Name: ApplicationCreate    State: VALIDATED       Error: 0
Job:  178 Name: ApplicationCreate    State: WAITING         Error: 0
Job:  178 Name: ApplicationCreate    State: COMPLETED       Error: 0

Example 2 (Creating a Helm bundle based application):

# robin app create from-bundle mysql-hb1 3 --wait
Job:  105 Name: K8SApplicationCreateHelm State: VALIDATED       Error: 0
Job:  105 Name: K8SApplicationCreateHelm State: WAITING         Error: 0
Job:  105 Name: K8SApplicationCreateHelm State: COMPLETED       Error: 0

Creates an application instance from a Bundle.

End Point: /api/v3/robin_server/apps

Method: POST

URL Parameters: None

Data Parameters:

  • kind: ROBIN - This mandatory field within the payload specifies that a Robin Bundle based application is to be created.

  • name: <app_name> - This mandatory field within the payload specifies the name of the application to be created.

  • bundleid: <bundle_id> - This mandatory field within the payload specifies the ID of the bundle from which the application will be created.

  • rpool: <rpool_name> - This mandatory field within the payload specifies the name of the resource pool in which the application will be created.

  • template_json: <template> - Utilizing this parameter within the payload, by specifying a dictionary representing the template in JSON format, results in the provided template and the parameters contained within it being used when the application is deployed. For Helm based bundles, this should be the JSON equivalent of the values.yaml file for the chart. In order to indicate that the implicitly generated default template or default values of the bundle should be used specify an empty dictionary.

  • template: <template_name> - Utilizing this parameter within the payload, by specifying a string representing a template name, results in the template associated with the name being used during application deployment.

  • ip_pools: <list_of_ippools> - Utilizing this parameter within the payload, by specifying a comma seperated list of IP Pool names, results in an IP address being allocated from each specified IP Pool for the application.

  • namespace: <namespace> - Utilizing this parameter within the payload, by specifying a string representing a namespace name, results in the application being deployed in the aforementioned namespace. If not specified, the application will be deployed within the users current namespace.

  • restart_num: <restart_num> - Utilizing this parameter within the payload, by specifying an integer, results in the number of restart attempts in the case of application failure being set to the specified value. The default value is 15.

  • auto_relocate: true - Utilizing this parameter within the payload, by specifying a boolean value, determines whether or not the auto relocate functionality is enabled for the application in the case of failure. By default it is enabled.

  • disable_hooks: true - Utilizing this parameter within the payload, by specifying a boolean value, determines whether or not the hook scripts are enabled to be run during life cycle operations. By default hook scripts are enabled.

  • genplan: true - Utilizing this parameter within the payload results in only a plan being generated and returned for the application instead of an actual deployment taking place.

Note

The following parameters are only applicable to Robin Application Bundle based applications: rpool, template, ip_pools, restart_num, disable_hooks, auto_relocate, and genplan.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error), 409 (Duplicate Resource Error)

Example Response:

Output
{
   "plan":{
      "enable_hooklogs":true,
      "zoneid":1599768542,
      "from_template":null,
      "input_json":{

      },
      "roles":[
         {
            "multinode":true,
            "restart_on_qoscfg":true,
            "vnodes":[
               {
                  "enable_hooklogs":true,
                  "enable_metrics":true,
                  "env":{
                     "ENABLE_SSH":{
                        "type":"boolean",
                        "value":true
                     },
                     "ROOT_PASSWORD":{
                        "type":"password",
                        "value":""
                     },
                     "DOCKER_OPTS":{
                        "type":"text",
                        "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN"
                     }
                  },
                  "cpu":{
                     "min":0,
                     "reserve":false,
                     "max":1
                  },
                  "name":"demo-test.server.01",
                  "multinode":true,
                  "vnodehooks":{
                     "postcreate":"bash postcreate.sh"
                  },
                  "gpu":{
                     "min":0,
                     "max":0
                  },
                  "mem":{
                     "hugepages_2m":0,
                     "size":209715200,
                     "hugepages_1g":0
                  },
                  "network":[
                     {
                        "ippool":"robin-default",
                        "name":"robin-default"
                     }
                  ],
                  "enable_portmapping":true,
                  "storage":[
                     {
                        "compression":"disabled",
                        "stordriver":{
                           "media":"SSD",
                           "protection":0,
                           "faultdomain":"host",
                           "type":"das"
                        },
                        "disk_tags":{

                        },
                        "faultdomain":"host",
                        "workload":0,
                        "type":"data",
                        "pvcpolicy":"create",
                        "snapshot_space_limit":214748365,
                        "size":1073741824,
                        "replication":1,
                        "fstype":"ext4",
                        "media":"SSD",
                        "lvm_vol_count":"0",
                        "name":"none_server01_data01",
                        "snap_reserved":20,
                        "encryption":"none",
                        "blocksize":4096,
                        "protection":0,
                        "lvm_type":"None",
                        "layout":"round-robin",
                        "path":"\/data"
                     },
                     {
                        "compression":"disabled",
                        "stordriver":{
                           "media":"SSD",
                           "protection":0,
                           "faultdomain":"host",
                           "type":"das"
                        },
                        "disk_tags":{

                        },
                        "faultdomain":"host",
                        "workload":0,
                        "type":"block",
                        "pvcpolicy":"create",
                        "snapshot_space_limit":214748365,
                        "size":1073741824,
                        "replication":1,
                        "fstype":"raw",
                        "media":"SSD",
                        "lvm_vol_count":"0",
                        "name":"none_server01_block01",
                        "snap_reserved":20,
                        "encryption":"none",
                        "blocksize":4096,
                        "protection":0,
                        "lvm_type":"None",
                        "layout":"round-robin",
                        "path":"\/dev\/rda"
                     }
                  ]
               }
            ],
            "image":{
               "entrypoint":"entry.sh",
               "name":"robinsys\/centos",
               "init_mode":false,
               "version":"7",
               "engine":"docker"
            },
            "name":"server",
            "display_name":"server",
            "qgroups":{
               "data":{
                  "wr_min_window":500,
                  "enabled":false,
                  "wr_weight":1,
                  "rd_weight":1,
                  "rd_min_iops":0,
                  "rd_min_window":500,
                  "wr_min_iops":0,
                  "wr_max_iops":2000000,
                  "priority":1,
                  "rd_max_iops":2000000
               },
               "block":{
                  "wr_min_window":500,
                  "enabled":false,
                  "wr_weight":1,
                  "rd_weight":1,
                  "rd_min_iops":0,
                  "rd_min_window":500,
                  "wr_min_iops":0,
                  "wr_max_iops":2000000,
                  "priority":1,
                  "rd_max_iops":2000000
               }
            }
         }
      ],
      "kind":"ROBIN",
      "rpool":"default",
      "name":"demo-test",
      "content_id":"2de2c0c8a93db5b68943f85c8b382e46",
      "snapshot":"enabled",
      "pvcpolicy":"create",
      "robin_version":"5.3.0-225",
      "enable_metrics":true,
      "rpoolid":1,
      "version":"7",
      "restart_num":15,
      "auto_relocate":true,
      "namespace":"random",
      "tenant":"Administrators",
      "username":"robin",
      "bundleid":"1",
      "app_ns":"random",
      "clone":"enabled"
   },
   "jobid":547
}

11.7.2. Create an application from a snapshot

In addition to providing for disaster recovery, application snapshots allow for the creation of an exact copy, or clone of an application instance. Creating a clone of an existing application instance can be very useful. For example, it allows for reports to be run on a database without affecting the source database application, for UAT tests, for validating patches before applying them to the production database, etc.

Cloning an application has typically required significant manual or scripting work and coordination across the storage layer and the application metadata layer (Kubernetes Pod, StatefulSet, PVC, Service etc). With Robin one can clone an entire application or application stack with one single command robin app create from-snapshot. Running this command creates a clone of an entire application from a previously taken application snapshot. Once complete the application is ready for use right away.

Changes made to the clone are not visible in the parent application from which the clone was created. Similarly, any changes made to the parent application are not visible to the clone. At the storage layer, Robin’s thin cloning technology is leveraged. Which means that a cloned PersistentVolume is not a physical copy of the source volume. Instead, it is a virtual copy, where only metadata is physically copied with the actual data being shared between the clone and the source. Changes made to either the clone or the source are localized into their own writable data streams, whereas any common unmodified data is shared.

A clone of an existing application instance can be created from an application snapshot with the following command:

# robin app create from-snapshot <app_name> <snapshotid>
                                            --rpool <rpool_name>
                                            --ip-pools <ip_pools>
                                            --role-ip-pools <role_pools>
                                            --role-vnode-hostnames <role_vnode_hosts>
                                            --role-cpus <role_cpus>
                                            --role-gpus <role_gpus>
                                            --role-mem <role_mem>

app_name

Application instance name

snapshotid

Unique ID of the application snapshot

--rpool <rpool_name>

Name of the resource pool to use. This is a mandatory parameter for clones of Robin Bundle based applications and does not apply to Helm based applications

--ip-pool <ip_pool>

Name of IP pool from which to allocate IP address of clone. This parameter only applies to clones of Robin Bundle based applications

--role-ip-pools <role_pools>

Comma separated list of IP Pools for a role in the format: <role>:<pool1,pool2>. This parameter only applies to clones of Robin Bundle based applications

--role-vnode-hostnames <role_vnode_hosts>

Comma separated list of vnode hostnames for a role in the format: <role>:<host1,host2>. This parameter only applies to clones of Robin Bundle based applications

--role-cpus <role_cpus>

CPU count for a role in the format: <role>:<count>. This parameter only applies to clones of Robin Bundle based applications

--role-gpus <role_gpus>

GPU count for a role in the format: <role>:<count>. This parameter only applies to clones of Robin Bundle based applications

--role-mem <role_mem>

Memory for a role in the format: <role>:<mem>. This parameter only applies to clones of Robin Bundle based applications

Note

All of the role specific parameters can be specified multiple times for different roles.

Example 1 (Create a clone of a Robin app from a snapshot):

# robin app create from-snapshot mysql-c1 ec2bdeba447211eaa2028d14cd0bbca6 --rpool default --wait
Job:  187 Name: ApplicationClone     State: VALIDATED       Error: 0
Job:  187 Name: ApplicationClone     State: WAITING         Error: 0
Job:  187 Name: ApplicationClone     State: FINALIZED       Error: 0
Job:  187 Name: ApplicationClone     State: COMPLETED       Error: 0

Example 2 (Create a clone (FLEX app) of a HELM app from a snapshot):

# robin app create from-snapshot mysql1-c1 d17d19f044ba11ea8e7831d18d69fbab --wait
Job:  198 Name: K8SApplicationClone  State: PREPARED        Error: 0
Job:  198 Name: K8SApplicationClone  State: AGENT_WAIT      Error: 0
Job:  198 Name: K8SApplicationClone  State: COMPLETED       Error: 0

Clones an existing application instance using a snapshot of the aformentioned application.

End Point: /api/v3/robin_server/apps/<snapshot_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: clone - This mandatory field within the payload specifies that the clone operation should be performed.

  • clonename: <app_name> - This mandatory field within the payload specifies the name of the clone to be created.

  • rpool: <rpool_name> - This mandatory field within the payload specifies the name of the resource pool in which the clone will be created.

  • cloneconfig: <clone_config> - This mandatory field within the payload specifies the base configuration of the clone. Within each role of the configuration one can edit the vnode_hostnames section, and within each vnode for the role the following attributes can be updated: network, the max value of cpu, the max value of gpu, and the size value of mem.

Note

The base config of the clone is the JSON spec file associated with the respective snapshot.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "enable_hooklogs":true,
      "snapname":"snapshot-1602011804",
      "zoneid":"1599768542",
      "from_template":null,
      "planid":6,
      "app_ns":"t001-u000005",
      "roles":[
         {
            "name":"server",
            "multinode_min":1,
            "qgroups":{
               "data":{
                  "wr_min_window":500,
                  "enabled":false,
                  "wr_min_iops":0,
                  "wr_weight":1,
                  "rd_min_iops":0,
                  "rd_min_window":500,
                  "rd_weight":1,
                  "wr_max_iops":2000000,
                  "priority":1,
                  "rd_max_iops":2000000
               },
               "root_fs":{
                  "wr_min_window":500,
                  "enabled":false,
                  "wr_min_iops":0,
                  "wr_weight":1,
                  "rd_min_iops":0,
                  "rd_min_window":500,
                  "rd_weight":1,
                  "wr_max_iops":2000000,
                  "priority":1,
                  "rd_max_iops":2000000
               },
               "block":{
                  "wr_min_window":500,
                  "enabled":false,
                  "wr_min_iops":0,
                  "wr_weight":1,
                  "rd_min_iops":0,
                  "rd_min_window":500,
                  "rd_weight":1,
                  "wr_max_iops":2000000,
                  "priority":1,
                  "rd_max_iops":2000000
               }
            },
            "vnodes":[
               {
                  "enable_hooklogs":true,
                  "role_name":"server",
                  "restart_num":15,
                  "state":"STARTED",
                  "host_ip":"172.21.19.191",
                  "jobid":165,
                  "rpoolid":1,
                  "name":"demo-clone.server.01",
                  "gpu":{
                     "type":"",
                     "max":0,
                     "count":0
                  },
                  "hosttags":{
                     "robin.io\/robinrpool":[
                        "default"
                     ],
                     "kubernetes.io\/arch":[
                        "amd64"
                     ],
                     "kubernetes.io\/os":[
                        "linux"
                     ]
                  },
                  "calico_inuse":true,
                  "enable_portmapping":true,
                  "utime":1600437863,
                  "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1599768866069\/1600437790650\/centos-7",
                  "allocated":{
                     "zonename":"default",
                     "nodename":"vnode-95-18",
                     "zoneid":1599768542,
                     "nodeid":3
                  },
                  "cpu":{
                     "min":0,
                     "max":1,
                     "reserve":false,
                     "nonisol":true
                  },
                  "cm_keys":[
                     "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSJtWucW0WsDJkGDdcov6bUGiZlPvMyREwWYS6V1H+bl1B7cql4E7KPC4A9M0TZGKpvaczcsW8wkGl1Xh70O8uVShpn45nQERLI\/P2teNB4CXhQFny1IvW3Jahv+XgvuSC9ZmoZu1E\/LPYXMsZ7CtfVzCduVtPpp7YeL8ybndPD9RuMLFWfKEKBocym7b95+2CKiNT4adQhUqMqAk4SUvLZLIWhqyFnuMnykzXrqobYKkdaRPgHf0JXYSBaqMbzwkld8UhMkv5RymueFnzsIebc0goy3MnbxEV+nVQ77BUh025jr+4MfseCSRexbedtQ3vp3ODy\/+pcU0TxqbfPuN3 root@vnode-95-42.robinsystems.com"
                  ],
                  "service_ports":[

                  ],
                  "bundle_object_id":"2de2c0c8a93db5b68943f85c8b382e46",
                  "appname":"demo",
                  "env":{
                     "ENABLE_SSH":{
                        "type":"boolean",
                        "value":true
                     },
                     "ROOT_PASSWORD":{
                        "type":"password",
                        "value":""
                     },
                     "DOCKER_OPTS":{
                        "type":"text",
                        "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN"
                     }
                  },
                  "allocated_host_type":"physical",
                  "bundleid":"1",
                  "k8s_provider":"robin",
                  "vnodehookargs":{
                     "postcreate":[

                     ]
                  },
                  "allocated_host_public_hostname":"vnode-95-18.robinsystems.com",
                  "engine":"docker",
                  "role":"server",
                  "disable_vnodehooks":false,
                  "enable_metrics":true,
                  "root_fs":"\/usr\/local\/robin\/instances\/demo-server-01.t001-u000005.svc.cluster.local",
                  "allocated_host_public_ip":"10.9.95.18",
                  "vnodehooks":{
                     "postcreate":"bash postcreate.sh"
                  },
                  "id":1,
                  "mem":{
                     "hugepages_2m":0,
                     "size":2013265920,
                     "hugepages_1g":0
                  },
                  "network":[
                     {
                        "name":"robin-default",
                        "interfaces":1,
                        "driver":"calico",
                        "allocated_prefix":16,
                        "allocated_names":[
                           "eth0"
                        ],
                        "subnet":"172.21.0.0",
                        "allocated_ip":"172.21.19.191",
                        "ippool":"robin-default",
                        "allocated_by":"system",
                        "allocated_netmask":"255.255.0.0"
                     }
                  ],
                  "appid":1,
                  "desired_status":"ONLINE",
                  "storage":[
                     {
                        "device":"\/dev\/sdc",
                        "volgrp_name":"demo.server.01.72.1.d98c2f1d-bed6-46a1-a1b8-5df11f5e5289",
                        "type":"data",
                        "stordriver":{
                           "media":"HDD",
                           "type":"das",
                           "faultdomain":"nofd",
                           "protection":"0"
                        },
                        "fstype":"ext4",
                        "media":"HDD",
                        "name":"demo-clone.server.01.data.1.41da8189-b80b-44e2-ab7e-19c28a9d48ef",
                        "snap_reserved":20,
                        "lvm_vol_count":"0",
                        "protection":0,
                        "pvcpolicy":"create",
                        "k8s_name":"demo-server-01-data-1-55121b5e",
                        "lvm_type":"None",
                        "parent_vol":{
                           "current_snapshot":"active_snap",
                           "vtype":0,
                           "partitions":0,
                           "stordriver":{
                              "media":"HDD",
                              "type":"das",
                              "faultdomain":"nofd",
                              "protection":"0"
                           },
                           "params":{

                           },
                           "name":"demo.server.01.data.1.55121b5e-ca30-47f5-9be8-3b80a2c837e1",
                           "block_size":4096,
                           "appid":1,
                           "protection":0,
                           "next_backupid":1,
                           "priority":2,
                           "resource_poolid":1,
                           "compression":0,
                           "current_snapshotid":1,
                           "next_snapshotid":2,
                           "size":1073741824,
                           "replication":1,
                           "qgroupid":3,
                           "appname":"default",
                           "slice_size":1073741824,
                           "snapshot_space_limit":536870912,
                           "snapname":"snapshot-1602011804",
                           "volumeid":"4",
                           "genkey":1600437814337784,
                           "media":72,
                           "grpid":3,
                           "multinode_mounting":false
                        },
                        "compression":"0",
                        "disk_tags":{

                        },
                        "faultdomain":"host",
                        "encryption":"none",
                        "size":1073741824,
                        "vol_ns":"t001-u000005",
                        "replication":1,
                        "workload":0,
                        "snapshot_space_limit":536870912,
                        "blocksize":4096,
                        "layout":"round-robin",
                        "path":"\/data",
                        "snapname":"snapshot-1602011804"
                     },
                     {
                        "device":"\/dev\/sdd",
                        "volgrp_name":"demo.server.01.72.1.388f1aaf-fd51-43d6-be0b-4461d5f44063",
                        "type":"block",
                        "stordriver":{
                           "media":"HDD",
                           "type":"das",
                           "faultdomain":"nofd",
                           "protection":"0"
                        },
                        "fstype":"raw",
                        "media":"HDD",
                        "name":"demo-clone.server.01.block.1.496cdedc-cd44-4984-b75f-dac9c55bea13",
                        "snap_reserved":20,
                        "lvm_vol_count":"0",
                        "protection":0,
                        "pvcpolicy":"create",
                        "k8s_name":"demo-server-01-block-1-cddb023c",
                        "lvm_type":"None",
                        "parent_vol":{
                           "current_snapshot":"active_snap",
                           "vtype":0,
                           "partitions":0,
                           "stordriver":{
                              "media":"HDD",
                              "type":"das",
                              "faultdomain":"nofd",
                              "protection":"0"
                           },
                           "params":{

                           },
                           "name":"demo.server.01.block.1.cddb023c-f1c4-4d1d-9973-c0548510617f",
                           "block_size":4096,
                           "appid":1,
                           "protection":0,
                           "next_backupid":1,
                           "priority":2,
                           "resource_poolid":1,
                           "compression":0,
                           "current_snapshotid":1,
                           "next_snapshotid":2,
                           "size":1073741824,
                           "replication":1,
                           "qgroupid":2,
                           "appname":"default",
                           "slice_size":1073741824,
                           "snapshot_space_limit":536870912,
                           "snapname":"snapshot-1602011804",
                           "volumeid":"3",
                           "genkey":1600437814328082,
                           "media":72,
                           "grpid":4,
                           "multinode_mounting":false
                        },
                        "compression":"0",
                        "disk_tags":{

                        },
                        "faultdomain":"host",
                        "encryption":"none",
                        "size":1073741824,
                        "vol_ns":"t001-u000005",
                        "replication":1,
                        "workload":0,
                        "snapshot_space_limit":536870912,
                        "blocksize":4096,
                        "layout":"round-robin",
                        "path":"\/dev\/rda",
                        "snapname":"snapshot-1602011804"
                     },
                     {
                        "device":"\/dev\/sde",
                        "volgrp_name":"demo.server.01.72.1.84a67da9-3839-49db-a967-0c7ed3f191d2",
                        "type":"root_fs",
                        "stordriver":{
                           "media":"HDD",
                           "type":"das",
                           "faultdomain":"nofd",
                           "protection":"0"
                        },
                        "fstype":"xfs",
                        "media":"HDD",
                        "name":"demo-clone.server.01.root_fs.1.72719c18-04f6-4f9b-b2a9-8284afa14516",
                        "snap_reserved":20,
                        "lvm_vol_count":"0",
                        "protection":0,
                        "pvcpolicy":"create",
                        "k8s_name":"demo-server-01-root-fs-1-03999d04",
                        "lvm_type":"None",
                        "parent_vol":{
                           "current_snapshot":"active_snap",
                           "vtype":0,
                           "partitions":0,
                           "stordriver":{
                              "media":"HDD",
                              "type":"das",
                              "faultdomain":"nofd",
                              "protection":"0"
                           },
                           "params":{

                           },
                           "name":"demo.server.01.root_fs.1.03999d04-597d-4db9-9f02-3571a816eca6",
                           "block_size":4096,
                           "appid":1,
                           "protection":0,
                           "next_backupid":1,
                           "priority":2,
                           "resource_poolid":1,
                           "compression":0,
                           "current_snapshotid":1,
                           "next_snapshotid":2,
                           "size":1073741824,
                           "replication":1,
                           "qgroupid":4,
                           "appname":"default",
                           "slice_size":1073741824,
                           "snapshot_space_limit":536870912,
                           "snapname":"snapshot-1602011804",
                           "volumeid":"5",
                           "genkey":1600437814342977,
                           "media":72,
                           "grpid":5,
                           "multinode_mounting":false
                        },
                        "compression":"0",
                        "disk_tags":{

                        },
                        "faultdomain":"host",
                        "encryption":"none",
                        "size":1073741824,
                        "vol_ns":"t001-u000005",
                        "replication":1,
                        "workload":0,
                        "snapshot_space_limit":536870912,
                        "blocksize":4096,
                        "layout":"round-robin",
                        "path":"\/",
                        "snapname":"snapshot-1602011804"
                     }
                  ],
                  "restart_on_qoscfg":true,
                  "service_uids":[

                  ],
                  "ctime":1600437863,
                  "vnodeid":1,
                  "image":{
                     "name":"robinsys\/centos",
                     "version":"7",
                     "registry_hostname":"",
                     "entrypoint":"entry.sh",
                     "registry_port":"",
                     "init_mode":false,
                     "registry_name":"Docker Hub",
                     "engine":"docker"
                  },
                  "allocated_host":"vnode-95-18.robinsystems.com",
                  "sidecar_info":{
                     "gpu":0,
                     "hugepages_2m":0,
                     "mem":0,
                     "containers":[

                     ],
                     "cpu":0,
                     "hugepages_1g":0
                  }
               }
            ],
            "restart_on_qoscfg":true,
            "elastic_ip_enabled":false,
            "multinode_max":256,
            "image":{
               "name":"robinsys\/centos",
               "version":"7",
               "registry_hostname":"",
               "entrypoint":"entry.sh",
               "registry_port":"",
               "init_mode":false,
               "registry_name":"Docker Hub",
               "engine":"docker"
            },
            "multinode":true,
            "display_name":"server",
            "scaleout":"enabled"
         }
      ],
      "local_avail":true,
      "enable_metrics":true,
      "stordriver":"das",
      "rpool":"default",
      "name":"demo-clone",
      "id":1,
      "namespace":"t001-u000005",
      "from_backup":false,
      "snapshot":"enabled",
      "original_app_owner":5,
      "pvcpolicy":"create",
      "parent_last_known_state":6,
      "content_id":"2de2c0c8a93db5b68943f85c8b382e46",
      "rpoolid":1,
      "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1599768866069\/1600437790650\/centos-7",
      "version":"7",
      "restart_num":15,
      "bundle_object_id":"2de2c0c8a93db5b68943f85c8b382e46",
      "auto_relocate":true,
      "original_app_tenant":1,
      "op_clone":true,
      "clone":"enabled",
      "tenant":"Administrators",
      "username":"robin",
      "bundleid":"1",
      "master_name":"demo",
      "desc":{

      },
      "parentid":4
   },
   "jobid":552
}

11.7.3. Create an application from a backup

A application instance can be created from an application backup with the following command:

# robin app create from-backup <app_name> <backupid>
                                          --rpool <rpool_name>
                                          --ip-pools <ip_pools>
                                          --restart-attempts <restart_num>
                                          --namespace <namespace>
                                          --media <media>
                                          --disable-hooks
                                          --disable-auto-relocate
                                          --genplan
                                          --start-hydration

app_name

Application instance name

backupid

Unique ID of the Application backup

--rpool <rpool_name>

Name of the resource pool to use. This is a mandatory parameter for Robin Bundle based applications and is not applicable to Helm based applications

--ip-pools <ip_pools>

Name of IP pools from which to allocated IP addresses for the imported application. Note this option is only valid for Robin Bundle based applications

--restart-attempts <restart_num>

Number of restart attempts when the app is in a failed state. Note this option is only valid for Robin Bundle based applications

--namespace <namespace>

Kubernetes namespace in which the application will be deployed

--media <media>

Specify the media type to be used for the volumes of the imported app. Valid values include: ‘HDD’, ‘SSD’. Note this option is only valid for Robin Bundle based applications

--disable-hooks

Disable hook scripts such that they do not run. Note this option is only valid for Robin Bundle based applications

--disable-auto-relocate

Disable auto relocate upon failure. Note this option is only valid for Robin Bundle based applications

--genplan

Only generate a plan for an application instead of deploying it. Note this option is only valid for Robin Bundle based applications

Example 1 (Create a Robin app from a backup):

# robin app create from-backup mysql-b2 ee529688447211eabaf85b58e9f190fd --rpool default --wait
Job:  182 Name: ApplicationCreate    State: VALIDATED       Error: 0
Job:  182 Name: ApplicationCreate    State: WAITING         Error: 0
Job:  182 Name: ApplicationCreate    State: COMPLETED       Error: 0

Example 2 (Create a FLEX app from the backup of a HELM app):

# robin app create from-backup mysql1-b2 952f3738447211ea99cee7cd7390d6c9 --wait
Job:  181 Name: K8SApplicationCreate State: PREPARED        Error: 0
Job:  181 Name: K8SApplicationCreate State: AGENT_WAIT      Error: 0
Job:  181 Name: K8SApplicationCreate State: COMPLETED       Error: 0

Imports an application instance from a backup. Note this is a two step process as outlined by the example API requests detailed below.

  1. Retrieving the backup config

    End Point: /api/v3/robin_server/storage_repo

    Method: GET

    URL Parameters:

    • sub-command: get-backup-info - This mandatory parameter within the url specifies that detailed information about the backup should be retrieved.

    • backupid: <backupid> - This mandatory parameter within the url specifies the ID of the backup for which to retrieve the configuration of.


    Data Parameters: None

    Port: RCM Port (default value is 29442)

    Headers:

    • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.


    Success Response Code: 200

    Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error), 404 (Not Found Error)

    Example Response:

    Output
    {
       "data":[
          {
             "zoneid":1599768542,
             "bundle_name":"centos-7",
             "backupname":"demo_backup-1602011804",
             "bundle_object_id":"2de2c0c8a93db5b68943f85c8b382e46",
             "backup_kind":"robin-platform-backup",
             "size":369098752,
             "config":{
                "enable_hooklogs":true,
                "parentid":1,
                "zoneid":"1599768542",
                "from_template":null,
                "username":"user1",
                "parent_last_known_state":6,
                "enable_metrics":true,
                "stordriver":"das",
                "rpoolid":1,
                "desc":{
    
                },
                "namespace":"t001-u000005",
                "content_id":"2de2c0c8a93db5b68943f85c8b382e46",
                "snapshot":"enabled",
                "pvcpolicy":"create",
                "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1599768866069\/1600437790650\/centos-7",
                "version":"7",
                "auto_relocate":true,
                "rpool":"default",
                "name":"none",
                "tenant":"Administrators",
                "app_ns":"t001-u000005",
                "bundleid":1,
                "roles":[
                   {
                      "multinode_max":256,
                      "vnodes":[
                         {
                            "enable_hooklogs":true,
                            "role_name":"server",
                            "host_ip":"172.21.19.191",
                            "jobid":165,
                            "name":"demo.server.01",
                            "calico_inuse":true,
                            "env":{
                               "ENABLE_SSH":{
                                  "type":"boolean",
                                  "value":true
                               },
                               "ROOT_PASSWORD":{
                                  "type":"password",
                                  "value":""
                               },
                               "DOCKER_OPTS":{
                                  "type":"text",
                                  "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN"
                               }
                            },
                            "service_ports":[
    
                            ],
                            "cpu":{
                               "min":0,
                               "reserve":false,
                               "max":1,
                               "nonisol":true
                            },
                            "k8s_provider":"robin",
                            "engine":"docker",
                            "allocated_host_public_hostname":"vnode-95-18.robinsystems.com",
                            "disable_vnodehooks":false,
                            "enable_metrics":true,
                            "allocated_host_public_ip":"10.9.95.18",
                            "vnodehooks":{
                               "postcreate":"bash postcreate.sh"
                            },
                            "mem":{
                               "hugepages_2m":0,
                               "size":2013265920,
                               "hugepages_1g":0
                            },
                            "network":[
                               {
                                  "ippool":"robin-default"
                               }
                            ],
                            "enable_portmapping":true,
                            "desired_status":"ONLINE",
                            "storage":[
                               {
                                  "device":"\/dev\/sdc",
                                  "type":"data",
                                  "workload":0,
                                  "fstype":"ext4",
                                  "media":"HDD",
                                  "lvm_vol_count":"0",
                                  "name":"demo.server.01.data.1.55121b5e-ca30-47f5-9be8-3b80a2c837e1",
                                  "snap_reserved":20,
                                  "import_app":true,
                                  "stordriver":{
                                     "media":"HDD",
                                     "type":"das",
                                     "faultdomain":"nofd",
                                     "protection":"0"
                                  },
                                  "protection":0,
                                  "lvm_type":"None",
                                  "pvcpolicy":"create",
                                  "compression":"0",
                                  "disk_tags":{
    
                                  },
                                  "faultdomain":"host",
                                  "encryption":"none",
                                  "size":1073741824,
                                  "vol_ns":"t001-u000005",
                                  "replication":1,
                                  "import_data_source":{
                                     "zoneid":"1599768542",
                                     "backup_path_prefix":"1599768542\/demo_1\/None",
                                     "appid":1,
                                     "blocksize":4096,
                                     "current_snapshotid":1,
                                     "volumeid":"4",
                                     "backupid":1,
                                     "appname":"default"
                                  },
                                  "snapshot_space_limit":536870912,
                                  "blocksize":4096,
                                  "layout":"round-robin",
                                  "path":"\/data",
                                  "snapname":"snapshot-1602011804"
                               },
                               {
                                  "device":"\/dev\/sdd",
                                  "type":"block",
                                  "workload":0,
                                  "fstype":"raw",
                                  "media":"HDD",
                                  "lvm_vol_count":"0",
                                  "name":"demo.server.01.block.1.cddb023c-f1c4-4d1d-9973-c0548510617f",
                                  "snap_reserved":20,
                                  "import_app":true,
                                  "stordriver":{
                                     "media":"HDD",
                                     "type":"das",
                                     "faultdomain":"nofd",
                                     "protection":"0"
                                  },
                                  "protection":0,
                                  "lvm_type":"None",
                                  "pvcpolicy":"create",
                                  "compression":"0",
                                  "disk_tags":{
    
                                  },
                                  "faultdomain":"host",
                                  "encryption":"none",
                                  "size":1073741824,
                                  "vol_ns":"t001-u000005",
                                  "replication":1,
                                  "import_data_source":{
                                     "zoneid":"1599768542",
                                     "backup_path_prefix":"1599768542\/demo_1\/None",
                                     "appid":1,
                                     "blocksize":4096,
                                     "current_snapshotid":1,
                                     "volumeid":"3",
                                     "backupid":1,
                                     "appname":"default"
                                  },
                                  "snapshot_space_limit":536870912,
                                  "blocksize":4096,
                                  "layout":"round-robin",
                                  "path":"\/dev\/rda",
                                  "snapname":"snapshot-1602011804"
                               },
                               {
                                  "device":"\/dev\/sde",
                                  "type":"root_fs",
                                  "workload":0,
                                  "fstype":"xfs",
                                  "media":"HDD",
                                  "lvm_vol_count":"0",
                                  "name":"demo.server.01.root_fs.1.03999d04-597d-4db9-9f02-3571a816eca6",
                                  "snap_reserved":20,
                                  "import_app":true,
                                  "stordriver":{
                                     "media":"HDD",
                                     "type":"das",
                                     "faultdomain":"nofd",
                                     "protection":"0"
                                  },
                                  "protection":0,
                                  "lvm_type":"None",
                                  "pvcpolicy":"create",
                                  "compression":"0",
                                  "disk_tags":{
    
                                  },
                                  "faultdomain":"host",
                                  "encryption":"none",
                                  "size":1073741824,
                                  "vol_ns":"t001-u000005",
                                  "replication":1,
                                  "import_data_source":{
                                     "zoneid":"1599768542",
                                     "backup_path_prefix":"1599768542\/demo_1\/None",
                                     "appid":1,
                                     "blocksize":4096,
                                     "current_snapshotid":1,
                                     "volumeid":"5",
                                     "backupid":1,
                                     "appname":"default"
                                  },
                                  "snapshot_space_limit":536870912,
                                  "blocksize":4096,
                                  "layout":"round-robin",
                                  "path":"\/",
                                  "snapname":"snapshot-1602011804"
                               }
                            ],
                            "restart_on_qoscfg":true,
                            "service_uids":[
    
                            ],
                            "gpu":{
                               "type":"",
                               "max":0,
                               "count":0
                            },
                            "sidecar_info":{
                               "gpu":0,
                               "hugepages_2m":0,
                               "mem":0,
                               "containers":[
    
                               ],
                               "cpu":0,
                               "hugepages_1g":0
                            }
                         }
                      ],
                      "volume_groups":[
    
                      ],
                      "multinode_min":1,
                      "image":{
                         "name":"robinsys\/centos",
                         "version":"7",
                         "registry_hostname":"",
                         "entrypoint":"entry.sh",
                         "engine":"docker",
                         "init_mode":false,
                         "registry_name":"Docker Hub",
                         "registry_port":""
                      },
                      "name":"server",
                      "display_name":"server",
                      "multinode":true,
                      "scaleout":"enabled",
                      "elastic_ip_enabled":false,
                      "restart_on_qoscfg":true,
                      "qgroups":{
                         "data":{
                            "wr_min_window":500,
                            "enabled":false,
                            "wr_weight":1,
                            "rd_min_iops":0,
                            "wr_max_iops":2000000,
                            "rd_weight":1,
                            "wr_min_iops":0,
                            "rd_min_window":500,
                            "priority":1,
                            "rd_max_iops":2000000
                         },
                         "root_fs":{
                            "wr_min_window":500,
                            "enabled":false,
                            "wr_weight":1,
                            "rd_min_iops":0,
                            "wr_max_iops":2000000,
                            "rd_weight":1,
                            "wr_min_iops":0,
                            "rd_min_window":500,
                            "priority":1,
                            "rd_max_iops":2000000
                         },
                         "block":{
                            "wr_min_window":500,
                            "enabled":false,
                            "wr_weight":1,
                            "rd_min_iops":0,
                            "wr_max_iops":2000000,
                            "rd_weight":1,
                            "wr_min_iops":0,
                            "rd_min_window":500,
                            "priority":1,
                            "rd_max_iops":2000000
                         }
                      }
                   }
                ],
                "master_name":"demo",
                "clone":"enabled",
                "snapname":"snapshot-1602011804"
             },
             "repo_name":"demo-backup",
             "appname":"demo"
          }
       ]
    }
    


    Note

    The config section within the above detailed response will be used when creating the application.

  2. Creating the application

    End Point: /api/v3/robin_server/apps

    Method: POST

    URL Parameters: None

    Data Parameters:

    • name: <app_name> - This mandatory field within the payload specifies the name of the application to be created.

    • rpool: <rpool_name> - This mandatory field within the payload specifies the name of the resource pool in which the application will be created.

    • ip_pools: <list_of_ippools> - Utilizing this parameter within the payload, by specifying a comma seperated list of IP Pool names, results in an IP address being allocated from each specified IP Pool for the application.

    • namespace: <namespace> - Utilizing this parameter within the payload, by specifying a string representing a namespace name, results in the application being deployed in the aforementioned namespace. If not specified, the application will be deployed within the users current namespace.

    • restart_num: <restart_num> - Utilizing this parameter within the payload, by specifying an integer, results in the number of restart attempts in the case of application failure being set to the specified value. The default value is 15.

    • auto_relocate: false - Utilizing this parameter within the payload, by specifying a boolean value, determines whether or not the auto relocate functionality is enabled for the application in the case of failure. By default it is enabled.

    • disable_hooks: true - Utilizing this parameter within the payload, by specifying a boolean value, determines whether or not the hook scripts are enabled to be run during life cycle operations. By default hook scripts are enabled.

    • genplan: true - Utilizing this parameter within the payload results in only a plan being generated and returned for the application instead of an actual deployment taking place.


    Note

    The main body of the request should be the config of the respective backup with the above parameters updated within the dictionary.

    Port: RCM Port (default value is 29442)

    Headers:

    • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.


    Success Response Code: 202

    Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error), 409 (Duplicate Resource Error)

    Example Response:

    Output
    {
       "plan":{
          "enable_hooklogs":true,
          "repo_name":"demo-backup",
          "from_template":null,
          "app_ns":"random",
          "roles":[
             {
                "multinode_max":256,
                "vnodes":[
                   {
                      "enable_hooklogs":true,
                      "host_ip":"172.21.19.191",
                      "calico_inuse":true,
                      "disable_vnodehooks":false,
                      "enable_metrics":true,
                      "jobid":165,
                      "allocated_host_public_ip":"10.9.95.18",
                      "vnodehooks":{
                         "postcreate":"bash postcreate.sh"
                      },
                      "gpu":{
                         "type":"",
                         "max":0,
                         "count":0
                      },
                      "sidecar_info":{
                         "gpu":0,
                         "hugepages_2m":0,
                         "mem":0,
                         "containers":[
    
                         ],
                         "cpu":0,
                         "hugepages_1g":0
                      },
                      "network":[
                         {
                            "ippool":"robin-default",
                            "name":"robin-default"
                         }
                      ],
                      "enable_portmapping":true,
                      "desired_status":"ONLINE",
                      "storage":[
                         {
                            "device":"\/dev\/sdc",
                            "compression":"0",
                            "type":"data",
                            "workload":0,
                            "fstype":"ext4",
                            "media":"HDD",
                            "lvm_vol_count":"0",
                            "name":"demo-backup.server.data.1.b8eb9993-eba6-4f1d-af2c-fa358d9aa072",
                            "import_app":true,
                            "protection":0,
                            "lvm_type":"None",
                            "pvcpolicy":"create",
                            "snap_reserved":20,
                            "stordriver":{
                               "media":"HDD",
                               "protection":"0",
                               "faultdomain":"nofd",
                               "type":"das"
                            },
                            "disk_tags":{
    
                            },
                            "faultdomain":"host",
                            "encryption":"none",
                            "size":1073741824,
                            "blocksize":4096,
                            "vol_ns":"t001-u000005",
                            "replication":1,
                            "snapshot_space_limit":536870912,
                            "import_data_source":{
                               "zoneid":"1599768542",
                               "backupid":1,
                               "appid":1,
                               "blocksize":4096,
                               "current_snapshotid":1,
                               "volumeid":"4",
                               "backup_path_prefix":"1599768542\/demo_1\/7e5ff5e4080811eba645317fc88a69a0",
                               "appname":"default"
                            },
                            "layout":"round-robin",
                            "path":"\/data",
                            "snapname":"snapshot-1602011804"
                         },
                         {
                            "device":"\/dev\/sdd",
                            "compression":"0",
                            "type":"block",
                            "workload":0,
                            "fstype":"raw",
                            "media":"HDD",
                            "lvm_vol_count":"0",
                            "name":"demo-backup.server.block.1.54037c86-96c0-4d60-8c47-279c87afe957",
                            "import_app":true,
                            "protection":0,
                            "lvm_type":"None",
                            "pvcpolicy":"create",
                            "snap_reserved":20,
                            "stordriver":{
                               "media":"HDD",
                               "protection":"0",
                               "faultdomain":"nofd",
                               "type":"das"
                            },
                            "disk_tags":{
    
                            },
                            "faultdomain":"host",
                            "encryption":"none",
                            "size":1073741824,
                            "blocksize":4096,
                            "vol_ns":"t001-u000005",
                            "replication":1,
                            "snapshot_space_limit":536870912,
                            "import_data_source":{
                               "zoneid":"1599768542",
                               "backupid":1,
                               "appid":1,
                               "blocksize":4096,
                               "current_snapshotid":1,
                               "volumeid":"3",
                               "backup_path_prefix":"1599768542\/demo_1\/7e5ff5e4080811eba645317fc88a69a0",
                               "appname":"default"
                            },
                            "layout":"round-robin",
                            "path":"\/dev\/rda",
                            "snapname":"snapshot-1602011804"
                         },
                         {
                            "device":"\/dev\/sde",
                            "compression":"0",
                            "type":"root_fs",
                            "workload":0,
                            "fstype":"xfs",
                            "media":"HDD",
                            "lvm_vol_count":"0",
                            "name":"demo-backup.server.root_fs.1.3be39c61-ce26-424b-b0b2-a6baddeb6065",
                            "import_app":true,
                            "protection":0,
                            "lvm_type":"None",
                            "pvcpolicy":"create",
                            "snap_reserved":20,
                            "stordriver":{
                               "media":"HDD",
                               "protection":"0",
                               "faultdomain":"nofd",
                               "type":"das"
                            },
                            "disk_tags":{
    
                            },
                            "faultdomain":"host",
                            "encryption":"none",
                            "size":1073741824,
                            "blocksize":4096,
                            "vol_ns":"t001-u000005",
                            "replication":1,
                            "snapshot_space_limit":536870912,
                            "import_data_source":{
                               "zoneid":"1599768542",
                               "backupid":1,
                               "appid":1,
                               "blocksize":4096,
                               "current_snapshotid":1,
                               "volumeid":"5",
                               "backup_path_prefix":"1599768542\/demo_1\/7e5ff5e4080811eba645317fc88a69a0",
                               "appname":"default"
                            },
                            "layout":"round-robin",
                            "path":"\/",
                            "snapname":"snapshot-1602011804"
                         }
                      ],
                      "service_ports":[
    
                      ],
                      "service_uids":[
    
                      ],
                      "cpu":{
                         "min":0,
                         "reserve":false,
                         "max":1,
                         "nonisol":true
                      },
                      "restart_on_qoscfg":true,
                      "mem":{
                         "hugepages_2m":0,
                         "size":2013265920,
                         "hugepages_1g":0
                      },
                      "role_name":"server",
                      "name":"demo-backup.server.01",
                      "env":{
                         "ENABLE_SSH":{
                            "type":"boolean",
                            "value":true
                         },
                         "ROOT_PASSWORD":{
                            "type":"password",
                            "value":""
                         },
                         "DOCKER_OPTS":{
                            "type":"text",
                            "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN"
                         }
                      },
                      "k8s_provider":"robin",
                      "allocated_host_public_hostname":"vnode-95-18.robinsystems.com",
                      "engine":"docker"
                   }
                ],
                "volume_groups":[
    
                ],
                "name":"server",
                "multinode_min":1,
                "image":{
                   "name":"robinsys\/centos",
                   "version":"7",
                   "registry_hostname":"",
                   "entrypoint":"entry.sh",
                   "engine":"docker",
                   "init_mode":false,
                   "registry_name":"Docker Hub",
                   "registry_port":""
                },
                "multinode":true,
                "display_name":"server",
                "scaleout":"enabled",
                "elastic_ip_enabled":false,
                "restart_on_qoscfg":true,
                "qgroups":{
                   "data":{
                      "wr_min_window":500,
                      "enabled":false,
                      "wr_min_iops":0,
                      "wr_weight":1,
                      "rd_weight":1,
                      "rd_min_window":500,
                      "rd_min_iops":0,
                      "wr_max_iops":2000000,
                      "priority":1,
                      "rd_max_iops":2000000
                   },
                   "root_fs":{
                      "wr_min_window":500,
                      "enabled":false,
                      "wr_min_iops":0,
                      "wr_weight":1,
                      "rd_weight":1,
                      "rd_min_window":500,
                      "rd_min_iops":0,
                      "wr_max_iops":2000000,
                      "priority":1,
                      "rd_max_iops":2000000
                   },
                   "block":{
                      "wr_min_window":500,
                      "enabled":false,
                      "wr_min_iops":0,
                      "wr_weight":1,
                      "rd_weight":1,
                      "rd_min_window":500,
                      "rd_min_iops":0,
                      "wr_max_iops":2000000,
                      "priority":1,
                      "rd_max_iops":2000000
                   }
                }
             }
          ],
          "enable_metrics":true,
          "stordriver":"das",
          "rpoolid":1,
          "namespace":"random",
          "zoneid":1599768542,
          "parentid":1,
          "snapshot":"enabled",
          "pvcpolicy":"create",
          "content_id":"2de2c0c8a93db5b68943f85c8b382e46",
          "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1599768866069\/1600437790650\/centos-7",
          "version":"7",
          "restart_num":15,
          "auto_relocate":true,
          "parent_last_known_state":6,
          "name":"demo-backup",
          "clone":"enabled",
          "tenant":"Administrators",
          "username":"robin",
          "rpool":"default",
          "bundleid":1,
          "master_name":"demo",
          "desc":{
    
          },
          "snapname":"snapshot-1602011804"
       },
       "jobid":556
    }
    

11.8. Register a Stateful Application

Run this command to register a stateful application with Robin Platform:

# robin app register <appname>
                     --app <stateful_app>
                     --resource <resource>
                     --selector <selector>
                     --namespace <namespace>
                     --dry-run
                     --specs

<appname>

The name to assign to this app in Robin Platform. To make it easy to associate with a specific Helm release that this app refers to, it is best to use a name that matches the helm release name

--app <stateful_app>

Helm or operator based applications. Ex: helm/<release_name>

--resource <resource>

Kubernetes native objects. Ex: pvc/<name> or pod/<name>

--selector <selector>

Kubernetes selectors. Ex: release=mongo-1.0,heritage=tiller

--namespace <namespace>

Kubernetes namespace in which the application exists

--dry-run

Show the kind, name and status of the objects to be picked up. Note this will not register the application

--specs

Show the spec files of the objects to be picked up. Note this will not register the application

Note

Only one of the --describe and --dry_run options can be specified at a time.

Example 1 (Install Helm chart stable/postgresql and register the resulting Helm release):

# helm install --tls --name pgsql stable/postgresql --set persistence.storageClass=robin --namespace t003-u000004 --tiller-namespace t003-u000004

# robin app register pgsql --app helm/pgsql --namespace t003-u000004

Note

More than one helm release can be tracked in a single app by specifying --app command line option twice. For example, $ robin app register myblog --app helm/apache --app helm/mysql would track two different helm releases – (1) apache and (2) mysql as a single unit named myblog in Robin Platform.

Register a stateful application with Robin Platform.

End Point: /api/v3/robin_server/k8s_app

Method: PUT

URL Parameters: None

Data Parameters:

  • action: register - This mandatory field within the payload specifies that the register operation is to be performed.

  • name: <app_name> - This mandatory field within the payload specifies the name of the application to be registered.

  • namespace: <namespace> - This mandatory field within the payload specifies the namespace in which the underlying Kubernetes objects for the application are spawned.

  • app_type: operator - This mandatory field within the payload specifies the type of application being registered.

  • describe: true - Utilizing this parameter results in the spec files of the objects to be picked up being returned. Note this will not register the application.

  • dry_run: true - Utilizing this parameter results in the kind, name and status of the objects to be picked up being returned. Note this will not register the application.

  • query: <dict_of_query_params> – This mandatory field within the payload specifies the set of query parameters to use when discovering Kubernetes objects to register as part of the application

    • selectors: <list_of_selectors> - This mandatory field within the dictionary specifies a list of strings representing a group of specific Kubernetes resources in the format ‘<resource-type>/<resource-name>’ to be registered. To indicate no resources, specify an empty list.

    • selectors: <list_of_selectors> - This mandatory field within the dictionary specifies a list of strings representing a set of selectors in the format ‘<label-name>=<label-value>’ to query Kubernetes objects with. To indicate no selectors, specify an empty list.

    • apps: <list_of_helm_releases> - This mandatory field within the dictionary specifies a list of strings in the format ‘helm/<release_name>’ and represents the helm charts to register as part of the application. To indicate no Helm releases, specify an empty list.

    • namespace: <namespace> - This mandatory field within the dictionary specifies the namespace in which the underlying Kubernetes objects for the application are spawned.

Note

Only one of the describe and dry_run parameters can be specified at a time.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":248
}

11.9. Unregister a Stateful Application

Issue the following command to unregister a stateful application from Robin Platform:

# robin app unregister <appname>

<appname>

The name of a previously registered stateful application.

Example:

# robin app unregister mysql1 --wait
This will remove application 'mysql1' from the cluster. Do you want to continue [y/n] ? y
Job:  169 Name: K8SAppUnregister     State: PROCESSED       Error: 0
Job:  169 Name: K8SAppUnregister     State: COMPLETED       Error: 0

Note

If the app being unregistered is a Helm release previously registered on the Robin Platform cluster, it will only be removed from the cluster. The underlying Helm release will be left intact.

Unregister a stateful application from Robin Platform.

End Point: /api/v3/robin_server/k8s_app

Method: PUT

URL Parameters: None

Data Parameters:

  • action: unregister - This mandatory field within the payload specifies that the unregister operation is to be performed.

  • name: <app_name> - This mandatory field within the payload specifies the name of the application to be unregistered.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":178
}

11.10. Delete an Application

Issue the following command to delete an application from a Robin Platform cluster:

# robin app delete <appname>
                     --force

app_name

Application instance name

--force

Force the deletion of the application and all associated Kubernetes objects.

When you run the robin app delete --force <k8s_app/helm_app> command, starting from Robin 5.3.5 HF3 runs a new job: K8SVolumeDeleteHelmRelease to reclaim storage space after the K8SApplicationDeleteHelm job.

Example:

# robin app delete mysql1 --wait -y
Job:  153 Name: K8SApplicationDeleteHelm State: VALIDATED       Error: 0
Job:  153 Name: K8SApplicationDeleteHelm State: COMPLETED       Error: 0

Note

An application that was created from a Robin Bundle can be deleted in its entirety. That means that all of the objects associated with the application that were created in the Kubernetes cluster will be deleted along with the application instance record in the Robin Platform cluster. By default, robin app delete will fail, however, for any stateful application that was registered with Robin Platform. To override this behavior, include --force on the command line. If the desire is to remove the application from Robin Platform but leave the Kubernetes objects intact, then use the robin app unregister command.

Delete an application from a Robin Platform cluster

End Point: /api/v6/robin_server/apps/<app_name>

Method: DELETE

URL Parameters:

  • force=true : Utilizing this parameter results in the ungraceful termination of an application, which includes not running any relevant hook scripts.

  • del_snaps=true : Utilizing this parameter results in both the application and its associated snapshots being deleted.

Data Parameters: None

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "enable_metrics":true,
      "auto_relocate":true,
      "pvcpolicy":"create",
      "enable_hooklogs":true,
      "zoneid":1597147518,
      "planid":710,
      "content_id":"64495e524cbc9f133d4b92bcc04e1f94",
      "name":"test-ds-1",
      "roles":[
         {
            "name":"server",
            "volume_groups":[

            ],
            "vnodes":[
               {
                  "allocated_host":"cscale-82-140.robinsystems.com",
                  "cm_keys":[
                     "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN8WYsAfs0+a1zzAIWIVV5MrZUaur688E08BL7fm+1uBFjBRPEevwrYrNFL7ebjJxYuB1R3WR+IX8Mmz7CiMDvfEiAQL1Ihj4GZ32WSqzZ7MN15UJK4DQWY7sU++VIusyPUj5goVS2mPj0k4zhheNOlC8XaaHgyUq+NjHHDZF5B4mX7huWfM+kC4u5nCvajoHdfeOse4e1n5RlXtlKRqzBbIma6w8Ej32qFxRLvp4lUXzCylYHBLGH42CKWvtxvETwJUb1kIW9DExSnD+u5fd4Dc2D98\/SY79OO4+aa7GA7JV7412S5kWbtq5cpnkDlvhon\/XzLVQlIqIiAJ6ukVmx root@cscale-82-140"
                  ],
                  "pod_ns":"t001-u000003",
                  "hostname":"test-ds-1-server-01.t001-u000003.svc.cluster.local",
                  "k8s_provider":"robin",
                  "appid":46,
                  "vnodehookargs":{
                     "postcreate":[

                     ]
                  },
                  "numa_allocations":{
                     "0":{
                        "isol_shared_cores_used":0,
                        "gpu_used":0,
                        "hugepages_1g_used":0,
                        "hugepages_2m_used":0,
                        "mem_used":209715200,
                        "non_isol_cores_used":1,
                        "isol_dedicated_cores_used":0
                     }
                  },
                  "enable_portmapping":true,
                  "storage":[
                     {
                        "pvcpolicy":"create",
                        "lvm_type":"None",
                        "size":1073741824,
                        "stordriver":{
                           "type":"das",
                           "faultdomain":"host",
                           "protection":0,
                           "media":"HDD"
                        },
                        "disk_tags":{

                        },
                        "encryption":"none",
                        "vol_ns":"t001-u000003",
                        "snapshot_space_limit":214748365,
                        "fstype":"ext4",
                        "protection":0,
                        "workload":0,
                        "name":"test-ds-1.server.01.data.1.e5506da8-8c25-460d-926b-146ab4b2c9c8",
                        "blocksize":4096,
                        "compression":"disabled",
                        "type":"data",
                        "media":"HDD",
                        "faultdomain":"host",
                        "lvm_vol_count":"0",
                        "allocated":{
                           "partitions":0,
                           "volumeid":"159",
                           "params":{

                           },
                           "media":72,
                           "size":1073741824,
                           "stordriver":{
                              "type":"das",
                              "faultdomain":"host",
                              "protection":0,
                              "media":"HDD"
                           },
                           "block_size":4096,
                           "current_snapshot":"active_snap",
                           "multinode_mounting":false,
                           "snapshot_space_limit":214748365,
                           "slice_size":1073741824,
                           "protection":0,
                           "next_backupid":1,
                           "name":"test-ds-1.server.01.data.1.e5506da8-8c25-460d-926b-146ab4b2c9c8",
                           "next_snapshotid":2,
                           "qgroupid":158,
                           "priority":2,
                           "genkey":1597453455641718,
                           "appname":"default",
                           "grpid":158,
                           "replication":1,
                           "vtype":0,
                           "current_snapshotid":1,
                           "compression":0,
                           "appid":1,
                           "resource_poolid":1
                        },
                        "replication":1,
                        "snap_reserved":20,
                        "device":"\/dev\/sde",
                        "path":"\/data",
                        "layout":"round-robin",
                        "volgrp_name":"test-ds-1.server.01.72.1.100e29ae-e508-4f21-a253-e3c912fcc242",
                        "k8s_name":"test-ds-1-server-01-data-1-e5506da8"
                     },
                     {
                        "pvcpolicy":"create",
                        "lvm_type":"None",
                        "size":1073741824,
                        "stordriver":{
                           "type":"das",
                           "faultdomain":"host",
                           "protection":0,
                           "media":"HDD"
                        },
                        "disk_tags":{

                        },
                        "encryption":"none",
                        "vol_ns":"t001-u000003",
                        "snapshot_space_limit":214748365,
                        "fstype":"raw",
                        "protection":0,
                        "workload":0,
                        "name":"test-ds-1.server.01.block.1.fa7b93eb-46f5-4830-b664-4428ed4088e9",
                        "blocksize":4096,
                        "compression":"disabled",
                        "type":"block",
                        "media":"HDD",
                        "faultdomain":"host",
                        "lvm_vol_count":"0",
                        "allocated":{
                           "partitions":0,
                           "volumeid":"158",
                           "params":{

                           },
                           "media":72,
                           "size":1073741824,
                           "stordriver":{
                              "type":"das",
                              "faultdomain":"host",
                              "protection":0,
                              "media":"HDD"
                           },
                           "block_size":4096,
                           "current_snapshot":"active_snap",
                           "multinode_mounting":false,
                           "snapshot_space_limit":214748365,
                           "slice_size":1073741824,
                           "protection":0,
                           "next_backupid":1,
                           "name":"test-ds-1.server.01.block.1.fa7b93eb-46f5-4830-b664-4428ed4088e9",
                           "next_snapshotid":2,
                           "qgroupid":159,
                           "priority":2,
                           "genkey":1597453455638742,
                           "appname":"default",
                           "grpid":159,
                           "replication":1,
                           "vtype":0,
                           "current_snapshotid":1,
                           "compression":0,
                           "appid":1,
                           "resource_poolid":1
                        },
                        "replication":1,
                        "snap_reserved":20,
                        "device":"\/dev\/sdf",
                        "path":"\/dev\/rda",
                        "layout":"round-robin",
                        "volgrp_name":"test-ds-1.server.01.72.1.18e90f5c-d221-4a5b-8fe9-4abc80a84776",
                        "k8s_name":"test-ds-1-server-01-block-1-fa7b93eb"
                     }
                  ],
                  "id":79,
                  "utime":1597453464,
                  "host_ip":"172.21.27.101",
                  "restart_on_qoscfg":true,
                  "hosttags":{
                     "kubernetes.io\/os":[
                        "linux"
                     ],
                     "robin.io\/robinrpool":[
                        "default"
                     ],
                     "kubernetes.io\/arch":[
                        "amd64"
                     ]
                  },
                  "network":[
                     {
                        "name":"robin-default",
                        "allocated_ip":"172.21.27.101",
                        "allocated_names":[
                           "eth0"
                        ],
                        "allocated_by":"system",
                        "interfaces":1,
                        "ippool":"robin-default",
                        "driver":"calico",
                        "allocated_prefix":16,
                        "allocated_netmask":"255.255.0.0",
                        "subnet":"172.21.0.0"
                     }
                  ],
                  "bundle_object_id":"64495e524cbc9f133d4b92bcc04e1f94",
                  "enable_metrics":true,
                  "bundleid":7,
                  "appname":"test-ds-1",
                  "allocated":{
                     "zonename":"default",
                     "nodeid":1,
                     "zoneid":1597147518,
                     "nodename":"cscale-82-140"
                  },
                  "restart_num":15,
                  "volume_groups":[
                     {
                        "volumes":[
                           "test-ds-1.server.01.data.1.e5506da8-8c25-460d-926b-146ab4b2c9c8"
                        ],
                        "layout":"round-robin",
                        "media":"HDD",
                        "replicas":1,
                        "rpoolid":1,
                        "device_sets":[
                           {
                              "name":"test-ds-1.server.01.72.1.100e29ae-e508-4f21-a253-e3c912fcc242.0.b93bfd54-808f-4839-abf4-c56143f05737",
                              "devices":[
                                 {
                                    "max_throughput_intensive_vols_per_disk":1,
                                    "max_latency_sensitive_vols_per_disk":2,
                                    "tags":{

                                    },
                                    "hostname":"cscale-82-140.robinsystems.com",
                                    "score":96,
                                    "allocated_slices":2,
                                    "reattachable":0,
                                    "stormgr_id":2,
                                    "protected":0,
                                    "slices":77,
                                    "max_volumes_per_disk":10,
                                    "aslices":5,
                                    "psize":107374182400,
                                    "write_unit":4096,
                                    "type":"HDD",
                                    "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                    "wwn":"0x600224804c48fd7e16c608dea0919064",
                                    "pused":167772160,
                                    "host":"cscale-82-140.robinsystems.com",
                                    "capacity":107374182400,
                                    "state":"READY",
                                    "role":"Storage"
                                 }
                              ],
                              "stormgr_id":234
                           }
                        ],
                        "name":"test-ds-1.server.01.72.1.100e29ae-e508-4f21-a253-e3c912fcc242",
                        "stormgr_id":158
                     },
                     {
                        "volumes":[
                           "test-ds-1.server.01.block.1.fa7b93eb-46f5-4830-b664-4428ed4088e9"
                        ],
                        "layout":"round-robin",
                        "media":"HDD",
                        "replicas":1,
                        "rpoolid":1,
                        "device_sets":[
                           {
                              "name":"test-ds-1.server.01.72.1.18e90f5c-d221-4a5b-8fe9-4abc80a84776.0.2eb1b314-7f19-4cb8-8627-d652544194d9",
                              "devices":[
                                 {
                                    "max_throughput_intensive_vols_per_disk":1,
                                    "max_latency_sensitive_vols_per_disk":2,
                                    "tags":{

                                    },
                                    "hostname":"cscale-82-140.robinsystems.com",
                                    "score":96,
                                    "allocated_slices":2,
                                    "reattachable":0,
                                    "stormgr_id":2,
                                    "protected":0,
                                    "slices":77,
                                    "max_volumes_per_disk":10,
                                    "aslices":5,
                                    "psize":107374182400,
                                    "write_unit":4096,
                                    "type":"HDD",
                                    "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                    "wwn":"0x600224804c48fd7e16c608dea0919064",
                                    "pused":167772160,
                                    "host":"cscale-82-140.robinsystems.com",
                                    "capacity":107374182400,
                                    "state":"READY",
                                    "role":"Storage"
                                 }
                              ],
                              "stormgr_id":235
                           }
                        ],
                        "name":"test-ds-1.server.01.72.1.18e90f5c-d221-4a5b-8fe9-4abc80a84776",
                        "stormgr_id":159
                     }
                  ],
                  "rpoolid":1,
                  "sidecar_info":{
                     "mem":0,
                     "cpu":0,
                     "containers":[

                     ],
                     "hugepages_1g":0,
                     "hugepages_2m":0,
                     "gpu":0
                  },
                  "role":"server",
                  "vnodehooks":{
                     "postcreate":"bash postcreate.sh"
                  },
                  "engine":"docker",
                  "desired_status":"ONLINE",
                  "allocated_host_type":"physical",
                  "state":"STARTED",
                  "name":"test-ds-1.server.01",
                  "enable_hooklogs":true,
                  "allocated_host_public_hostname":"cscale-82-140.robinsystems.com",
                  "pod_name":"test-ds-1-server-01",
                  "jobid":1887,
                  "cpu":{
                     "min":0,
                     "max":1,
                     "reserve":false
                  },
                  "role_name":"server",
                  "vnodeid":79,
                  "allocated_host_public_ip":"10.9.82.140",
                  "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1597122699552\/1597452431325\/k8s-test-10.0",
                  "root_fs":"\/usr\/local\/robin\/instances\/test-ds-1-server-01.t001-u000003.svc.cluster.local",
                  "mem":{
                     "size":209715200,
                     "hugepages_1g":0,
                     "hugepages_2m":0
                  },
                  "image":{
                     "name":"robinsys\/centos",
                     "engine":"docker",
                     "registry_hostname":"",
                     "version":"7",
                     "registry_port":"",
                     "entrypoint":"entry.sh",
                     "init_mode":false
                  },
                  "env":{
                     "DOCKER_OPTS":{
                        "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                        "type":"text"
                     },
                     "ROOT_PASSWORD":{
                        "value":"",
                        "type":"password"
                     },
                     "allocated":{
                        "ROBINHOST":"cscale-82-140.robinsystems.com",
                        "DOCKER_OPTS":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                        "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                        "ENABLE_SSH":true,
                        "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux",
                        "ROBINHOST_TAG_ROBINRPOOL":"default",
                        "POD_NAME":"test-ds-1-server-01",
                        "POD_NS":"t001-u000003",
                        "ROOT_PASSWORD":"",
                        "K8S_NODE":"cscale-82-140"
                     },
                     "ENABLE_SSH":{
                        "value":true,
                        "type":"boolean"
                     }
                  },
                  "ctime":1597453464,
                  "service_uids":[

                  ],
                  "calico_inuse":true,
                  "gpu":{
                     "min":0,
                     "max":0
                  }
               }
            ],
            "image":{
               "name":"robinsys\/centos",
               "engine":"docker",
               "registry_hostname":"",
               "version":"7",
               "registry_port":"",
               "entrypoint":"entry.sh",
               "init_mode":false
            },
            "display_name":"server",
            "qgroups":{
               "data":{
                  "wr_weight":1,
                  "wr_min_window":500,
                  "rd_min_window":500,
                  "enabled":false,
                  "rd_max_iops":2000000,
                  "wr_min_iops":0,
                  "wr_max_iops":2000000,
                  "priority":1,
                  "rd_weight":1,
                  "rd_min_iops":0
               },
               "block":{
                  "wr_weight":1,
                  "wr_min_window":500,
                  "rd_min_window":500,
                  "enabled":false,
                  "rd_max_iops":2000000,
                  "wr_min_iops":0,
                  "wr_max_iops":2000000,
                  "priority":1,
                  "rd_weight":1,
                  "rd_min_iops":0
               }
            },
            "restart_on_qoscfg":true
         }
      ],
      "from_template":null,
      "bundle_object_id":"64495e524cbc9f133d4b92bcc04e1f94",
      "apphooks":{
         "postdestroy":"python3 postdestroy.py",
         "allocated":{
            "postdestroy":"python3 postdestroy.py",
            "postcreate":"python3 postcreate.py",
            "precreate":"python3 precreate.py"
         },
         "postcreate":"python3 postcreate.py",
         "precreate":"python3 precreate.py"
      },
      "bundleid":7,
      "snapshot":"enabled",
      "id":46,
      "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1597122699552\/1597452431325\/k8s-test-10.0",
      "robin_version":"5.3.1-182",
      "restart_num":15,
      "clone":"enabled",
      "version":"7",
      "namespace":"t001-u000003",
      "rpool":"default",
      "rpoolid":1,
      "username":"robin",
      "tenant":"Administrators",
      "app_ns":"t001-u000003"
   },
   "jobid":1891
}

11.11. List all Applications

The following command will list all applications created or registered with Robin Platform:

# robin app list --app-kind <app_kind>
                 --app-types <app_type_list>

--app-kind <app_kind>

Filter by application kind (valid choices are ‘robin’, ‘helm’, and ‘flexapp’)

--app-types <app_types>

Filter by application type (valid choices are’MASTER’ and ‘CLONE’)

Example 1 (Listing all Applications):

# robin app list
ROBIN Bundle Apps:

+-------+--------------+--------+--------+---------------+--------+-----+-----+-------------+--------+---------+-----------+-------+
|  Name | Owner/Tenant |  Type  | Parent | Resource Pool | Vnodes | CPU | GPU | Memory (GB) | Status | LastOpr |   Health  | Error |
+-------+--------------+--------+--------+---------------+--------+-----+-----+-------------+--------+---------+-----------+-------+
| mysql |  admin1/t1   | MASTER |   -    |    default    |   1    |  4  |  0  |      4      | Ready  |  ONLINE | Unhealthy |   0   |
| pgsql |  admin1/t1   | MASTER |   -    |    default    |   1    |  1  |  0  |      1      | Ready  |  ONLINE |  Unknown  |   0   |
+-------+--------------+--------+--------+---------------+--------+-----+-----+-------------+--------+---------+-----------+-------+

Helm/Flex Apps:

+-----------+---------+-------------+--------------+--------------+-----------+---------+
| Name      | Type    | State       | Owner/Tenant | Namespace    | Snapshots | Backups |
+-----------+---------+-------------+--------------+--------------+-----------+---------+
| mysql1    | helm    | ONLINE      | admin1/t1    | t003-u000004 | 1         | 1       |
| mysql-hb1 | helm    | ONLINE      | admin1/t1    | t003-u000004 | 0         | 0       |
| mysql2    | helm    | ONLINE      | admin1/t1    | t003-u000004 | 0         | 0       |
| mysql1-b1 | flexapp | INITIALIZED | admin1/t1    | t003-u000004 | 0         | 0       |
+-----------+---------+-------------+--------------+--------------+-----------+---------+

Example 2 (Listing only Robin Applications):

# robin app list --app-kind robin
ROBIN Bundle Apps:

+-------+--------------+--------+--------+---------------+--------+-----+-----+-------------+--------+---------+-----------+-------+
|  Name | Owner/Tenant |  Type  | Parent | Resource Pool | Vnodes | CPU | GPU | Memory (GB) | Status | LastOpr |   Health  | Error |
+-------+--------------+--------+--------+---------------+--------+-----+-----+-------------+--------+---------+-----------+-------+
| mysql |  admin1/t1   | MASTER |   -    |    default    |   1    |  4  |  0  |      4      | Ready  |  ONLINE | Unhealthy |   0   |
| pgsql |  admin1/t1   | MASTER |   -    |    default    |   1    |  1  |  0  |      1      | Ready  |  ONLINE |  Unknown  |   0   |
+-------+--------------+--------+--------+---------------+--------+-----+-----+-------------+--------+---------+-----------+-------+

Returns information on all applications within a cluster including details on their statuses (from Robin’s perspective), resource consumption, and their owners.

End Point: /api/v6/robin_server/appsview

Method: GET

URL Parameters:

  • atype=[MASTER,CLONE] : Utilizing this parameter filters the results by the type specified. Valid values include MASTER and CLONE.

  • akind=[robin,helm,flexapp] : Utilizing this parameter filters the results by the kind specified. Valid values include robin, helm and flexapp.

Data Parameters: None

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error)

Example Response:

Output
{
   "robin":{
      "tenants":[
         {
            "name":"Administrators",
            "id":1
         }
      ],
      "rpools":[
         {
            "name":"default",
            "id":1
         }
      ],
      "zones":[
         {
            "zoneid":1597969746,
            "name":"default",
            "id":1
         }
      ],
      "vnodes":[
         {
            "nodeid":1,
            "mem":4194304,
            "userid":3,
            "zoneid":null,
            "cpu":1,
            "role":"dsbundle",
            "gpu":0,
            "hugepages_1g":0,
            "utime":1598343982,
            "hugepages_2m":0,
            "hostname":"test-app-new-dsbundle-01.t001-u000003.svc.cluster.local",
            "name":"test-app-new.dsbundle.01",
            "status":"ONLINE",
            "pod_name":"test-app-new-dsbundle-01",
            "appid":12,
            "engine":"docker",
            "tenantid":1,
            "state":"STARTED",
            "id":12,
            "desired_status":"ONLINE",
            "pod_ns":"t001-u000003"
         },
         {
            "nodeid":1,
            "mem":1283457024,
            "userid":3,
            "zoneid":null,
            "cpu":1,
            "role":"nginx",
            "gpu":0,
            "hugepages_1g":0,
            "utime":1598453564,
            "hugepages_2m":0,
            "hostname":"demo-nginx-01.t001-u000003.svc.cluster.local",
            "name":"demo.nginx.01",
            "status":"ONLINE",
            "pod_name":"demo-nginx-01",
            "appid":13,
            "engine":"docker",
            "tenantid":1,
            "state":"STARTED",
            "id":13,
            "desired_status":"ONLINE",
            "pod_ns":"t001-u000003"
         }
      ],
      "users":[
         {
            "email":null,
            "tenantid":1,
            "firstname":"Robin",
            "id":3,
            "username":"robin",
            "lastname":"Systems"
         }
      ],
      "nodes":[
         {
            "rpoolid":1,
            "memory_used":0,
            "nvnodes":0,
            "k8s_node_name":"cscale-82-140",
            "zoneid":1,
            "cpu":40,
            "mem":33555701760,
            "mem_for_storage":1073741824,
            "cpu_prov_factor":10,
            "name":"cscale-82-140.robinsystems.com",
            "cpu_cores_present":40,
            "state":"ONLINE",
            "id":1,
            "cores_used":0,
            "services":"{\"update_time\":1598470070.8638851643,\"services\":{\"stormgr-server\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:29:43.555551\",\"MainPID\":2275,\"Id\":\"stormgr-server\"},\"consul-server\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:28:49.778591\",\"MainPID\":566,\"Id\":\"consul-server\"},\"consul_members\":[{\"Port\":29460,\"Status\":1,\"DelegateMax\":5,\"ProtocolMin\":1,\"Tags\":{\"segment\":\"\",\"bootstrap\":\"1\",\"vsn_min\":\"2\",\"build\":\"0.9.4:40f243a+\",\"vsn_max\":\"3\",\"vsn\":\"2\",\"raft_vsn\":\"2\",\"role\":\"consul\",\"dc\":\"consul\",\"id\":\"9d550700-9fac-4de6-b6bc-1b957e82bda9\",\"wan_join_port\":\"29461\",\"port\":\"29459\"},\"Name\":\"cscale-82-140.robinsystems.com\",\"DelegateMin\":2,\"ProtocolCur\":2,\"DelegateCur\":4,\"Addr\":\"10.9.82.140\",\"ProtocolMax\":5}],\"robin-auth-server\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:29:10.587576\",\"MainPID\":1007,\"Id\":\"robin-auth-server\"},\"robin-node-monitor\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:29:31.387560\",\"MainPID\":1245,\"Id\":\"robin-node-monitor\"},\"robin-watchdog\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:28:54.388588\",\"MainPID\":867,\"Id\":\"robin-watchdog\"},\"sherlock-server\":{\"ActiveState\":\"inactive\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":0,\"MainPID\":0,\"Id\":\"sherlock-server\"},\"httpd\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:29:46.799549\",\"MainPID\":2590,\"Id\":\"httpd\"},\"robin-file-server\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:29:15.559572\",\"MainPID\":1074,\"Id\":\"robin-file-server\"},\"robin-event-server\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:29:15.088572\",\"MainPID\":1041,\"Id\":\"robin-event-server\"},\"consul-client\":{\"ActiveState\":\"inactive\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":0,\"MainPID\":0,\"Id\":\"consul-client\"},\"gui-cli\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:29:46.964548\",\"MainPID\":2622,\"Id\":\"gui-cli\"},\"robin-agent\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:29:38.987554\",\"MainPID\":1716,\"Id\":\"robin-agent\"},\"robin-server\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-26 12:27:39.201277\",\"MainPID\":15116,\"Id\":\"robin-server\"},\"iomgr-server\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 12:51:14.290049\",\"MainPID\":29172,\"Id\":\"iomgr-server\"},\"monitor-server\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:29:47.114548\",\"MainPID\":2662,\"Id\":\"monitor-server\"},\"postgresql-9.6\":{\"ActiveState\":\"active\",\"Type\":\"simple\",\"ExecMainStartTimestamp\":\"2020-08-20 10:28:52.396589\",\"MainPID\":662,\"Id\":\"postgresql-9.6\"},\"consul_dns\":true}}"
         }
      ],
      "bundles":[
         {
            "version":"1.0",
            "name":"nginx",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":1
         },
         {
            "version":"1.0",
            "name":"tolerations",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":2
         },
         {
            "version":"1.0",
            "name":"dsbundle",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":3
         },
         {
            "version":"2.0",
            "name":"dsbundle",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":4
         },
         {
            "version":"3.0",
            "name":"dsbundle",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":5
         },
         {
            "version":"4.0",
            "name":"dsbundle",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":6
         },
         {
            "version":"10.0",
            "name":"dsbundle",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":7
         },
         {
            "version":"11.0",
            "name":"dsbundle",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":8
         },
         {
            "version":"12.0",
            "name":"dsbundle",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":9
         },
         {
            "version":"15.0",
            "name":"dsbundle",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":10
         },
         {
            "version":"new",
            "name":"dsbundle",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":11
         },
         {
            "version":"20.0",
            "name":"dsbundle",
            "share_with_all_tenants":false,
            "tenantid":1,
            "userid":3,
            "zoneid":1,
            "limitperbundle":0,
            "id":12
         }
      ],
      "apps":[
         {
            "rpoolid":1,
            "nvnodes":1,
            "zoneid":1,
            "mem":4194304,
            "atype":"MASTER",
            "name":"test-app-new",
            "status":"Ready",
            "hugepages_1g":0,
            "tenantid":1,
            "error":0,
            "utime":1598343982,
            "parentid":null,
            "userid":3,
            "cpu":1,
            "gpu":0,
            "bundleid":12,
            "hugepages_2m":0,
            "health":"Unknown",
            "ctime":1598343982,
            "unique_id":"a54ef254e6ac11eaa97cc972afea67da",
            "state":"ONLINE",
            "id":12,
            "parent_app":""
         },
         {
            "rpoolid":1,
            "nvnodes":1,
            "zoneid":1,
            "mem":1283457024,
            "atype":"MASTER",
            "name":"demo",
            "status":"Ready",
            "hugepages_1g":0,
            "tenantid":1,
            "error":0,
            "utime":1598453574,
            "parentid":null,
            "userid":3,
            "cpu":1,
            "gpu":0,
            "bundleid":1,
            "hugepages_2m":0,
            "health":"Unknown",
            "ctime":1598453564,
            "unique_id":"ba9df9e8e7ab11eaa8012d67016161bd",
            "state":"ONLINE",
            "id":13,
            "parent_app":""
         }
      ]
   },
   "k8s":[
      {
         "backup_schedule":{

         },
         "id":"da5f043ae7d211ea8ed2b5f75df49f21",
         "query":"{\"namespace\":\"t001-u000003\",\"resources\":[],\"selectors\":[],\"apps\":[\"helm\\\/ideal-giraffe\"]}",
         "kind":"helm",
         "tenant":"Administrators",
         "snapshot_schedule":{

         },
         "namespace":"t001-u000003",
         "name":"demo-helm",
         "state":"ONLINE",
         "num_snapshots":0,
         "username":"robin",
         "num_backups":0
      }
   ]
}

11.12. Show information about a specific Application

Issue the following command to get detailed information about a specific application instance:

# robin app info <app_name>
                 --namespace <namespace>
                 --services
                 --network
                 --hooks
                 --appjson
                 --appini
                 --volmap
                 --events
                 --storage
                 --status
                 --networkpolicies

app_name

Application instance name

--namespace <namespace>

If there are multiple applications of the same name but in different namespaces this option can be used to distinguish them

--services

Display information about services for an application

--network

Display network information for an application

--hooks

Display application and vnode hook scripts

--appjson

Display the application JSON file contents. For non Robin Bundle based applications, the Kubernetes YAML file for each of the objects associated with the application is displayed

--appini

Display the appini file contents

--volmap

Display the mapping between the application’s volumes and the respective disk from which they are allocated

--events

Display the events assosciated with the specified application

--storage

Display the storage statistics associated with the application

--status

Display the status of the Kubernetes objects associated with the application

--networkpolicies

Display the Kubernetes Ingress/Egress Network Policies associated with the application

Example 1 (Showing information about a Robin app):

# robin app info mysql

Name: mysql

Bundle Info: mysql docker-8.0

Autopilot: Enabled

ROLE    mysql                (vnodes: 1)

HPA: Not Configured

VNODE            1:mysql.mysql.01                 : mysql-mysql-01 (4 cores) (0 GPUs) (4G) (Hugepages-2m: -) (Hugepages-1g: -) (SSD: -) (HDD: 12G) (SVC ports: -) ONLINE

Volume                                                     | MntPoint       | Size (GB) | SnapSize (GB) | Layout      | Media
-----------------------------------------------------------+----------------+-----------+---------------+-------------+-------
mysql.mysql.01.data.1.da86f291-f60a-4d82-82ea-d6e5f7e4e9d1 | /var/lib/mysql | 10        | 2             | round-robin | HDD

App Hooks: Enabled
Vnode Hooks: Enabled

Example 2 (Showing information about a HELM app):

# robin app info mysql1

Backups:
Name                              : mysql1
Kind                              : helm
State                             : ONLINE
Number of repos                   : 1
Number of snapshots               : 1
Number of usable backups          : 0
Number of archived/failed backups : 1

Query:
-------
{'apps': ['helm/trendy-crocodile'], 'namespace': 't003-u000004', 'resources': [], 'selectors': []}

Repos:
+----------+-----------------------+----------+------------+
| Name     | Bucket                | Path     | Permission |
+----------+-----------------------+----------+------------+
| testrepo | testbucket-1029384756 | dev/tom/ | readwrite  |
+----------+-----------------------+----------+------------+

Snapshots:
+----------------------------------+----------------------------+-------------+--------+----------------------+
| Id                               | Name                       | Description | State  | Creation Time        |
+----------------------------------+----------------------------+-------------+--------+----------------------+
| 327ab8b447b111eaae7f0f55d6e44d6c | mysql1_snapshot-1580863693 | -           | ONLINE | 04 Feb 2020 16:48:19 |
+----------------------------------+----------------------------+-------------+--------+----------------------+

Archived/Failed Backups:
+----------------------------------+--------------------------+-------------+-----------------+----------------------+
| Id                               | Name                     | Description | State           | Creation Time        |
+----------------------------------+--------------------------+-------------+-----------------+----------------------+
| 36b7c9de47b111eaaf8deb154706dccd | mysql1_backup-1580863693 | -           | Deleted locally | 04 Feb 2020 16:48:24 |
+----------------------------------+--------------------------+-------------+-----------------+----------------------+

Example 3 (Showing information about all K8S services for an application):

# robin app info nginx-app --services
App Name: nginx-app

Services:
+-------------------------+--------------+-----------+---------------+----------------+-------------+
| Service Name            | Type         | Ports     | Service Level | Cluster IP     | External IP |
+-------------------------+--------------+-----------+---------------+----------------+-------------+
| nginx-app-nginx-cl-0    | ClusterIP    | 80        | Role          | 172.19.88.109  | N/A         |
| nginx-app-nginx-lb-0    | LoadBalancer | 80:32742  | Role          | 172.19.149.207 | None        |
| nginx-app-nginx-01-np-0 | NodePort     | 80:30486  | VNode         | 172.19.219.189 | N/A         |
+-------------------------+--------------+-----------+---------------+----------------+-------------+

Example 4 (Showing network information for an application):

# robin app info nginx-app --network
App Name: nginx-app

Network Info:
+--------------------+--------------+-----------------+
| Vnode              | IP Addrs     | Number of Intfs |
+--------------------+--------------+-----------------+
| nginx-app.nginx.01 | 172.21.27.0  | 1               |
+--------------------+--------------+-----------------+

Example 5 (Showing network policies attached to an application):

# robin app info nginx-app --networkpolicies
App Name: nginx-app

App Configured K8S Ingress/Egress Network Policies:
+-------------------------------------------+----------------------------------------------+--------------+
| Network Policy                            | Network Policy Type                          | Namespace    |
+-------------------------------------------+----------------------------------------------+--------------+
| np-allow-intra-ns-pods-t001-u000003       | Allow Intra-Namespace Ingress/Egress traffic | t001-u000003 |
| tp-allow-intra-tenant-pods-t001-u000003-1 | Allow Intra-Tenant Ingress/Egress traffic    | t001-u000003 |
| up-allow-intra-user-pods-t001-u000003-3   | Allow Intra-User Ingress/Egress traffic      | t001-u000003 |
+-------------------------------------------+----------------------------------------------+--------------+

Returns detailed information about an application, such as the volumes serving as storage, the resource breakdown and status of each container for every role.

End Point: /api/v6/robin_server/apps/<appname>?info=true&details=vnodes

Method: GET

URL Parameters: None

Data Parameters: None

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error)

Example Response:

Output
{
   "error":0,
   "updates_available":false,
   "disk":2147483648,
   "zoneid":1596601846,
   "bundle_version":"1.5",
   "bundle_name":"RIC",
   "ctime":1596663233,
   "owner":{
      "last_name":"Systems",
      "tenant_id":1,
      "username":"robin",
      "first_name":"Robin",
      "tenant_name":"Administrators",
      "email":null,
      "user_id":3
   },
   "ainstances":[
      {
         "id":6,
         "role":"server",
         "memory":209715200,
         "events":[

         ],
         "vnc_port":null,
         "utime":1596663233,
         "user":"robin",
         "state":"STARTED",
         "name":"test-RIC-1.server.01",
         "ctime":1596663233,
         "public_ips":[

         ],
         "image_format":"UNKNOWN",
         "hugepages_2m":0,
         "storage":[
            {
               "size":1073741824,
               "media":"HDD",
               "state":"ONLINE",
               "name":"test-RIC-1.server.01.data.1.382f1ad5-1294-4e24-8297-9c6025eacfe5",
               "id":"8"
            },
            {
               "size":1073741824,
               "media":"HDD",
               "state":"ONLINE",
               "name":"test-RIC-1.server.01.block.1.1053eaeb-4542-42a5-a173-d69a76703ead",
               "id":"9"
            }
         ],
         "bundle":{
            "pathname":"\/usr\/local\/robin\/collections\/file-collection-1596578146092\/1596663217668\/RIC-1.5",
            "description":"-",
            "tenants":[
               "Administrators"
            ],
            "create_time":"August 05, 2020 14:33:37",
            "content_id":"f972a5725d1bfe2671a79d61856f872a",
            "zoneid":1596601846,
            "share_with_all_tenants":false,
            "user":"robin",
            "type":"ROBIN",
            "name":"RIC",
            "nchildren":0,
            "version":"1.5",
            "file_object_id":1596663217668,
            "bundleid":3,
            "ntemplates":1,
            "tenant":"Administrators",
            "collection_id":1596578146092,
            "napps":1,
            "parent":"",
            "groupid":3
         },
         "image":{
            "version":"",
            "file":"",
            "name":""
         },
         "network_bandwidth":null,
         "app":"test-RIC-1",
         "status":"ONLINE",
         "cpu_cores":1,
         "config":{
            "restart_num":15,
            "service_uids":[

            ],
            "appname":"test-RIC-1",
            "allocated_host":"cscale-82-140.robinsystems.com",
            "allocated_host_public_ip":"10.9.82.140",
            "cpu":{
               "max":1,
               "min":0,
               "reserve":false
            },
            "sidecar_info":{
               "hugepages_1g":0,
               "mem":0,
               "hugepages_2m":0,
               "containers":[

               ],
               "cpu":0,
               "gpu":0
            },
            "id":6,
            "role_name":"server",
            "hosttags":{
               "kubernetes.io\/os":[
                  "linux"
               ],
               "robin.io\/robinrpool":[
                  "default"
               ],
               "kubernetes.io\/arch":[
                  "amd64"
               ]
            },
            "pod_name":"test-ric-1-server-01",
            "role":"server",
            "rpoolid":1,
            "network":[
               {
                  "subnet":"172.21.0.0",
                  "allocated_by":"system",
                  "allocated_ip":"172.21.26.94",
                  "allocated_prefix":16,
                  "allocated_names":[
                     "eth0"
                  ],
                  "interfaces":1,
                  "driver":"calico",
                  "allocated_netmask":"255.255.0.0",
                  "ippool":"robin-default",
                  "name":"robin-default"
               }
            ],
            "storage":[
               {
                  "volgrp_name":"test-RIC-1.server.01.72.1.ea297971-f931-4787-99cc-6782e026b77c",
                  "media":"HDD",
                  "stordriver":{
                     "media":"HDD",
                     "protection":0,
                     "faultdomain":"host",
                     "type":"das"
                  },
                  "workload":0,
                  "type":"data",
                  "snapshot_space_limit":214748365,
                  "faultdomain":"host",
                  "name":"test-RIC-1.server.01.data.1.382f1ad5-1294-4e24-8297-9c6025eacfe5",
                  "blocksize":4096,
                  "layout":"round-robin",
                  "disk_tags":{

                  },
                  "allocated":{
                     "media":72,
                     "volumeid":"8",
                     "priority":2,
                     "genkey":1596663220770472,
                     "grpid":8,
                     "partitions":0,
                     "snapshot_space_limit":214748365,
                     "name":"test-RIC-1.server.01.data.1.382f1ad5-1294-4e24-8297-9c6025eacfe5",
                     "current_snapshot":"active_snap",
                     "params":{

                     },
                     "stordriver":{
                        "media":"HDD",
                        "protection":0,
                        "faultdomain":"host",
                        "type":"das"
                     },
                     "next_backupid":1,
                     "appname":"default",
                     "vtype":0,
                     "resource_poolid":1,
                     "current_snapshotid":1,
                     "block_size":4096,
                     "size":1073741824,
                     "replication":1,
                     "multinode_mounting":false,
                     "appid":1,
                     "next_snapshotid":2,
                     "protection":0,
                     "compression":0,
                     "slice_size":1073741824,
                     "qgroupid":8
                  },
                  "pvcpolicy":"create",
                  "fstype":"ext4",
                  "snap_reserved":20,
                  "size":1073741824,
                  "lvm_vol_count":"0",
                  "lvm_type":"None",
                  "encryption":"none",
                  "protection":0,
                  "compression":"disabled",
                  "vol_ns":"t001-u000003",
                  "replication":1,
                  "path":"\/data",
                  "k8s_name":"test-ric-1-server-01-data-1-382f1ad5"
               },
               {
                  "volgrp_name":"test-RIC-1.server.01.72.1.1e483fd0-2d5c-434c-aef0-91a87796977a",
                  "media":"HDD",
                  "stordriver":{
                     "media":"HDD",
                     "protection":0,
                     "faultdomain":"host",
                     "type":"das"
                  },
                  "workload":0,
                  "type":"block",
                  "snapshot_space_limit":214748365,
                  "faultdomain":"host",
                  "name":"test-RIC-1.server.01.block.1.1053eaeb-4542-42a5-a173-d69a76703ead",
                  "blocksize":4096,
                  "layout":"round-robin",
                  "disk_tags":{

                  },
                  "allocated":{
                     "media":72,
                     "volumeid":"9",
                     "priority":2,
                     "genkey":1596663220787432,
                     "grpid":9,
                     "partitions":0,
                     "snapshot_space_limit":214748365,
                     "name":"test-RIC-1.server.01.block.1.1053eaeb-4542-42a5-a173-d69a76703ead",
                     "current_snapshot":"active_snap",
                     "params":{

                     },
                     "stordriver":{
                        "media":"HDD",
                        "protection":0,
                        "faultdomain":"host",
                        "type":"das"
                     },
                     "next_backupid":1,
                     "appname":"default",
                     "vtype":0,
                     "resource_poolid":1,
                     "current_snapshotid":1,
                     "block_size":4096,
                     "size":1073741824,
                     "replication":1,
                     "multinode_mounting":false,
                     "appid":1,
                     "next_snapshotid":2,
                     "protection":0,
                     "compression":0,
                     "slice_size":1073741824,
                     "qgroupid":9
                  },
                  "pvcpolicy":"create",
                  "fstype":"raw",
                  "snap_reserved":20,
                  "size":1073741824,
                  "replication":1,
                  "lvm_type":"None",
                  "encryption":"none",
                  "protection":0,
                  "compression":"disabled",
                  "vol_ns":"t001-u000003",
                  "lvm_vol_count":"0",
                  "path":"\/dev\/rda",
                  "k8s_name":"test-ric-1-server-01-block-1-1053eaeb"
               }
            ],
            "cm_keys":[
               "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgHRR3k5onnh+hjqpoW\/oLkr37GOs2f8FQVDJUHHrDeB+\/cn9c\/nez4lu9J0FkCe+mQwhnuiCicunZEjVZOWpIvjxblbw6Lh7ZkN+o5mOkcxCayrp3fDFnR1PerJJhRPnJU60zxFYbAGPrQtCywQ+b7J9hLtNaqCBf9eAwVWiLSEcFs0SkrjXjFjXOTCaq8b45AWSYc6ZxhzMsFTkTF3C37rTmEGIijmDvUbq1HRGXtQ2YZrlo\/yjJqn8wk8E+cw+Sh\/PEsudaVzoZRqyQ\/lsWBt\/+0nFON8pYttyXPZjKhuGDB5QNtUZ4kgvzDfr1TF1XEXHfo2PdsswRkQ4rU8bF root@cscale-82-140"
            ],
            "env":{
               "ENABLE_SSH":{
                  "value":true,
                  "type":"boolean"
               },
               "ROOT_PASSWORD":{
                  "value":"",
                  "type":"password"
               },
               "allocated":{
                  "K8S_NODE":"cscale-82-140",
                  "ROBINHOST":"cscale-82-140.robinsystems.com",
                  "POD_NAME":"test-ric-1-server-01",
                  "ROOT_PASSWORD":"",
                  "ENABLE_SSH":true,
                  "ROBINHOST_TAG_ROBINRPOOL":"default",
                  "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                  "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux",
                  "POD_NS":"t001-u000003",
                  "DOCKER_OPTS":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN"
               },
               "DOCKER_OPTS":{
                  "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                  "type":"text"
               }
            },
            "appid":6,
            "root_fs":"\/usr\/local\/robin\/instances\/test-ric-1-server-01.t001-u000003.svc.cluster.local",
            "enable_hooklogs":true,
            "bundle_object_id":"f972a5725d1bfe2671a79d61856f872a",
            "numa_allocations":{
               "0":{
                  "hugepages_1g_used":0,
                  "hugepages_2m_used":0,
                  "gpu_used":0,
                  "isol_shared_cores_used":0,
                  "non_isol_cores_used":1,
                  "mem_used":209715200,
                  "isol_dedicated_cores_used":0
               }
            },
            "utime":1596663233,
            "volume_groups":[
               {
                  "layout":"round-robin",
                  "volumes":[
                     "test-RIC-1.server.01.data.1.382f1ad5-1294-4e24-8297-9c6025eacfe5"
                  ],
                  "media":"HDD",
                  "device_sets":[
                     {
                        "devices":[
                           {
                              "tags":{

                              },
                              "pused":1107296256,
                              "allocated_slices":2,
                              "type":"HDD",
                              "state":"READY",
                              "aslices":29,
                              "slices":77,
                              "stormgr_id":1,
                              "max_throughput_intensive_vols_per_disk":1,
                              "write_unit":4096,
                              "host":"cscale-82-140.robinsystems.com",
                              "role":"Storage",
                              "protected":0,
                              "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                              "reattachable":0,
                              "score":84,
                              "psize":107374182400,
                              "max_volumes_per_disk":10,
                              "wwn":"0x600224804c48fd7e16c608dea0919064",
                              "capacity":107374182400,
                              "hostname":"cscale-82-140.robinsystems.com",
                              "max_latency_sensitive_vols_per_disk":2
                           }
                        ],
                        "name":"test-RIC-1.server.01.72.1.ea297971-f931-4787-99cc-6782e026b77c.0.1e8feb41-fd42-4409-b8c1-751331febdc1",
                        "stormgr_id":8
                     }
                  ],
                  "rpoolid":1,
                  "name":"test-RIC-1.server.01.72.1.ea297971-f931-4787-99cc-6782e026b77c",
                  "replicas":1,
                  "stormgr_id":8
               },
               {
                  "layout":"round-robin",
                  "volumes":[
                     "test-RIC-1.server.01.block.1.1053eaeb-4542-42a5-a173-d69a76703ead"
                  ],
                  "media":"HDD",
                  "device_sets":[
                     {
                        "devices":[
                           {
                              "tags":{

                              },
                              "pused":1107296256,
                              "allocated_slices":2,
                              "type":"HDD",
                              "state":"READY",
                              "aslices":29,
                              "slices":77,
                              "stormgr_id":1,
                              "max_throughput_intensive_vols_per_disk":1,
                              "write_unit":4096,
                              "host":"cscale-82-140.robinsystems.com",
                              "role":"Storage",
                              "protected":0,
                              "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                              "reattachable":0,
                              "score":84,
                              "psize":107374182400,
                              "max_volumes_per_disk":10,
                              "wwn":"0x600224804c48fd7e16c608dea0919064",
                              "capacity":107374182400,
                              "hostname":"cscale-82-140.robinsystems.com",
                              "max_latency_sensitive_vols_per_disk":2
                           }
                        ],
                        "name":"test-RIC-1.server.01.72.1.1e483fd0-2d5c-434c-aef0-91a87796977a.0.5bf728c4-ea26-4e0f-82d7-c584fcf0bd9a",
                        "stormgr_id":9
                     }
                  ],
                  "rpoolid":1,
                  "name":"test-RIC-1.server.01.72.1.1e483fd0-2d5c-434c-aef0-91a87796977a",
                  "replicas":1,
                  "stormgr_id":9
               }
            ],
            "bundleid":3,
            "vnodehooks":{
               "postcreate":"bash postcreate.sh"
            },
            "mem":{
               "size":209715200,
               "hugepages_1g":0,
               "hugepages_2m":0
            },
            "enable_portmapping":true,
            "state":"STARTED",
            "name":"test-RIC-1.server.01",
            "k8s_provider":"robin",
            "ctime":1596663233,
            "vnodeid":6,
            "allocated":{
               "zoneid":1596601846,
               "nodename":"cscale-82-140",
               "nodeid":1,
               "zonename":"default"
            },
            "image":{
               "init_mode":false,
               "version":"7",
               "registry_hostname":"",
               "entrypoint":"entry.sh",
               "name":"robinsys\/centos",
               "engine":"docker",
               "registry_port":""
            },
            "calico_inuse":true,
            "enable_metrics":true,
            "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1596578146092\/1596663217668\/RIC-1.5",
            "vnodehookargs":{
               "postcreate":[

               ]
            },
            "pod_ns":"t001-u000003",
            "allocated_host_public_hostname":"cscale-82-140.robinsystems.com",
            "allocated_host_type":"physical",
            "hostname":"test-ric-1-server-01.t001-u000003.svc.cluster.local",
            "host_ip":"172.21.26.94",
            "restart_on_qoscfg":true,
            "engine":"docker",
            "gpu":{
               "max":0,
               "min":0
            }
         },
         "physical_host":{
            "compute_status":"READY",
            "status":1,
            "hostname":"cscale-82-140.robinsystems.com",
            "compute_state":"ONLINE",
            "public_hostname":"cscale-82-140.robinsystems.com",
            "compute_services":[
               [
                  "robin-agent",
                  true
               ],
               [
                  "monitor-server",
                  true
               ],
               [
                  "iomgr-server",
                  true
               ]
            ],
            "state":"ONLINE",
            "public_ip":"10.9.82.140"
         },
         "gpu_cores":0,
         "restartpolicy":{
            "restarts_done":0,
            "burst_count":0,
            "burst_start_time":0,
            "burst_interval":600,
            "id":13,
            "restart_limit":15
         },
         "distribution":{
            "version":"",
            "name":""
         },
         "root_fs":"\/usr\/local\/robin\/instances\/test-ric-1-server-01.t001-u000003.svc.cluster.local",
         "volumes":[
            {
               "size":1073741824,
               "media":"HDD",
               "state":"ONLINE",
               "name":"test-RIC-1.server.01.data.1.382f1ad5-1294-4e24-8297-9c6025eacfe5",
               "id":"8"
            },
            {
               "size":1073741824,
               "media":"HDD",
               "state":"ONLINE",
               "name":"test-RIC-1.server.01.block.1.1053eaeb-4542-42a5-a173-d69a76703ead",
               "id":"9"
            }
         ],
         "capacity":{
            "threshold":85,
            "used":0,
            "total":0,
            "unit":"Bytes"
         },
         "service_ports":null,
         "tenant":"Administrators",
         "hugepages_1g":0,
         "rpool":"default",
         "autopilot":true,
         "desired_status":"ONLINE",
         "ip_addresses":[
            "172.21.26.94\/16"
         ],
         "engine":"docker",
         "hostname":"test-ric-1-server-01.t001-u000003.svc.cluster.local"
      }
   ],
   "local_avail":true,
   "nbackups":0,
   "id":6,
   "clone":false,
   "unique_id":"549c0ac2d76311eab3c057add9d364f3",
   "parentid":"",
   "status":"Ready",
   "atype":"MASTER",
   "message":"",
   "nsnapshots":0,
   "utime":1596663233,
   "rpool":"default",
   "autopilot":true,
   "snapshots":[

   ],
   "user_shares":[

   ],
   "mem":209715200,
   "backups":[

   ],
   "state":"ONLINE",
   "name":"test-RIC-1",
   "cpu":1,
   "restore_status":{

   },
   "appinfo":{

   },
   "nvnodes":1,
   "resources":[

   ],
   "health":"Unknown",
   "config":{
      "content_id":"f972a5725d1bfe2671a79d61856f872a",
      "from_template":null,
      "enable_metrics":true,
      "kind":"ROBIN",
      "id":6,
      "name":"test-RIC-1",
      "auto_relocate":true,
      "version":"7",
      "zoneid":1596601846,
      "app_ns":"t001-u000003",
      "namespace":"t001-u000003",
      "tenant":"Administrators",
      "clone":"enabled",
      "pvcpolicy":"create",
      "planid":6,
      "restart_num":15,
      "rpoolid":1,
      "roles":[
         {
            "qgroups":{
               "block":{
                  "rd_weight":1,
                  "rd_max_iops":2000000,
                  "priority":1,
                  "wr_min_iops":0,
                  "wr_min_window":500,
                  "rd_min_iops":0,
                  "rd_min_window":500,
                  "enabled":false,
                  "wr_max_iops":2000000,
                  "wr_weight":1
               },
               "data":{
                  "rd_weight":1,
                  "rd_max_iops":2000000,
                  "priority":1,
                  "wr_min_iops":0,
                  "wr_min_window":500,
                  "rd_min_iops":0,
                  "rd_min_window":500,
                  "enabled":false,
                  "wr_max_iops":2000000,
                  "wr_weight":1
               }
            },
            "vnodes":[
               {
                  "restart_num":15,
                  "service_uids":[

                  ],
                  "appname":"test-RIC-1",
                  "allocated_host":"cscale-82-140.robinsystems.com",
                  "allocated_host_public_ip":"10.9.82.140",
                  "cpu":{
                     "max":1,
                     "min":0,
                     "reserve":false
                  },
                  "sidecar_info":{
                     "hugepages_1g":0,
                     "mem":0,
                     "hugepages_2m":0,
                     "containers":[

                     ],
                     "cpu":0,
                     "gpu":0
                  },
                  "id":6,
                  "role_name":"server",
                  "hosttags":{
                     "kubernetes.io\/os":[
                        "linux"
                     ],
                     "robin.io\/robinrpool":[
                        "default"
                     ],
                     "kubernetes.io\/arch":[
                        "amd64"
                     ]
                  },
                  "pod_name":"test-ric-1-server-01",
                  "role":"server",
                  "rpoolid":1,
                  "status":"ONLINE",
                  "network":[
                     {
                        "subnet":"172.21.0.0",
                        "allocated_by":"system",
                        "allocated_ip":"172.21.26.94",
                        "allocated_prefix":16,
                        "allocated_names":[
                           "eth0"
                        ],
                        "interfaces":1,
                        "driver":"calico",
                        "allocated_netmask":"255.255.0.0",
                        "ippool":"robin-default",
                        "name":"robin-default"
                     }
                  ],
                  "storage":[
                     {
                        "volgrp_name":"test-RIC-1.server.01.72.1.ea297971-f931-4787-99cc-6782e026b77c",
                        "media":"HDD",
                        "stordriver":{
                           "media":"HDD",
                           "protection":0,
                           "faultdomain":"host",
                           "type":"das"
                        },
                        "workload":0,
                        "type":"data",
                        "snapshot_space_limit":214748365,
                        "faultdomain":"host",
                        "name":"test-RIC-1.server.01.data.1.382f1ad5-1294-4e24-8297-9c6025eacfe5",
                        "blocksize":4096,
                        "layout":"round-robin",
                        "disk_tags":{

                        },
                        "allocated":{
                           "media":72,
                           "volumeid":"8",
                           "priority":2,
                           "genkey":1596663220770472,
                           "grpid":8,
                           "partitions":0,
                           "snapshot_space_limit":214748365,
                           "name":"test-RIC-1.server.01.data.1.382f1ad5-1294-4e24-8297-9c6025eacfe5",
                           "current_snapshot":"active_snap",
                           "params":{

                           },
                           "stordriver":{
                              "media":"HDD",
                              "protection":0,
                              "faultdomain":"host",
                              "type":"das"
                           },
                           "next_backupid":1,
                           "appname":"default",
                           "vtype":0,
                           "resource_poolid":1,
                           "current_snapshotid":1,
                           "block_size":4096,
                           "size":1073741824,
                           "replication":1,
                           "multinode_mounting":false,
                           "appid":1,
                           "next_snapshotid":2,
                           "protection":0,
                           "compression":0,
                           "slice_size":1073741824,
                           "qgroupid":8
                        },
                        "pvcpolicy":"create",
                        "fstype":"ext4",
                        "snap_reserved":20,
                        "size":1073741824,
                        "lvm_vol_count":"0",
                        "lvm_type":"None",
                        "encryption":"none",
                        "protection":0,
                        "compression":"disabled",
                        "vol_ns":"t001-u000003",
                        "replication":1,
                        "path":"\/data",
                        "k8s_name":"test-ric-1-server-01-data-1-382f1ad5"
                     },
                     {
                        "volgrp_name":"test-RIC-1.server.01.72.1.1e483fd0-2d5c-434c-aef0-91a87796977a",
                        "media":"HDD",
                        "stordriver":{
                           "media":"HDD",
                           "protection":0,
                           "faultdomain":"host",
                           "type":"das"
                        },
                        "workload":0,
                        "type":"block",
                        "snapshot_space_limit":214748365,
                        "faultdomain":"host",
                        "name":"test-RIC-1.server.01.block.1.1053eaeb-4542-42a5-a173-d69a76703ead",
                        "blocksize":4096,
                        "layout":"round-robin",
                        "disk_tags":{

                        },
                        "allocated":{
                           "media":72,
                           "volumeid":"9",
                           "priority":2,
                           "genkey":1596663220787432,
                           "grpid":9,
                           "partitions":0,
                           "snapshot_space_limit":214748365,
                           "name":"test-RIC-1.server.01.block.1.1053eaeb-4542-42a5-a173-d69a76703ead",
                           "current_snapshot":"active_snap",
                           "params":{

                           },
                           "stordriver":{
                              "media":"HDD",
                              "protection":0,
                              "faultdomain":"host",
                              "type":"das"
                           },
                           "next_backupid":1,
                           "appname":"default",
                           "vtype":0,
                           "resource_poolid":1,
                           "current_snapshotid":1,
                           "block_size":4096,
                           "size":1073741824,
                           "replication":1,
                           "multinode_mounting":false,
                           "appid":1,
                           "next_snapshotid":2,
                           "protection":0,
                           "compression":0,
                           "slice_size":1073741824,
                           "qgroupid":9
                        },
                        "pvcpolicy":"create",
                        "fstype":"raw",
                        "snap_reserved":20,
                        "size":1073741824,
                        "replication":1,
                        "lvm_type":"None",
                        "encryption":"none",
                        "protection":0,
                        "compression":"disabled",
                        "vol_ns":"t001-u000003",
                        "lvm_vol_count":"0",
                        "path":"\/dev\/rda",
                        "k8s_name":"test-ric-1-server-01-block-1-1053eaeb"
                     }
                  ],
                  "cm_keys":[
                     "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgHRR3k5onnh+hjqpoW\/oLkr37GOs2f8FQVDJUHHrDeB+\/cn9c\/nez4lu9J0FkCe+mQwhnuiCicunZEjVZOWpIvjxblbw6Lh7ZkN+o5mOkcxCayrp3fDFnR1PerJJhRPnJU60zxFYbAGPrQtCywQ+b7J9hLtNaqCBf9eAwVWiLSEcFs0SkrjXjFjXOTCaq8b45AWSYc6ZxhzMsFTkTF3C37rTmEGIijmDvUbq1HRGXtQ2YZrlo\/yjJqn8wk8E+cw+Sh\/PEsudaVzoZRqyQ\/lsWBt\/+0nFON8pYttyXPZjKhuGDB5QNtUZ4kgvzDfr1TF1XEXHfo2PdsswRkQ4rU8bF root@cscale-82-140"
                  ],
                  "env":{
                     "ENABLE_SSH":{
                        "value":true,
                        "type":"boolean"
                     },
                     "ROOT_PASSWORD":{
                        "value":"",
                        "type":"password"
                     },
                     "allocated":{
                        "K8S_NODE":"cscale-82-140",
                        "ROBINHOST":"cscale-82-140.robinsystems.com",
                        "POD_NAME":"test-ric-1-server-01",
                        "ROOT_PASSWORD":"",
                        "ENABLE_SSH":true,
                        "ROBINHOST_TAG_ROBINRPOOL":"default",
                        "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                        "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux",
                        "POD_NS":"t001-u000003",
                        "DOCKER_OPTS":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN"
                     },
                     "DOCKER_OPTS":{
                        "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                        "type":"text"
                     }
                  },
                  "appid":6,
                  "root_fs":"\/usr\/local\/robin\/instances\/test-ric-1-server-01.t001-u000003.svc.cluster.local",
                  "enable_hooklogs":true,
                  "bundle_object_id":"f972a5725d1bfe2671a79d61856f872a",
                  "numa_allocations":{
                     "0":{
                        "hugepages_1g_used":0,
                        "hugepages_2m_used":0,
                        "gpu_used":0,
                        "isol_shared_cores_used":0,
                        "non_isol_cores_used":1,
                        "mem_used":209715200,
                        "isol_dedicated_cores_used":0
                     }
                  },
                  "utime":1596663233,
                  "volume_groups":[
                     {
                        "layout":"round-robin",
                        "volumes":[
                           "test-RIC-1.server.01.data.1.382f1ad5-1294-4e24-8297-9c6025eacfe5"
                        ],
                        "media":"HDD",
                        "device_sets":[
                           {
                              "devices":[
                                 {
                                    "tags":{

                                    },
                                    "pused":1107296256,
                                    "allocated_slices":2,
                                    "type":"HDD",
                                    "state":"READY",
                                    "aslices":29,
                                    "slices":77,
                                    "stormgr_id":1,
                                    "max_throughput_intensive_vols_per_disk":1,
                                    "write_unit":4096,
                                    "host":"cscale-82-140.robinsystems.com",
                                    "role":"Storage",
                                    "protected":0,
                                    "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                    "reattachable":0,
                                    "score":84,
                                    "psize":107374182400,
                                    "max_volumes_per_disk":10,
                                    "wwn":"0x600224804c48fd7e16c608dea0919064",
                                    "capacity":107374182400,
                                    "hostname":"cscale-82-140.robinsystems.com",
                                    "max_latency_sensitive_vols_per_disk":2
                                 }
                              ],
                              "name":"test-RIC-1.server.01.72.1.ea297971-f931-4787-99cc-6782e026b77c.0.1e8feb41-fd42-4409-b8c1-751331febdc1",
                              "stormgr_id":8
                           }
                        ],
                        "rpoolid":1,
                        "name":"test-RIC-1.server.01.72.1.ea297971-f931-4787-99cc-6782e026b77c",
                        "replicas":1,
                        "stormgr_id":8
                     },
                     {
                        "layout":"round-robin",
                        "volumes":[
                           "test-RIC-1.server.01.block.1.1053eaeb-4542-42a5-a173-d69a76703ead"
                        ],
                        "media":"HDD",
                        "device_sets":[
                           {
                              "devices":[
                                 {
                                    "tags":{

                                    },
                                    "pused":1107296256,
                                    "allocated_slices":2,
                                    "type":"HDD",
                                    "state":"READY",
                                    "aslices":29,
                                    "slices":77,
                                    "stormgr_id":1,
                                    "max_throughput_intensive_vols_per_disk":1,
                                    "write_unit":4096,
                                    "host":"cscale-82-140.robinsystems.com",
                                    "role":"Storage",
                                    "protected":0,
                                    "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                    "reattachable":0,
                                    "score":84,
                                    "psize":107374182400,
                                    "max_volumes_per_disk":10,
                                    "wwn":"0x600224804c48fd7e16c608dea0919064",
                                    "capacity":107374182400,
                                    "hostname":"cscale-82-140.robinsystems.com",
                                    "max_latency_sensitive_vols_per_disk":2
                                 }
                              ],
                              "name":"test-RIC-1.server.01.72.1.1e483fd0-2d5c-434c-aef0-91a87796977a.0.5bf728c4-ea26-4e0f-82d7-c584fcf0bd9a",
                              "stormgr_id":9
                           }
                        ],
                        "rpoolid":1,
                        "name":"test-RIC-1.server.01.72.1.1e483fd0-2d5c-434c-aef0-91a87796977a",
                        "replicas":1,
                        "stormgr_id":9
                     }
                  ],
                  "bundleid":3,
                  "vnodehooks":{
                     "postcreate":"bash postcreate.sh"
                  },
                  "mem":{
                     "size":209715200,
                     "hugepages_1g":0,
                     "hugepages_2m":0
                  },
                  "enable_portmapping":true,
                  "state":"STARTED",
                  "name":"test-RIC-1.server.01",
                  "k8s_provider":"robin",
                  "ctime":1596663233,
                  "vnodeid":6,
                  "allocated":{
                     "zoneid":1596601846,
                     "nodename":"cscale-82-140",
                     "nodeid":1,
                     "zonename":"default"
                  },
                  "image":{
                     "init_mode":false,
                     "version":"7",
                     "registry_hostname":"",
                     "entrypoint":"entry.sh",
                     "name":"robinsys\/centos",
                     "engine":"docker",
                     "registry_port":""
                  },
                  "calico_inuse":true,
                  "enable_metrics":true,
                  "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1596578146092\/1596663217668\/RIC-1.5",
                  "vnodehookargs":{
                     "postcreate":[

                     ]
                  },
                  "pod_ns":"t001-u000003",
                  "allocated_host_public_hostname":"cscale-82-140.robinsystems.com",
                  "allocated_host_type":"physical",
                  "hostname":"test-ric-1-server-01.t001-u000003.svc.cluster.local",
                  "host_ip":"172.21.26.94",
                  "restart_on_qoscfg":true,
                  "engine":"docker",
                  "gpu":{
                     "max":0,
                     "min":0
                  }
               }
            ],
            "name":"server",
            "display_name":"server",
            "restart_on_qoscfg":true,
            "volume_groups":[

            ],
            "image":{
               "init_mode":false,
               "version":"7",
               "registry_hostname":"",
               "entrypoint":"entry.sh",
               "name":"robinsys\/centos",
               "engine":"docker",
               "registry_port":""
            }
         }
      ],
      "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1596578146092\/1596663217668\/RIC-1.5",
      "username":"robin",
      "robin_version":"5.3.0-171",
      "enable_hooklogs":true,
      "bundle_object_id":"f972a5725d1bfe2671a79d61856f872a",
      "bundleid":3,
      "rpool":"default",
      "snapshot":"enabled"
   },
   "vnodes":[
      "test-RIC-1.server.01"
   ],
   "repos":[

   ],
   "parent_app":"",
   "app_kind":"robin",
   "appcfg_autopilot":true,
   "bundleid":3,
   "backup_state":"Hydrated",
   "storagerepos":[

   ],
   "gpu":0
}

11.13. Stop a Robin Application

Issue the following command to stop an application:

# robin app stop [<app_name>]
                 --all

app_name

Application instance name

--all

Stop all applications

Example:

# robin app stop mysql --wait
Job:  177 Name: ApplicationStop      State: VALIDATED       Error: 0
Job:  177 Name: ApplicationStop      State: WAITING         Error: 0
Job:  177 Name: ApplicationStop      State: COMPLETED       Error: 0

Note

The robin app stop command can only be used with Robin Applications.

Stops a Robin bundle based application that is currently running.

End Point: /api/v3/robin_server/apps/<app_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: stop - This mandatory field within the payload specifies that the stop operation is to be performed.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "robin_version":"5.3.1-182",
      "auto_relocate":true,
      "pvcpolicy":"create",
      "enable_hooklogs":true,
      "zoneid":1597147518,
      "planid":712,
      "content_id":"a360b352c8c800e7f1af4075bb3320a4",
      "name":"demo",
      "roles":[
         {
            "name":"server",
            "display_name":"server",
            "vnodes":[
               {
                  "allocated_host":"cscale-82-140.robinsystems.com",
                  "cm_keys":[
                     "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN8WYsAfs0+a1zzAIWIVV5MrZUaur688E08BL7fm+1uBFjBRPEevwrYrNFL7ebjJxYuB1R3WR+IX8Mmz7CiMDvfEiAQL1Ihj4GZ32WSqzZ7MN15UJK4DQWY7sU++VIusyPUj5goVS2mPj0k4zhheNOlC8XaaHgyUq+NjHHDZF5B4mX7huWfM+kC4u5nCvajoHdfeOse4e1n5RlXtlKRqzBbIma6w8Ej32qFxRLvp4lUXzCylYHBLGH42CKWvtxvETwJUb1kIW9DExSnD+u5fd4Dc2D98\/SY79OO4+aa7GA7JV7412S5kWbtq5cpnkDlvhon\/XzLVQlIqIiAJ6ukVmx root@cscale-82-140"
                  ],
                  "enable_portmapping":true,
                  "hostname":"demo-server-01.t001-u000003.svc.cluster.local",
                  "k8s_provider":"robin",
                  "appid":47,
                  "vnodehookargs":{
                     "postcreate":[

                     ]
                  },
                  "numa_allocations":{
                     "0":{
                        "isol_shared_cores_used":0,
                        "hugepages_2m_used":0,
                        "hugepages_1g_used":0,
                        "gpu_used":0,
                        "mem_used":209715200,
                        "non_isol_cores_used":1,
                        "isol_dedicated_cores_used":0
                     }
                  },
                  "pod_ns":"t001-u000003",
                  "storage":[
                     {
                        "type":"data",
                        "lvm_type":"None",
                        "size":1073741824,
                        "stordriver":{
                           "type":"das",
                           "faultdomain":"host",
                           "protection":0,
                           "media":"HDD"
                        },
                        "media":"HDD",
                        "disk_tags":{

                        },
                        "path":"\/data",
                        "vol_ns":"t001-u000003",
                        "snapshot_space_limit":214748365,
                        "fstype":"ext4",
                        "protection":0,
                        "workload":0,
                        "name":"demo.server.01.data.1.4589956b-3709-42f1-812d-6eeb1be3b947",
                        "blocksize":4096,
                        "layout":"round-robin",
                        "pvcpolicy":"create",
                        "faultdomain":"host",
                        "lvm_vol_count":"0",
                        "allocated":{
                           "partitions":0,
                           "volumeid":"161",
                           "params":{

                           },
                           "media":72,
                           "size":1073741824,
                           "stordriver":{
                              "type":"das",
                              "faultdomain":"host",
                              "protection":0,
                              "media":"HDD"
                           },
                           "block_size":4096,
                           "current_snapshot":"active_snap",
                           "multinode_mounting":false,
                           "snapshot_space_limit":214748365,
                           "slice_size":1073741824,
                           "protection":0,
                           "next_backupid":1,
                           "name":"demo.server.01.data.1.4589956b-3709-42f1-812d-6eeb1be3b947",
                           "next_snapshotid":2,
                           "qgroupid":161,
                           "genkey":1597467855202873,
                           "appname":"default",
                           "grpid":160,
                           "resource_poolid":1,
                           "replication":1,
                           "vtype":0,
                           "current_snapshotid":1,
                           "compression":0,
                           "appid":1,
                           "priority":2
                        },
                        "replication":1,
                        "snap_reserved":20,
                        "encryption":"none",
                        "compression":"disabled",
                        "volgrp_name":"demo.server.01.72.1.8f528537-0a21-49d0-9f4a-75ed17559bcd",
                        "k8s_name":"demo-server-01-data-1-4589956b"
                     },
                     {
                        "type":"block",
                        "lvm_type":"None",
                        "size":1073741824,
                        "stordriver":{
                           "type":"das",
                           "faultdomain":"host",
                           "protection":0,
                           "media":"HDD"
                        },
                        "media":"HDD",
                        "disk_tags":{

                        },
                        "path":"\/dev\/rda",
                        "vol_ns":"t001-u000003",
                        "snapshot_space_limit":214748365,
                        "fstype":"raw",
                        "protection":0,
                        "workload":0,
                        "name":"demo.server.01.block.1.13a9b1b5-8187-4e2d-8a63-2479d5602e34",
                        "blocksize":4096,
                        "layout":"round-robin",
                        "pvcpolicy":"create",
                        "faultdomain":"host",
                        "lvm_vol_count":"0",
                        "allocated":{
                           "partitions":0,
                           "volumeid":"160",
                           "params":{

                           },
                           "media":72,
                           "size":1073741824,
                           "stordriver":{
                              "type":"das",
                              "faultdomain":"host",
                              "protection":0,
                              "media":"HDD"
                           },
                           "block_size":4096,
                           "current_snapshot":"active_snap",
                           "multinode_mounting":false,
                           "snapshot_space_limit":214748365,
                           "slice_size":1073741824,
                           "protection":0,
                           "next_backupid":1,
                           "name":"demo.server.01.block.1.13a9b1b5-8187-4e2d-8a63-2479d5602e34",
                           "next_snapshotid":2,
                           "qgroupid":162,
                           "genkey":1597467855198470,
                           "appname":"default",
                           "grpid":161,
                           "resource_poolid":1,
                           "replication":1,
                           "vtype":0,
                           "current_snapshotid":1,
                           "compression":0,
                           "appid":1,
                           "priority":2
                        },
                        "replication":1,
                        "snap_reserved":20,
                        "encryption":"none",
                        "compression":"disabled",
                        "volgrp_name":"demo.server.01.72.1.ff9de003-4425-425a-ac04-db91540ee43a",
                        "k8s_name":"demo-server-01-block-1-13a9b1b5"
                     }
                  ],
                  "id":80,
                  "utime":1597467867,
                  "host_ip":"172.21.24.156",
                  "restart_on_qoscfg":true,
                  "hosttags":{
                     "robin.io\/robinrpool":[
                        "default"
                     ],
                     "kubernetes.io\/os":[
                        "linux"
                     ],
                     "kubernetes.io\/arch":[
                        "amd64"
                     ]
                  },
                  "network":[
                     {
                        "name":"robin-default",
                        "allocated_ip":"172.21.24.156",
                        "allocated_names":[
                           "eth0"
                        ],
                        "allocated_by":"system",
                        "interfaces":1,
                        "subnet":"172.21.0.0",
                        "allocated_prefix":16,
                        "driver":"calico",
                        "allocated_netmask":"255.255.0.0",
                        "ippool":"robin-default"
                     }
                  ],
                  "calico_inuse":true,
                  "enable_metrics":true,
                  "bundleid":1,
                  "appname":"demo",
                  "allocated":{
                     "zonename":"default",
                     "nodeid":1,
                     "zoneid":1597147518,
                     "nodename":"cscale-82-140"
                  },
                  "restart_num":15,
                  "volume_groups":[
                     {
                        "volumes":[
                           "demo.server.01.data.1.4589956b-3709-42f1-812d-6eeb1be3b947"
                        ],
                        "layout":"round-robin",
                        "media":"HDD",
                        "replicas":1,
                        "rpoolid":1,
                        "device_sets":[
                           {
                              "name":"demo.server.01.72.1.8f528537-0a21-49d0-9f4a-75ed17559bcd.0.9e88d02c-3d16-4c05-89ff-29a4e2f2204a",
                              "devices":[
                                 {
                                    "max_throughput_intensive_vols_per_disk":1,
                                    "max_latency_sensitive_vols_per_disk":2,
                                    "tags":{

                                    },
                                    "hostname":"cscale-82-140.robinsystems.com",
                                    "score":96,
                                    "allocated_slices":2,
                                    "reattachable":0,
                                    "stormgr_id":2,
                                    "protected":0,
                                    "slices":77,
                                    "max_volumes_per_disk":10,
                                    "aslices":5,
                                    "psize":107374182400,
                                    "write_unit":4096,
                                    "type":"HDD",
                                    "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                    "wwn":"0x600224804c48fd7e16c608dea0919064",
                                    "pused":234881024,
                                    "host":"cscale-82-140.robinsystems.com",
                                    "capacity":107374182400,
                                    "role":"Storage",
                                    "state":"READY"
                                 }
                              ],
                              "stormgr_id":236
                           }
                        ],
                        "name":"demo.server.01.72.1.8f528537-0a21-49d0-9f4a-75ed17559bcd",
                        "stormgr_id":160
                     },
                     {
                        "volumes":[
                           "demo.server.01.block.1.13a9b1b5-8187-4e2d-8a63-2479d5602e34"
                        ],
                        "layout":"round-robin",
                        "media":"HDD",
                        "replicas":1,
                        "rpoolid":1,
                        "device_sets":[
                           {
                              "name":"demo.server.01.72.1.ff9de003-4425-425a-ac04-db91540ee43a.0.64d7adca-97f0-4ed4-9e98-f81e7557b437",
                              "devices":[
                                 {
                                    "max_throughput_intensive_vols_per_disk":1,
                                    "max_latency_sensitive_vols_per_disk":2,
                                    "tags":{

                                    },
                                    "hostname":"cscale-82-140.robinsystems.com",
                                    "score":96,
                                    "allocated_slices":2,
                                    "reattachable":0,
                                    "stormgr_id":2,
                                    "protected":0,
                                    "slices":77,
                                    "max_volumes_per_disk":10,
                                    "aslices":5,
                                    "psize":107374182400,
                                    "write_unit":4096,
                                    "type":"HDD",
                                    "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                    "wwn":"0x600224804c48fd7e16c608dea0919064",
                                    "pused":234881024,
                                    "host":"cscale-82-140.robinsystems.com",
                                    "capacity":107374182400,
                                    "role":"Storage",
                                    "state":"READY"
                                 }
                              ],
                              "stormgr_id":237
                           }
                        ],
                        "name":"demo.server.01.72.1.ff9de003-4425-425a-ac04-db91540ee43a",
                        "stormgr_id":161
                     }
                  ],
                  "rpoolid":1,
                  "sidecar_info":{
                     "mem":0,
                     "cpu":0,
                     "containers":[

                     ],
                     "hugepages_1g":0,
                     "hugepages_2m":0,
                     "gpu":0
                  },
                  "role":"server",
                  "vnodehooks":{
                     "postcreate":"bash postcreate.sh"
                  },
                  "allocated_host_type":"physical",
                  "state":"STARTED",
                  "name":"demo.server.01",
                  "enable_hooklogs":true,
                  "allocated_host_public_hostname":"cscale-82-140.robinsystems.com",
                  "pod_name":"demo-server-01",
                  "engine":"docker",
                  "cpu":{
                     "min":0,
                     "max":1,
                     "reserve":false
                  },
                  "role_name":"server",
                  "vnodeid":80,
                  "allocated_host_public_ip":"10.9.82.140",
                  "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1597122699552\/1597122985597\/centos-1.0",
                  "root_fs":"\/usr\/local\/robin\/instances\/demo-server-01.t001-u000003.svc.cluster.local",
                  "mem":{
                     "size":209715200,
                     "hugepages_2m":0,
                     "hugepages_1g":0
                  },
                  "image":{
                     "name":"robinsys\/centos",
                     "engine":"docker",
                     "registry_hostname":"",
                     "version":"7",
                     "registry_port":"",
                     "entrypoint":"entry.sh",
                     "init_mode":false
                  },
                  "env":{
                     "DOCKER_OPTS":{
                        "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                        "type":"text"
                     },
                     "ROOT_PASSWORD":{
                        "value":"",
                        "type":"password"
                     },
                     "allocated":{
                        "ROBINHOST":"cscale-82-140.robinsystems.com",
                        "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux",
                        "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                        "DOCKER_OPTS":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                        "ROBINHOST_TAG_ROBINRPOOL":"default",
                        "POD_NAME":"demo-server-01",
                        "POD_NS":"t001-u000003",
                        "ROOT_PASSWORD":"",
                        "K8S_NODE":"cscale-82-140",
                        "ENABLE_SSH":true
                     },
                     "ENABLE_SSH":{
                        "value":true,
                        "type":"boolean"
                     }
                  },
                  "ctime":1597467867,
                  "service_uids":[

                  ],
                  "bundle_object_id":"a360b352c8c800e7f1af4075bb3320a4",
                  "gpu":{
                     "min":0,
                     "max":0
                  }
               }
            ],
            "image":{
               "name":"robinsys\/centos",
               "engine":"docker",
               "registry_hostname":"",
               "version":"7",
               "registry_port":"",
               "entrypoint":"entry.sh",
               "init_mode":false
            },
            "volume_groups":[

            ],
            "qgroups":{
               "data":{
                  "wr_min_window":500,
                  "wr_weight":1,
                  "rd_min_window":500,
                  "enabled":false,
                  "wr_max_iops":2000000,
                  "wr_min_iops":0,
                  "priority":1,
                  "rd_max_iops":2000000,
                  "rd_weight":1,
                  "rd_min_iops":0
               },
               "block":{
                  "wr_min_window":500,
                  "wr_weight":1,
                  "rd_min_window":500,
                  "enabled":false,
                  "wr_max_iops":2000000,
                  "wr_min_iops":0,
                  "priority":1,
                  "rd_max_iops":2000000,
                  "rd_weight":1,
                  "rd_min_iops":0
               }
            },
            "restart_on_qoscfg":true
         }
      ],
      "bundle_object_id":"a360b352c8c800e7f1af4075bb3320a4",
      "tenant":"Administrators",
      "bundleid":1,
      "snapshot":"enabled",
      "id":47,
      "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1597122699552\/1597122985597\/centos-1.0",
      "from_template":null,
      "restart_num":15,
      "clone":"enabled",
      "version":"7",
      "namespace":"t001-u000003",
      "rpool":"default",
      "rpoolid":1,
      "username":"robin",
      "enable_metrics":true,
      "app_ns":"t001-u000003"
   },
   "jobid":1896
}

11.14. Start a Robin Application

Issue the following command to stop an application:

# robin app start [<app_name>]
                  --all

app_name

Application instance name

--all

Start all applications

Example:

# robin app start mysql --wait
Job:  174 Name: ApplicationStart     State: VALIDATED       Error: 0
Job:  174 Name: ApplicationStart     State: WAITING         Error: 0
Job:  174 Name: ApplicationStart     State: COMPLETED       Error: 0

Note

The robin app start command can only be used with Robin Applications.

Starts a Robin bundle based application that is currently not running.

End Point: /api/v3/robin_server/apps/<app_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: start - This mandatory field within the payload specifies that the start operation is to be performed.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "orig_config":{
         "robin_version":"5.3.1-182",
         "auto_relocate":true,
         "pvcpolicy":"create",
         "enable_hooklogs":true,
         "zoneid":1597147518,
         "planid":712,
         "content_id":"a360b352c8c800e7f1af4075bb3320a4",
         "name":"demo",
         "roles":[
            {
               "name":"server",
               "volume_groups":[

               ],
               "vnodes":[
                  {
                     "allocated_host":"cscale-82-140.robinsystems.com",
                     "cm_keys":[
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN8WYsAfs0+a1zzAIWIVV5MrZUaur688E08BL7fm+1uBFjBRPEevwrYrNFL7ebjJxYuB1R3WR+IX8Mmz7CiMDvfEiAQL1Ihj4GZ32WSqzZ7MN15UJK4DQWY7sU++VIusyPUj5goVS2mPj0k4zhheNOlC8XaaHgyUq+NjHHDZF5B4mX7huWfM+kC4u5nCvajoHdfeOse4e1n5RlXtlKRqzBbIma6w8Ej32qFxRLvp4lUXzCylYHBLGH42CKWvtxvETwJUb1kIW9DExSnD+u5fd4Dc2D98\/SY79OO4+aa7GA7JV7412S5kWbtq5cpnkDlvhon\/XzLVQlIqIiAJ6ukVmx root@cscale-82-140"
                     ],
                     "enable_portmapping":true,
                     "hostname":"demo-server-01.t001-u000003.svc.cluster.local",
                     "vnodeid":80,
                     "appid":47,
                     "vnodehookargs":{
                        "postcreate":[

                        ]
                     },
                     "numa_allocations":{
                        "0":{
                           "isol_shared_cores_used":0,
                           "gpu_used":0,
                           "hugepages_1g_used":0,
                           "hugepages_2m_used":0,
                           "mem_used":209715200,
                           "non_isol_cores_used":1,
                           "isol_dedicated_cores_used":0
                        }
                     },
                     "pod_ns":"t001-u000003",
                     "storage":[
                        {
                           "pvcpolicy":"create",
                           "lvm_type":"None",
                           "size":1073741824,
                           "stordriver":{
                              "media":"HDD",
                              "faultdomain":"host",
                              "protection":0,
                              "type":"das"
                           },
                           "disk_tags":{

                           },
                           "path":"\/data",
                           "vol_ns":"t001-u000003",
                           "snapshot_space_limit":214748365,
                           "fstype":"ext4",
                           "replication":1,
                           "workload":0,
                           "name":"demo.server.01.data.1.4589956b-3709-42f1-812d-6eeb1be3b947",
                           "blocksize":4096,
                           "compression":"disabled",
                           "type":"data",
                           "media":"HDD",
                           "faultdomain":"host",
                           "lvm_vol_count":"0",
                           "allocated":{
                              "partitions":0,
                              "volumeid":"161",
                              "multinode_mounting":false,
                              "media":72,
                              "size":1073741824,
                              "stordriver":{
                                 "media":"HDD",
                                 "faultdomain":"host",
                                 "protection":0,
                                 "type":"das"
                              },
                              "block_size":4096,
                              "current_snapshot":"active_snap",
                              "params":{

                              },
                              "snapshot_space_limit":214748365,
                              "slice_size":1073741824,
                              "replication":1,
                              "next_backupid":1,
                              "name":"demo.server.01.data.1.4589956b-3709-42f1-812d-6eeb1be3b947",
                              "next_snapshotid":2,
                              "qgroupid":161,
                              "priority":2,
                              "genkey":1597467855202873,
                              "appname":"default",
                              "grpid":160,
                              "protection":0,
                              "vtype":0,
                              "current_snapshotid":1,
                              "compression":0,
                              "appid":1,
                              "resource_poolid":1
                           },
                           "protection":0,
                           "snap_reserved":20,
                           "encryption":"none",
                           "layout":"round-robin",
                           "volgrp_name":"demo.server.01.72.1.8f528537-0a21-49d0-9f4a-75ed17559bcd",
                           "k8s_name":"demo-server-01-data-1-4589956b"
                        },
                        {
                           "pvcpolicy":"create",
                           "lvm_type":"None",
                           "size":1073741824,
                           "stordriver":{
                              "media":"HDD",
                              "faultdomain":"host",
                              "protection":0,
                              "type":"das"
                           },
                           "disk_tags":{

                           },
                           "path":"\/dev\/rda",
                           "vol_ns":"t001-u000003",
                           "snapshot_space_limit":214748365,
                           "fstype":"raw",
                           "replication":1,
                           "workload":0,
                           "name":"demo.server.01.block.1.13a9b1b5-8187-4e2d-8a63-2479d5602e34",
                           "blocksize":4096,
                           "compression":"disabled",
                           "type":"block",
                           "media":"HDD",
                           "faultdomain":"host",
                           "lvm_vol_count":"0",
                           "allocated":{
                              "partitions":0,
                              "volumeid":"160",
                              "multinode_mounting":false,
                              "media":72,
                              "size":1073741824,
                              "stordriver":{
                                 "media":"HDD",
                                 "faultdomain":"host",
                                 "protection":0,
                                 "type":"das"
                              },
                              "block_size":4096,
                              "current_snapshot":"active_snap",
                              "params":{

                              },
                              "snapshot_space_limit":214748365,
                              "slice_size":1073741824,
                              "replication":1,
                              "next_backupid":1,
                              "name":"demo.server.01.block.1.13a9b1b5-8187-4e2d-8a63-2479d5602e34",
                              "next_snapshotid":2,
                              "qgroupid":162,
                              "priority":2,
                              "genkey":1597467855198470,
                              "appname":"default",
                              "grpid":161,
                              "protection":0,
                              "vtype":0,
                              "current_snapshotid":1,
                              "compression":0,
                              "appid":1,
                              "resource_poolid":1
                           },
                           "protection":0,
                           "snap_reserved":20,
                           "encryption":"none",
                           "layout":"round-robin",
                           "volgrp_name":"demo.server.01.72.1.ff9de003-4425-425a-ac04-db91540ee43a",
                           "k8s_name":"demo-server-01-block-1-13a9b1b5"
                        }
                     ],
                     "id":80,
                     "utime":1597467867,
                     "name":"demo.server.01",
                     "restart_on_qoscfg":true,
                     "hosttags":{
                        "kubernetes.io\/os":[
                           "linux"
                        ],
                        "robin.io\/robinrpool":[
                           "default"
                        ],
                        "kubernetes.io\/arch":[
                           "amd64"
                        ]
                     },
                     "network":[
                        {
                           "name":"robin-default",
                           "driver":"calico",
                           "allocated_ip":"172.21.24.156",
                           "allocated_netmask":"255.255.0.0",
                           "interfaces":1,
                           "ippool":"robin-default",
                           "allocated_by":"system",
                           "allocated_prefix":16,
                           "allocated_names":[
                              "eth0"
                           ],
                           "subnet":"172.21.0.0"
                        }
                     ],
                     "calico_inuse":true,
                     "enable_metrics":true,
                     "bundleid":1,
                     "appname":"demo",
                     "allocated":{
                        "zonename":"default",
                        "nodeid":1,
                        "zoneid":1597147518,
                        "nodename":"cscale-82-140"
                     },
                     "restart_num":15,
                     "volume_groups":[
                        {
                           "volumes":[
                              "demo.server.01.data.1.4589956b-3709-42f1-812d-6eeb1be3b947"
                           ],
                           "device_sets":[
                              {
                                 "name":"demo.server.01.72.1.8f528537-0a21-49d0-9f4a-75ed17559bcd.0.9e88d02c-3d16-4c05-89ff-29a4e2f2204a",
                                 "devices":[
                                    {
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "tags":{

                                       },
                                       "hostname":"cscale-82-140.robinsystems.com",
                                       "score":96,
                                       "allocated_slices":2,
                                       "reattachable":0,
                                       "stormgr_id":2,
                                       "protected":0,
                                       "slices":77,
                                       "max_volumes_per_disk":10,
                                       "aslices":5,
                                       "psize":107374182400,
                                       "write_unit":4096,
                                       "type":"HDD",
                                       "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                       "wwn":"0x600224804c48fd7e16c608dea0919064",
                                       "pused":234881024,
                                       "host":"cscale-82-140.robinsystems.com",
                                       "capacity":107374182400,
                                       "role":"Storage",
                                       "state":"READY"
                                    }
                                 ],
                                 "stormgr_id":236
                              }
                           ],
                           "media":"HDD",
                           "replicas":1,
                           "rpoolid":1,
                           "layout":"round-robin",
                           "name":"demo.server.01.72.1.8f528537-0a21-49d0-9f4a-75ed17559bcd",
                           "stormgr_id":160
                        },
                        {
                           "volumes":[
                              "demo.server.01.block.1.13a9b1b5-8187-4e2d-8a63-2479d5602e34"
                           ],
                           "device_sets":[
                              {
                                 "name":"demo.server.01.72.1.ff9de003-4425-425a-ac04-db91540ee43a.0.64d7adca-97f0-4ed4-9e98-f81e7557b437",
                                 "devices":[
                                    {
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "tags":{

                                       },
                                       "hostname":"cscale-82-140.robinsystems.com",
                                       "score":96,
                                       "allocated_slices":2,
                                       "reattachable":0,
                                       "stormgr_id":2,
                                       "protected":0,
                                       "slices":77,
                                       "max_volumes_per_disk":10,
                                       "aslices":5,
                                       "psize":107374182400,
                                       "write_unit":4096,
                                       "type":"HDD",
                                       "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                       "wwn":"0x600224804c48fd7e16c608dea0919064",
                                       "pused":234881024,
                                       "host":"cscale-82-140.robinsystems.com",
                                       "capacity":107374182400,
                                       "role":"Storage",
                                       "state":"READY"
                                    }
                                 ],
                                 "stormgr_id":237
                              }
                           ],
                           "media":"HDD",
                           "replicas":1,
                           "rpoolid":1,
                           "layout":"round-robin",
                           "name":"demo.server.01.72.1.ff9de003-4425-425a-ac04-db91540ee43a",
                           "stormgr_id":161
                        }
                     ],
                     "rpoolid":1,
                     "sidecar_info":{
                        "gpu":0,
                        "mem":0,
                        "cpu":0,
                        "containers":[

                        ],
                        "hugepages_1g":0,
                        "hugepages_2m":0
                     },
                     "role":"server",
                     "vnodehooks":{
                        "postcreate":"bash postcreate.sh"
                     },
                     "ctime":1597467867,
                     "allocated_host_type":"physical",
                     "gpu":{
                        "min":0,
                        "max":0
                     },
                     "host_ip":"172.21.24.156",
                     "enable_hooklogs":true,
                     "allocated_host_public_hostname":"cscale-82-140.robinsystems.com",
                     "pod_name":"demo-server-01",
                     "engine":"docker",
                     "cpu":{
                        "min":0,
                        "max":1,
                        "reserve":false
                     },
                     "k8s_provider":"robin",
                     "allocated_host_public_ip":"10.9.82.140",
                     "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1597122699552\/1597122985597\/centos-1.0",
                     "root_fs":"\/usr\/local\/robin\/instances\/demo-server-01.t001-u000003.svc.cluster.local",
                     "mem":{
                        "size":209715200,
                        "hugepages_1g":0,
                        "hugepages_2m":0
                     },
                     "image":{
                        "name":"robinsys\/centos",
                        "engine":"docker",
                        "registry_hostname":"",
                        "version":"7",
                        "registry_port":"",
                        "entrypoint":"entry.sh",
                        "init_mode":false
                     },
                     "env":{
                        "DOCKER_OPTS":{
                           "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                           "type":"text"
                        },
                        "ROOT_PASSWORD":{
                           "value":"",
                           "type":"password"
                        },
                        "allocated":{
                           "ROBINHOST":"cscale-82-140.robinsystems.com",
                           "DOCKER_OPTS":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                           "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                           "ENABLE_SSH":true,
                           "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux",
                           "ROBINHOST_TAG_ROBINRPOOL":"default",
                           "POD_NAME":"demo-server-01",
                           "POD_NS":"t001-u000003",
                           "ROOT_PASSWORD":"",
                           "K8S_NODE":"cscale-82-140"
                        },
                        "ENABLE_SSH":{
                           "value":true,
                           "type":"boolean"
                        }
                     },
                     "state":"STARTED",
                     "service_uids":[

                     ],
                     "bundle_object_id":"a360b352c8c800e7f1af4075bb3320a4",
                     "role_name":"server"
                  }
               ],
               "image":{
                  "name":"robinsys\/centos",
                  "engine":"docker",
                  "registry_hostname":"",
                  "version":"7",
                  "registry_port":"",
                  "entrypoint":"entry.sh",
                  "init_mode":false
               },
               "display_name":"server",
               "qgroups":{
                  "data":{
                     "wr_weight":1,
                     "wr_min_window":500,
                     "rd_min_iops":0,
                     "enabled":false,
                     "wr_max_iops":2000000,
                     "rd_max_iops":2000000,
                     "priority":1,
                     "rd_min_window":500,
                     "rd_weight":1,
                     "wr_min_iops":0
                  },
                  "block":{
                     "wr_weight":1,
                     "wr_min_window":500,
                     "rd_min_iops":0,
                     "enabled":false,
                     "wr_max_iops":2000000,
                     "rd_max_iops":2000000,
                     "priority":1,
                     "rd_min_window":500,
                     "rd_weight":1,
                     "wr_min_iops":0
                  }
               },
               "restart_on_qoscfg":true
            }
         ],
         "bundle_object_id":"a360b352c8c800e7f1af4075bb3320a4",
         "tenant":"Administrators",
         "bundleid":1,
         "snapshot":"enabled",
         "id":47,
         "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1597122699552\/1597122985597\/centos-1.0",
         "from_template":null,
         "restart_num":15,
         "clone":"enabled",
         "version":"7",
         "namespace":"t001-u000003",
         "rpool":"default",
         "rpoolid":1,
         "username":"robin",
         "enable_metrics":true,
         "app_ns":"t001-u000003"
      },
      "kind":"robin",
      "name":"demo",
      "opcode":2,
      "namespace":"t001-u000003",
      "current_user":{
         "tenants":[
            "Administrators"
         ],
         "session_expires":"2020-08-15T09:44:41",
         "tenant_role":"superadmin",
         },
         "user_contexts":[
            "robin"
         ],
         "tenant_id":1,
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "ip_addr":"172.20.0.1",
         "user_permissions":{

         },
         "user_id":3,
         "namespace":"t001-u000003",
         "username":"robin",
         "user_context":"robin",
         "tenant":"Administrators"
      },
      "action":"start"
   },
   "jobid":1899
}

11.15. Restart a Robin Application

Issue the following command to restart an application:

# robin app restart [<app_name>]
                    --all

app_name

Application instance name

--all

Restart all applications

Example:

# robin app restart mysql --wait
Job:  180 Name: ApplicationStart     State: VALIDATED       Error: 0
Job:  180 Name: ApplicationStart     State: WAITING         Error: 0
Job:  180 Name: ApplicationStart     State: COMPLETED       Error: 0

Note

The robin app restart command can only be used with Robin Applications.

Restarts a Robin bundle based application.

End Point: /api/v3/robin_server/apps/<app_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: redeploy - This mandatory field within the payload specifies that the restart operation is to be performed.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "orig_config":{
         "robin_version":"5.3.1-182",
         "auto_relocate":true,
         "pvcpolicy":"create",
         "enable_hooklogs":true,
         "zoneid":1597147518,
         "planid":713,
         "content_id":"a360b352c8c800e7f1af4075bb3320a4",
         "name":"demo",
         "roles":[
            {
               "name":"server",
               "display_name":"server",
               "vnodes":[
                  {
                     "allocated_host":"cscale-82-140.robinsystems.com",
                     "cm_keys":[
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN8WYsAfs0+a1zzAIWIVV5MrZUaur688E08BL7fm+1uBFjBRPEevwrYrNFL7ebjJxYuB1R3WR+IX8Mmz7CiMDvfEiAQL1Ihj4GZ32WSqzZ7MN15UJK4DQWY7sU++VIusyPUj5goVS2mPj0k4zhheNOlC8XaaHgyUq+NjHHDZF5B4mX7huWfM+kC4u5nCvajoHdfeOse4e1n5RlXtlKRqzBbIma6w8Ej32qFxRLvp4lUXzCylYHBLGH42CKWvtxvETwJUb1kIW9DExSnD+u5fd4Dc2D98\/SY79OO4+aa7GA7JV7412S5kWbtq5cpnkDlvhon\/XzLVQlIqIiAJ6ukVmx root@cscale-82-140"
                     ],
                     "enable_portmapping":true,
                     "hostname":"demo-server-01.t001-u000003.svc.cluster.local",
                     "k8s_provider":"robin",
                     "appid":47,
                     "vnodehookargs":{
                        "postcreate":[

                        ]
                     },
                     "numa_allocations":{
                        "0":{
                           "isol_shared_cores_used":0,
                           "gpu_used":0,
                           "hugepages_1g_used":0,
                           "hugepages_2m_used":0,
                           "mem_used":209715200,
                           "non_isol_cores_used":1,
                           "isol_dedicated_cores_used":0
                        }
                     },
                     "pod_ns":"t001-u000003",
                     "storage":[
                        {
                           "pvcpolicy":"create",
                           "lvm_type":"None",
                           "size":1073741824,
                           "stordriver":{
                              "type":"das",
                              "faultdomain":"host",
                              "protection":0,
                              "media":"HDD"
                           },
                           "media":"HDD",
                           "disk_tags":{

                           },
                           "path":"\/data",
                           "vol_ns":"t001-u000003",
                           "snapshot_space_limit":214748365,
                           "fstype":"ext4",
                           "protection":0,
                           "workload":0,
                           "name":"demo.server.01.data.1.4589956b-3709-42f1-812d-6eeb1be3b947",
                           "blocksize":4096,
                           "layout":"round-robin",
                           "type":"data",
                           "faultdomain":"host",
                           "lvm_vol_count":"0",
                           "allocated":{
                              "partitions":0,
                              "volumeid":"161",
                              "params":{

                              },
                              "media":72,
                              "size":1073741824,
                              "stordriver":{
                                 "type":"das",
                                 "faultdomain":"host",
                                 "protection":0,
                                 "media":"HDD"
                              },
                              "block_size":4096,
                              "current_snapshot":"active_snap",
                              "multinode_mounting":false,
                              "snapshot_space_limit":214748365,
                              "slice_size":1073741824,
                              "protection":0,
                              "next_backupid":1,
                              "name":"demo.server.01.data.1.4589956b-3709-42f1-812d-6eeb1be3b947",
                              "next_snapshotid":2,
                              "qgroupid":161,
                              "genkey":1597467855202873,
                              "appname":"default",
                              "grpid":160,
                              "resource_poolid":1,
                              "replication":1,
                              "vtype":0,
                              "current_snapshotid":1,
                              "compression":0,
                              "appid":1,
                              "priority":2
                           },
                           "replication":1,
                           "snap_reserved":20,
                           "device":"\/dev\/sde",
                           "encryption":"none",
                           "compression":"disabled",
                           "volgrp_name":"demo.server.01.72.1.8f528537-0a21-49d0-9f4a-75ed17559bcd",
                           "k8s_name":"demo-server-01-data-1-4589956b"
                        },
                        {
                           "pvcpolicy":"create",
                           "lvm_type":"None",
                           "size":1073741824,
                           "stordriver":{
                              "type":"das",
                              "faultdomain":"host",
                              "protection":0,
                              "media":"HDD"
                           },
                           "media":"HDD",
                           "disk_tags":{

                           },
                           "path":"\/dev\/rda",
                           "vol_ns":"t001-u000003",
                           "snapshot_space_limit":214748365,
                           "fstype":"raw",
                           "protection":0,
                           "workload":0,
                           "name":"demo.server.01.block.1.13a9b1b5-8187-4e2d-8a63-2479d5602e34",
                           "blocksize":4096,
                           "layout":"round-robin",
                           "type":"block",
                           "faultdomain":"host",
                           "lvm_vol_count":"0",
                           "allocated":{
                              "partitions":0,
                              "volumeid":"160",
                              "params":{

                              },
                              "media":72,
                              "size":1073741824,
                              "stordriver":{
                                 "type":"das",
                                 "faultdomain":"host",
                                 "protection":0,
                                 "media":"HDD"
                              },
                              "block_size":4096,
                              "current_snapshot":"active_snap",
                              "multinode_mounting":false,
                              "snapshot_space_limit":214748365,
                              "slice_size":1073741824,
                              "protection":0,
                              "next_backupid":1,
                              "name":"demo.server.01.block.1.13a9b1b5-8187-4e2d-8a63-2479d5602e34",
                              "next_snapshotid":2,
                              "qgroupid":162,
                              "genkey":1597467855198470,
                              "appname":"default",
                              "grpid":161,
                              "resource_poolid":1,
                              "replication":1,
                              "vtype":0,
                              "current_snapshotid":1,
                              "compression":0,
                              "appid":1,
                              "priority":2
                           },
                           "replication":1,
                           "snap_reserved":20,
                           "device":"\/dev\/sdf",
                           "encryption":"none",
                           "compression":"disabled",
                           "volgrp_name":"demo.server.01.72.1.ff9de003-4425-425a-ac04-db91540ee43a",
                           "k8s_name":"demo-server-01-block-1-13a9b1b5"
                        }
                     ],
                     "id":80,
                     "utime":1597467867,
                     "host_ip":"172.21.24.156",
                     "restart_on_qoscfg":true,
                     "hosttags":{
                        "kubernetes.io\/os":[
                           "linux"
                        ],
                        "robin.io\/robinrpool":[
                           "default"
                        ],
                        "kubernetes.io\/arch":[
                           "amd64"
                        ]
                     },
                     "network":[
                        {
                           "name":"robin-default",
                           "allocated_ip":"172.21.24.156",
                           "allocated_names":[
                              "eth0"
                           ],
                           "allocated_by":"system",
                           "interfaces":1,
                           "subnet":"172.21.0.0",
                           "driver":"calico",
                           "allocated_prefix":16,
                           "allocated_netmask":"255.255.0.0",
                           "ippool":"robin-default"
                        }
                     ],
                     "calico_inuse":true,
                     "enable_metrics":true,
                     "bundleid":1,
                     "appname":"demo",
                     "allocated":{
                        "zonename":"default",
                        "nodeid":1,
                        "zoneid":1597147518,
                        "nodename":"cscale-82-140"
                     },
                     "restart_num":15,
                     "volume_groups":[
                        {
                           "volumes":[
                              "demo.server.01.data.1.4589956b-3709-42f1-812d-6eeb1be3b947"
                           ],
                           "layout":"round-robin",
                           "media":"HDD",
                           "replicas":1,
                           "rpoolid":1,
                           "device_sets":[
                              {
                                 "name":"demo.server.01.72.1.8f528537-0a21-49d0-9f4a-75ed17559bcd.0.9e88d02c-3d16-4c05-89ff-29a4e2f2204a",
                                 "devices":[
                                    {
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "tags":{

                                       },
                                       "hostname":"cscale-82-140.robinsystems.com",
                                       "score":96,
                                       "allocated_slices":2,
                                       "reattachable":0,
                                       "stormgr_id":2,
                                       "protected":0,
                                       "slices":77,
                                       "max_volumes_per_disk":10,
                                       "aslices":5,
                                       "psize":107374182400,
                                       "write_unit":4096,
                                       "type":"HDD",
                                       "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                       "wwn":"0x600224804c48fd7e16c608dea0919064",
                                       "pused":234881024,
                                       "host":"cscale-82-140.robinsystems.com",
                                       "capacity":107374182400,
                                       "role":"Storage",
                                       "state":"READY"
                                    }
                                 ],
                                 "stormgr_id":236
                              }
                           ],
                           "name":"demo.server.01.72.1.8f528537-0a21-49d0-9f4a-75ed17559bcd",
                           "stormgr_id":160
                        },
                        {
                           "volumes":[
                              "demo.server.01.block.1.13a9b1b5-8187-4e2d-8a63-2479d5602e34"
                           ],
                           "layout":"round-robin",
                           "media":"HDD",
                           "replicas":1,
                           "rpoolid":1,
                           "device_sets":[
                              {
                                 "name":"demo.server.01.72.1.ff9de003-4425-425a-ac04-db91540ee43a.0.64d7adca-97f0-4ed4-9e98-f81e7557b437",
                                 "devices":[
                                    {
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "tags":{

                                       },
                                       "hostname":"cscale-82-140.robinsystems.com",
                                       "score":96,
                                       "allocated_slices":2,
                                       "reattachable":0,
                                       "stormgr_id":2,
                                       "protected":0,
                                       "slices":77,
                                       "max_volumes_per_disk":10,
                                       "aslices":5,
                                       "psize":107374182400,
                                       "write_unit":4096,
                                       "type":"HDD",
                                       "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                       "wwn":"0x600224804c48fd7e16c608dea0919064",
                                       "pused":234881024,
                                       "host":"cscale-82-140.robinsystems.com",
                                       "capacity":107374182400,
                                       "role":"Storage",
                                       "state":"READY"
                                    }
                                 ],
                                 "stormgr_id":237
                              }
                           ],
                           "name":"demo.server.01.72.1.ff9de003-4425-425a-ac04-db91540ee43a",
                           "stormgr_id":161
                        }
                     ],
                     "rpoolid":1,
                     "sidecar_info":{
                        "mem":0,
                        "cpu":0,
                        "containers":[

                        ],
                        "gpu":0,
                        "hugepages_2m":0,
                        "hugepages_1g":0
                     },
                     "role":"server",
                     "vnodehooks":{
                        "postcreate":"bash postcreate.sh"
                     },
                     "engine":"docker",
                     "desired_status":"ONLINE",
                     "allocated_host_type":"physical",
                     "state":"STARTED",
                     "name":"demo.server.01",
                     "enable_hooklogs":true,
                     "allocated_host_public_hostname":"cscale-82-140.robinsystems.com",
                     "pod_name":"demo-server-01",
                     "jobid":1901,
                     "cpu":{
                        "min":0,
                        "max":1,
                        "reserve":false
                     },
                     "role_name":"server",
                     "vnodeid":80,
                     "allocated_host_public_ip":"10.9.82.140",
                     "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1597122699552\/1597122985597\/centos-1.0",
                     "root_fs":"\/usr\/local\/robin\/instances\/demo-server-01.t001-u000003.svc.cluster.local",
                     "mem":{
                        "size":209715200,
                        "hugepages_2m":0,
                        "hugepages_1g":0
                     },
                     "image":{
                        "name":"robinsys\/centos",
                        "engine":"docker",
                        "registry_hostname":"",
                        "version":"7",
                        "registry_port":"",
                        "entrypoint":"entry.sh",
                        "init_mode":false
                     },
                     "env":{
                        "DOCKER_OPTS":{
                           "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                           "type":"text"
                        },
                        "ROOT_PASSWORD":{
                           "value":"",
                           "type":"password"
                        },
                        "allocated":{
                           "ROBINHOST":"cscale-82-140.robinsystems.com",
                           "DOCKER_OPTS":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                           "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                           "ENABLE_SSH":true,
                           "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux",
                           "ROBINHOST_TAG_ROBINRPOOL":"default",
                           "POD_NAME":"demo-server-01",
                           "POD_NS":"t001-u000003",
                           "ROOT_PASSWORD":"",
                           "K8S_NODE":"cscale-82-140"
                        },
                        "ENABLE_SSH":{
                           "value":true,
                           "type":"boolean"
                        }
                     },
                     "ctime":1597467867,
                     "service_uids":[

                     ],
                     "bundle_object_id":"a360b352c8c800e7f1af4075bb3320a4",
                     "gpu":{
                        "min":0,
                        "max":0
                     }
                  }
               ],
               "image":{
                  "name":"robinsys\/centos",
                  "engine":"docker",
                  "registry_hostname":"",
                  "version":"7",
                  "registry_port":"",
                  "entrypoint":"entry.sh",
                  "init_mode":false
               },
               "volume_groups":[

               ],
               "qgroups":{
                  "data":{
                     "wr_min_window":500,
                     "wr_weight":1,
                     "rd_min_window":500,
                     "enabled":false,
                     "wr_max_iops":2000000,
                     "wr_min_iops":0,
                     "priority":1,
                     "rd_max_iops":2000000,
                     "rd_weight":1,
                     "rd_min_iops":0
                  },
                  "block":{
                     "wr_min_window":500,
                     "wr_weight":1,
                     "rd_min_window":500,
                     "enabled":false,
                     "wr_max_iops":2000000,
                     "wr_min_iops":0,
                     "priority":1,
                     "rd_max_iops":2000000,
                     "rd_weight":1,
                     "rd_min_iops":0
                  }
               },
               "restart_on_qoscfg":true
            }
         ],
         "bundle_object_id":"a360b352c8c800e7f1af4075bb3320a4",
         "tenant":"Administrators",
         "bundleid":1,
         "snapshot":"enabled",
         "id":47,
         "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1597122699552\/1597122985597\/centos-1.0",
         "from_template":null,
         "restart_num":15,
         "clone":"enabled",
         "version":"7",
         "namespace":"t001-u000003",
         "rpool":"default",
         "rpoolid":1,
         "username":"robin",
         "enable_metrics":true,
         "app_ns":"t001-u000003"
      },
      "kind":"robin",
      "name":"demo",
      "opcode":20,
      "namespace":"t001-u000003",
      "current_user":{
         "tenants":[
            "Administrators"
         ],
         "session_expires":"2020-08-15T09:44:41",
         "tenant_role":"superadmin",
         "user_contexts":[
            "robin"
         ],
         "tenant_id":1,
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "ip_addr":"172.20.0.1",
         "user_permissions":{

         },
         "user_id":3,
         "namespace":"t001-u000003",
         "username":"robin",
         "user_context":"robin",
         "tenant":"Administrators"
      },
      "action":"redeploy"
   },
   "jobid":1902
}

11.16. Application Sharing and the Reasignment of Application Ownership

Each application is assigned to a user and a tenant. The user is the application’s owner (creator) and the tenant is the tenant they were logged into when they created the app. By default, a regular tenant user (a user assigned the user role) can only access and manage applications they own. There are times, however, when it might be desirable for an application to be shared with multiple tenant users. For example, a tenant administrator might want a group of users to share management responsibilities for an application. To accomplish this, the tenant admin can give each user shared access to the app with permission to perform specific administrative tasks, such as starting and stopping the app, creating snapshots and backups, etc. In addition to application sharing, there are also times when the ownership of an application needs to be reassigned from one tenant user to another. For example, if the application’s owner needs to be removed from the tenant.

Applications are multi-object entities consisting of the application control object and one or more instance (vnode) objects. There is a very tight coupling between these objects that requires they all be assigned to the same user and tenant. In addition to the objects making up the application, an application may have one or more snapshots or clones associated with it.

  • A application snapshot contains a point-in-time copy of the application’s data and operational state. Snapshot’s can be used to revert (roll back) an app to a particular point in time, or when creating an application clone.

  • An application clone is an application instance, however it does not exist independently. The volumes allocated for an application clone are shared with the parent app (linked by the sanpshot the clone was created from).

Requiring all application objects be assigned to the same user and tenant ensures that the user (the application’s owner) will be able to access and manage all resources associated with the application. This is especially true when it comes to app deletion. An app cannot be deleted if there are any snapshots or clones associated with it, and the app’s owner will not be able to delete them (or even see them) if they are ownd by another user. Any snapshot or clone created by a user with shared access to an app will be assigned to the same user and tenant as the app. The user creating the snapshot or clone will automatically be given shared access to the objects they created, however, so they can access it.

Note

  • The sharing of applications and the reassignment of their ownership is closely aligned with the sharing of namespaces. Before a user to be given access to an application, they first must be given access to the namespace the application is deployed to. Note that the sharing of a namespace is a separate operation from the sharing of an application.

  • When reassigning ownership of an application, the ownership of all related snapshots and application clones will also be changed.

  • If a user’s shared access to an app is revoked, then shared access to all snapshots and clones associated with that app will also be revoked.

  • An application clone must be deployed in the same namespace the parent is deployed in. Even if it’s possible for applications deployed to different namespaces to share storage volume (from a pure storage point of view), to allow it makes validity checking scenarios very complicated and error prone.

  • A user with shared access to an app will not automatically have access to snapshots and application clones associated with the app. They can be given shared access, however (by a tenantadmin or superadmin user).

  • A user with shared access to an app (and adequate share permissions) will be able to create and manage the snapshots and clones they create.

  • A user with shared access to an app will not be allowed to delete the app (only the app owner, a tenantadmin, or superadmin should be able to do that).

  • Even though there is a relationship between an app and backups crated from that app, the above ownership rule doesn’t apply. That’s because backups can exist independent of the apps they were created from, and even from the cluster they were created on.

11.16.1. Sharing an Application

Run the following command to share an app with one or more users:

# robin app share name [user_list]
                       --operations <operations>
                       --all-tenant-users

name

Application instance name

user_list

Optional comma separated list of users the application will be shared with

--operations <operations>

Comma separated list of operations the users will be allowed to perform on the shared application. To allow all valid operations to be performed, specify ‘ALL_OPERATIONS’ on the command line (default value is ‘view’)

--all-tenant-users

Share app with all tenant users. Note this option is required when no users are explicitly specified

Example:

# robin app share demo robin --wait
Job:  101 Name: ApplicationShare     State: PROCESSED       Error: 0
Job:  101 Name: ApplicationShare     State: COMPLETED       Error: 0

Note

The ability to share an application is subject to Robin Role Based Access Control (RBAC). By default, only Cluster and Tenant Administrators (users assigned the superadmin or tenantadmin role for the specified tenant) have permission to do so. See the section on User Management for details on how Robin RBAC works.

  • Tenant Administrators will only be able to share applications that are bound to their tenant.

  • Applications can only be shared with users who are members of the tenant the application is bound to.

Shares an application with a set of users within a tenant whilst also assigning the operations the aforementioned users are allowed to perform on the application.

End Point: /api/v3/robin_server/apps/<app_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: share - This mandatory field within the payload specifies that the user share operation is to be performed.

  • operation_list: <list_of_operations> - Utilizing this parameter within the payload, by specifying a comma seperated list of operations, results in the aforementioned users being able to perform the given operations on the target application. The ‘view’ operation is assigned by default regardless of which operations are given.

  • user_list: <list_of_user_names> - Utilizing this parameter within the payload, by specifiying a comma seperated list of usernames, results in the application being shared with the respective users.

  • all_tenant_users: true - Utilizing this parameter within the payload results in the application being shared with all users within the tenant the application is deployed in. The default value is false. Note this field overrides any users passed via the user_list parameter.

  • all_operations: true - Utilizing this parameter within the payload results in all valid operations being allowed for the given users on the application. The default value is false. Note this field overrides any operations passed via the operation_list parameter.

Note

At least one of the following options, user_list or all_tenant_users, must be used in order to specify the users to share the application with. In addition at least one of the following options, operation_list or all_operations, must be given to specify the operations these users are allowed to perform on the application. To view a list of operations that can be unshared for the application, review the section detailed here.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "current_user":{
         "ip_addr":"172.20.0.1",
         "user_permissions":{

         },
         "username":"robin",
         "user_id":3,
         "tenants":[
            "t2",
            "Administrators"
         ],
         "session_expires":"2020-12-09T06:38:52",
         "tenant":"Administrators",
         "namespace":"t001-u000005",
         "user_contexts":[
            "robin",
            "robin"
         ],
         "tenant_id":1,
         "user_context":"robin",
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "tenant_role":"superadmin"
      },
      "name":"demo",
      "namespace":"t001-u000005",
      "kind":"robin",
      "action":"share",
      "user_list":[
         "robin"
      ],
      "all_tenant_users":false,
      "operation_list":[
         "view"
      ],
      "opcode":null,
      "all_operations":false
   },
   "jobid":667
}

11.16.2. Stop Sharing an Application

Run the following command to stop sharing an app with one or more users:

# robin app unshare name [user_list]
                         --operations <operations>
                         --all-tenant-users

name

Application instance name

user_list

Optional comma separated list of users the application will no longer be shared with

--operations <operations>

Comma separated list of operations the users will no longer be allowed to perform on the shared application. To prevent all all valid operations from being performed, specify ‘ALL_OPERATIONS’ on the command line.

--all-tenant-users

Stop sharing app with all tenant users for specified operations. Note this option is required when no users are explicitly specified

Example:

# robin app unshare demo robin --wait
Job:  102 Name: ApplicationUnshare   State: VALIDATED       Error: 0
Job:  102 Name: ApplicationUnshare   State: COMPLETED       Error: 0

Note

The ability to stop sharing an application is subject to Robin Role Based Access Control (RBAC). By default, only Cluster and Tenant Administrators (users assigned the superadmin or tenantadmin role for the specified tenant) have permission to do so. See the section on User Management for details on how Robin RBAC works.

  • Tenant Administrators will only be able to stop sharing applications that are bound to their tenant.

Unshares an application with a set of users and/or unassigns operations the aforementioned users are allowed to perform on the application.

End Point: /api/v3/robin_server/apps/<app_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: unshare - This mandatory field within the payload specifies that the user unshare operation is to be performed.

  • operation_list: <list_of_operations> - Utilizing this parameter within the payload, by specifiying a comma seperated list of operations, results in the aforementioned users not being able to perform the given operations on the target application.

  • user_list: <list_of_user_names> - Utilizing this parameter within the payload, by specifiying a comma seperated list of usernames, results in the application being unshared with the respective users.

  • all_tenant_users: true - Utilizing this parameter within the payload results in the application being unshared with all users within the tenant the application is deployed in. The default value is false. Note this field overrides any users passed via the user_list parameter.

  • all_operations: true - Utilizing this parameter within the payload results in all valid operations being disallowed for the given application. The default value is false. Note this field overrides any operations passed via the operation_list parameter.

Note

At least one of the following options, user_list or all_tenant_users, must be used in order to specify the users to share the application with. In addition at least one of the following options, operation_list or all_operations, must be given to specify the operations these users aren’t allowed to perform on the application. To view a list of operations that can be unshared for the application, review the section detailed here.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "current_user":{
         "ip_addr":"172.20.0.1",
         "user_permissions":{

         },
         "username":"robin",
         "user_id":3,
         "tenants":[
            "t2",
            "Administrators"
         ],
         "session_expires":"2020-12-09T06:38:52",
         "tenant":"Administrators",
         "namespace":"t001-u000005",
         "user_contexts":[
            "robin",
            "robin"
         ],
         "tenant_id":1,
         "user_context":"robin",
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "tenant_role":"superadmin"
      },
      "name":"demo",
      "namespace":"t001-u000005",
      "kind":"robin",
      "action":"unshare",
      "user_list":[
         "robin"
      ],
      "all_tenant_users":false,
      "operation_list":[
         "ALL_OPERATIONS"
      ],
      "opcode":null,
      "all_operations":true
   },
   "jobid":668
}

11.16.3. List Application Shares

Run the following command to list application shares:

# robin app list-shares [username]

username

The username of the user to show application shares for. If a username is not supplied, application shares for all users are shown.

Example:

# robin app list-shares
App Id | App Name | Operation | Users
-------+----------+-----------+-------
1      | demo     | view      | robin

Note

The ability to view application shares is subject to Robin Role Based Access Control (RBAC). By default, only Cluster and Tenant Administrators (users assigned the superadmin or tenantadmin role for the specified tenant) have permission to do so. See the section on User Management for details on how Robin RBAC works.

Lists the users each application is shared with alongside the operations the aforementioned users can perform on each of the respective applications.

End Point: /api/v3/robin_server/apps

Method: GET

URL Parameters: None

Data Parameters:

  • action: get_user_shares - This mandatory field within the payload specifies that application user shares should be returned.

  • username: <user_name> - Utilizing this parameter within the payload, by specifiying the name of a user, results in only application shares for the respective user being returned.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "items":[
      {
         "application":{
            "name":"demo-clone",
            "id":5
         },
         "id":7,
         "users":[
            "robin"
         ],
         "operation":"view",
         "share_type":"application_share",
         "object_type":"APPLICATION",
         "all_tenant_users":false,
         "tenant":"Administrators"
      },
      {
         "application":{
            "name":"demo",
            "id":1
         },
         "id":9,
         "users":[
            "robin"
         ],
         "operation":"view",
         "share_type":"application_share",
         "object_type":"APPLICATION",
         "all_tenant_users":false,
         "tenant":"Administrators"
      }
   ]
}

11.16.4. Reassign Ownership of an Application

Run the following command to reassign ownership of an app to a different tenant user:

# robin app change-owner <app_names> [username]

app_names

Comma separated list of one or more application names

username

The username of the new owner. If a username is not provided then ownership of the app will be reassigned to the current user.

Example:

# robin app change-owner demo user1
Job:   72 Name: ApplicationChangeOwner State: VALIDATED       Error: 0
Job:   72 Name: ApplicationChangeOwner State: COMPLETED       Error: 0

Note

The ability to reassign ownership of an app is subject to Robin Role Based Access Control (RBAC). By default, only Cluster and Tenant Administrators (users assigned the superadmin or tenantadmin role for the specified tenant) have permission to do so. See the section on User Management for details on how Robin RBAC works.

  • Tenant Administrators will only be able to reassign ownership of applications that are bound to their tenant.

  • Ownership of an app can only be reassigned to a user who is a member of the tenant the application is bound to.

Reassigns ownership of an application to a different tenant user.

End Point: /api/v3/robin_server/apps/<app_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: change_owner - This mandatory field within the payload specifies that the change owner operation is to be performed.

  • username: <username> - This mandatory field within the payload specifies the name of the user to whom the application’s ownership will be reassigned to.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "opcode":null,
      "current_user":{
         "session_expires":"2020-09-18T17:25:02",
         "user_id":3,
         "tenant_role":"superadmin",
         "user_contexts":[
            "robin",
            "robin"
         ],
         "username":"robin",
         "user_permissions":{

         },
         "tenant":"Administrators",
         "user_context":"robin",
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "ip_addr":"172.17.0.1",
         "namespace":"t001-u000003",
         "tenant_id":1,
         "tenants":[
            "t2",
            "Administrators"
         ]
      },
      "username":"user1",
      "namespace":"t001-u000003",
      "kind":"robin",
      "name":"demo",
      "action":"change_owner",
      "include_children":true
   },
   "jobid":73
}

11.17. Scaling services for a Robin Application

Robin Platform natively provides horizontal scaling of services for applications deployed via a Robin bundle. This allows your application to handle, with no additional downtime, increased loads and requests which could otherwise result in unresponsiveness. Moreover, if its utilization decreases, an application can also be scaled down according to demand. Issue the following command to scale an application horizontally:

# robin app scale <name> <rolename> <count>
                                         --vnode-hostnames <hostnames>
                                         --env <envs>
                                         --ippools <ippools>
                                         --staticmacs <staticmacs>
                                         --tags <tags>
                                         --cpu <cpu>
                                         --gpu <gpu>
                                         --mem <mem>
                                         --storage <storage_config>

name

Application instance name

rolename

Name of role to scale

count

Number of instances to scale the role to

--vnode-hostnames <hostnames>

Provide the hostnames on which the additional vnodes will be deployed

--env <envs>

Environment variables for additional vnodes

--ippools <ippools>

IP Pool names and a comma seperated list of respective static IP addresses to allocate from them for each additional vnode e.g. <ippool_name>=<ip1>,<ip2> etc.

--staticmacs <staticmacs>

IP Pool names and a comma seperated list of respective static MAC addresses to allocate from them for each additional vnode e.g. <ippool_name>=<static MAC1>,<static MAC2> etc.

--tags <tags>

Tags for additional vnodes

--cpu <cpu>

CPU limits for additional vnodes

--gpu <gpu>

GPU limits for additional vnodes

--mem <mem>

Memory limits for additional vnodes

--storage <storage_config>

Storage config for additional vnodes

Example:

# robin app scale a1 server 3 --cpu 4 --wait
Job:  126 Name: ApplicationScale     State: PROCESSED       Error: 0
Job:  126 Name: ApplicationScale     State: WAITING         Error: 0
Job:  126 Name: ApplicationScale     State: COMPLETED       Error: 0

11.18. Scaling resources for a Robin Application

Robin Platform natively provides vertical scaling of services for applications deployed via a Robin bundle. This allows your application to use a greater amount of resources (cpu, memory etc.) which would allow it to function at a greater capacity. It also enables better resource management post-creation of an application. This includes reducing the number of resources consumed by the application. Issue the following command to scale an application vertically:

Note

Only Vnodes which are in the states: ONLINE or PLAN_FAILED, will be scaled up.

# robin app computeqos <app_name>
                        --role <role>
                        --cpus <cpu>
                        --gpus <gpu>
                        --memory <mem>
                        --hugepages-2mi <hgps_2m>
                        --hugepages-1gi <hgps_1g>
                        --swap <swap>

app_name

Application instance name

--role <role>

Name of role to scale

--cpus <cpu>

Maximum number of CPUs per instance

--gpus <gpu>

Maximum number of GPUs per instance

--memory <mem>

Memory limit per instance in bytes

--hugepages-2mi <hgps_2m>

2Mi Hugepages limit per instance in bytes

--hugepages-1gi <hgps_1g>

1Gi Hugepages limit per instance in bytes

--swap <swap>

Swap limit per instance in bytes

Example:

# robin app computeqos a1 --role server --cpus 3 --wait
Job:  128 Name: ApplicationComputeQos     State: PROCESSED       Error: 0
Job:  128 Name: ApplicationComputeQos     State: WAITING         Error: 0
Job:  128 Name: ApplicationComputeQos     State: COMPLETED       Error: 0

11.19. Storage QoS for a Robin Application

Robin Platform natively allows a user to manage the storage performance of their application. As a result, a user can set min/max write and read I/O performance for their application which in turn helps reduce I/O bottlenecks depending on the nature of the application. Issue the following command to scale the Storage I/OPs of an application:

# robin app storageqos <app_name>
                       --role <role>
                       --volume-type <vol_type>
                       --read-min-iops <read_min>
                       --read-max-iops <read_max>
                       --read-weight <read_weight>
                       --write-min-iops <write_min>
                       --write-max-iops <write_max>
                       --write-weight <write_weight>

app_name

Application instance name

--role <role>

Name of role to scale storage I/OPs for

--volume-type <vol_type>

Type of volume to scale storage I/OPs for

--read-min-iops <read_min>

Minimum I/OPs for read operations

--read-max-iops <read_max>

Maximum I/OPs for read operations

--read-weight <read_weight>

Relative weightage for read operations. Only values between 1 and 6 can be specified

--write-min-iops <write_min>

Minimum I/OPs for write operations

--write-max-iops <write_max>

Maximum I/OPs for write operations

--write-weight <write_weight>

Relative weightage for write operations. Only values between 1 and 6 can be specified

Example:

# robin app storageqos demo --role server --volume-type data --read-min-iops 1000 --wait
Job:  185 Name: ApplicationStorageQos State: VALIDATED       Error: 0
Job:  185 Name: ApplicationStorageQos State: COMPLETED       Error: 0

Set min/max write and read I/O performance for an application.

End Point: /api/v3/robin_server/apps/<app_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: storageqos - This mandatory field within the payload specifies that the storage QoS operation is to be performed.

  • role: <role> - This mandatory field within the payload specifies the name of the application’s role whose volume parameters will be modified.

  • vol_type: <vol_type> - This mandatory field within the payload specifies the volume type of the aforementioned role for which I/O parameters will be modified.

  • qos_cfg: <dict_of_qos_params>

    • rd_min_iops: <rd_min_iops> - Utilizing this parameter within the dictionary, by specifying an integer, results in the minimum I/OPs for read operations being set to the given value.

    • rd_max_iops: <rd_max_iops> - Utilizing this parameter within the dictionary, by specifying an integer, results in the maximum I/OPs for read operations being set to the given value.

    • rd_weight: <rd_weight> - Utilizing this parameter within the dictionary, by specifying an integer between 1 and 6, results in the relative weightage for read operations being set to the given value.

    • wr_min_iops: <wr_min_iops> - Utilizing this parameter within the dictionary, by specifying an integer, results in the minimum I/OPs for write operations being set to the given value.

    • wr_max_iops: <wr_max_iops> - Utilizing this parameter within the dictionary, by specifying an integer, results in the maximum I/OPs for write operations being set to the given value.

    • wr_weight: <wr_weight> - Utilizing this parameter within the dictionary, by specifying an integer between 1 and 6, results in the relative weightage for write operations being set to the given value.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":263,
   "plan":{
      "action":"storageqos",
      "role":"server",
      "vol_type":"data",
      "qos_cfg":{
         "rd_min_iops":1100
      },
      "name":"test1",
      "namespace":"t001-u000003",
      "kind":"robin",
      "opcode":null,
      "current_user":{
         "user_id":3,
         "username":"robin",
         "tenant_id":1,
         "tenant":"Administrators",
         "tenants":[
            "Administrators"
         ],
         "tenant_role":"superadmin",
         "namespace":"t001-u000003",
         "user_context":"robin",
         "user_contexts":[
            "robin"
         ],
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "user_permissions":{

         },
      },
      "appdata":{
         "name":"test1",
         "version":"7",
         "snapshot":"enabled",
         "clone":"enabled",
         "roles":[
            {
               "name":"server",
               "multinode":true,
               "image":{
                  "name":"robinsys\/centos",
                  "version":"7",
                  "engine":"docker",
                  "entrypoint":"entry.sh",
                  "init_mode":false,
                  "registry_hostname":"",
                  "registry_port":""
               },
               "display_name":"server",
               "vnodes":[
                  {
                     "name":"test1.server.01",
                     "multinode":true,
                     "storage":[
                        {
                           "type":"data",
                           "media":"HDD",
                           "path":"\/data",
                           "size":1073741824,
                           "blocksize":4096,
                           "compression":"disabled",
                           "layout":"round-robin",
                           "name":"test1.server.01.data.1.057388c3-5410-4152-8b8b-4210165cc384",
                           "protection":0,
                           "replication":1,
                           "faultdomain":"host",
                           "encryption":"none",
                           "disk_tags":{

                           },
                           "lvm_type":"None",
                           "lvm_vol_count":"0",
                           "workload":0,
                           "snap_reserved":20,
                           "snapshot_space_limit":214748365,
                           "fstype":"ext4",
                           "stordriver":{
                              "media":"HDD",
                              "protection":0,
                              "faultdomain":"host",
                              "type":"das"
                           },
                           "pvcpolicy":"create",
                           "k8s_name":"test1-server-01-data-1-057388c3",
                           "vol_ns":"t001-u000003",
                           "volgrp_name":"test1.server.01.72.1.d02321dd-0c18-4e47-9e74-0467a0c3517d",
                           "allocated":{
                              "size":1073741824,
                              "grpid":4,
                              "multinode_mounting":false,
                              "qgroupid":4,
                              "appid":1,
                              "name":"test1.server.01.data.1.057388c3-5410-4152-8b8b-4210165cc384",
                              "snapshot_space_limit":214748365,
                              "current_snapshotid":1,
                              "vtype":0,
                              "slice_size":1073741824,
                              "replication":1,
                              "media":72,
                              "volumeid":"5",
                              "protection":0,
                              "priority":2,
                              "next_backupid":1,
                              "compression":0,
                              "resource_poolid":1,
                              "partitions":0,
                              "block_size":4096,
                              "appname":"default",
                              "params":{

                              },
                              "current_snapshot":"active_snap",
                              "next_snapshotid":2,
                              "genkey":1611119983972436,
                              "stordriver":{
                                 "media":"HDD",
                                 "protection":0,
                                 "faultdomain":"host",
                                 "type":"das"
                              }
                           }
                        },
                        {
                           "type":"block",
                           "media":"HDD",
                           "path":"\/dev\/rda",
                           "size":1073741824,
                           "fstype":"raw",
                           "blocksize":4096,
                           "compression":"disabled",
                           "layout":"round-robin",
                           "name":"test1.server.01.block.1.52b19e79-34a6-4797-86a7-724ceae401d2",
                           "protection":0,
                           "replication":1,
                           "faultdomain":"host",
                           "encryption":"none",
                           "disk_tags":{

                           },
                           "lvm_type":"None",
                           "lvm_vol_count":"0",
                           "workload":0,
                           "snap_reserved":20,
                           "snapshot_space_limit":214748365,
                           "stordriver":{
                              "media":"HDD",
                              "protection":0,
                              "faultdomain":"host",
                              "type":"das"
                           },
                           "pvcpolicy":"create",
                           "k8s_name":"test1-server-01-block-1-52b19e79",
                           "vol_ns":"t001-u000003",
                           "volgrp_name":"test1.server.01.72.1.76fc29b1-a0de-42eb-bede-21e5d1250a4a",
                           "allocated":{
                              "size":1073741824,
                              "grpid":5,
                              "multinode_mounting":false,
                              "qgroupid":5,
                              "appid":1,
                              "name":"test1.server.01.block.1.52b19e79-34a6-4797-86a7-724ceae401d2",
                              "snapshot_space_limit":214748365,
                              "current_snapshotid":1,
                              "vtype":0,
                              "slice_size":1073741824,
                              "replication":1,
                              "media":72,
                              "volumeid":"4",
                              "protection":0,
                              "priority":2,
                              "next_backupid":1,
                              "compression":0,
                              "resource_poolid":1,
                              "partitions":0,
                              "block_size":4096,
                              "appname":"default",
                              "params":{

                              },
                              "current_snapshot":"active_snap",
                              "next_snapshotid":2,
                              "genkey":1611119983965589,
                              "stordriver":{
                                 "media":"HDD",
                                 "protection":0,
                                 "faultdomain":"host",
                                 "type":"das"
                              }
                           }
                        }
                     ],
                     "vnodehooks":{
                        "postcreate":"bash postcreate.sh"
                     },
                     "cpu":{
                        "reserve":false,
                        "min":0,
                        "max":1
                     },
                     "gpu":{
                        "min":0,
                        "max":0
                     },
                     "mem":{
                        "size":209715200,
                        "hugepages_2m":0,
                        "hugepages_1g":0
                     },
                     "env":{
                        "ENABLE_SSH":{
                           "type":"boolean",
                           "value":true
                        },
                        "DOCKER_OPTS":{
                           "type":"text",
                           "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN"
                        },
                        "ROOT_PASSWORD":{
                           "type":"password",
                           "value":""
                        },
                        "allocated":{
                           "ENABLE_SSH":true,
                           "DOCKER_OPTS":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                           "ROOT_PASSWORD":"",
                           "ROBINHOST":"vnode-95-76.robinsystems.com",
                           "K8S_NODE":"vnode-95-76.robinsystems.com",
                           "POD_NAME":"test1-server-01",
                           "POD_NS":"t001-u000003",
                           "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux",
                           "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                           "ROBINHOST_TAG_ROBINRPOOL":"default"
                        }
                     },
                     "network":[
                        {
                           "ippool":"robin-default",
                           "name":"robin-default",
                           "driver":"calico",
                           "interfaces":1,
                           "allocated_ip":"172.21.29.53",
                           "allocated_netmask":"255.255.0.0",
                           "allocated_prefix":16,
                           "subnet":"172.21.0.0",
                           "allocated_by":"system",
                           "allocated_names":[
                              "eth0"
                           ]
                        }
                     ],
                     "enable_portmapping":true,
                     "enable_hooklogs":true,
                     "enable_metrics":true,
                     "sidecar_info":{
                        "cpu":0,
                        "mem":0,
                        "gpu":0,
                        "hugepages_2m":0,
                        "hugepages_1g":0,
                        "containers":[

                        ]
                     },
                     "role_name":"server",
                     "rpoolid":1,
                     "calico_inuse":true,
                     "restart_on_qoscfg":true,
                     "allocated":{
                        "zoneid":1608100028,
                        "zonename":"default",
                        "nodeid":1,
                        "nodename":"vnode-95-76"
                     },
                     "allocated_host":"vnode-95-76.robinsystems.com",
                     "k8s_provider":"robin",
                     "allocated_host_type":"physical",
                     "numa_allocations":{
                        "0":{
                           "non_isol_cores_used":1,
                           "isol_shared_cores_used":0,
                           "isol_dedicated_cores_used":0,
                           "mem_used":209715200,
                           "hugepages_1g_used":0,
                           "hugepages_2m_used":0,
                           "gpu_used":0
                        }
                     },
                     "allocated_host_public_hostname":"vnode-95-76.robinsystems.com",
                     "allocated_host_public_ip":"10.9.95.76",
                     "hosttags":{
                        "kubernetes.io\/os":[
                           "linux"
                        ],
                        "kubernetes.io\/arch":[
                           "amd64"
                        ],
                        "robin.io\/robinrpool":[
                           "default"
                        ]
                     },
                     "volume_groups":[
                        {
                           "media":"HDD",
                           "rpoolid":1,
                           "volumes":[
                              "test1.server.01.data.1.057388c3-5410-4152-8b8b-4210165cc384"
                           ],
                           "layout":"round-robin",
                           "device_sets":[
                              {
                                 "devices":[
                                    {
                                       "wwn":"0xQEMU_QEMU_HARDDISK_b77676df-21a6-40e1-9",
                                       "capacity":53687091200,
                                       "type":"HDD",
                                       "state":"READY",
                                       "reattachable":0,
                                       "protected":0,
                                       "role":"Storage",
                                       "devpath":"\/dev\/disk\/by-id\/scsi-0QEMU_QEMU_HARDDISK_b77676df-21a6-40e1-9",
                                       "host":"vnode-95-76.robinsystems.com",
                                       "tags":{

                                       },
                                       "max_volumes_per_disk":10,
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "pused":0,
                                       "psize":53687091200,
                                       "slices":38,
                                       "aslices":0,
                                       "write_unit":512,
                                       "stormgr_id":1,
                                       "hostname":"vnode-95-76.robinsystems.com",
                                       "score":100,
                                       "allocated_slices":2
                                    }
                                 ],
                                 "name":"test1.server.01.72.1.d02321dd-0c18-4e47-9e74-0467a0c3517d.0.5ef90f50-3ac8-4b14-8164-0f56439118e5",
                                 "stormgr_id":4
                              }
                           ],
                           "replicas":1,
                           "name":"test1.server.01.72.1.d02321dd-0c18-4e47-9e74-0467a0c3517d",
                           "stormgr_id":4
                        },
                        {
                           "media":"HDD",
                           "rpoolid":1,
                           "volumes":[
                              "test1.server.01.block.1.52b19e79-34a6-4797-86a7-724ceae401d2"
                           ],
                           "layout":"round-robin",
                           "device_sets":[
                              {
                                 "devices":[
                                    {
                                       "wwn":"0xQEMU_QEMU_HARDDISK_b77676df-21a6-40e1-9",
                                       "capacity":53687091200,
                                       "type":"HDD",
                                       "state":"READY",
                                       "reattachable":0,
                                       "protected":0,
                                       "role":"Storage",
                                       "devpath":"\/dev\/disk\/by-id\/scsi-0QEMU_QEMU_HARDDISK_b77676df-21a6-40e1-9",
                                       "host":"vnode-95-76.robinsystems.com",
                                       "tags":{

                                       },
                                       "max_volumes_per_disk":10,
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "pused":0,
                                       "psize":53687091200,
                                       "slices":38,
                                       "aslices":0,
                                       "write_unit":512,
                                       "stormgr_id":1,
                                       "hostname":"vnode-95-76.robinsystems.com",
                                       "score":100,
                                       "allocated_slices":2
                                    }
                                 ],
                                 "name":"test1.server.01.72.1.76fc29b1-a0de-42eb-bede-21e5d1250a4a.0.629def65-6cae-4395-af9f-a126a7b193cb",
                                 "stormgr_id":5
                              }
                           ],
                           "replicas":1,
                           "name":"test1.server.01.72.1.76fc29b1-a0de-42eb-bede-21e5d1250a4a",
                           "stormgr_id":5
                        }
                     ],
                     "pod_name":"test1-server-01",
                     "pod_ns":"t001-u000003",
                     "hostname":"test1-server-01.t001-u000003.svc.cluster.local",
                     "host_ip":"172.21.29.53",
                     "service_uids":[

                     ],
                     "vnodehookargs":{
                        "postcreate":[

                        ]
                     },
                     "id":1,
                     "restart_num":15,
                     "role":"server",
                     "appname":"test1",
                     "appid":2,
                     "state":"STARTED",
                     "root_fs":"\/usr\/local\/robin\/instances\/test1-server-01.t001-u000003.svc.cluster.local",
                     "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1608100413051\/1611119928411\/centos-7",
                     "bundle_object_id":"303fa86aab3ed746b67232b00e86025f",
                     "bundleid":2,
                     "engine":"docker",
                     "image":{
                        "name":"robinsys\/centos",
                        "version":"7",
                        "engine":"docker",
                        "entrypoint":"entry.sh",
                        "init_mode":false,
                        "registry_hostname":"",
                        "registry_port":""
                     },
                     "cm_keys":[
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmMKD4kq7GasuAlIN4OiJ3svBr3ogCDmHiKcC53MwDcbW6BDm2i8pIV1i5MDqcjqoygDdcjIEFqfjdRVqV\/bcGid1sxdTStkdHazQlPFbQ4bYRelySNcWnfn6yeXVfO\/b3E8Bm\/3iYeryEn4A7CyKVdy7jGuRBl2F6c0UqYsMoVMioSrI+obT6crDF85bOTsnunjtqAm9Toz5zACOng2qhSKkrSTNer5uRQ2XfyadEHXlNrgZl2hxolTGrDrGEaUo\/MQC1oO0JkPYsw+XQdx\/JDSKOxeCtuwXOJj\/omlScmjogC9Vei1TzSLKEtSqjv6UCXzKBmyczPBUgnUivG+NV root@vnode-95-76.robinsystems.com"
                     ],
                     "ctime":1611120032,
                     "utime":1611120032,
                     "vnodeid":1
                  }
               ],
               "qgroups":{
                  "data":{
                     "enabled":false,
                     "priority":1,
                     "rd_max_iops":2000000,
                     "rd_min_iops":1000,
                     "rd_min_window":500,
                     "rd_weight":1,
                     "wr_max_iops":2000000,
                     "wr_min_iops":0,
                     "wr_min_window":500,
                     "wr_weight":1
                  },
                  "block":{
                     "enabled":false,
                     "priority":1,
                     "rd_max_iops":2000000,
                     "rd_min_iops":0,
                     "rd_min_window":500,
                     "rd_weight":1,
                     "wr_max_iops":2000000,
                     "wr_min_iops":0,
                     "wr_min_window":500,
                     "wr_weight":1
                  }
               },
               "restart_on_qoscfg":true,
               "volume_groups":[

               ]
            }
         ],
         "robin_version":"5.3.4-1127",
         "pvcpolicy":"create",
         "rpool":"default",
         "from_template":null,
         "zoneid":1608100028,
         "bundleid":2,
         "content_id":"303fa86aab3ed746b67232b00e86025f",
         "namespace":"t001-u000003",
         "restart_num":15,
         "auto_relocate":true,
         "rpoolid":1,
         "username":"robin",
         "tenant":"Administrators",
         "app_ns":"t001-u000003",
         "enable_hooklogs":true,
         "enable_metrics":true,
         "planid":1,
         "id":2,
         "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1608100413051\/1611119928411\/centos-7",
         "bundle_object_id":"303fa86aab3ed746b67232b00e86025f"
      }
   }
}

11.20. Upgrading a Robin Application

Robin Platform provides a native and seamless upgrade workflow for applications deployed via Robin bundles. When a new version of an application bundle is added to a Robin Platform custer, all eligible applications are made available for upgrades. One can proceed with the upgrade of an application in a variety of manners with only minimal downtime for the application. These are the supported upgrade options:

  • Standard upgrade - all services are upgraded at the same time by restarting pods with the new images and/or hook scripts.

  • Online upgrade - If the PODs and services are upgraded outside of ROBIN, this mode can be used to upgrade the application to the latest bundle specified for future restarts/redeploys. This option is used when performing an RPM level upgrade inside KVM virtual machine PODs.

  • Rolling upgrade - the services of an application are updated incrementally with zero to minimal downtime.

  • Image upgrade(s) - images used for specific (or all) containers across multiple services can be updated to newer versions. This option can be used in combination with the others and will also create a new bundle with a manifest containing the new image names and/or versions.

  • A dry run of the upgrade can be performed on a clone of the specified application. This allows the user to verify the upgrade works as expected.

In all situations a snapshot of the specified application is taken to ensure if that there are any issues with the upgrade, one can always rollback the application to a healthy state. The snapshot acts as a fail-safe to ensure that an application is always recoverable regardless of what happens with the upgrade. There is an option to disable this feature, but normally this is not recommended.

Note

The upgrade path specifying the version dependencies is defined within the bundle manifest. For more details, review the bundle building guide here.

# robin app upgrade <app_name>
                    --bundleid <bundle_id>
                    --image <image_str>
                    --test
                    --rolling
                    --online
                    --skip-snap

app_name

Application instance name

--bundleid <bundle_id>

ID of bundle to upgrade to

--image <image_str>

Images to be updated to eg, ‘r1=i1:v1,r1.s1=i2:v2’ where r1 refers to the role, s1 refers to the sidecar container name, i1,i2 refer to the image names and v1,v2 refer to the image versions

--test

Test the upgrade using a clone of the app

--rolling

Perform a rolling upgrade

--skip-snap

Skip taking a snapshot before the upgrade process

--online

Skip restarting the application PODs as part of the upgrade process

Note

Either one of the following options must be specified: --bundleid or --image

Example 1 (Rolling upgrade for an application):

# robin app upgrade a4 --bundleid 4 --rolling --wait
Upgrading application a4...Done

Example 2 (Online upgrade for an application without a snapshot):

# robin app upgrade kvm1 --bundleid 4 --online --skip-snap --wait
Upgrading application kvm1...Done

Upgrades an application from the current bundle and image to a newly specified bundle and image.

End Point: /api/v3/robin_server/apps/<app_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: upgrade - This mandatory field within the payload specifies that the upgrade operation is to be performed.

  • bundleid: <bundleid> - Utilizing this parameter within the payload by specifying an integer representing a bundle ID results in the application being upgraded to the associated bundle.

  • image: <image_str> - Utilizing this parameter within the payload by specifying a string in the format ‘r1=i1:v1,r1.s1=i2:v2’ where r1 refers to the role, s1 refers to the sidecar container name, i1,i2 refer to the image names and v1,v2 refer to the image versions results in the container/sidecar images being upgraded to those specified.

  • test: true - Utilizing this parameter within the payload results in a test upgrade being performed on a clone of the application. The default value is False.

  • rolling: true - Utilizing this parameter within the payload results in the upgrade operation to be performed is a rolling upgrade. The default value is False.

  • take_snap: false - Utilizing this parameter within the payload determines whether or not a snapshot is taken before an application is upgrade. The default value is True.

  • online: true - Utilizing this parameter within the payload results in the application PODs not being restarted as part of the upgrade process. The default value is False.

Note

Either one of the following parameters must be specified within the payload: bundleid or image

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "name":"demo",
      "current_user":{
         "ip_addr":"172.20.0.1",
         "user_permissions":{

         },
         "username":"robin",
         "user_id":3,
         "tenants":[
            "t2",
            "Administrators"
         ],
         "session_expires":"2020-12-08T05:11:45",
         "tenant":"Administrators",
         "namespace":"t001-u000003",
         "user_contexts":[
            "robin",
            "robin"
         ],
         "tenant_id":1,
         "user_context":"robin",
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "tenant_role":"superadmin"
      },
      "bundleid":7,
      "rolling":false,
      "action":"upgrade",
      "kind":"robin",
      "authorization_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjozLCJ0ZW5hbnRfaWQiOjEsImV4cCI6MTYwNzQwNDMwNX0.Lawioo1JaQMV99xdPS7c6UcGfveocO00tRZ2qBO6ik8",
      "namespace":"random",
      "opcode":null,
      "test":false
   },
   "jobid":652
}

11.21. Attach an External Storage Repo to an Application

Robin Platform allows entire applications, plus their data to be backed up to an external storage device or service such as AWS S3, Google GCS object stores, etc. Repo management is explained at length here. Issue the following command to attach a repo to an application:

# robin app attach-repo <app_name> <repo_name>
                                   --app-namespace <app_ns>

app_name

Application instance name

repo_name

Name of the storage repo

--app-namespace <app_ns>

If there are multiple applications of the same name but in different namespaces this option can be used to distinguish them

Example:

# robin app attach-repo mysql-c1 testrepo --wait
Job:  115 Name: ApplicationAddRepo   State: VALIDATED       Error: 0
Job:  115 Name: ApplicationAddRepo   State: COMPLETED       Error: 0

Attaches a repo to an application in order to enable backups for it.

End Point: /api/v3/robin_server/apps/<appname>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: add_repo - This mandatory field within the payload specifies that the repo attach operation is to be performed.

  • repo_name: <repo_name> - This mandatory field within the payload specifies the repo to be attached to the application.

  • name: <appname> - This mandatory field within the payload specifies the application to which the aforementioned repo should be attached.

  • namespace: <app_ns> - Utilizing this parameter results in only applications within the specified namespace being considered.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "action":"add_repo",
      "name":"mysql-jf6s",
      "current_user":{
         "user_context":"robin",
         "tenants":[
            "Administrators"
         ],
         "namespace":"t001-u000003",
         "session_expires":"2020-09-09T00:09:42",
         "tenant_role":"superadmin",
         "tenant":"Administrators",
         "user_permissions":{

         },
         "user_contexts":[
            "robin",
            "robin-k8s-cluster"
         ],
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "ip_addr":"172.17.0.1",
         "user_id":3,
         "tenant_id":1,
         "username":"robin"
      },
      "namespace":"t001-u000003",
      "opcode":null,
      "kind":"robin",
      "repo_name":"app-repompsq"
   },
   "jobid":725
}

11.22. Detach an External Storage Repo from an Application

A previously attached storage repo can be detached from an Application using this command:

# robin app detach-repo <app_name> <repo_name>
                                   --app-namespace <app_ns>
                                   --yes

app_name

Application instance name

repo_name

Name of the storage repo

--app-namespace <app_ns>

If there are multiple applications of the same name but in different namespaces this option can be used to distinguish them

--yes

Do not prompt the user for confirmation

Example:

# robin app detach-repo mysql-c1 testrepo --wait
Job:  116 Name: ApplicationRemoveRepo State: PREPARED        Error: 0
Job:  116 Name: ApplicationRemoveRepo State: COMPLETED       Error: 0

Detaches a previously attached repo from an application.

End Point: /api/v3/robin_server/apps/<appname>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: remove_repo - This mandatory field within the payload specifies that the repo detach operation is to be performed.

  • repo_name: <repo_name> - This mandatory field within the payload specifies the repo to be detached from the application.

  • name: <appname> - This mandatory field within the payload specifies the application from which the aforementioned repo should be detached.

  • namespace=<app_ns> - Utilizing this parameter results in only applications within the specified namespace being considered.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "purge":false,
      "namespace":"t001-u000003",
      "current_user":{
         "user_context":"robin",
         "tenants":[
            "Administrators"
         ],
         "namespace":"t001-u000003",
         "session_expires":"2020-09-09T00:09:42",
         "tenant_role":"superadmin",
         "tenant":"Administrators",
         "user_permissions":{

         },
         "user_contexts":[
            "robin",
            "robin-k8s-cluster"
         ],
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "ip_addr":"172.17.0.1",
         "user_id":3,
         "tenant_id":1,
         "username":"robin"
      },
      "action":"remove_repo",
      "name":"mysql-jf6s",
      "kind":"robin",
      "opcode":null,
      "repo_name":"app-repompsq"
   },
   "jobid":730
}

11.23. Manage Application Snapshot Schedules

Robin Platform allows configuring a schedule to automatically snapshot applications and set retention policies. The advantage is that an application can always be rolled back to a point in time when it was healthy. The schedule can be set via a JSON file or a CRON string. Issue the following command to set up a snapshot schedule for an app:

# robin app snapshot-schedule <app_name>
                              --snapshot-schedule <schedule>
                              --snapshot-schedule-cron <schedule>
                              --retain <retained_snapshots>
                              --app-namespace <app_ns>
                              --disable
                              --enable

app_name

Application instance name

--snapshot-scheedule <schedule>

Snapshot schedule specified as JSON

--snapshot-scheedule-cron <schedule>

Snapshot schedule specified as CRON string

--retain <retained_snapshots>

Number of snapshots to retain with the specified schedule

--app-namespace <app_ns>

If there are multiple applications of the same name but in different namespaces this option can be used to distinguish them

--disable

Disable the specified schedule

--enable

Enable the specified schedule

The fields that can be specified in the JSON file describing a schedule are:

frequency

The overall frequency at which to take snapshots. Valid values include: ‘hourly’, ‘daily’, ‘weekly’, ‘monthly’.

minute

An integer between 1-59 representing the minute at which the operation should be run. This field is optional, and the default value is 1 if not specified.

hour

An integer between 0-23 representing the hour at which the operation should be run. This field is optional, and the default value is 0 if not specified.

weekday

An integer between 0-6 representing the day of the week on which the operation should be run. Sunday is represented by 0 and so on and so forth. This field is optional, and the default value is 0 if not specified.

monthday

An integer between 1-28 representing the day of the month on which the operation should be run. This field is optional, and the default value is 1 if not specified.

Note

Only one snapshot schedule of each frequency type can be created. You cannot set 2 different hourly snapshot schedules. However, 1 hourly and 1 weekly schedule is a supported combination.

Snapshot Schedule as a JSON:

Here’s an example of a JSON file describing a snapshot schedule:

{
   "frequency": "weekly",
   "weekday": 3,
   "hour": 5,
   "minute": 30,
}

The above JSON will configure a snapshot schedule running every week on Wednesday at 05:30 AM.

# robin app snapshot-schedule a1 --snapshot-schedule demo_sched.json --retain 2 --enable --wait
Job:  116 Name: ApplicationSetSnapBack State: PREPARED        Error: 0
Job:  116 Name: ApplicationSetSnapBack State: COMPLETED       Error: 0

Snapshot Schedule as a CRON:

Robin allows one to specify a snapshot schedule via a CRON string with the standardised format. However there are three caveats. First the minute parameter of the string must always be set as minutely snapshot schedules are not supported. In a similar vein the parameter indicating the month must also be set (if applicable) as yearly schedules are not supported either. Finally one cannot specify both a day of the month and a day of the week as it is not a support configuration.

Here’s an example of a CRON string describing a snapshot schedule:

30 5 * * 3

The above CRON string configures a snapshot schedule running every week on Wednesday at 05:30 AM.

# robin app snapshot-schedule a1 --snapshot-schedule-cron "30 5 * * 3" --retain 2 --enable --wait
Job:  116 Name: ApplicationSetSnapBack State: PREPARED        Error: 0
Job:  116 Name: ApplicationSetSnapBack State: COMPLETED       Error: 0

11.24. Manage Application Backup Schedules

Robin Platform allows configuring a schedule to automatically backup application snapshots and set retention policies. The advantage is that an application can always be restored to the state saved in the backup. The schedule can be set via a JSON file or a CRON string. Issue the following command to set up a backup schedule for an app:

Note

A snapshot schedule must be configured for the application before a backup schedule can be set.

# robin app backup-schedule <app_name>
                            --backup-schedule <schedule>
                            --backup-schedule-cron <schedule>
                            --retain <retained_backups>
                            --filter <snap_filter>
                            --app-namespace <app_ns>
                            --disable
                            --enable

app_name

Application instance name

--backup-scheedule <schedule>

Backup schedule specified as JSON

--backup-scheedule-cron <schedule>

Backup schedule specified as CRON string

--retain <retained_backups>

Number of backups to retain with the specified schedule

--filter <snap_filter>

Frequency of snapshot schedule to backup

--app-namespace <app_ns>

If there are multiple applications of the same name but in different namespaces this option can be used to distinguish them

--disable

Disable the specified schedule

--enable

Enable the specified schedule

The fields that can be specified in the JSON file describing a schedule are:

frequency

The overall frequency at which to take backups. Valid values include: ‘hourly’, ‘daily’, ‘weekly’, ‘monthly’.

minute

An integer between 1-59 representing the minute at which the operation should be run. This field is optional, and the default value is 1 if not specified.

hour

An integer between 0-23 representing the hour at which the operation should be run. This field is optional, and the default value is 0 if not specified.

weekday

An integer between 0-6 representing the day of the week on which the operation should be run. Sunday is represented by 0 and so on and so forth. This field is optional, and the default value is 0 if not specified.

monthday

An integer between 1-28 representing the day of the month on which the operation should be run. This field is optional, and the default value is 1 if not specified.

Note

Only one backup schedule of each frequency type can be created. You cannot set 2 different hourly backup schedules. However, 1 hourly and 1 weekly schedule is a supported combination.

Backup Schedule as a JSON:

Here’s an example of a JSON file describing a backup schedule:

{
   "frequency": "weekly",
   "weekday": 0,
   "hour": 7,
   "minute": 15,
}

The above JSON will configure a backup schedule running every week on Sunday at 07:15 AM.

# robin app backup-schedule a1 --backup-schedule demo_sched.json --retain 3 --enable --filter daily --wait
Job:  116 Name: ApplicationSetSnapBack State: PREPARED        Error: 0
Job:  116 Name: ApplicationSetSnapBack State: COMPLETED       Error: 0

Backup Schedule as a CRON:

Robin allows one to specify a backup schedule via a CRON string with the standardised format. However there are three caveats. First the minute parameter of the string must always be set as minutely backup schedules are not supported. In a similar vein the parameter indicating the month must also be set (if applicable) as yearly schedules are not supported either. Finally one cannot specify both a day of the month and a day of the week as it is not a support configuration.

Here’s an example of a CRON string describing a snapshot schedule:

15 7 * * 0

The above CRON string will configure a backup schedule running every week on Sunday at 07:15 AM.

# robin app backup-schedule a1 --backup-schedule-cron "15 7 * * 0" --retain 2 --enable --filter daily --wait
Job:  116 Name: ApplicationSetSnapBack State: PREPARED        Error: 0
Job:  116 Name: ApplicationSetSnapBack State: COMPLETED       Error: 0

11.25. Restore an Application from a Snapshot or Backup

An application can be restored to the point-in-time state saved within an associated snapshot or backup (a snapshot that has been pushed to a storage repo). Issue the following command to recover an app to a specific point-in-time:

# robin app restore <app_name>
                    --snapshotid <snapshotid>
                    --backupid <backupid>
                    --skip-rx-pvcs
                    --include-rx-pvcs

app_name

Application instance name

--snapshotid <snapshotid>

ID of application snapshot

--backupid <backupid>

ID of application backup

--skip-rx-pvcs

Skip restoring RWX and ROX PVCs

--include-rx-pvcs

Include the restoration of RWX and ROX PVCs

Note

One of --snapshotid or --backupid must be provided.

Example:

# robin app restore mysql1 --snapshotid 2b388be6497211eaba7a190f2cdd554f --wait
Job:  188 Name: ApplicationRollback State: PREPARED        Error: 0
Job:  188 Name: ApplicationRollback State: AGENT_WAIT      Error: 0
Job:  188 Name: ApplicationRollback State: COMPLETED       Error: 0

Restores an application to the point-in-time state saved within an associated snapshot or backup (a snapshot that has been pushed to a storage repo).

End Point: /api/v3/robin_server/robin_server/apps/<appname>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: rollback - This mandatory field within the payload specifies that the restore operation is to be performed.

  • snapshotid: <snapshotid> - Utilizing this parameter, by specifiying the UUID of a snapshot, results in the application being rolled back to the state saved in the aformentioned snapshot.

  • backupid: <backupid> - Utilizing this parameter, by specifiying the UUID of a backup, results in the application being rolled back to the state saved in the aformentioned backup.

Note

One of snapshotid or backupid must be provided.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "snap_app":{
         "roles":[
            {
               "vnodes":[
                  {
                     "service_uids":[
                        "390f55e2-56dd-46f1-8c94-4f0c38c92aeb"
                     ],
                     "rpoolid":1,
                     "network":[
                        {
                           "subnet":"172.21.0.0",
                           "ippool":"robin-default",
                           "interfaces":1,
                           "allocated_ip":"172.21.24.104",
                           "allocated_prefix":16,
                           "name":"robin-default",
                           "allocated_by":"system",
                           "driver":"calico",
                           "allocated_names":[
                              "eth0"
                           ],
                           "allocated_netmask":"255.255.0.0"
                        }
                     ],
                     "sidecar_info":{
                        "mem":0,
                        "gpu":0,
                        "hugepages_2m":0,
                        "containers":[

                        ],
                        "cpu":0,
                        "hugepages_1g":0
                     },
                     "hosttags":{
                        "robinhost":[
                           "cscale-82-239"
                        ],
                        "kubernetes.io\/arch":[
                           "amd64"
                        ],
                        "rnodetype":[
                           "robin-worker-node"
                        ],
                        "nodetype":[
                           "robin-node"
                        ],
                        "domain":[
                           "ROBIN"
                        ],
                        "kubernetes.io\/os":[
                           "linux"
                        ],
                        "robin.io\/robinrpool":[
                           "default"
                        ],
                        "robinrpool":[
                           "default"
                        ]
                     },
                     "enable_hooklogs":true,
                     "cmdlineargs":"-W",
                     "vnodehooks":{
                        "prestart":"bash vnode_sample opr=prestart",
                        "postcreate":"bash check_mysql",
                        "poststart":"bash check_mysql",
                        "postgrow":"bash check_mysql",
                        "postrollback":"bash check_mysql",
                        "poststop":"bash vnode_sample opr=poststop",
                        "pregrow":"bash vnode_sample opr=pregrow",
                        "prerollback":"bash vnode_sample opr=prerollback",
                        "preclone":"bash vnode_sample opr=preclone",
                        "prestop":"bash vnode_sample opr=prestop",
                        "precreate":"bash vnode_sample opr=precreate",
                        "postsnapshot":"bash unquiesce.sh",
                        "presnapshot":"bash quiesce.sh",
                        "postclone":"bash check_mysql",
                        "postdestroy":"bash vnode_sample opr=postdestroy",
                        "predestroy":"bash vnode_sample opr=predestroy"
                     },
                     "hostname":"lak-mysql-01.t001-u000003.svc.cluster.local",
                     "bundle_object_id":"7be85809d7ecf1544e461df868f163ad",
                     "enable_portmapping":true,
                     "image":{
                        "entrypoint":"custom-entrypoint.sh",
                        "engine":"docker",
                        "version":"5.7",
                        "registry_hostname":"",
                        "name":"mysql",
                        "registry_port":""
                     },
                     "numa_allocations":{
                        "0":{
                           "gpu_used":0,
                           "isol_dedicated_cores_used":0,
                           "hugepages_1g_used":0,
                           "non_isol_cores_used":1,
                           "isol_shared_cores_used":0,
                           "hugepages_2m_used":0,
                           "mem_used":1073741824
                        }
                     },
                     "calico_inuse":true,
                     "allocated_host_public_hostname":"cscale-82-239.robinsystems.com",
                     "allocated":{
                        "zoneid":1595331866,
                        "zonename":"default",
                        "nodename":"cscale-82-239",
                        "nodeid":4
                     },
                     "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1595307896158\/1595307917814\/mysql-5.7",
                     "host_ip":"172.21.24.104",
                     "appid":43,
                     "mem":{
                        "hugepages_2m":0,
                        "size":1073741824,
                        "hugepages_1g":0
                     },
                     "gpu":{
                        "max":0,
                        "min":0
                     },
                     "state":"STARTED",
                     "enable_metrics":true,
                     "allocated_host_public_ip":"10.9.82.239",
                     "commandline":"-W",
                     "cpu":{
                        "max":1,
                        "min":0
                     },
                     "allocated_host_type":"physical",
                     "allocated_host":"cscale-82-239.robinsystems.com",
                     "role":"mysql",
                     "ctime":1599592323,
                     "volume_groups":[
                        {
                           "stormgr_id":56,
                           "name":"lak.mysql.01.72.1.2519c51d-f90d-4753-9fd8-bc689b32938c",
                           "layout":"round-robin",
                           "volumes":[
                              "lak.mysql.01.data.1.db34409d-5077-4505-9382-b74cab487726"
                           ],
                           "media":"HDD",
                           "device_sets":[
                              {
                                 "stormgr_id":75,
                                 "name":"lak.mysql.01.72.1.2519c51d-f90d-4753-9fd8-bc689b32938c.0.cc0ba584-9372-4828-9058-24918a6093a9",
                                 "devices":[
                                    {
                                       "role":"Storage",
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "pused":1006632960,
                                       "reattachable":0,
                                       "protected":0,
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "wwn":"0x6002248067f958fce9788c6f585a1eb7",
                                       "psize":107374182400,
                                       "hostname":"cscale-82-239.robinsystems.com",
                                       "write_unit":4096,
                                       "aslices":49,
                                       "slices":77,
                                       "capacity":107374182400,
                                       "tags":{

                                       },
                                       "allocated_slices":2,
                                       "stormgr_id":6,
                                       "type":"HDD",
                                       "state":"READY",
                                       "score":74,
                                       "devpath":"\/dev\/disk\/by-id\/scsi-36002248067f958fce9788c6f585a1eb7",
                                       "max_volumes_per_disk":40,
                                       "host":"cscale-82-239.robinsystems.com"
                                    }
                                 ]
                              }
                           ],
                           "rpoolid":1,
                           "replicas":1
                        }
                     ],
                     "restart_num":15,
                     "pod_name":"lak-mysql-01",
                     "vnodeid":16,
                     "engine":"docker",
                     "appname":"lak",
                     "storage":[
                        {
                           "faultdomain":"host",
                           "protection":0,
                           "snap_reserved":20,
                           "media":"HDD",
                           "encryption":"none",
                           "workload":0,
                           "fstype":"ext4",
                           "replication":1,
                           "layout":"round-robin",
                           "volgrp_name":"lak.mysql.01.72.1.2519c51d-f90d-4753-9fd8-bc689b32938c",
                           "snapname":"snap1",
                           "lvm_vol_count":"0",
                           "path":"\/var\/lib\/mysql",
                           "compression":"disabled",
                           "blocksize":4096,
                           "k8s_name":"lak-mysql-01-data-1-db34409d",
                           "vol_ns":"t001-u000003",
                           "disk_tags":{

                           },
                           "allocated":{
                              "media":72,
                              "stordriver":{
                                 "media":"HDD",
                                 "type":"das",
                                 "faultdomain":"host",
                                 "protection":0
                              },
                              "replication":1,
                              "next_backupid":1,
                              "appname":"default",
                              "resource_poolid":1,
                              "vtype":0,
                              "current_snapshotid":1,
                              "slice_size":1073741824,
                              "protection":0,
                              "multinode_mounting":false,
                              "volumeid":"56",
                              "compression":0,
                              "priority":2,
                              "params":{

                              },
                              "qgroupid":58,
                              "next_snapshotid":2,
                              "appid":1,
                              "name":"lak.mysql.01.data.1.db34409d-5077-4505-9382-b74cab487726",
                              "block_size":4096,
                              "snapshot_space_limit":214748365,
                              "current_snapshot":"active_snap",
                              "size":1073741824,
                              "genkey":1599592280515667,
                              "snapname":"snap1",
                              "grpid":56,
                              "partitions":0
                           },
                           "lvm_type":"None",
                           "type":"data",
                           "snapshot_space_limit":214748365,
                           "size":1073741824,
                           "name":"lak.mysql.01.data.1.db34409d-5077-4505-9382-b74cab487726",
                           "pvcpolicy":"create",
                           "stordriver":{
                              "media":"HDD",
                              "type":"das",
                              "faultdomain":"host",
                              "protection":0
                           }
                        }
                     ],
                     "services":[
                        {
                           "vnodename":"lak-mysql-01",
                           "selectors":{
                              "robin.io\/vnode":"lak-mysql-01"
                           },
                           "labels":{
                              "namespace":"t001-u000003",
                              "robin.io\/username":"robin",
                              "robin.io\/tenant_id":"1",
                              "robin.io\/user_id":"3",
                              "scope":"vnode",
                              "robin.io\/tenant":"Administrators"
                           },
                           "appname":"lak",
                           "k8s_name":"lak-mysql-01-np-0",
                           "ports":[
                              {
                                 "port":3306,
                                 "name":"tcp-port3306",
                                 "protocol":"TCP",
                                 "target_port":3306,
                                 "node_port":30640
                              }
                           ],
                           "cluster_ip":"172.19.45.11",
                           "type":"NodePort"
                        }
                     ],
                     "env":{
                        "MYSQL_USER":{
                           "type":"text",
                           "value":"robin"
                        },
                        "MYSQL_DATABASE":{
                           "type":"text",
                           "value":"robin"
                        },
                        "allocated":{
                           "MYSQL_USER":"robin",
                           "ROBINHOST_TAG_ROBINHOST":"cscale-82-239",
                           "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                           "ROBINHOST_TAG_NODETYPE":"robin-node",
                           "MYSQL_PASSWORD":"robin123",
                           "POD_NS":"t001-u000003",
                           "ROBINHOST":"cscale-82-239.robinsystems.com",
                           "POD_NAME":"lak-mysql-01",
                           "MYSQL_ROOT_PASSWORD":"robin123",
                           "K8S_NODE":"cscale-82-239",
                           "MYSQL_DATABASE":"robin",
                           "ROBINHOST_TAG_DOMAIN":"ROBIN",
                           "ROBINHOST_TAG_RNODETYPE":"robin-worker-node",
                           "ROBINHOST_TAG_ROBINRPOOL":"default",
                           "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux"
                        },
                        "MYSQL_ROOT_PASSWORD":{
                           "type":"password",
                           "value":"robin123"
                        },
                        "MYSQL_PASSWORD":{
                           "type":"password",
                           "value":"robin123"
                        }
                     },
                     "root_fs":"\/usr\/local\/robin\/instances\/lak-mysql-01.t001-u000003.svc.cluster.local",
                     "restart_on_qoscfg":true,
                     "k8s_provider":"robin",
                     "vnodehookargs":{
                        "postdestroy":[
                           "opr=postdestroy"
                        ],
                        "prestart":[
                           "opr=prestart"
                        ],
                        "postcreate":[

                        ],
                        "poststart":[

                        ],
                        "postrollback":[

                        ],
                        "postgrow":[

                        ],
                        "poststop":[
                           "opr=poststop"
                        ],
                        "pregrow":[
                           "opr=pregrow"
                        ],
                        "prerollback":[
                           "opr=prerollback"
                        ],
                        "preclone":[
                           "opr=preclone"
                        ],
                        "prestop":[
                           "opr=prestop"
                        ],
                        "precreate":[
                           "opr=precreate"
                        ],
                        "postsnapshot":[

                        ],
                        "postclone":[

                        ],
                        "presnapshot":[

                        ],
                        "predestroy":[
                           "opr=predestroy"
                        ]
                     },
                     "role_name":"mysql",
                     "name":"lak.mysql.01",
                     "cm_keys":[
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKS44FJBT75q64OPV8s1WL\/lFbMogtnSm9wk6i+uQArrteNI6DhMYnBV8GC+Dttr2sxurxm\/QEW3Pa9OKhtCtT\/CQ0h+w7u8f8Mu77zAtAd4rhFAtuK86wiZPp8vSRp3Q2l7TMC31VV08wa7fulk\/SSF6maJRQxxmH2lNOsHYOHZve4TSZ+FuGT5h0KMAtGjy7jDSfdt4nBFb\/EzVuUE70y8x8q7SmObQGCDBoQlC\/QwcmBJ+T25l7fDfVTSXSjCRb2wN2DIxUA7Cr1hNRoZNPAAFahq+jWYYS+aKaXVe6cR6GEtgQ66ey7Zn8ZHOrmW9n9LEnYT\/CmzV6l4gwfyIp root@cscale-82-236",
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxdMba+MjIxpx8IzmIodVTs13BJj3BAsRaeOpIC3g07eKcb\/WCJ3E9kFvOyJzqX1KmOpYqwtYG0zTwd+xPlc9fudEoORLM2jAt5JZQliT8IDGLyRYqhsOaL+HPKeO8VU9u0sd8938OXGKEJQ1Qt0DQcXuXTSDYGefS24TaWxJ6r\/bbM0WXYrJiFc83LemUHGq\/vdNpXNbGiAMPCTF3\/ZkHsIQTJd8dmBXn3VsEcRbvSGnHIXvQjRZRJp5hBVl\/zFZtGFuT7Rs1IVpZtsO81hFCkgAX\/jonSglX193+A5oCFPeTsfOD01A3r9x3qdcgtSwxkU5ElmksR6BNt0pXenO7 root@cscale-82-238",
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwaDQ4NFtH5X1NVdUW\/trWG0W3LaLOQdz0LIwTMiYo707zpW5STz6R4qRCyonqA5DGx9KicnDvbLYXrDtEFczf68j3N9mgm4QKQ5NAUsKgCrXD\/musfl7T0kwmADh4tWI1pbnEJNAfY+xOvKqd1MQIoXNY3jDHlZghb0un+ZnCkxlEwLNUEZySdVhuUitK6fH0abpbLDSWAqqWvzBQMeTYVD91KJPqQXPyejQcjw31dmFYQJ+Ru7Nm0+iifXIZ4poyGZuxNZL9K0F4j+mS+LQav+dAnQGfL62HyAZhHmFoqF9l1GQs6qwrWU6UaZPLAt3XaghtDJwXTks6vEkjibNN root@cscale-82-237"
                     ],
                     "utime":1599592323,
                     "pod_ns":"t001-u000003",
                     "bundleid":4,
                     "id":16
                  }
               ],
               "image":{
                  "entrypoint":"custom-entrypoint.sh",
                  "engine":"docker",
                  "version":"5.7",
                  "registry_hostname":"",
                  "name":"mysql",
                  "registry_port":""
               },
               "commandline":"-W",
               "volume_groups":[

               ],
               "display_name":"Runs mysql database server",
               "qgroups":{
                  "data":{
                     "rd_min_iops":0,
                     "enabled":false,
                     "wr_min_iops":0,
                     "priority":1,
                     "rd_weight":1,
                     "wr_max_iops":2000000,
                     "wr_weight":1,
                     "rd_max_iops":2000000,
                     "wr_min_window":500,
                     "rd_min_window":500
                  }
               },
               "restart_on_qoscfg":true,
               "name":"mysql",
               "service_ports":[
                  3306
               ]
            }
         ],
         "desc":"",
         "rpool":"default",
         "enable_hooklogs":true,
         "bundle_object_id":"7be85809d7ecf1544e461df868f163ad",
         "from_template":null,
         "parentid":43,
         "clonemode":"unfenced",
         "auto_relocate":true,
         "name":"lak_snap1",
         "clone":"enabled",
         "snapname":"snap1",
         "robin_version":"5.3.1-349",
         "snapshot":"enabled",
         "parent_last_known_state":6,
         "restart_num":15,
         "namespace":"t001-u000003",
         "planid":522,
         "rpoolid":1,
         "tenant":"Administrators",
         "content_id":"7be85809d7ecf1544e461df868f163ad",
         "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1595307896158\/1595307917814\/mysql-5.7",
         "app_ns":"t001-u000003",
         "bundleid":4,
         "master_name":"lak",
         "apphooks":{
            "postdestroy":"bash app_sample postdestroy",
            "prestart":"bash app_sample prestart",
            "validate":"python3.4 validate_template.py",
            "health":"python3.4 health.py",
            "postcreate":"bash app_sample postcreate",
            "poststart":"bash app_sample poststart",
            "allocated":{
               "prestart":"bash app_sample prestart",
               "validate":"python3.4 validate_template.py",
               "health":"python3.4 health.py",
               "postcreate":"bash app_sample postcreate",
               "poststart":"bash app_sample poststart",
               "postgrow":"bash app_sample postgrow",
               "postrollback":"bash app_sample postrollback",
               "poststop":"bash app_sample poststop",
               "pregrow":"bash app_sample pregrow",
               "prerollback":"bash app_sample prerollback",
               "preclone":"bash app_sample preclone",
               "prestop":"bash app_sample prestop",
               "precreate":"bash app_sample precreate",
               "postsnapshot":"bash app_sample postsnapshot",
               "presnapshot":"bash app_sample presnapshot",
               "postclone":"bash app_sample postclone",
               "postdestroy":"bash app_sample postdestroy",
               "predestroy":"bash app_sample predestroy"
            },
            "postrollback":"bash app_sample postrollback",
            "postgrow":"bash app_sample postgrow",
            "poststop":"bash app_sample poststop",
            "pregrow":"bash app_sample pregrow",
            "prerollback":"bash app_sample prerollback",
            "preclone":"bash app_sample preclone",
            "prestop":"bash app_sample prestop",
            "precreate":"bash app_sample precreate",
            "postsnapshot":"bash app_sample postsnapshot",
            "postclone":"bash app_sample postclone",
            "presnapshot":"bash app_sample presnapshot",
            "predestroy":"bash app_sample predestroy"
         },
         "enable_metrics":true,
         "zoneid":1595331866,
         "id":43,
         "pvcpolicy":"create",
         "username":"robin"
      },
      "orig_app":{
         "roles":[
            {
               "qgroups":{
                  "data":{
                     "rd_min_iops":0,
                     "wr_min_iops":0,
                     "wr_weight":1,
                     "priority":1,
                     "rd_weight":1,
                     "wr_max_iops":2000000,
                     "enabled":false,
                     "rd_max_iops":2000000,
                     "wr_min_window":500,
                     "rd_min_window":500
                  }
               },
               "image":{
                  "entrypoint":"custom-entrypoint.sh",
                  "engine":"docker",
                  "version":"5.7",
                  "registry_hostname":"",
                  "name":"mysql",
                  "registry_port":""
               },
               "commandline":"-W",
               "restart_on_qoscfg":true,
               "volume_groups":[

               ],
               "display_name":"Runs mysql database server",
               "vnodes":[
                  {
                     "service_uids":[
                        "390f55e2-56dd-46f1-8c94-4f0c38c92aeb"
                     ],
                     "rpoolid":1,
                     "network":[
                        {
                           "subnet":"172.21.0.0",
                           "ippool":"robin-default",
                           "interfaces":1,
                           "allocated_ip":"172.21.24.104",
                           "allocated_prefix":16,
                           "name":"robin-default",
                           "allocated_by":"system",
                           "driver":"calico",
                           "allocated_names":[
                              "eth0"
                           ],
                           "allocated_netmask":"255.255.0.0"
                        }
                     ],
                     "sidecar_info":{
                        "mem":0,
                        "gpu":0,
                        "hugepages_2m":0,
                        "containers":[

                        ],
                        "cpu":0,
                        "hugepages_1g":0
                     },
                     "hosttags":{
                        "robin.io\/robinrpool":[
                           "default"
                        ],
                        "robinrpool":[
                           "default"
                        ],
                        "rnodetype":[
                           "robin-worker-node"
                        ],
                        "nodetype":[
                           "robin-node"
                        ],
                        "domain":[
                           "ROBIN"
                        ],
                        "kubernetes.io\/os":[
                           "linux"
                        ],
                        "robinhost":[
                           "cscale-82-239"
                        ],
                        "kubernetes.io\/arch":[
                           "amd64"
                        ]
                     },
                     "enable_hooklogs":true,
                     "cmdlineargs":"-W",
                     "vnodehooks":{
                        "postdestroy":"bash vnode_sample opr=postdestroy",
                        "prestart":"bash vnode_sample opr=prestart",
                        "postcreate":"bash check_mysql",
                        "poststart":"bash check_mysql",
                        "postrollback":"bash check_mysql",
                        "postgrow":"bash check_mysql",
                        "poststop":"bash vnode_sample opr=poststop",
                        "pregrow":"bash vnode_sample opr=pregrow",
                        "prerollback":"bash vnode_sample opr=prerollback",
                        "preclone":"bash vnode_sample opr=preclone",
                        "prestop":"bash vnode_sample opr=prestop",
                        "precreate":"bash vnode_sample opr=precreate",
                        "postsnapshot":"bash unquiesce.sh",
                        "postclone":"bash check_mysql",
                        "presnapshot":"bash quiesce.sh",
                        "predestroy":"bash vnode_sample opr=predestroy"
                     },
                     "hostname":"lak-mysql-01.t001-u000003.svc.cluster.local",
                     "bundle_object_id":"7be85809d7ecf1544e461df868f163ad",
                     "enable_portmapping":true,
                     "image":{
                        "entrypoint":"custom-entrypoint.sh",
                        "engine":"docker",
                        "version":"5.7",
                        "registry_hostname":"",
                        "name":"mysql",
                        "registry_port":""
                     },
                     "numa_allocations":{
                        "0":{
                           "gpu_used":0,
                           "isol_dedicated_cores_used":0,
                           "hugepages_1g_used":0,
                           "non_isol_cores_used":1,
                           "isol_shared_cores_used":0,
                           "hugepages_2m_used":0,
                           "mem_used":1073741824
                        }
                     },
                     "commandline":"-W",
                     "calico_inuse":true,
                     "allocated_host_public_hostname":"cscale-82-239.robinsystems.com",
                     "allocated":{
                        "zoneid":1595331866,
                        "zonename":"default",
                        "nodename":"cscale-82-239",
                        "nodeid":4
                     },
                     "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1595307896158\/1595307917814\/mysql-5.7",
                     "host_ip":"172.21.24.104",
                     "appid":43,
                     "mem":{
                        "hugepages_1g":0,
                        "size":1073741824,
                        "hugepages_2m":0
                     },
                     "gpu":{
                        "max":0,
                        "min":0
                     },
                     "storage":[
                        {
                           "faultdomain":"host",
                           "snapshot_space_limit":214748365,
                           "snap_reserved":20,
                           "media":"HDD",
                           "encryption":"none",
                           "workload":0,
                           "fstype":"ext4",
                           "replication":1,
                           "layout":"round-robin",
                           "volgrp_name":"lak.mysql.01.72.1.2519c51d-f90d-4753-9fd8-bc689b32938c",
                           "lvm_vol_count":"0",
                           "path":"\/var\/lib\/mysql",
                           "compression":"disabled",
                           "type":"data",
                           "blocksize":4096,
                           "k8s_name":"lak-mysql-01-data-1-db34409d",
                           "vol_ns":"t001-u000003",
                           "disk_tags":{

                           },
                           "allocated":{
                              "media":72,
                              "replication":1,
                              "next_backupid":1,
                              "appname":"default",
                              "resource_poolid":1,
                              "vtype":0,
                              "current_snapshotid":2,
                              "next_snapshotid":2,
                              "compression":0,
                              "multinode_mounting":false,
                              "volumeid":"56",
                              "priority":2,
                              "params":{

                              },
                              "snapshot_space_limit":214748365,
                              "qgroupid":58,
                              "slice_size":1073741824,
                              "appid":1,
                              "name":"lak.mysql.01.data.1.db34409d-5077-4505-9382-b74cab487726",
                              "block_size":4096,
                              "protection":0,
                              "current_snapshot":"active_snap",
                              "size":1073741824,
                              "partitions":0,
                              "genkey":1599592280515667,
                              "grpid":56,
                              "stordriver":{
                                 "media":"HDD",
                                 "type":"das",
                                 "faultdomain":"host",
                                 "protection":0
                              }
                           },
                           "lvm_type":"None",
                           "name":"lak.mysql.01.data.1.db34409d-5077-4505-9382-b74cab487726",
                           "protection":0,
                           "size":1073741824,
                           "pvcpolicy":"create",
                           "stordriver":{
                              "media":"HDD",
                              "type":"das",
                              "faultdomain":"host",
                              "protection":0
                           }
                        }
                     ],
                     "enable_metrics":true,
                     "allocated_host_public_ip":"10.9.82.239",
                     "state":"STARTED",
                     "cpu":{
                        "max":1,
                        "min":0
                     },
                     "allocated_host_type":"physical",
                     "allocated_host":"cscale-82-239.robinsystems.com",
                     "role":"mysql",
                     "ctime":1599592323,
                     "volume_groups":[
                        {
                           "rpoolid":1,
                           "name":"lak.mysql.01.72.1.2519c51d-f90d-4753-9fd8-bc689b32938c",
                           "device_sets":[
                              {
                                 "name":"lak.mysql.01.72.1.2519c51d-f90d-4753-9fd8-bc689b32938c.0.cc0ba584-9372-4828-9058-24918a6093a9",
                                 "stormgr_id":75,
                                 "devices":[
                                    {
                                       "role":"Storage",
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "pused":1006632960,
                                       "reattachable":0,
                                       "protected":0,
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "wwn":"0x6002248067f958fce9788c6f585a1eb7",
                                       "psize":107374182400,
                                       "hostname":"cscale-82-239.robinsystems.com",
                                       "write_unit":4096,
                                       "aslices":49,
                                       "slices":77,
                                       "capacity":107374182400,
                                       "tags":{

                                       },
                                       "allocated_slices":2,
                                       "stormgr_id":6,
                                       "type":"HDD",
                                       "state":"READY",
                                       "score":74,
                                       "devpath":"\/dev\/disk\/by-id\/scsi-36002248067f958fce9788c6f585a1eb7",
                                       "max_volumes_per_disk":40,
                                       "host":"cscale-82-239.robinsystems.com"
                                    }
                                 ]
                              }
                           ],
                           "volumes":[
                              "lak.mysql.01.data.1.db34409d-5077-4505-9382-b74cab487726"
                           ],
                           "layout":"round-robin",
                           "media":"HDD",
                           "stormgr_id":56,
                           "replicas":1
                        }
                     ],
                     "restart_num":15,
                     "pod_name":"lak-mysql-01",
                     "vnodeid":16,
                     "engine":"docker",
                     "appname":"lak",
                     "services":[
                        {
                           "vnodename":"lak-mysql-01",
                           "selectors":{
                              "robin.io\/vnode":"lak-mysql-01"
                           },
                           "labels":{
                              "namespace":"t001-u000003",
                              "robin.io\/username":"robin",
                              "robin.io\/tenant":"Administrators",
                              "robin.io\/user_id":"3",
                              "scope":"vnode",
                              "robin.io\/tenant_id":"1"
                           },
                           "appname":"lak",
                           "k8s_name":"lak-mysql-01-np-0",
                           "ports":[
                              {
                                 "protocol":"TCP",
                                 "name":"tcp-port3306",
                                 "port":3306,
                                 "target_port":3306,
                                 "node_port":30640
                              }
                           ],
                           "cluster_ip":"172.19.45.11",
                           "type":"NodePort"
                        }
                     ],
                     "env":{
                        "MYSQL_USER":{
                           "type":"text",
                           "value":"robin"
                        },
                        "MYSQL_DATABASE":{
                           "type":"text",
                           "value":"robin"
                        },
                        "allocated":{
                           "MYSQL_USER":"robin",
                           "ROBINHOST_TAG_ROBINHOST":"cscale-82-239",
                           "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                           "POD_NS":"t001-u000003",
                           "ROBINHOST_TAG_NODETYPE":"robin-node",
                           "MYSQL_PASSWORD":"robin123",
                           "POD_NAME":"lak-mysql-01",
                           "ROBINHOST":"cscale-82-239.robinsystems.com",
                           "ROBINHOST_TAG_ROBINRPOOL":"default",
                           "K8S_NODE":"cscale-82-239",
                           "MYSQL_DATABASE":"robin",
                           "ROBINHOST_TAG_DOMAIN":"ROBIN",
                           "ROBINHOST_TAG_RNODETYPE":"robin-worker-node",
                           "MYSQL_ROOT_PASSWORD":"robin123",
                           "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux"
                        },
                        "MYSQL_ROOT_PASSWORD":{
                           "type":"password",
                           "value":"robin123"
                        },
                        "MYSQL_PASSWORD":{
                           "type":"password",
                           "value":"robin123"
                        }
                     },
                     "root_fs":"\/usr\/local\/robin\/instances\/lak-mysql-01.t001-u000003.svc.cluster.local",
                     "restart_on_qoscfg":true,
                     "k8s_provider":"robin",
                     "vnodehookargs":{
                        "prestart":[
                           "opr=prestart"
                        ],
                        "postcreate":[

                        ],
                        "poststart":[

                        ],
                        "postgrow":[

                        ],
                        "postrollback":[

                        ],
                        "poststop":[
                           "opr=poststop"
                        ],
                        "pregrow":[
                           "opr=pregrow"
                        ],
                        "prerollback":[
                           "opr=prerollback"
                        ],
                        "preclone":[
                           "opr=preclone"
                        ],
                        "prestop":[
                           "opr=prestop"
                        ],
                        "precreate":[
                           "opr=precreate"
                        ],
                        "postsnapshot":[

                        ],
                        "presnapshot":[

                        ],
                        "postclone":[

                        ],
                        "postdestroy":[
                           "opr=postdestroy"
                        ],
                        "predestroy":[
                           "opr=predestroy"
                        ]
                     },
                     "role_name":"mysql",
                     "name":"lak.mysql.01",
                     "cm_keys":[
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKS44FJBT75q64OPV8s1WL\/lFbMogtnSm9wk6i+uQArrteNI6DhMYnBV8GC+Dttr2sxurxm\/QEW3Pa9OKhtCtT\/CQ0h+w7u8f8Mu77zAtAd4rhFAtuK86wiZPp8vSRp3Q2l7TMC31VV08wa7fulk\/SSF6maJRQxxmH2lNOsHYOHZve4TSZ+FuGT5h0KMAtGjy7jDSfdt4nBFb\/EzVuUE70y8x8q7SmObQGCDBoQlC\/QwcmBJ+T25l7fDfVTSXSjCRb2wN2DIxUA7Cr1hNRoZNPAAFahq+jWYYS+aKaXVe6cR6GEtgQ66ey7Zn8ZHOrmW9n9LEnYT\/CmzV6l4gwfyIp root@cscale-82-236",
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxdMba+MjIxpx8IzmIodVTs13BJj3BAsRaeOpIC3g07eKcb\/WCJ3E9kFvOyJzqX1KmOpYqwtYG0zTwd+xPlc9fudEoORLM2jAt5JZQliT8IDGLyRYqhsOaL+HPKeO8VU9u0sd8938OXGKEJQ1Qt0DQcXuXTSDYGefS24TaWxJ6r\/bbM0WXYrJiFc83LemUHGq\/vdNpXNbGiAMPCTF3\/ZkHsIQTJd8dmBXn3VsEcRbvSGnHIXvQjRZRJp5hBVl\/zFZtGFuT7Rs1IVpZtsO81hFCkgAX\/jonSglX193+A5oCFPeTsfOD01A3r9x3qdcgtSwxkU5ElmksR6BNt0pXenO7 root@cscale-82-238",
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwaDQ4NFtH5X1NVdUW\/trWG0W3LaLOQdz0LIwTMiYo707zpW5STz6R4qRCyonqA5DGx9KicnDvbLYXrDtEFczf68j3N9mgm4QKQ5NAUsKgCrXD\/musfl7T0kwmADh4tWI1pbnEJNAfY+xOvKqd1MQIoXNY3jDHlZghb0un+ZnCkxlEwLNUEZySdVhuUitK6fH0abpbLDSWAqqWvzBQMeTYVD91KJPqQXPyejQcjw31dmFYQJ+Ru7Nm0+iifXIZ4poyGZuxNZL9K0F4j+mS+LQav+dAnQGfL62HyAZhHmFoqF9l1GQs6qwrWU6UaZPLAt3XaghtDJwXTks6vEkjibNN root@cscale-82-237"
                     ],
                     "utime":1599592323,
                     "pod_ns":"t001-u000003",
                     "bundleid":4,
                     "id":16
                  }
               ],
               "name":"mysql",
               "service_ports":[
                  3306
               ]
            }
         ],
         "rpool":"default",
         "enable_hooklogs":true,
         "bundle_object_id":"7be85809d7ecf1544e461df868f163ad",
         "clonemode":"unfenced",
         "auto_relocate":true,
         "name":"lak",
         "clone":"enabled",
         "from_template":null,
         "robin_version":"5.3.1-349",
         "snapshot":"enabled",
         "restart_num":15,
         "namespace":"t001-u000003",
         "planid":522,
         "rpoolid":1,
         "tenant":"Administrators",
         "content_id":"7be85809d7ecf1544e461df868f163ad",
         "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1595307896158\/1595307917814\/mysql-5.7",
         "app_ns":"t001-u000003",
         "bundleid":4,
         "apphooks":{
            "prestart":"bash app_sample prestart",
            "validate":"python3.4 validate_template.py",
            "health":"python3.4 health.py",
            "postcreate":"bash app_sample postcreate",
            "poststart":"bash app_sample poststart",
            "allocated":{
               "postdestroy":"bash app_sample postdestroy",
               "prestart":"bash app_sample prestart",
               "validate":"python3.4 validate_template.py",
               "health":"python3.4 health.py",
               "postcreate":"bash app_sample postcreate",
               "poststart":"bash app_sample poststart",
               "postrollback":"bash app_sample postrollback",
               "postgrow":"bash app_sample postgrow",
               "poststop":"bash app_sample poststop",
               "pregrow":"bash app_sample pregrow",
               "prerollback":"bash app_sample prerollback",
               "preclone":"bash app_sample preclone",
               "prestop":"bash app_sample prestop",
               "precreate":"bash app_sample precreate",
               "postsnapshot":"bash app_sample postsnapshot",
               "postclone":"bash app_sample postclone",
               "presnapshot":"bash app_sample presnapshot",
               "predestroy":"bash app_sample predestroy"
            },
            "postrollback":"bash app_sample postrollback",
            "postgrow":"bash app_sample postgrow",
            "poststop":"bash app_sample poststop",
            "pregrow":"bash app_sample pregrow",
            "prerollback":"bash app_sample prerollback",
            "preclone":"bash app_sample preclone",
            "prestop":"bash app_sample prestop",
            "precreate":"bash app_sample precreate",
            "postsnapshot":"bash app_sample postsnapshot",
            "presnapshot":"bash app_sample presnapshot",
            "postclone":"bash app_sample postclone",
            "postdestroy":"bash app_sample postdestroy",
            "predestroy":"bash app_sample predestroy"
         },
         "enable_metrics":true,
         "zoneid":1595331866,
         "username":"robin",
         "pvcpolicy":"create",
         "id":43
      }
   },
   "jobid":744
}

11.26. Configure Snapshot Space Limits for an Application

Use the following command to configure an application’s snapshot space limit:

# robin app snapshot-space-limit <app_name>
                                 --role <role>
                                 --volume-type <volume_type>
                                 --snapshot-space-limit <snap_limit>
                                 --role-values <rolestr>
                                 --all

app_name

Application instance name

--role <role>

Application Role Name (required if –all is not specified)

--volume-type <volume_type>

Volume type within the role (required if –role is specified)

--snapshot-space-limit <snap_limit>

Snapshot space limit in bytes for volumes of the given type or Snapshot space percentage for all volumes of the app

--role-values <rolestr>

Specify values for multiple roles and vtypes in app i.e. <role1>:<vtype1>:<snaplimit> <role2>:<vtype2>:<snaplimit>

--all

Configure snapshot space for all roles

Example:

# robin app snapshot-space-limit mysql1 --all -l 3% --wait
Job:  227 Name: ApplicationSnapshotSpaceLimitUpdate State: VALIDATED   Error: 0
Job:  227 Name: ApplicationSnapshotSpaceLimitUpdate State: COMPLETED   Error: 0

Configures the snapshot space limit for an application.

End Point: /api/v3/robin_server/robin_server/apps/<appname>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: snapshot_limits - This mandatory field within the payload specifies that the snapshot limits of an application are to be modified.

  • limits: <list_of_dicts>

    • role: <role_name> - This mandatory field within each dictionary specifies the role of the volumes that need to be modified.

    • snapshot_space_limit: <snapshot_limit> - This mandatory field within each dictionary specifies the total snapshot space limit of each volume (in bytes) that meets the type and role provided.

    • vol_type: <vol_type - This mandatory field within each dictionary specifies the type of the volumes within the given role that need to be modified.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "current_user":{
         "tenant_id":1,
         "username":"robin",
         "user_context":"robin",
         "namespace":"t001-u000003",
         "tenant_role":"superadmin",
         "ip_addr":"172.17.0.1",
         "user_permissions":{

         },
         "user_contexts":[
            "robin"
         ],
         "user_id":3,
         "session_expires":"2020-09-09T00:09:15",
         "tenant":"Administrators",
         "tenants":[
            "Administrators"
         ],
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ]
      },
      "action":"snapshot_limits",
      "appdata":{
         "username":"robin",
         "rpool":"default",
         "content_id":"017a9be81a251ab7adae390a6249b7f5",
         "namespace":"t001-u000003",
         "auto_relocate":true,
         "rpoolid":1,
         "restart_num":15,
         "bundleid":1,
         "id":31,
         "pvcpolicy":"create",
         "enable_metrics":true,
         "bundle_object_id":"017a9be81a251ab7adae390a6249b7f5",
         "tenant":"Administrators",
         "roles":[
            {
               "restart_on_qoscfg":true,
               "qgroups":{
                  "data":{
                     "rd_max_iops":2000000,
                     "rd_weight":1,
                     "wr_weight":1,
                     "rd_min_window":500,
                     "wr_min_window":500,
                     "priority":1,
                     "enabled":false,
                     "wr_min_iops":0,
                     "wr_max_iops":2000000,
                     "rd_min_iops":0
                  },
                  "block":{
                     "rd_max_iops":2000000,
                     "rd_weight":1,
                     "wr_weight":1,
                     "rd_min_window":500,
                     "wr_min_window":500,
                     "priority":1,
                     "enabled":false,
                     "wr_min_iops":0,
                     "wr_max_iops":2000000,
                     "rd_min_iops":0
                  }
               },
               "display_name":"server",
               "image":{
                  "engine":"docker",
                  "version":"7",
                  "registry_hostname":"",
                  "entrypoint":"entry.sh",
                  "name":"robinsys\/centos",
                  "registry_port":"",
                  "init_mode":false
               },
               "name":"server",
               "vnodes":[
                  {
                     "allocated_host_type":"physical",
                     "hosttags":{
                        "robin.io\/robinrpool":[
                           "default"
                        ],
                        "kubernetes.io\/os":[
                           "linux"
                        ],
                        "kubernetes.io\/arch":[
                           "amd64"
                        ]
                     },
                     "image":{
                        "engine":"docker",
                        "version":"7",
                        "registry_hostname":"",
                        "entrypoint":"entry.sh",
                        "name":"robinsys\/centos",
                        "registry_port":"",
                        "init_mode":false
                     },
                     "rpoolid":1,
                     "allocated_host_public_ip":"10.9.82.140",
                     "restart_num":15,
                     "bundleid":1,
                     "role_name":"server",
                     "utime":1599164742,
                     "id":31,
                     "cpu":{
                        "max":1,
                        "min":0,
                        "reserve":false
                     },
                     "env":{
                        "ROOT_PASSWORD":{
                           "type":"password",
                           "value":""
                        },
                        "DOCKER_OPTS":{
                           "type":"text",
                           "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN"
                        },
                        "allocated":{
                           "ROBINHOST":"cscale-82-140.robinsystems.com",
                           "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                           "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux",
                           "POD_NAME":"lak-server-01",
                           "ROOT_PASSWORD":"",
                           "ROBINHOST_TAG_ROBINRPOOL":"default",
                           "K8S_NODE":"cscale-82-140",
                           "DOCKER_OPTS":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                           "ENABLE_SSH":true,
                           "POD_NS":"t001-u000003"
                        },
                        "ENABLE_SSH":{
                           "type":"boolean",
                           "value":true
                        }
                     },
                     "ctime":1599164742,
                     "enable_hooklogs":true,
                     "pod_name":"lak-server-01",
                     "calico_inuse":true,
                     "appname":"lak",
                     "vnodehooks":{
                        "postcreate":"bash postcreate.sh"
                     },
                     "service_uids":[

                     ],
                     "engine":"docker",
                     "role":"server",
                     "name":"lak.server.01",
                     "allocated":{
                        "zonename":"default",
                        "nodeid":1,
                        "nodename":"cscale-82-140",
                        "zoneid":1598666199
                     },
                     "appid":31,
                     "root_fs":"\/usr\/local\/robin\/instances\/lak-server-01.t001-u000003.svc.cluster.local",
                     "vnodeid":31,
                     "mem":{
                        "hugepages_1g":0,
                        "size":209715200,
                        "hugepages_2m":0
                     },
                     "storage":[
                        {
                           "snapshot_space_limit":214748365,
                           "fstype":"ext4",
                           "vol_ns":"t001-u000003",
                           "compression":"disabled",
                           "snap_reserved":20,
                           "layout":"round-robin",
                           "media":"HDD",
                           "volgrp_name":"lak.server.01.72.1.79604a77-a02e-4293-9e4a-ff5a23bfb74c",
                           "pvcpolicy":"create",
                           "encryption":"none",
                           "replication":1,
                           "size":1073741824,
                           "k8s_name":"lak-server-01-data-1-be9e603f",
                           "disk_tags":{

                           },
                           "workload":0,
                           "protection":0,
                           "path":"\/data",
                           "lvm_vol_count":"0",
                           "stordriver":{
                              "faultdomain":"host",
                              "protection":0,
                              "media":"HDD",
                              "type":"das"
                           },
                           "faultdomain":"host",
                           "type":"data",
                           "lvm_type":"None",
                           "name":"lak.server.01.data.1.be9e603f-8c52-4472-9aa6-c8a9ada07ae3",
                           "allocated":{
                              "resource_poolid":1,
                              "snapshot_space_limit":214748365,
                              "compression":0,
                              "slice_size":1073741824,
                              "params":{

                              },
                              "partitions":0,
                              "genkey":1599164729997502,
                              "current_snapshotid":1,
                              "next_backupid":1,
                              "replication":1,
                              "size":1073741824,
                              "current_snapshot":"active_snap",
                              "grpid":64,
                              "priority":2,
                              "volumeid":"65",
                              "appname":"default",
                              "next_snapshotid":2,
                              "stordriver":{
                                 "faultdomain":"host",
                                 "protection":0,
                                 "media":"HDD",
                                 "type":"das"
                              },
                              "protection":0,
                              "media":72,
                              "vtype":0,
                              "multinode_mounting":false,
                              "qgroupid":64,
                              "name":"lak.server.01.data.1.be9e603f-8c52-4472-9aa6-c8a9ada07ae3",
                              "block_size":4096,
                              "appid":1
                           },
                           "blocksize":4096
                        },
                        {
                           "snapshot_space_limit":214748365,
                           "fstype":"raw",
                           "vol_ns":"t001-u000003",
                           "compression":"disabled",
                           "snap_reserved":20,
                           "layout":"round-robin",
                           "media":"HDD",
                           "volgrp_name":"lak.server.01.72.1.dfedd742-66bc-4b3c-b626-01c581d12cc5",
                           "pvcpolicy":"create",
                           "encryption":"none",
                           "replication":1,
                           "size":1073741824,
                           "k8s_name":"lak-server-01-block-1-52af20de",
                           "disk_tags":{

                           },
                           "workload":0,
                           "protection":0,
                           "path":"\/dev\/rda",
                           "lvm_vol_count":"0",
                           "stordriver":{
                              "faultdomain":"host",
                              "protection":0,
                              "media":"HDD",
                              "type":"das"
                           },
                           "faultdomain":"host",
                           "type":"block",
                           "lvm_type":"None",
                           "name":"lak.server.01.block.1.52af20de-9a7e-40f5-a9b0-65e191ea5564",
                           "allocated":{
                              "resource_poolid":1,
                              "snapshot_space_limit":214748365,
                              "compression":0,
                              "slice_size":1073741824,
                              "params":{

                              },
                              "partitions":0,
                              "genkey":1599164729992109,
                              "current_snapshotid":1,
                              "next_backupid":1,
                              "replication":1,
                              "size":1073741824,
                              "current_snapshot":"active_snap",
                              "grpid":65,
                              "priority":2,
                              "volumeid":"64",
                              "appname":"default",
                              "next_snapshotid":2,
                              "stordriver":{
                                 "faultdomain":"host",
                                 "protection":0,
                                 "media":"HDD",
                                 "type":"das"
                              },
                              "protection":0,
                              "media":72,
                              "vtype":0,
                              "multinode_mounting":false,
                              "qgroupid":65,
                              "name":"lak.server.01.block.1.52af20de-9a7e-40f5-a9b0-65e191ea5564",
                              "block_size":4096,
                              "appid":1
                           },
                           "blocksize":4096
                        }
                     ],
                     "cm_keys":[
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBZg2sAe0kUqoIEPV6dMQ99U\/9rSmZbF70M5s1Ys39cYPEkkWHMAnWHe6Vj1cDik+wSPV6qk4EiV7tTi+nwTQzbiJx67FcF29i1WLvVtc0xXSNo9zkJTHG4CONg79UoW8F6GnrHD+NJiQAdenQAcThnFGJoqaqn\/ohxcuTV3rnc+W84EAlCPVEa3mzvFzu0hXFDN6JrbcYBdG8BU2xrUGM3PaQZRGay6ZbpQSLlFY8XevAO4iTeMfkBRJxFGNEE0zFpVwwtVfNHsCAkfqmSt4kM68OdS4ZdHmjPsIjzyhWJPMnnqJ17vWGUHLEfMxvY2Nb5dCSR\/SAoHVXTtItGFYT root@cscale-82-140"
                     ],
                     "hostname":"lak-server-01.t001-u000003.svc.cluster.local",
                     "allocated_host":"cscale-82-140.robinsystems.com",
                     "gpu":{
                        "max":0,
                        "min":0
                     },
                     "numa_allocations":{
                        "0":{
                           "hugepages_1g_used":0,
                           "non_isol_cores_used":1,
                           "isol_dedicated_cores_used":0,
                           "mem_used":209715200,
                           "hugepages_2m_used":0,
                           "isol_shared_cores_used":0,
                           "gpu_used":0
                        }
                     },
                     "vnodehookargs":{
                        "postcreate":[

                        ]
                     },
                     "network":[
                        {
                           "ippool":"robin-default",
                           "name":"robin-default",
                           "driver":"calico",
                           "subnet":"172.21.0.0",
                           "allocated_ip":"172.21.26.106",
                           "allocated_netmask":"255.255.0.0",
                           "interfaces":1,
                           "allocated_by":"system",
                           "allocated_names":[
                              "eth0"
                           ],
                           "allocated_prefix":16
                        }
                     ],
                     "enable_metrics":true,
                     "k8s_provider":"robin",
                     "host_ip":"172.21.26.106",
                     "allocated_host_public_hostname":"cscale-82-140.robinsystems.com",
                     "restart_on_qoscfg":true,
                     "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1598641146105\/1598641180179\/centos-1.0",
                     "pod_ns":"t001-u000003",
                     "state":"STARTED",
                     "enable_portmapping":true,
                     "bundle_object_id":"017a9be81a251ab7adae390a6249b7f5",
                     "sidecar_info":{
                        "cpu":0,
                        "hugepages_2m":0,
                        "hugepages_1g":0,
                        "gpu":0,
                        "containers":[

                        ],
                        "mem":0
                     },
                     "volume_groups":[
                        {
                           "layout":"round-robin",
                           "media":"HDD",
                           "stormgr_id":64,
                           "device_sets":[
                              {
                                 "devices":[
                                    {
                                       "capacity":107374182400,
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "slices":77,
                                       "tags":{

                                       },
                                       "aslices":13,
                                       "type":"HDD",
                                       "stormgr_id":2,
                                       "hostname":"cscale-82-140.robinsystems.com",
                                       "psize":107374182400,
                                       "protected":0,
                                       "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                       "score":92,
                                       "wwn":"0x600224804c48fd7e16c608dea0919064",
                                       "write_unit":4096,
                                       "reattachable":0,
                                       "allocated_slices":2,
                                       "max_volumes_per_disk":10,
                                       "state":"READY",
                                       "role":"Storage",
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "pused":301989888,
                                       "host":"cscale-82-140.robinsystems.com"
                                    }
                                 ],
                                 "name":"lak.server.01.72.1.79604a77-a02e-4293-9e4a-ff5a23bfb74c.0.54e6a270-a851-432d-8af3-e4a5724fd7ed",
                                 "stormgr_id":64
                              }
                           ],
                           "volumes":[
                              "lak.server.01.data.1.be9e603f-8c52-4472-9aa6-c8a9ada07ae3"
                           ],
                           "name":"lak.server.01.72.1.79604a77-a02e-4293-9e4a-ff5a23bfb74c",
                           "rpoolid":1,
                           "replicas":1
                        },
                        {
                           "layout":"round-robin",
                           "media":"HDD",
                           "stormgr_id":65,
                           "device_sets":[
                              {
                                 "devices":[
                                    {
                                       "capacity":107374182400,
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "slices":77,
                                       "tags":{

                                       },
                                       "aslices":13,
                                       "type":"HDD",
                                       "stormgr_id":2,
                                       "hostname":"cscale-82-140.robinsystems.com",
                                       "psize":107374182400,
                                       "protected":0,
                                       "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                                       "score":92,
                                       "wwn":"0x600224804c48fd7e16c608dea0919064",
                                       "write_unit":4096,
                                       "reattachable":0,
                                       "allocated_slices":2,
                                       "max_volumes_per_disk":10,
                                       "state":"READY",
                                       "role":"Storage",
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "pused":301989888,
                                       "host":"cscale-82-140.robinsystems.com"
                                    }
                                 ],
                                 "name":"lak.server.01.72.1.dfedd742-66bc-4b3c-b626-01c581d12cc5.0.57785519-2999-404f-a8c1-c46bf24eb2a2",
                                 "stormgr_id":65
                              }
                           ],
                           "volumes":[
                              "lak.server.01.block.1.52af20de-9a7e-40f5-a9b0-65e191ea5564"
                           ],
                           "name":"lak.server.01.72.1.dfedd742-66bc-4b3c-b626-01c581d12cc5",
                           "rpoolid":1,
                           "replicas":1
                        }
                     ]
                  }
               ],
               "volume_groups":[

               ]
            }
         ],
         "clone":"enabled",
         "enable_hooklogs":true,
         "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1598641146105\/1598641180179\/centos-1.0",
         "robin_version":"5.3.0-172",
         "planid":33,
         "zoneid":1598666199,
         "app_ns":"t001-u000003",
         "snapshot":"enabled",
         "version":"7",
         "name":"lak",
         "from_template":null
      },
      "namespace":"t001-u000003",
      "limits":[
         {
            "vol_type":"data",
            "snapshot_space_limit":375809639,
            "role":"server"
         },
         {
            "vol_type":"block",
            "snapshot_space_limit":375809639,
            "role":"server"
         }
      ],
      "kind":"robin",
      "name":"lak",
      "opcode":null
   },
   "jobid":257
}

11.27. Adding a volume for a service within an application

In certain scenarios, users will need to attach an additional volume post application deployment for a service that whose data capcacity needs to be extended. This is commonly done for Oracle RAC where the database might need access to increased storage or the number of volumes accesible for a Hadoop data node might need to be increased. Robin provides a native way in which to do this without any downtime for the respective containers. In order to add a volume, issue the following command:

# robin app addvol <name> <role> <voltype> <size> <mntpath>

name

Application instance name

role

Name of role to add volume to

voltype

Type of additional volume. This must already be predefined within the application bundle.

size

Size of additional volume

mntpath

Path on which the additional volume should be mounted

Example:

# robin app addvol a1 mysql data 3G /var/lib/new --wait
Job:  363 Name: ApplicationAddVolume State: VALIDATED       Error: 0
Job:  363 Name: ApplicationAddVolume State: WAITING         Error: 0
Job:  363 Name: ApplicationAddVolume State: COMPLETED       Error: 0

Attaches an an additional volume post application deployment for a service that whose data capcacity needs to be extended without causing any downtime for the respective containers.

End Point: /api/v3/robin_server/robin_server/apps/<appname>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: addvol - This mandatory field within the payload specifies that the add volume operation is to be performed.

  • name: <app_name> - This mandatory field within the payload specifies the app to which the volume will be added.

  • role: <role_name> - This mandatory field within the payload specifies the role to which the volume needs to be added.

  • volume: <dict_of_properties>

    • path: <vol_path> - This mandatory field within the dictionary specifies the path on which the additional volume should be mounted.

    • size: <vol_size> - This mandatory field within the dictionary specifies the size of the volume (in bytes) to be added.

    • type: <vol_type - This mandatory field within the dictionary specifies the type of the volume to be added.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan":{
      "user_id":3,
      "tenant_id":1,
      "current_user":{
         "tenant_id":1,
         "username":"robin",
         "user_context":"robin",
         "namespace":"t001-u000003",
         "tenant_role":"superadmin",
         "ip_addr":"172.17.0.1",
         "user_permissions":{

         },
         "user_contexts":[
            "robin"
         ],
         "user_id":3,
         "session_expires":"2020-09-09T00:09:15",
         "tenant":"Administrators",
         "tenants":[
            "Administrators"
         ],
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ]
      },
      "action":"addvol",
      "role":"server",
      "namespace":"t001-u000003",
      "volume":{
         "snapshot_space_limit":1127428917,
         "fstype":"ext4",
         "vol_ns":"t001-u000003",
         "compression":"disabled",
         "snap_reserved":20,
         "layout":"round-robin",
         "media":"HDD",
         "volgrp_name":"lak.server.01.72.1.79604a77-a02e-4293-9e4a-ff5a23bfb74c",
         "pvcpolicy":"create",
         "encryption":"none",
         "replication":1,
         "size":3221225472,
         "k8s_name":"lak-server-01-data-1-be9e603f",
         "disk_tags":{

         },
         "workload":0,
         "protection":0,
         "path":"\/var\/lib\/new",
         "lvm_vol_count":"0",
         "stordriver":{
            "faultdomain":"host",
            "protection":0,
            "media":"HDD",
            "type":"das"
         },
         "faultdomain":"host",
         "type":"data",
         "lvm_type":"None",
         "name":"lak.server.01.data.1.be9e603f-8c52-4472-9aa6-c8a9ada07ae3",
         "blocksize":4096
      },
      "name":"lak",
      "kind":"robin",
      "opcode":null
   },
   "jobid":258
}

11.28. Expanding a volume associated wih a service within an application

In certain scenarios, users will need to grow volumes post application deployment for a service whose data capcacity needs to be increased. This is commonly done when the storage usage for an application was underestimated during the initial configuration. Robin provides a native way in which to do this without a need to restart the application containers. In order to expand a volume, issue the following command:

# robin app expandvol <name> <role> <voltype> <size>

Note

Only the following filesystems are supported for automatic volume expansion wherein which the pod can start consuming the added space immediately: ext4 and xfs (except for when it used as the root filesystem).

name

Application instance name

role

Name of role to expand volume of

voltype

Type of volume to expand. This must already be predefined within the application bundle.

size

Size the volume should be expanded to

Example:

# robin app expandvol demo server data 2G --wait
Job:  363 Name: ApplicationExpandVolume State: VALIDATED       Error: 0
Job:  363 Name: ApplicationExpandVolume State: WAITING         Error: 0
Job:  363 Name: ApplicationExpandVolume State: COMPLETED       Error: 0

Expands volume(s) post application deployment for a service whose data capcacity needs to be increased without needing to restart the application containers.

End Point: /api/v3/robin_server/robin_server/apps/<appname>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: expandvol - This mandatory field within the payload specifies that the expand volume operation is to be performed.

  • name: <app_name> - This mandatory field within the payload specifies the app whose volume(s) will be expanded.

  • roles: <list_of_dicts>

    • role: <role_name> - This mandatory field within the dictionary specifies the role whose volume(s) need to be expanded.

    • volumes: <list_of_dict_with_properties>

      • size: <vol_size> - This mandatory field within the dictionary specifies the size (in bytes) to which the volume should be expanded to.

      • type: <vol_type - This mandatory field within the dictionary specifies the type of the volume to be expanded.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":2420,
   "plan":{
      "action":"expandvol",
      "name":"demo",
      "roles":[
         {
            "role_name":"server",
            "volumes":[
               {
                  "type":"data",
                  "size":2147483648
               }
            ]
         }
      ],
      "namespace":"t001-u000003",
      "kind":"robin",
      "opcode":null,
      "current_user":{
         "user_id":3,
         "username":"admin",
         "tenant_id":1,
         "tenant":"Administrators",
         "tenants":[
            "Administrators"
         ],
         "tenant_role":"superadmin",
         "namespace":"t001-u000003",
         "user_context":"admin",
         "user_contexts":[
            "admin"
         ],
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "user_permissions":{

         },
         "ip_addr":"10.9.60.114",
         "session_expires":"2021-08-02T06:22:17"
      },
      "tenant_id":1,
      "user_id":3,
      "appcfg":{
         "name":"demo",
         "version":"7",
         "snapshot":"enabled",
         "clone":"enabled",
         "roles":[
            {
               "name":"server",
               "multinode":true,
               "image":{
                  "name":"robinsys\/centos",
                  "version":"7",
                  "engine":"docker",
                  "entrypoint":"entry.sh",
                  "init_mode":false,
                  "registry_hostname":"",
                  "registry_port":""
               },
               "display_name":"server",
               "vnodes":[
                  {
                     "name":"demo.server.01",
                     "multinode":true,
                     "storage":[
                        {
                           "type":"data",
                           "media":"HDD",
                           "path":"\/data",
                           "size":1073741824,
                           "blocksize":4096,
                           "compression":"disabled",
                           "layout":"round-robin",
                           "name":"demo.server.01.data.1.2e5298c8-6802-424d-b90c-61e8646f3597",
                           "protection":0,
                           "replication":1,
                           "faultdomain":"host",
                           "encryption":"none",
                           "disk_tags":{

                           },
                           "lvm_type":"None",
                           "lvm_vol_count":"0",
                           "workload":0,
                           "snap_reserved":20,
                           "snapshot_space_limit":214748365,
                           "fstype":"ext4",
                           "stordriver":{
                              "media":"HDD",
                              "protection":0,
                              "faultdomain":"host",
                              "type":"das"
                           },
                           "pvcpolicy":"create",
                           "k8s_name":"demo-server-01-data-1-2e5298c8",
                           "vol_ns":"t001-u000003",
                           "volgrp_name":"demo.server.01.72.1.23f36cc6-0c52-4772-b70a-e35ddc47469b",
                           "allocated":{
                              "protection":0,
                              "size":1073741824,
                              "name":"demo.server.01.data.1.2e5298c8-6802-424d-b90c-61e8646f3597",
                              "multinode_mounting":false,
                              "replication":1,
                              "snapshot_space_limit":214748365,
                              "compression":0,
                              "partitions":0,
                              "priority":2,
                              "vtype":0,
                              "media":72,
                              "qgroupid":177,
                              "resource_poolid":1,
                              "block_size":4096,
                              "next_backupid":1,
                              "grpid":186,
                              "next_snapshotid":2,
                              "appid":1,
                              "current_snapshot":"active_snap",
                              "appname":"default",
                              "slice_size":1073741824,
                              "volumeid":"187",
                              "params":{

                              },
                              "current_snapshotid":1,
                              "genkey":1627824605079817,
                              "stordriver":{
                                 "media":"HDD",
                                 "protection":0,
                                 "faultdomain":"host",
                                 "type":"das"
                              }
                           },
                           "device_sets":[
                              [
                                 {
                                    "aslices":34,
                                    "pused":7583301632,
                                    "psize":107374182400,
                                    "slices":77,
                                    "write_unit":4096,
                                    "stormgr_id":8,
                                    "wwn":"0x600224804a0680e9eb923fd38f181063",
                                    "capacity":107374182400,
                                    "type":"HDD",
                                    "state":"READY",
                                    "host":"centos-60-114.robinsystems.com",
                                    "reattachable":0,
                                    "protected":0,
                                    "role":"Storage",
                                    "devpath":"\/dev\/disk\/by-id\/scsi-3600224804a0680e9eb923fd38f181063",
                                    "max_volumes_per_disk":40,
                                    "max_latency_sensitive_vols_per_disk":2,
                                    "max_throughput_intensive_vols_per_disk":1,
                                    "tags":{

                                    },
                                    "hostname":"centos-60-114.robinsystems.com",
                                    "score":78,
                                    "allocated_slices":2
                                 }
                              ]
                           ]
                        },
                        {
                           "type":"block",
                           "media":"HDD",
                           "path":"\/dev\/rda",
                           "size":1073741824,
                           "fstype":"raw",
                           "blocksize":4096,
                           "compression":"disabled",
                           "layout":"round-robin",
                           "name":"demo.server.01.block.1.ea82ab17-7e75-4b82-ac0f-68ae758aa4aa",
                           "protection":0,
                           "replication":1,
                           "faultdomain":"host",
                           "encryption":"none",
                           "disk_tags":{

                           },
                           "lvm_type":"None",
                           "lvm_vol_count":"0",
                           "workload":0,
                           "snap_reserved":20,
                           "snapshot_space_limit":214748365,
                           "stordriver":{
                              "media":"HDD",
                              "protection":0,
                              "faultdomain":"host",
                              "type":"das"
                           },
                           "pvcpolicy":"create",
                           "k8s_name":"demo-server-01-block-1-ea82ab17",
                           "vol_ns":"t001-u000003",
                           "volgrp_name":"demo.server.01.72.1.badcd32a-0cc2-4aa2-a279-840792a75c7a",
                           "allocated":{
                              "protection":0,
                              "size":1073741824,
                              "name":"demo.server.01.block.1.ea82ab17-7e75-4b82-ac0f-68ae758aa4aa",
                              "multinode_mounting":false,
                              "replication":1,
                              "snapshot_space_limit":214748365,
                              "compression":0,
                              "partitions":0,
                              "priority":2,
                              "vtype":0,
                              "media":72,
                              "qgroupid":178,
                              "resource_poolid":1,
                              "block_size":4096,
                              "next_backupid":1,
                              "grpid":187,
                              "next_snapshotid":2,
                              "appid":1,
                              "current_snapshot":"active_snap",
                              "appname":"default",
                              "slice_size":1073741824,
                              "volumeid":"186",
                              "params":{

                              },
                              "current_snapshotid":1,
                              "genkey":1627824605075415,
                              "stordriver":{
                                 "media":"HDD",
                                 "protection":0,
                                 "faultdomain":"host",
                                 "type":"das"
                              }
                           },
                           "device_sets":[
                              [
                                 {
                                    "aslices":34,
                                    "pused":7583301632,
                                    "psize":107374182400,
                                    "slices":77,
                                    "write_unit":4096,
                                    "stormgr_id":8,
                                    "wwn":"0x600224804a0680e9eb923fd38f181063",
                                    "capacity":107374182400,
                                    "type":"HDD",
                                    "state":"READY",
                                    "host":"centos-60-114.robinsystems.com",
                                    "reattachable":0,
                                    "protected":0,
                                    "role":"Storage",
                                    "devpath":"\/dev\/disk\/by-id\/scsi-3600224804a0680e9eb923fd38f181063",
                                    "max_volumes_per_disk":40,
                                    "max_latency_sensitive_vols_per_disk":2,
                                    "max_throughput_intensive_vols_per_disk":1,
                                    "tags":{

                                    },
                                    "hostname":"centos-60-114.robinsystems.com",
                                    "score":78,
                                    "allocated_slices":2
                                 }
                              ]
                           ]
                        }
                     ],
                     "vnodehooks":{
                        "postcreate":"bash postcreate.sh"
                     },
                     "cpu":{
                        "reserve":false,
                        "min":0,
                        "max":1
                     },
                     "gpu":{
                        "min":0,
                        "max":0
                     },
                     "mem":{
                        "size":209715200,
                        "hugepages_2m":0,
                        "hugepages_1g":0
                     },
                     "env":{
                        "ENABLE_SSH":{
                           "type":"boolean",
                           "value":true
                        },
                        "DOCKER_OPTS":{
                           "type":"text",
                           "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN"
                        },
                        "ROOT_PASSWORD":{
                           "type":"password",
                           "value":""
                        },
                        "allocated":{
                           "ENABLE_SSH":true,
                           "DOCKER_OPTS":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
                           "ROOT_PASSWORD":"",
                           "ROBINHOST":"centos-60-114.robinsystems.com",
                           "K8S_NODE":"centos-60-114",
                           "POD_NAME":"demo-server-01",
                           "POD_NS":"t001-u000003",
                           "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux",
                           "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
                           "ROBINHOST_TAG_NODE-ROLE.KUBERNETES.IO-CONTROL-PLANE":"",
                           "ROBINHOST_TAG_ROBINRPOOL":"default"
                        }
                     },
                     "network":[
                        {
                           "ippool":"robin-default",
                           "name":"robin-default",
                           "driver":"calico",
                           "interfaces":1,
                           "allocated_ip":"172.21.30.109",
                           "allocated_netmask":"255.255.0.0",
                           "allocated_prefix":16,
                           "subnet":"172.21.0.0",
                           "allocated_by":"system",
                           "allocated_names":[
                              "eth0"
                           ]
                        }
                     ],
                     "enable_portmapping":true,
                     "enable_hooklogs":true,
                     "enable_metrics":true,
                     "sidecar_info":{
                        "cpu":0,
                        "mem":0,
                        "gpu":0,
                        "hugepages_2m":0,
                        "hugepages_1g":0,
                        "containers":[

                        ]
                     },
                     "role_name":"server",
                     "rpoolid":1,
                     "calico_inuse":true,
                     "restart_on_qoscfg":true,
                     "allocated":{
                        "zoneid":1626105129,
                        "zonename":"default",
                        "nodeid":1,
                        "nodename":"centos-60-114",
                        "k8s_nodename":"centos-60-114"
                     },
                     "allocated_host":"centos-60-114.robinsystems.com",
                     "v6_enabled_host":true,
                     "k8s_provider":"robin",
                     "allocated_host_type":"physical",
                     "numa_allocations":{
                        "0":{
                           "guaranteed_cores_used":0,
                           "mem_used":209715200,
                           "hugepages_1g_used":0,
                           "hugepages_2m_used":0,
                           "gpu_used":0
                        }
                     },
                     "allocated_host_public_hostname":"centos-60-114.robinsystems.com",
                     "allocated_host_public_ip":"10.9.60.114",
                     "hosttags":{
                        "kubernetes.io\/os":[
                           "linux"
                        ],
                        "kubernetes.io\/arch":[
                           "amd64"
                        ],
                        "node-role.kubernetes.io\/control-plane":[
                           ""
                        ],
                        "robin.io\/robinrpool":[
                           "default"
                        ]
                     },
                     "volume_groups":[
                        {
                           "media":"HDD",
                           "rpoolid":1,
                           "volumes":[
                              "demo.server.01.data.1.2e5298c8-6802-424d-b90c-61e8646f3597"
                           ],
                           "layout":"round-robin",
                           "device_sets":[
                              {
                                 "devices":[
                                    {
                                       "aslices":34,
                                       "pused":7583301632,
                                       "psize":107374182400,
                                       "slices":77,
                                       "write_unit":4096,
                                       "stormgr_id":8,
                                       "wwn":"0x600224804a0680e9eb923fd38f181063",
                                       "capacity":107374182400,
                                       "type":"HDD",
                                       "state":"READY",
                                       "host":"centos-60-114.robinsystems.com",
                                       "reattachable":0,
                                       "protected":0,
                                       "role":"Storage",
                                       "devpath":"\/dev\/disk\/by-id\/scsi-3600224804a0680e9eb923fd38f181063",
                                       "max_volumes_per_disk":40,
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "tags":{

                                       },
                                       "hostname":"centos-60-114.robinsystems.com",
                                       "score":78,
                                       "allocated_slices":2
                                    }
                                 ],
                                 "name":"demo.server.01.72.1.23f36cc6-0c52-4772-b70a-e35ddc47469b.0.f373692c-6fd9-4391-a170-4bf165216608",
                                 "stormgr_id":190
                              }
                           ],
                           "replicas":1,
                           "name":"demo.server.01.72.1.23f36cc6-0c52-4772-b70a-e35ddc47469b",
                           "stormgr_id":186
                        },
                        {
                           "media":"HDD",
                           "rpoolid":1,
                           "volumes":[
                              "demo.server.01.block.1.ea82ab17-7e75-4b82-ac0f-68ae758aa4aa"
                           ],
                           "layout":"round-robin",
                           "device_sets":[
                              {
                                 "devices":[
                                    {
                                       "aslices":34,
                                       "pused":7583301632,
                                       "psize":107374182400,
                                       "slices":77,
                                       "write_unit":4096,
                                       "stormgr_id":8,
                                       "wwn":"0x600224804a0680e9eb923fd38f181063",
                                       "capacity":107374182400,
                                       "type":"HDD",
                                       "state":"READY",
                                       "host":"centos-60-114.robinsystems.com",
                                       "reattachable":0,
                                       "protected":0,
                                       "role":"Storage",
                                       "devpath":"\/dev\/disk\/by-id\/scsi-3600224804a0680e9eb923fd38f181063",
                                       "max_volumes_per_disk":40,
                                       "max_latency_sensitive_vols_per_disk":2,
                                       "max_throughput_intensive_vols_per_disk":1,
                                       "tags":{

                                       },
                                       "hostname":"centos-60-114.robinsystems.com",
                                       "score":78,
                                       "allocated_slices":2
                                    }
                                 ],
                                 "name":"demo.server.01.72.1.badcd32a-0cc2-4aa2-a279-840792a75c7a.0.2b039006-23c1-4aaa-8677-935f3bd1ae76",
                                 "stormgr_id":191
                              }
                           ],
                           "replicas":1,
                           "name":"demo.server.01.72.1.badcd32a-0cc2-4aa2-a279-840792a75c7a",
                           "stormgr_id":187
                        }
                     ],
                     "pod_name":"demo-server-01",
                     "pod_ns":"t001-u000003",
                     "hostname":"demo-server-01.t001-u000003.svc.cluster.local",
                     "host_ip":"172.21.30.109",
                     "vnodehookargs":{
                        "postcreate":[

                        ]
                     },
                     "id":4,
                     "service_uids":[

                     ],
                     "restart_num":15,
                     "role":"server",
                     "appname":"demo",
                     "appid":225,
                     "state":"STARTED",
                     "root_fs":"\/usr\/local\/robin\/instances\/demo-server-01.t001-u000003.svc.cluster.local",
                     "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1627824308434\/1627824323155\/centos-7",
                     "bundle_object_id":"365b16ada386af586aa056b5437a0800",
                     "bundleid":200,
                     "engine":"docker",
                     "image":{
                        "name":"robinsys\/centos",
                        "version":"7",
                        "engine":"docker",
                        "entrypoint":"entry.sh",
                        "init_mode":false,
                        "registry_hostname":"",
                        "registry_port":""
                     },
                     "cm_keys":[
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrpL7LACGVVe8twg86GgzGffgNFb7RPfDwcmzjwngwaZ09crgUCOVzoVU+EafD461tMLqudTTimvP4L98KarqybQQxKCPcB\/dbPlyffYbIzj7HXtHW8jx2Vd5YxPuAqweOCR4+E9sjm1iESD94jLEra8KacC5R2kZECXoWfStIkG6bir7UzzZpx1fbH9AGGeS0\/CEYtcMw13Ppq+yVxZYb5YQccPz7GrcnhFlkHaBGFg+aeZuwgKgpYIqXB3jNHm5iSPKxObRefw7KBrGL73xGC\/NE8WiQEj1SvE9MuTcg2kQ2H1PQ4yYpHVNPr1ZSRwMe10JEXLDpfXP0Lc0HQx6T root@centos-60-114",
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD30E\/WTROqBdswhUdI1DJd7K1f8Pd54USlzj\/sS0sJcRAdyNUyf61pY\/bv57DXafJKQmb2zVH8TBg4L8k2yHIO\/j2BTH\/yIA7J1MuDT5D4k+vYn1konJfeSyZCBUhipdMKjR0WOBVJe11fRWaDl7Ovx82Aox8XD4OmlCJ4eqCXj1avKWfE000NiT8SYzBscneKPLA67Wemqxr5xWWmoE+wisbztmfwEfhE0EAfMrKDnsLqjs4yGT\/R2bGh0WHqc+lre9+6lMDEB\/NcdpRElvFFSHZMYmsKUic1QYbfatvqldZ1u9kv3TGUEmZ8n8aiNzIHKkkZay0Pd+ppNTkjFFex root@centos-60-116",
                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXu8F9941aqw\/i5Fkyu7asayMaYZ+go2PXh+wwbskT0VSogOR9yKL\/i9p85kMn6PLZ196fqpjyzpqN3WI7LtIOyDGO\/wM9N2uU21jCE+PEM5E7\/+1lcdUcUyr3IHRpX45tmeB+916X1AIvMW4qe9BPq5pDFSjPstAJFVZ5CwQhDpnysrk6k\/gpsYzMSXyWT54V4gbe7I\/K9qufqfqpDMov8bPbrknknPqbdYTROAdLFiKYKzHSYRsfmRkF7+WqRQGtjL+GKtVciPtcu51C3tvQl2cUqNGEpyE7p5DSiEzuFbro2n4sFJp1EdTIcYMWx6iD5GlZGPnfx1m3Xhq0l0al root@centos-60-115"
                     ],
                     "ctime":1627824628,
                     "utime":1627824628,
                     "vnodeid":4
                  }
               ],
               "qgroups":{
                  "data":{
                     "enabled":false,
                     "priority":1,
                     "rd_max_iops":2000000,
                     "rd_min_iops":0,
                     "rd_min_window":500,
                     "rd_weight":1,
                     "wr_max_iops":2000000,
                     "wr_min_iops":0,
                     "wr_min_window":500,
                     "wr_weight":1
                  },
                  "block":{
                     "enabled":false,
                     "priority":1,
                     "rd_max_iops":2000000,
                     "rd_min_iops":0,
                     "rd_min_window":500,
                     "rd_weight":1,
                     "wr_max_iops":2000000,
                     "wr_min_iops":0,
                     "wr_min_window":500,
                     "wr_weight":1
                  }
               },
               "restart_on_qoscfg":true,
               "volume_groups":[

               ]
            }
         ],
         "robin_version":"5.3.5-159",
         "pvcpolicy":"create",
         "rpool":"default",
         "from_template":null,
         "zoneid":1626105129,
         "bundleid":200,
         "content_id":"365b16ada386af586aa056b5437a0800",
         "namespace":"t001-u000003",
         "restart_num":15,
         "auto_relocate":true,
         "rpoolid":1,
         "username":"admin",
         "tenant":"Administrators",
         "app_ns":"t001-u000003",
         "enable_hooklogs":true,
         "enable_metrics":true,
         "planid":53,
         "id":225,
         "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1627824308434\/1627824323155\/centos-7",
         "bundle_object_id":"365b16ada386af586aa056b5437a0800"
      }
   }
}

11.29. Managing Application Vnodes

Within Robin, an application is defined to consist of vnodes. A Vnode is a Robin-specific construct that is used to refer to a Pod in the native Kubernetes world in the majority of cases. The existence of this construct allows users to have more granular control of their applications as it enables them to manipulate the essential building blocks of their workload. Some of the life-cycle operations that can be performed at the Vnode level including restarting a Vnode (which translates to destroying and recreating a pod without losing any data stored within) and relocating a vnode to another host (which translates to moving a pod from one Kubernetes node to another).

In addition to the operations described above, the following commands are described in this section:

robin instance list

View all Vnodes

robin instance info

Retrieve information about a particular Vnode

robin instance stop

Stop a particular Vnode

robin instance start

Start a particular Vnode

robin instance restart

Stop and then start a particular Vnode

robin instance relocate

Move a Vnode to another host

robin instance repair

Repair the storage of a particular Vnode

Note

The terms vnode and instance are interchangeable and refer to the same underlying construct.

11.29.1. Listing all Vnodes

In order to view all Vnodes currently part of Robin applications alongside details such as their status, the host on which they reside and the compute resources allocated to them, issue the following command:

# robin instance list --host <hostname>
                      --app  <app_name>
                      --all
                      --json

--host <hostname>

Filter results based on hosts on which instances are located

--app <app_name>

Filter results based on applications instances are part of

--all

Display deleted instances alongside current instances

--json

Output in JSON format

Example:

# robin instance list
ID | Owner/Tenant         | ResPool | Container            | Hostname                                            | IP Addresses     | Status | Autopilot | LastOpr | Host          | Engine | Cores | GPUs | Mem (GB) | Ctime
---+----------------------+---------+----------------------+-----------------------------------------------------+------------------+--------+-----------+---------+---------------+--------+-------+------+----------+----------------------
6  | robin/Administrators | default | new-app.server.01    | new-app-server-01.t001-u000003.svc.cluster.local    | 172.21.31.14/16  | ONLINE | Enabled   | STARTED | cscale-82-140 | docker | 1     | 0    | 0.2      | 10 Aug 2020 23:21:59
7  | robin/Administrators | default | new-app-2.server.01  | new-app-2-server-01.t001-u000003.svc.cluster.local  | 172.21.22.121/16 | ONLINE | Enabled   | STARTED | cscale-82-140 | docker | 1     | 0    | 0.2      | 10 Aug 2020 23:30:52
8  | robin/Administrators | default | new-app-10.server.01 | new-app-10-server-01.t001-u000003.svc.cluster.local | 172.21.25.97/16  | ONLINE | Enabled   | STARTED | cscale-82-140 | docker | 1     | 0    | 0.2      | 10 Aug 2020 23:35:23
9  | robin/Administrators | default | demo.server.01       | demo-server-01.t001-u000003.svc.cluster.local       | 172.21.23.80/16  | ONLINE | Enabled   | STARTED | cscale-82-140 | docker | 1     | 0    | 0.2      | 11 Aug 2020 21:50:03

Returns all Vnodes currently part of Robin applications alongside details such as their status, the host on which they reside and the compute resources allocated to them.

End Point: /api/v5/robin_server/instances

Method: GET

URL Parameters:

  • appname=<appname> : Utilizing this parameter results in only instances that are part of the specified application being returned.

  • host=<hostname> : Utilizing this parameter results in only instances residing on the specified host being returned.

  • deleted=true : Utilizing this parameter results in deleted instances being returned alongside any existing instances.

Data Parameters: None

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error)

Example Response:

Output
{
   "users":[
      {
         "username":"robin",
         "lastname":"Systems",
         "email":null,
         "id":3,
         "tenantid":1,
         "firstname":"Robin"
      }
   ],
   "instances":[
      {
         "gpu_cores":0,
         "rpool":"default",
         "cpu_cores":1,
         "hugepages_2m":0,
         "tenant_ref":1,
         "hugepages_1g":0,
         "memory":209715200,
         "engine":"docker",
         "hostname":"new-app-server-01.t001-u000003.svc.cluster.local",
         "appcluster_id":6,
         "host":"cscale-82-140.robinsystems.com",
         "uptime":1597126919,
         "user_ref":3,
         "state":"STARTED",
         "id":6,
         "name":"new-app.server.01",
         "ctime":1597126919,
         "status":"ONLINE",
         "autopilot":true
      },
      {
         "gpu_cores":0,
         "rpool":"default",
         "cpu_cores":1,
         "hugepages_2m":0,
         "tenant_ref":1,
         "hugepages_1g":0,
         "memory":209715200,
         "engine":"docker",
         "hostname":"new-app-2-server-01.t001-u000003.svc.cluster.local",
         "appcluster_id":7,
         "host":"cscale-82-140.robinsystems.com",
         "uptime":1597127452,
         "user_ref":3,
         "state":"STARTED",
         "id":7,
         "name":"new-app-2.server.01",
         "ctime":1597127452,
         "status":"ONLINE",
         "autopilot":true
      },
      {
         "gpu_cores":0,
         "rpool":"default",
         "cpu_cores":1,
         "hugepages_2m":0,
         "tenant_ref":1,
         "hugepages_1g":0,
         "memory":209715200,
         "engine":"docker",
         "hostname":"new-app-10-server-01.t001-u000003.svc.cluster.local",
         "appcluster_id":8,
         "host":"cscale-82-140.robinsystems.com",
         "uptime":1597127723,
         "user_ref":3,
         "state":"STARTED",
         "id":8,
         "name":"new-app-10.server.01",
         "ctime":1597127723,
         "status":"ONLINE",
         "autopilot":true
      },
      {
         "gpu_cores":0,
         "rpool":"default",
         "cpu_cores":1,
         "hugepages_2m":0,
         "tenant_ref":1,
         "hugepages_1g":0,
         "memory":209715200,
         "engine":"docker",
         "hostname":"demo-server-01.t001-u000003.svc.cluster.local",
         "appcluster_id":9,
         "host":"cscale-82-140.robinsystems.com",
         "uptime":1597208647,
         "user_ref":3,
         "state":"STARTED",
         "id":9,
         "name":"demo.server.01",
         "ctime":1597207803,
         "status":"ONLINE",
         "autopilot":true
      }
   ],
   "ipaddresses":{
      "8":[
         "172.21.25.97\/16"
      ],
      "9":[
         "172.21.23.80\/16"
      ],
      "6":[
         "172.21.31.14\/16"
      ],
      "7":[
         "172.21.22.121\/16"
      ]
   },
   "tenants":[
      {
         "id":1,
         "name":"Administrators"
      }
   ]
}

11.29.2. Show information about a specific Vnode

In order to view details about a particular Vnode including information about the compute, storage and networking components of the pod alongside any events concerning it, issue the following command:

# robin instance info <name>
                      --hooks
                      --env
                      --events
                      --json

name

Name of application instance

--hooks

Display information about the Vnode’s hook scripts

--env

Display information about the Vnode’s environment variables

--events

Display information about events relating to this Vnode

--json

Output in JSON format

Example:

# robin instance info demo.server.01

Status:
   Name                      : demo.server.01
   Application               : demo
   Resource Pool             : default
   Created Time              : 11 Aug 2020 21:50:03
   State                     : STARTED
   Autopilot                 : Enabled
   Status                    : ONLINE (Desired: ONLINE)

Physical Host:
   Hostname                  : cscale-82-140.robinsystems.com
   Host State                : ONLINE
   Host Status               : 1
   Host Compute State        : ONLINE
   Host Compute Status       : READY
   Host robin-agent          : RUNNING
   Host monitor-server       : RUNNING
   Host iomgr-server         : RUNNING

Network:
   Hostname                  : demo-server-01.t001-u000003.svc.cluster.local
   IP Address                : 172.21.23.80/16

Compute:
   Engine                    : docker
   Max_cores                 : 1
   Max_memory                : 0.2G
   Hugepages-2Mi             : -
   Hugepages-1Gi             : -

Storage                       : (HDD: 2G, SSD: -)
   Id:18  demo.server.01.data.1.424679e5-6aa3-466f-a4a9-8a40b70f3ff6  : HDD 1G (ONLINE)
   Id:19  demo.server.01.block.1.1d69df39-84a2-462a-806d-71df0a3aa7cc : HDD 1G (ONLINE)

Bundle:
   Bundle Id                 : 1
   Bundle Name               : centos
   Bundle Version            : 1.0
   Bundle ObjectId           : 1597122985597
   Bundle Hooks Path         : cscale-82-140.robinsystems.com:/var/lib/robin/file_object_cache/centos-1.0/scripts

Events:

RestartPolicy:
   restart_limit             : 15
   restart_left              : 15
   burst_interval            : 600 seconds
   burst_count               : N/A

Returns details about a particular Vnode including information about the compute, storage and networking components of the pod alongside its current status.

End Point: /api/v3/robin_server/instances/<instance_name>

Method: GET

URL Parameters: None

Data Parameters: None

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error)

Example Response:

Output
{
   "state":"Succeed",
   "message":"NA",
   "items":{
      "utime":1597208647,
      "rpool":"default",
      "memory":209715200,
      "capacity":{
         "threshold":85,
         "unit":"Bytes",
         "total":0,
         "used":0
      },
      "physical_host":{
         "state":"ONLINE",
         "compute_status":"READY",
         "compute_services":[
            [
               "robin-agent",
               true
            ],
            [
               "monitor-server",
               true
            ],
            [
               "iomgr-server",
               true
            ]
         ],
         "public_hostname":"cscale-82-140.robinsystems.com",
         "status":1,
         "public_ip":"10.9.82.140",
         "compute_state":"ONLINE",
         "hostname":"cscale-82-140.robinsystems.com"
      },
      "autopilot":true,
      "root_fs":"\/usr\/local\/robin\/instances\/demo-server-01.t001-u000003.svc.cluster.local",
      "hugepages_1g":0,
      "engine":"docker",
      "user":"robin",
      "config":{
         "utime":1597207803,
         "vnodehookargs":{
            "postcreate":[

            ]
         },
         "root_fs":"\/usr\/local\/robin\/instances\/demo-server-01.t001-u000003.svc.cluster.local",
         "enable_metrics":true,
         "state":"STARTED",
         "ctime":1597207803,
         "env":{
            "DOCKER_OPTS":{
               "type":"text",
               "value":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN"
            },
            "ENABLE_SSH":{
               "type":"boolean",
               "value":true
            },
            "ROOT_PASSWORD":{
               "type":"password",
               "value":""
            },
            "allocated":{
               "DOCKER_OPTS":"-v \/sys\/fs\/cgroup:\/sys\/fs\/cgroup --cap-add=SYS_ADMIN",
               "ENABLE_SSH":true,
               "ROOT_PASSWORD":"",
               "POD_NS":"t001-u000003",
               "ROBINHOST_TAG_KUBERNETES.IO-OS":"linux",
               "ROBINHOST_TAG_KUBERNETES.IO-ARCH":"amd64",
               "ROBINHOST":"cscale-82-140.robinsystems.com",
               "POD_NAME":"demo-server-01",
               "K8S_NODE":"cscale-82-140",
               "ROBINHOST_TAG_ROBINRPOOL":"default"
            }
         },
         "allocated_host_type":"physical",
         "hosttags":{
            "robin.io\/robinrpool":[
               "default"
            ],
            "kubernetes.io\/os":[
               "linux"
            ],
            "kubernetes.io\/arch":[
               "amd64"
            ]
         },
         "appname":"demo",
         "restart_num":15,
         "host_ip":"172.21.23.80",
         "hostname":"demo-server-01.t001-u000003.svc.cluster.local",
         "image":{
            "name":"robinsys\/centos",
            "init_mode":false,
            "registry_port":"",
            "entrypoint":"entry.sh",
            "engine":"docker",
            "registry_hostname":"",
            "version":"7"
         },
         "storage":[
            {
               "fstype":"ext4",
               "stordriver":{
                  "faultdomain":"host",
                  "protection":0,
                  "type":"das",
                  "media":"HDD"
               },
               "k8s_name":"demo-server-01-data-1-424679e5",
               "volgrp_name":"demo.server.01.72.1.4567d4ef-ce18-4cec-87b6-d4f204e14eab",
               "path":"\/data",
               "allocated":{
                  "block_size":4096,
                  "stordriver":{
                     "faultdomain":"host",
                     "protection":0,
                     "type":"das",
                     "media":"HDD"
                  },
                  "volumeid":"18",
                  "partitions":0,
                  "multinode_mounting":false,
                  "vtype":0,
                  "size":1073741824,
                  "genkey":1597207790284383,
                  "snapshot_space_limit":214748365,
                  "protection":0,
                  "name":"demo.server.01.data.1.424679e5-6aa3-466f-a4a9-8a40b70f3ff6",
                  "compression":0,
                  "appname":"default",
                  "grpid":18,
                  "priority":2,
                  "params":{

                  },
                  "appid":1,
                  "media":72,
                  "replication":1,
                  "next_snapshotid":2,
                  "slice_size":1073741824,
                  "current_snapshotid":1,
                  "current_snapshot":"active_snap",
                  "qgroupid":18,
                  "resource_poolid":1,
                  "next_backupid":1
               },
               "lvm_type":"None",
               "snap_reserved":20,
               "encryption":"none",
               "lvm_vol_count":"0",
               "device":"\/dev\/sdk",
               "blocksize":4096,
               "pvcpolicy":"create",
               "size":1073741824,
               "snapshot_space_limit":214748365,
               "name":"demo.server.01.data.1.424679e5-6aa3-466f-a4a9-8a40b70f3ff6",
               "vol_ns":"t001-u000003",
               "workload":0,
               "layout":"round-robin",
               "protection":0,
               "faultdomain":"host",
               "type":"data",
               "media":"HDD",
               "replication":1,
               "disk_tags":{

               },
               "compression":"disabled"
            },
            {
               "fstype":"raw",
               "stordriver":{
                  "faultdomain":"host",
                  "protection":0,
                  "type":"das",
                  "media":"HDD"
               },
               "k8s_name":"demo-server-01-block-1-1d69df39",
               "volgrp_name":"demo.server.01.72.1.8433e073-8691-4467-afdb-49f61be817b3",
               "path":"\/dev\/rda",
               "allocated":{
                  "block_size":4096,
                  "stordriver":{
                     "faultdomain":"host",
                     "protection":0,
                     "type":"das",
                     "media":"HDD"
                  },
                  "volumeid":"19",
                  "partitions":0,
                  "multinode_mounting":false,
                  "vtype":0,
                  "size":1073741824,
                  "genkey":1597207790379086,
                  "snapshot_space_limit":214748365,
                  "protection":0,
                  "name":"demo.server.01.block.1.1d69df39-84a2-462a-806d-71df0a3aa7cc",
                  "compression":0,
                  "appname":"default",
                  "grpid":19,
                  "priority":2,
                  "params":{

                  },
                  "appid":1,
                  "media":72,
                  "replication":1,
                  "next_snapshotid":2,
                  "slice_size":1073741824,
                  "current_snapshotid":1,
                  "current_snapshot":"active_snap",
                  "qgroupid":19,
                  "resource_poolid":1,
                  "next_backupid":1
               },
               "lvm_type":"None",
               "snap_reserved":20,
               "encryption":"none",
               "lvm_vol_count":"0",
               "device":"\/dev\/sdl",
               "blocksize":4096,
               "pvcpolicy":"create",
               "size":1073741824,
               "snapshot_space_limit":214748365,
               "name":"demo.server.01.block.1.1d69df39-84a2-462a-806d-71df0a3aa7cc",
               "vol_ns":"t001-u000003",
               "workload":0,
               "layout":"round-robin",
               "protection":0,
               "faultdomain":"host",
               "type":"block",
               "media":"HDD",
               "replication":1,
               "disk_tags":{

               },
               "compression":"disabled"
            }
         ],
         "rpoolid":1,
         "allocated_host_public_hostname":"cscale-82-140.robinsystems.com",
         "pod_ns":"t001-u000003",
         "jobid":90,
         "bundle_path":"\/usr\/local\/robin\/collections\/file-collection-1597122699552\/1597122985597\/centos-1.0",
         "network":[
            {
               "name":"robin-default",
               "allocated_ip":"172.21.23.80",
               "interfaces":1,
               "allocated_netmask":"255.255.0.0",
               "ippool":"robin-default",
               "allocated_names":[
                  "eth0"
               ],
               "allocated_by":"system",
               "driver":"calico",
               "allocated_prefix":16,
               "subnet":"172.21.0.0"
            }
         ],
         "bundleid":1,
         "sidecar_info":{
            "containers":[

            ],
            "mem":0,
            "gpu":0,
            "cpu":0,
            "hugepages_1g":0,
            "hugepages_2m":0
         },
         "volume_groups":[
            {
               "device_sets":[
                  {
                     "name":"demo.server.01.72.1.4567d4ef-ce18-4cec-87b6-d4f204e14eab.0.717a6eb8-97a6-46b3-b097-9f9532a95762",
                     "devices":[
                        {
                           "max_volumes_per_disk":10,
                           "tags":{

                           },
                           "capacity":107374182400,
                           "score":90,
                           "aslices":17,
                           "slices":77,
                           "reattachable":0,
                           "allocated_slices":2,
                           "state":"READY",
                           "type":"HDD",
                           "host":"cscale-82-140.robinsystems.com",
                           "role":"Storage",
                           "psize":107374182400,
                           "stormgr_id":2,
                           "max_latency_sensitive_vols_per_disk":2,
                           "hostname":"cscale-82-140.robinsystems.com",
                           "wwn":"0x600224804c48fd7e16c608dea0919064",
                           "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                           "write_unit":4096,
                           "pused":369098752,
                           "protected":0,
                           "max_throughput_intensive_vols_per_disk":1
                        }
                     ],
                     "stormgr_id":18
                  }
               ],
               "name":"demo.server.01.72.1.4567d4ef-ce18-4cec-87b6-d4f204e14eab",
               "rpoolid":1,
               "stormgr_id":18,
               "replicas":1,
               "volumes":[
                  "demo.server.01.data.1.424679e5-6aa3-466f-a4a9-8a40b70f3ff6"
               ],
               "layout":"round-robin",
               "media":"HDD"
            },
            {
               "device_sets":[
                  {
                     "name":"demo.server.01.72.1.8433e073-8691-4467-afdb-49f61be817b3.0.9c6285de-48e8-40fc-83c3-1f1e98b86fc1",
                     "devices":[
                        {
                           "max_volumes_per_disk":10,
                           "tags":{

                           },
                           "capacity":107374182400,
                           "score":90,
                           "aslices":17,
                           "slices":77,
                           "reattachable":0,
                           "allocated_slices":2,
                           "state":"READY",
                           "type":"HDD",
                           "host":"cscale-82-140.robinsystems.com",
                           "role":"Storage",
                           "psize":107374182400,
                           "stormgr_id":2,
                           "max_latency_sensitive_vols_per_disk":2,
                           "hostname":"cscale-82-140.robinsystems.com",
                           "wwn":"0x600224804c48fd7e16c608dea0919064",
                           "devpath":"\/dev\/disk\/by-id\/scsi-3600224804c48fd7e16c608dea0919064",
                           "write_unit":4096,
                           "pused":369098752,
                           "protected":0,
                           "max_throughput_intensive_vols_per_disk":1
                        }
                     ],
                     "stormgr_id":19
                  }
               ],
               "name":"demo.server.01.72.1.8433e073-8691-4467-afdb-49f61be817b3",
               "rpoolid":1,
               "stormgr_id":19,
               "replicas":1,
               "volumes":[
                  "demo.server.01.block.1.1d69df39-84a2-462a-806d-71df0a3aa7cc"
               ],
               "layout":"round-robin",
               "media":"HDD"
            }
         ],
         "bundle_object_id":"a360b352c8c800e7f1af4075bb3320a4",
         "allocated_host_public_ip":"10.9.82.140",
         "engine":"docker",
         "allocated":{
            "zoneid":1597147518,
            "zonename":"default",
            "nodename":"cscale-82-140",
            "nodeid":1
         },
         "vnodehooks":{
            "postcreate":"bash postcreate.sh"
         },
         "numa_allocations":{
            "0":{
               "isol_dedicated_cores_used":0,
               "non_isol_cores_used":1,
               "hugepages_1g_used":0,
               "gpu_used":0,
               "isol_shared_cores_used":0,
               "mem_used":209715200,
               "hugepages_2m_used":0
            }
         },
         "gpu":{
            "min":0,
            "max":0
         },
         "cpu":{
            "min":0,
            "max":1,
            "reserve":false
         },
         "role":"server",
         "service_uids":[

         ],
         "k8s_provider":"robin",
         "desired_status":"ONLINE",
         "allocated_host":"cscale-82-140.robinsystems.com",
         "name":"demo.server.01",
         "enable_hooklogs":true,
         "id":9,
         "appid":9,
         "cm_keys":[
            "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN8WYsAfs0+a1zzAIWIVV5MrZUaur688E08BL7fm+1uBFjBRPEevwrYrNFL7ebjJxYuB1R3WR+IX8Mmz7CiMDvfEiAQL1Ihj4GZ32WSqzZ7MN15UJK4DQWY7sU++VIusyPUj5goVS2mPj0k4zhheNOlC8XaaHgyUq+NjHHDZF5B4mX7huWfM+kC4u5nCvajoHdfeOse4e1n5RlXtlKRqzBbIma6w8Ej32qFxRLvp4lUXzCylYHBLGH42CKWvtxvETwJUb1kIW9DExSnD+u5fd4Dc2D98\/SY79OO4+aa7GA7JV7412S5kWbtq5cpnkDlvhon\/XzLVQlIqIiAJ6ukVmx root@cscale-82-140"
         ],
         "enable_portmapping":true,
         "pod_name":"demo-server-01",
         "role_name":"server",
         "mem":{
            "hugepages_1g":0,
            "size":209715200,
            "hugepages_2m":0
         },
         "calico_inuse":true,
         "restart_on_qoscfg":true,
         "vnodeid":9
      },
      "tenant":"Administrators",
      "state":"STARTED",
      "cpu_cores":1,
      "ctime":1597207803,
      "events":[

      ],
      "role":"server",
      "bundle":{
         "name":"centos",
         "tenants":[
            "Administrators"
         ],
         "create_time":"August 10, 2020 22:16:25",
         "file_object_id":1597122985597,
         "parent":"",
         "pathname":"\/usr\/local\/robin\/collections\/file-collection-1597122699552\/1597122985597\/centos-1.0",
         "share_with_all_tenants":false,
         "ntemplates":1,
         "type":"ROBIN",
         "user":"robin",
         "version":"1.0",
         "zoneid":1597147518,
         "napps":1,
         "description":"-",
         "groupid":1,
         "collection_id":1597122699552,
         "nchildren":1,
         "content_id":"a360b352c8c800e7f1af4075bb3320a4",
         "tenant":"Administrators",
         "bundleid":1
      },
      "desired_status":"ONLINE",
      "name":"demo.server.01",
      "image_format":"UNKNOWN",
      "volumes":[
         {
            "name":"demo.server.01.block.1.1d69df39-84a2-462a-806d-71df0a3aa7cc",
            "id":"19",
            "size":1073741824,
            "media":"HDD",
            "state":"ONLINE"
         },
         {
            "name":"demo.server.01.data.1.424679e5-6aa3-466f-a4a9-8a40b70f3ff6",
            "id":"18",
            "size":1073741824,
            "media":"HDD",
            "state":"ONLINE"
         }
      ],
      "ip_addresses":[
         "172.21.23.80\/16"
      ],
      "service_ports":null,
      "status":"ONLINE",
      "id":9,
      "hostname":"demo-server-01.t001-u000003.svc.cluster.local",
      "gpu_cores":0,
      "image":{
         "name":"",
         "file":"",
         "version":""
      },
      "hugepages_2m":0,
      "storage":[
         {
            "name":"demo.server.01.block.1.1d69df39-84a2-462a-806d-71df0a3aa7cc",
            "id":"19",
            "size":1073741824,
            "media":"HDD",
            "state":"ONLINE"
         },
         {
            "name":"demo.server.01.data.1.424679e5-6aa3-466f-a4a9-8a40b70f3ff6",
            "id":"18",
            "size":1073741824,
            "media":"HDD",
            "state":"ONLINE"
         }
      ],
      "network_bandwidth":null,
      "public_ips":[

      ],
      "vnc_port":null,
      "restartpolicy":{
         "burst_interval":600,
         "burst_count":0,
         "id":16,
         "burst_start_time":0,
         "restarts_done":0,
         "restart_limit":15
      },
      "app":"demo",
      "distribution":{
         "name":"",
         "version":""
      }
   }
}

11.29.3. Stop a Vnode

In certain situations, particular Vnodes need to be stopped as they might be in an error state and thus need to be debugged or the resources consumed by it might need to be temporarily released. In order to perform this operation, issue the following command:

# robin instance stop <name>
                      --force

name

Name of application instance

--force

Ungracefully stop the Vnode without running the respective hook scripts

Example:

# robin instance stop demo.server.01 --wait
Job:   88 Name: VnodeStop            State: PROCESSED       Error: 0
Job:   88 Name: VnodeStop            State: AGENT_WAIT      Error: 0
Job:   88 Name: VnodeStop            State: COMPLETED       Error: 0

Stops a Vnode in order to help debug error states or to surrender resources consumed by it as they might need to be temporarily released.

End Point: /api/v3/robin_server/instances/<instance_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: stop - This mandatory field within the payload specifies that the stop operation is to be performed.

  • force: true - Utilizing this parameter results in the Vnode being stopped ungracefully without the respective hook scripts being run.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":93
}

11.29.4. Start a Vnode

In order to start a Vnode that was previously stopped, issue the following command:

# robin instance start <name>
                       --host <hostname>

name

Name of application instance

--host <hostname>

Primary hostname of node on which to start the Vnode on

Example:

# robin instance start demo.server.01 --wait
Job:   89 Name: VnodeDeploy          State: PROCESSED       Error: 0
Job:   89 Name: VnodeDeploy          State: AGENT_WAIT      Error: 0
Job:   89 Name: VnodeDeploy          State: COMPLETED       Error: 0

Starts a Vnode that was previously stopped.

End Point: /api/v3/robin_server/instances/<instance_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: start - This mandatory field within the payload specifies that the start operation is to be performed.

  • desired_host: <hostname> - Utilizing this parameter, by specifying the primary hostname of a node in the cluster, results in the Vnode being started on the aforementioned host.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":95
}

11.29.5. Restart a Vnode

In certain situations, particular Vnodes might need to be restarted in order to solve any errors (such as configuration issues, or entrypoint failures) and allow the Pod to be deployed successfully. In order to perform this operation, issue the following command:

# robin instance restart <name>
                         --entrypoint <entrypoint>
                         --host <hostname>

name

Name of application instance

--entrypoint <entrypoint>

Custom entrypoint command to run in order to help debugging

--host <hostname>

Primary hostname of node on which to start the Vnode on

Example:

# robin instance restart demo.server.01 --wait
Job:   90 Name: VnodeDeploy          State: PROCESSED       Error: 0
Job:   90 Name: VnodeDeploy          State: WAITING         Error: 0
Job:   90 Name: VnodeDeploy          State: AGENT_WAIT      Error: 0
Job:   90 Name: VnodeDeploy          State: FINALIZED       Error: 0
Job:   90 Name: VnodeDeploy          State: COMPLETED       Error: 0

Restarts Vnodes in order to solve any errors (such as configuration issues, or entrypoint failures) and allow the Pod to be deployed successfully.

End Point: /api/v3/robin_server/instances/<instance_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: restart - This mandatory field within the payload specifies that the restart operation is to be performed.

  • entrypoint: <custom_entrypoint> - Utilizing this parameter, by specifying a custom entrypoint command, results in the Pod’s container being started with the aforementioned entrypoint.

  • desired_host: <hostname> - Utilizing this parameter, by specifying the primary hostname of a node in the cluster, results in the Vnode being started on the aforementioned host.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":99
}

11.29.6. Manually relocating a Vnode

In certain scenarios, some instances (pods) of an application might need manual intervention in order to recover. This process might require the pod to be moved to another host which is healthy or more suitable for the resource requirements.

Note

When an application is relocated, the destination server must have enough space available to load the necessary docker or qcow2 images.

In order to relocate an instance, issue the following command:

Note

If no target hostname is specified, Robin’s placement algorithm will attempt to find the best possible target host given the constraints.

# robin instance relocate <name>
                           --to-host <hostname>
                           --relax-placement-rules

name

Name of application instance

--to-host <hostname>

Primary hostname of target node to relocate the instance to

--relax-placement-rules

Relax all placement rules the pod was created with during relocate

Example:

# robin instance relocate a1.server.01 --wait
Job:   63 Name: VnodeDeploy          State: PROCESSED       Error: 0
Job:   63 Name: VnodeDeploy          State: WAITING         Error: 0
Job:   63 Name: VnodeDeploy          State: AGENT_WAIT      Error: 0
Job:   63 Name: VnodeDeploy          State: FINALIZED       Error: 0
Job:   63 Name: VnodeDeploy          State: COMPLETED       Error: 0

Moves a vnode to another host which is healthy or more suitable for the resource requirements.

End Point: /api/v3/robin_server/instances/<instance_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: relocate - This mandatory field within the payload specifies that the relocate operation is to be performed.

  • relax_placement_rules: true - Utilizing this parameter results in all placement rules associated with the Vnode are dropped during the relocate operation.

  • desired_host: <hostname> - Utilizing this parameter, by specifying the primary hostname of a node in the cluster, results in the Vnode being relocated to the aforementioned host.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":103
}

11.29.7. Repairing Vnode storage

Certain applications have the ability to automatically recover data which has been corrupted and/or lost even when the underlying data volume are not present. Instances that are created as part of these applications can be repaired which translates to a new data volume being created in place of the faulted volumes with the recovered data in place. In order to perform this operation, issue the following command:

# robin instance repair <name>
                        --allvol

name

Name of application instance

--allvol

Replace all the volumes instead of just faulted volumes

Example:

# robin instance repair demo.server.01 --wait
Job:   92 Name: VnodeDeploy          State: PROCESSED       Error: 0
Job:   92 Name: VnodeDeploy          State: WAITING         Error: 0
Job:   92 Name: VnodeDeploy          State: AGENT_WAIT      Error: 0
Job:   92 Name: VnodeDeploy          State: FINALIZED       Error: 0
Job:   92 Name: VnodeDeploy          State: COMPLETED       Error: 0

Repairs a vnode of an application by creating new data volumes to replace the corresponding faulted ones with the recovered data present. Note this operation is only valid for applications that have the ability to automatically recover data which has been corrupted and/or lost even when the underlying data volumes are not present.

End Point: /api/v3/robin_server/instances/<instance_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: repair - This mandatory field within the payload specifies that the repair operation is to be performed.

  • allvol: true - Utilizing this parameter results in all volumes being replaced instead of just the faulted volumes

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "jobid":109
}

11.30. High Availability of Applications

As long as resources are available on surviving nodes, Robin guarantees the high availability of applications in case of server disruptions or downtime and Pod failures. As a result, Robin minimizes the application downtime and maximizes the productivity of the end users of the applications. The mechanism through which is this achieved is known as Robin Autopilot. As its name suggests it is a process wherein which no user intervention is needed in order to redeploy an application such that it becomes healthy again. The core concept that drives Autopilot is very simple: maintain a watch over all the application vnodes (Pods) in a cluster, and keep track of its current state as well as the desired state – if these do not match, attempt to redeploy or relocate the Pod such that it can return to the desired (healthy) state. Since Autopilot only runs on the host where the Robin Server is currently deployed, it utilizes an independent thread that is running on all the nodes in the Robin Cluster to report back the status of the Robin application Pods. This thread utilizes the kubelet service to report the state of the Pod in Kubernetes back to Autopilot every 5 seconds.

Handling node failures:

Autopilot detects a node failure when the aforementioned independent thread running on a particular node fails to report back within a given number of seconds; this value is known as the threshold. The default value for this threshold is 50 seconds, and given that Autopilot polls the monitoring thread every 5 seconds, at least 10 attempts to report the status of the node (and consequently the pods residing on it) have to fail for Autopilot to consider the node to be down. The delay exists in order to account for network downtime and/or other miscelleanous reporting errors. In a scenario wherein which this does occur, Autopilot will automatically attempt to relocate the vnodes residing on the failed host to another suitable host in the cluster. If none of the other exisiting nodes in the cluster are suitable, the application will be marked as FAULTED and will require manual intervention to recover.

Handling pod failures:

Autopilot detects a Pod failure when the monitoring thread running on the host where the Pod resides reports that it is unhealthy. Autopilot then records this state change and marks the appropriate Vnode as FAULTED in Robin. Sticking to the previously described core principle, this error state does not meet the desired ONLINE status of the Vnode. As a result, Autopilot will automatically attempt to redeploy the Pod on its current host. This is attempted a configurable number of times (by default this value is 15), after which if the Pod still is not running manual intervention is required to recover the pod.

Detecting Pod and Application Health:

Robin supports both standard Kubernetes liveness and readiness probes for Vnodes. They can be defined at the role level within the bundle manifest file. As result each Vnode (pod) that is deployed for that role will inherit the specified probes. Their structure should be indentical to the one used when specifying a probe for a standard Kubernetes deployment via a YAML file. These probes in turn will impact the reported state of the pod and consequently determine when Autopilot attempts to recover the pod. However, in certain scenarios even if all the pods an application is comprised of are healthy, the application itself might not be functioning correctly. In order to alert the user when such cases occur, Robin allows the user to specify an application health script within the apphooks section of the bundle manifest. This will be run every 2 minutes as part of a schedule and will allow the user to accurately determine if their application is truly functional and online.

Note

Since Autopilot only monitors individual Vnodes, it will only take action when it detects the Vnode is in a negative state.

In addition to the above details, the following commands are described in this section:

robin ap disable

Disable Autopilot

robin ap enable

Enable Autopilot

robin ap report

View all objects being tracked by Autopilot

robin instance relocate

Relocate a Vnode

11.30.1. Disabling Autopilot

Although not generally recommended, one might need to disengage Autopilot in given situations, such as debugging why an application pod is continously crashing. In order to disable Autopilot, issue the following command:

# robin ap disable --app <app_name>
                   --yes

--app <app_name>

The name of the application to disable Autopilot for

--yes

Do not prompt the user for confirmation of disabling

Example:

# robin ap disable --app a1 --wait --yes
Job:   57 Name: ApplicationUpdate    State: PROCESSED       Error: 0
Job:   57 Name: ApplicationUpdate    State: COMPLETED       Error: 0

Disengages autopilot temporarily. Note this is usually not recommended but can be appropriate in certain situations such debugging the continous crashing of application pods.

End Point: /api/v3/robin_server/metrics

Method: PUT

URL Parameters: None

Data Parameters:

  • method: disable - This mandatory field within the payload specifies that the disable operation is to be performed.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response: On success the reponse is empty.

11.30.2. Enabling Autopilot

Since Autopilot is enabled by default, this command only needs to be run if Autopilot was previously disengaged. By re-enabling Autopilot, the benefits of automatated self-healing and monitoring of applications can be realized. Issue the following command to enable Autopilot:

# robin ap enable --app <app_name>

--app <app_name>

The name of the application to enable Autopilot for

Example:

# robin ap enable --app a1 --wait
Job:   58 Name: ApplicationUpdate    State: PROCESSED       Error: 0
Job:   58 Name: ApplicationUpdate    State: COMPLETED       Error: 0

Rengages Autopilot such that the benefits of automatated self-healing and monitoring of applications can be realized.

End Point: /api/v3/robin_server/metrics

Method: PUT

URL Parameters: None

Data Parameters:

  • method: enable - This mandatory field within the payload specifies that the enable operation is to be performed.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response: On success the reponse is empty.

11.30.3. Generating Autopilot Report

In order to view all the objects that are currently being tracked by Autopilot and respective details about each assignment such as the threshold value, the last time an update was recieved etc, issue the following command:

# robin ap report --name <name>
                  --json

--name <name>

Object name to filter the report by

--json

Output in JSON

Example:

# robin ap report
Type       | Name                                                       | Curr   | Desired | LastUpdate | Threshold | MonFreq | GrpName                  | Autopilot
-----------+------------------------------------------------------------+--------+---------+------------+-----------+---------+--------------------------+-----------
Collection | file-collection-1583356117884                              | Online | Online  | 5s back    | 50        | 5       | vnode36.robinsystems.com | Enabled
Pnode      | vnode36.robinsystems.com                                   | Ready  | Ready   | 5s back    | -         | 5       | vnode36.robinsystems.com | Enabled
Pnode      | vnode88.robinsystems.com                                   | Ready  | Ready   | 0s back    | -         | 5       | vnode88.robinsystems.com | Enabled
Pnode      | vnode89.robinsystems.com                                   | Ready  | Ready   | 1s back    | -         | 5       | vnode89.robinsystems.com | Enabled
Vnode      | a1-server-01.t001-u000003.svc.cluster.local (a1.server.01) | ONLINE | ONLINE  | 0s back    | 50        | 5       | vnode88.robinsystems.com | Enabled

Returns all the objects that are currently being tracked by Autopilot and respective details about each assignment such as the threshold value, the last time an update was recieved etc.

End Point: /api/v3/robin_server/metrics

Method: GET

URL Parameters: None

Data Parameters: None

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 200

Error Response Code: 500 (Internal Server Error) 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "items":[
      {
         "is_in_transition":false,
         "desired_status":"Ready",
         "last_update_tstamp":1599580075.0771598816,
         "monitor_frequency":5,
         "name":"cscale-82-140.robinsystems.com",
         "status_threshold":null,
         "grpname":"cscale-82-140.robinsystems.com",
         "prev_attempt_time":0,
         "enabled":true,
         "create_tstamp":1599238236.5658314228,
         "curr_status":"Ready",
         "id":"cscale-82-140.robinsystems.com",
         "time_elapsed_s":3,
         "class":"Pnode",
         "backoff_time":0,
         "services":{
            "gui-cli":{
               "Id":"gui-cli",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:57:19.320496",
               "MainPID":2615
            },
            "sherlock-server":{
               "Id":"sherlock-server",
               "ActiveState":"inactive",
               "Type":"simple",
               "ExecMainStartTimestamp":0,
               "MainPID":0
            },
            "robin-node-monitor":{
               "Id":"robin-node-monitor",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:57:01.803506",
               "MainPID":1260
            },
            "robin-watchdog":{
               "Id":"robin-watchdog",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:56:28.105524",
               "MainPID":866
            },
            "httpd":{
               "Id":"httpd",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:57:19.039496",
               "MainPID":2583
            },
            "robin-server":{
               "Id":"robin-server",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-09-04 09:50:28.377093",
               "MainPID":52304
            },
            "robin-event-server":{
               "Id":"robin-event-server",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:56:47.465514",
               "MainPID":1037
            },
            "iomgr-server":{
               "Id":"iomgr-server",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:58:53.276445",
               "MainPID":3231
            },
            "consul_dns":true,
            "monitor-server":{
               "Id":"monitor-server",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:57:19.467496",
               "MainPID":2655
            },
            "robin-auth-server":{
               "Id":"robin-auth-server",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:56:42.970516",
               "MainPID":1008
            },
            "robin-file-server":{
               "Id":"robin-file-server",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:56:47.932513",
               "MainPID":1075
            },
            "consul-server":{
               "Id":"consul-server",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:56:23.220527",
               "MainPID":569
            },
            "postgresql-9.6":{
               "Id":"postgresql-9.6",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:56:26.091525",
               "MainPID":666
            },
            "consul-client":{
               "Id":"consul-client",
               "ActiveState":"inactive",
               "Type":"simple",
               "ExecMainStartTimestamp":0,
               "MainPID":0
            },
            "robin-agent":{
               "Id":"robin-agent",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-09-03 12:11:21.325069",
               "MainPID":2970
            },
            "stormgr-server":{
               "Id":"stormgr-server",
               "ActiveState":"active",
               "Type":"simple",
               "ExecMainStartTimestamp":"2020-08-28 11:57:13.988499",
               "MainPID":2273
            }
         }
      },
      {
         "is_in_transition":false,
         "desired_status":"ONLINE",
         "last_update_tstamp":1599580075.0771598816,
         "monitor_frequency":5,
         "name":"lak.server.01",
         "status_threshold":50,
         "grpname":"cscale-82-140.robinsystems.com",
         "prev_attempt_time":1599238236,
         "enabled":true,
         "create_tstamp":1599238236.5824928284,
         "curr_status":"ONLINE",
         "id":"lak-server-01.t001-u000003.svc.cluster.local",
         "time_elapsed_s":3,
         "class":"Vnode",
         "backoff_time":10
      },
      {
         "is_in_transition":false,
         "desired_status":"ONLINE",
         "last_update_tstamp":1599580075.0771598816,
         "monitor_frequency":5,
         "name":"custom-labels-app.server.01",
         "status_threshold":50,
         "grpname":"cscale-82-140.robinsystems.com",
         "prev_attempt_time":1599238293,
         "enabled":true,
         "create_tstamp":1599238293.9596076012,
         "curr_status":"ONLINE",
         "id":"custom-labels-app-server-01.t001-u000003.svc.cluster.local",
         "time_elapsed_s":3,
         "class":"Vnode",
         "backoff_time":10
      },
      {
         "is_in_transition":false,
         "desired_status":"ONLINE",
         "last_update_tstamp":1599580075.0771598816,
         "monitor_frequency":5,
         "name":"lak2.server.01",
         "status_threshold":50,
         "grpname":"cscale-82-140.robinsystems.com",
         "prev_attempt_time":1599238236,
         "enabled":true,
         "create_tstamp":1599238236.5851621628,
         "curr_status":"ONLINE",
         "id":"lak2-server-01.t001-u000003.svc.cluster.local",
         "time_elapsed_s":3,
         "class":"Vnode",
         "backoff_time":10
      },
      {
         "is_in_transition":false,
         "desired_status":"ONLINE",
         "last_update_tstamp":1599580075.0771598816,
         "monitor_frequency":5,
         "name":"lak3.server.01",
         "status_threshold":50,
         "grpname":"cscale-82-140.robinsystems.com",
         "prev_attempt_time":1599238236,
         "enabled":true,
         "create_tstamp":1599238236.5880100727,
         "curr_status":"ONLINE",
         "id":"lak3-server-01.t001-u000003.svc.cluster.local",
         "time_elapsed_s":3,
         "class":"Vnode",
         "backoff_time":10
      },
      {
         "is_in_transition":false,
         "desired_status":"Online",
         "last_update_tstamp":1599580075.0771598816,
         "monitor_frequency":5,
         "name":"file-collection-1598641146105",
         "status_threshold":50,
         "grpname":"cscale-82-140.robinsystems.com",
         "prev_attempt_time":0,
         "enabled":true,
         "create_tstamp":1599238236.5969836712,
         "curr_status":"Online",
         "id":"file-collection-1598641146105",
         "time_elapsed_s":3,
         "class":"Collection",
         "backoff_time":0
      }
   ]
}

11.31. Advanced Application Features

Robin provides a variety of advanced features that allows users to take advantage of physical attributes of the nodes on which their application is deployed. These features allow for greater flexibility in terms of deployment, fine-grained control, and enable users to attain maximum performance for their deployments.

11.31.1. Static IP Allocation

Robin allows users to assign static IP addresses for bundle applications utilizing either Calico, OVS, or SRIOV network driver-based IP-Pools. This control enables users to set up complimentary services or infrastructure beforehand so that they are able to communicate with the application as soon as it is orchestrated and ready. The only prerequisite is that the given IP addresses reside within the respective IP-Pool(s) provided within the application deployment template. This holds true for both range based IP-Pools and those that are defined by a network/netmask combination (also known as a rangeless IP-Pool). One advantage of the latter is that it allows a user to allocate multiple IPv4, IPv6 and dual-stack IP Addresses for an application. However, if a given IP Address is already in-use within the Kubernetes cluster the deployment of the application will fail.

11.31.1.1. Points to consider for static IP addresses

  • The range of static IP addresses provided in the network annotations must be a subset of the IP-Pool range.

  • If a Pod gets stuck in a terminating state because the node on which this Pod was running is permanently unavailable. The static IP address of the terminating Pod is not released until the Pod is permanently deleted. The Pod can be permanently deleted by restoring the node or by running the kubectl delete pod command.

  • A bundle application can be cloned using a snapshot containing both static IP address and static MAC address.

  • The robin ip-pool info command only shows the allocated IP addresses and not the allocated MAC addresses for cloned applications.

11.31.1.2. Usage

In order to specify a particular IP Address for a particular Vnode, its definition within an application JSON will have to be edited such that for each IP-Pool within the network section from which you want to statically assign an IP Address, an IP Address is specified using the key static_ip.

More details on how to dynamically specific Static IP Addresses using Robin bundle templates can be found here.

Example:

{
    "roles": [
        {
            "name": "server",
             "vnodes": [
                 {
                     "network": [
                        {
                            "ippool": "ovs-1",
                            "static_ip": "10.9.85.144"
                        },
                        {
                            "ippool": "ovs-2",
                            "static_ip": "fd74:ca9b:3a09:868c:10:9:85:144"
                        }
                    ]
                }
            ]
        }
    ]
}

Note

For more information on IP-Pool management and creation, please refer to the documentation here.

11.31.2. Static MAC Allocation for Robin Bundles

Robin allows users to assign static MAC addresses to the Robin bundle applications. Robin recommends assigning static MAC addresses to Vnodes of applications that utilize IP-Pool(s) backed by underlay CNI plugins, such as SR-IOV and OVS, rather than those that use overlay CNI plugins such as Calico. This feature ensures that the MAC addresses associated with the respective Vnodes are maintained even if the Vnode is restarted. Consequently, it allows users to prioritize traffic, provide high bandwidth and ultimately reduce latency for applications utilizing this feature.

11.31.2.1. Prerequisites

The following are the prerequisites for assigning the static MAC address:

  • A unique MAC address must be provided for the L2 network (IP-Pool).

  • It must be unicast type.

11.31.2.2. Caveats

Below are some points to consider when utilizing static MAC addresses:

  • Robin does not support the static MAC address for KVM based applications.

  • Robin does not verify whether the provided MAC addresses already exists within the network. As a result, if this is the case application deployment may fail.

  • A static MAC address can be assigned to one Vnode only. For exmaple, if there are 10 Vnodes to be deployed then there must be 10 static MAC addresses to assign.

  • If a Pod gets stuck in a terminating state because the node on which this Pod was running is permanently unavailable, the static MAC address of the terminating Pod is not released until the Pod is permanently deleted. The Pod can be permanently deleted by restoring the node or by running the kubectl delete pod command.

11.31.2.3. Usage

In order to specify a particular MAC Address for a particular Vnode, its definition within an application JSON will have to be edited such that for each IP-Pool within the network section for which you want to statically assign a MAC Address, a MAC Address is specified using the key static_mac.

More details on how to dynamically specific Static MAC Addresses using Robin bundle templates can be found here.

Example:

{
    "roles": [
        {
            "name": "server",
             "vnodes": [
                 {
                     "network": [
                        {
                            "ippool": "ovs-1",
                            "static_mac": "04:04:06:07:08:09"
                        },
                        {
                            "ippool": "ovs-2",
                            "static_mac": "04:03:06:07:08:09"
                        }
                    ]
                }
            ]
        }
    ]
}

11.31.3. NUMA Awareness and CPU Exclusivity

For latency sensitive workloads, Robin supports deploying applications with NUMA awareness. This means that every Vnode for the application will not cross the NUMA boundary and as a result all the compute resources requested (including networking) by the Vnode will originate from one NUMA node. This is treated as a strict constraint and thus if the requirements cannot be met the application deployment will fail altogether. This condition can be specified within the application template under the application name attribute with the key numa_aware set to True.

Additionally, Robin supports CPU exclusivity at application level - no other application processes will utilize the CPUs assigned by the Robin orchestrator to the original application. This is achieved via CPU pinning and can be further enhanced by isolating CPUs for deployments as part of the node configuration. This is done with every application deployment so no user knowledge (with regards to CPU IDs) or input is needed.

The combination of these two features allows Robin to support highly performant applications with very little manual input from the end user. In addition normal workloads can also be run on the same cluster with no interruption or reduction to the performance of resource intensive applications.

Note

Even without NUMA awareness explicitly requested Robin attempts to make applications as NUMA aware as possible. This means the orchestrator attempts to gather as many of the required resources as possible from one NUMA node. The difference here is - this is a soft requirement and the application deployment will not fail.

11.31.4. Hugepages Support

Robin supports the allocation of hugepages to PODs deployed as part of the creation of a Robin bundle application. The hugepages can be allocated strictly from a single NUMA node if the application needs to be NUMA aware, or can cross the NUMA boundary depending on the size of the request. As with all other resources, the Robin orchestrator tracks the consumption of these hugepages across Vnodes deployed within the cluster, and allocates them appropriately. A custom mount point for the hugepages (other than the default /dev/hugepages) can be specified by the user at the time of application deployment if need be.

In order to create an application with hugepages one can utilize a variety of methods:

  • Within the bundle manifest from which the application will be created, the default size of hugepages (1Gi or 2Mi) can be specified for each container of a role. More details can be found here.

  • At run-time the user can specify the number of hugepages that should be used for each specific role for the application in the UI.

  • A user can edit the template through which an application will be created to enforce hugepages usage by adding the keys hugepages_1g or hugepages_2m (and the respective amount of each to be allocated as the values) within the memory requests for each Vnode where it is needed.

11.31.5. Multi-Instance GPU (MIG) Support

Multi-Instance GPU (MIG) is a mode of operation that allows a single GPU to partition into up to seven separate GPU instances and exposes these GPU instances to the nodes as independent GPUs. Every GPU is fully isolated with its own memory and compute resources. More details on NVIDIA multi-instance GPUs in general can be found here. Additional details on MIG support in Kubernetes via the NVIDIA operator can be found here.

Note

The NVIDIA A100 GPU is the only GPU that supports the MIG mode.

Robin supports the partitioned GPU devices by not only discovering their presence on a node but also by tracking their availability throughout and consequently allowing them to be allocatable via Robin Bundle applications. In order to achieve this the necessary NVIDIA components (specified in the documentation referred to above) alongside the GPU operator must be installed on the concerned nodes. For user convienence the installation of the aforementioned operator can be done alongside the installation of Robin via the same installer script by utilizing the --setup-gpu-operator option. Moreover, if there are any configuration changes post-installation with regard to the MIG partitions the robin host probe --rediscover command can be used to ensure they are captured and reflected. This is particularly necessary when a node is rebooted (or stopped with regard to cloud-based VM instances) as it could result in the loss of the current MIG configuration or if any taints are removed on particular nodes which result in the deployment of the GPU operator on aforementioned nodes. With regards to the former case, partitions will have to be recreated in order to recover the GPU operator Pods (which will crash due to the sudden removal of the parititions) and thus allow for the devices to be allocatable again.

Note

Currently Robin only supports the mixed strategy for exposing GPU devices on a Kubernetes node, resulting in the fact that only one resource type can be specified per application. However, there is no limit to how many instances of the specified resource type can be requested.

In order to create an application with MIG partitioned GPU devices a variety of methods can be utilized:

  • Within the bundle manifest from which the application will be created, the default GPU resource type to be selected can be specified. More details can be found here.

  • At run-time the user can specify the GPU resource type that should be used for each specific role for the application in the UI.

  • A user can edit the template through which an application will be created to enforce the GPU resource selected by adding the key type with the respective resource type name as the value within the GPU request for each Vnode where it is needed.

Note

The resource type allocated to an application cannot be changed post-deployment, however it can be scaled as needed.

11.31.5.1. MIG partition recreation

When a node is rebooted or shutdown and recovered the MIG partitions that were present on it are lost. They can be recreated in the following two ways:

  • Robin provides a configuration tunable named create_mig_partitions_on_reboot, details for which can be found here, in order to facilitate the recreation of the partitions with no user intervention after a node recovers from a shutdown. If this config variable is enabled using the robin config update command, detailed here, before a node is brought down then all the previously present partitions will be automatically available again after the node is back online.

  • The partitions can be manually recreated by following the instructions detailed here. Once this process is the robin host probe --rediscover command can be issued so they can be recognized and allocated by the Robin orchestrator.

Note

By default, the create_mig_partitions_on_reboot attribute is disabled.

11.31.6. Horizontal Pod Auto-scaling

The Horizontal Pod Autoscaler (HPA) is a Kubernetes construct that automatically scales the number of pods based on the CPU/Memory usage of an application or any other combination of exposed custom metrics. It is designed to accomodate dynamic changes in an application’s load over time by altering the number of pods such that the average pod utilization or average application response unit remains constant.

Robin leverages the aforementioned Kubernetes HPA infrastructure to enable autoscaling for Robin roles. The HPA configuration for each role can be defined within the manifest file of a Robin Application Bundle and constrained by any metrics scraped by Prometheus. The advantage of this feature is that it provides the granular control needed to scale a particular role/service of an application based on usage. Imagine the following scenario, a role exists that primarily focuses on daily report generation and so could be heavily utilized in the evening but might only receive a handful of requests during the afternoon. In order to efficiently allocate resources, HPA can be utilized to ensure more pods are available when the role’s load increases whilst also releasing resources through the deletion of pods when the role’s utilization falls. Moreover unlike native Kubernetes HPA, Robin allows for application-specific hook scripts to be run before and after the respective scale in and scale-out operations to ensure the service is configured correctly given the adjustments made.

More details on how to enable and configure HPA for an Robin Application Bundle can be found here.

11.31.6.1. Managing an application’s HPA configuration

When HPA is configured for a role, Robin disables manual horizontal scaling operations for the respective role since the two features are diametriclly opposed. This is because if there is a manual scale-out operation performed but the role is under utilized the HPA will automatically kick in and reduce the number of pods for that service to original amount. The result is the same for the manual scale-in operation i.e. no change in the total number of pods.

However these manual operations are very useful in certain circumstances and thus Robin provides a command through which HPA can be temporarily disabled for a role so as to allow these commands to be run again. Moreover the same command can be used to alter the minimum/maximum number of pods a role can be manipulated to have via HPA. In order to manage HPA for a particular role of an application as described previously, issue the following command:

# robin app update-hpa <appname> <rolename>
                                 --max-instances <max_instances>
                                 --min-instances <min_instances>
                                 --disable
                                 --enable

appname

Application name

rolename

Role name

--max-instances <max_instances>

Maximum number of instances that can be spawned for a role via HPA

--min-instances <min_instances>

Minimum number of instances that can be present for a role via HPA

--disable

Disable HPA

--enable

Enable HPA

Example:

# robin app update-hpa a1 server --disable --wait
Job:   64 Name: ApplicationUpdateHPA          State: PROCESSED       Error: 0
Job:   64 Name: ApplicationUpdateHPA          State: WAITING         Error: 0
Job:   64 Name: ApplicationUpdateHPA          State: COMPLETED       Error: 0

Enables/disables horizontal pod autoscaling for a particular role within an application. Note when HPA is enabled for the role, manual horizontal scaling operations are disabled.

End Point: /api/v3/robin_server/apps/<app_name>

Method: PUT

URL Parameters: None

Data Parameters:

  • action: update_hpa - This mandatory field within the payload specifies that the add HPA operation is to be performed.

  • name: <app_name> - This mandatory field within the payload specifies the app for which to configure HPA.

  • role: <role_name> - This mandatory field within the payload specifies the role whose pods will be controlled by the autoscaler.

  • enable_hpa: [true|false] - This mandatory field within the payload specifies whether or not the autoscaler should be enabled or not for the specified role.

  • max_instances: <max_instances_value> - Utilizing this parameter within the payload, by specifying an integer, results in the max number of pods that can be spawned by the autoscaler being set to the value specified. If not specified, the value will be retained from the Kubernetes spec file of the autoscaler.

  • min_instances: <min_instances_value> - Utilizing this parameter within the payload, by specifying an integer, results in the minimum number of pods that can be present when the autoscaler is in control being set to the value specified. If not specified, the value will be retained from the Kubernetes spec file of the autoscaler.

Port: RCM Port (default value is 29442)

Headers:

  • Authorization: <auth_token> : Authorization token to identify which user is sending the request. The token can be acquired from the login API.

Success Response Code: 202

Error Response Code: 500 (Internal Server Error), 404 (Not Found Error), 401 (Unauthorized Error), 400 (Invalid API Usage Error)

Example Response:

Output
{
   "plan": {
      "opcode":"None",
      "role":"server",
      "current_user":{
         "tenant":"Administrators",
         "user_id":3,
         "tenants":[
            "t2",
            "Administrators"
         ],
         "tenant_id":1,
         "user_permissions":{

         },
         "username":"robin",
         "namespace":"random",
         "user_context":"robin",
         "user_capabilities":[
            "AllSuperAdminCapabilities"
         ],
         "ip_addr":"172.17.0.1",
         "tenant_role":"superadmin",
         "session_expires":"2020-10-15T03:25:40",
         "user_contexts":[
            "robin",
            "robin"
         ]
      },
      "kind":"robin",
      "max_instances":3,
      "name":"demo",
      "namespace":"random",
      "action":"update_hpa",
      "enable_hpa":false
   },
   "jobid":258
}

11.31.6.2. Considerations for Stateless and Stateful Applications

Autoscaling is useful for purely stateless applications where the cost of data redistribution due to scale operations is near zero or minimal, or if the state is in-core and can be very easily rebuilt. Thus workloads such as webservers, REST-endpoints, or stateless business logic applications etc. benefit the most from auto-scaling since they dont suffer from the additional overhead that comes with data replication or movement. However one must exercise caution when considering HPA for stateful applications. This is because not only are they typically data-heavy which introduces the problem of data rebalancing when autoscaling but also there could be a negative impact on the performance of applications running on the same platform due to these operations. The following scenarios expand on these potential issues:

  • Scenario 1: Let’s say autoscaling is applied to a database which has native scale-out capabilities and a policy set such that an auto scale-out is performed by the application when a certain load average is reached. The following will happen behind the scenes when the average load limit is reached. The HPA will kick in wherein which the first step of the scale-out operation, creating the pods and adding storage volumes is performed (Robin does this in seconds). However for the DB to actually use the resources, the data has to be redistributed (the database does this after Robin executes the post-scale hook). This means that the existing data is read from disk and rebalanced by relocating sections of it from the existing pods to the newly created ones. The moved data is purged from the original pods, which internally also reindexes the existing tables. As a result, the total cost of the data movement (including with the consequent network congestion), the impact on existing clients connected to the database, disk load from reads, writes and reindexing far outweighs the cost of adding more “units” to the database. Moreover, the initial trigger for the scale-out action was high load average which is only increased by the resultant data redistribution from the “relieving” operation. This cyclic dependancy will continously reduce the performance of the database.

  • Scenario 2: Let’s say the threshold for auto-scaling of our database application is met for non-performance related reasons. As explained above, the cost of the consequent scale-out operation due to the necessary data movement is considerably high but in certain scenarios can be acceptable. However the effect of the operation on other applications running on the same platform must be considered too. Even if the performance penalty incurred for the original application is tolerable the network load caused by the scale-out will negatively affect the performance of other applications using that network or sharing the same server. Moreover, in the worst case the performance threshold of the other applications could be crossed which in turn triggers additional scale-out operations for each of the impacted applications. Thus the load on the overall system is compounded in an expontential manner and ultimately could cause the server to crash.

Given the above reasons, Robin recommends that HPA not be used for stateful applications or if it is necessary under extreme caution and rigourous performance testing.

11.31.6.3. Architecture Diagram

The following diagram illustrates the architecture and interaction between different components required to enable HPA for Robin Bundle applications.

_images/hpa_architecture.png

11.31.7. SSH key support

SSH keys provide a secure and scalable way to control Secure Shell (SSH) access to Robin Bundle application containers. An SSH key, which is based on public key infrastructure (PKI) technology, actually consists of the following keys:

  • A public key which can be shared with others and used by both the user and the remote server.

  • A private key which must never be shared with anyone and must be secured on a system. The private key can be secured through a passphrase.

Together, these keys form a secure access credential. For more information about the SSH key, see the SSH key.

Robin users can register their personal SSH key pairs for use in a Robin CNP cluster. Only the public key is added to the cluster, however, the private key is maintained by the user. This ensures that only authorized users are able to SSH into the application’s containers. Before deploying a Robin Bundle application, you must specify the SSH key in an application’s manifest file.

Note

You can add SSH keys only to Robin Bundle applications that support the SSH protocol. It is not supported for HELM based applications.

All Robin users can add, view, and delete SSH keys to their cluster. They can also refer to these SSH keys in the Robin Bundle applications they deploy. SSH keys are for the private use of the user who added them. You must not share your SSH keys with other users. With the exception of superadmin users, users cannot access the SSH keys belonging to other users in the cluster.

Robin CNP provides the following role-based access to its users:

  • User - A user can add, delete, view, or access their own SSH key.

  • Tenantadmin - A tenantadmin can add, delete, view, or access their own SSH keys, however, the tenantadmin cannot manage the SSH keys for its tenant users.

  • Superadmin - A superadmin can add, delete, view, or access their own SSH key and other users’ SSH keys in the cluster.

As a user, you can access an application using the SSH key. First, you need to add your SSH key to the cluster, then create a Robin Bundle application using a manifest file that contains the SSH key.

Important

Robin supports only Rivest Shamir Adleman (RSA) SSH key pairs, not Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA) SSH key pairs.

The following operations are covered in this section:

robin ssh-key add

Add an SSH key

robin ssh-key list

List SSH keys

robin ssh-key delete

Delete an SSH key

11.31.7.1. Add a SSH key

To add an SSH key to a cluster such that it can be used by an application for passwordless login, run the following command:

Note

An SSH key pair must be generated beforehand.

# robin ssh-key add <name> <key>
                           --username <username>

name

Name of the SSH key for future reference

key

The public key to be added. It includes details such as the key type, the key value, and the key user enclosed in double quotes

--username <username>

Name of the user to associate the SSH key to. Note only a superadmin can add a SSH key for other users

Example:

# robin ssh-key add Key1 "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxfq02mwYeUUTEmiHtumM5ElPf7KLVj3/locpPvdnnXiDbpACP9nO8NKVKH5ftojrrvgC91CYo9dd8MH+OvXYYwbz3C5Evejs6b7YgWFHwKBtNyVA5kdfjxN1JYNzVYHwLPJqPDRRpCyamn/fj+tG2oR9rIxArl63/7/Rr18N2VGl/GjUUMWGar5UVLSyUyjHiotULm6DaGRZdxtHZQ7dvn+lR1S5a0mnjabwrZ62Edmzhr2B7oKfuzmpfcHXW3SOg1JpJxoWNgzxa3fyy3OmkIxwmXyBb3mnCyCJMkVR+ojjV0nUp root@admin"
Successfully added ssh key.

11.31.7.2. View registered SSH keys

To view the list of SSH keys currently present on the cluster, run the following command:

# robin ssh-key list --username <username>
                     --name <name>
                     --keyid <keyid>
                     --full

--username <username>

Filter based on the username provided

--name <name>

Filter based on the name of the SSH key provided

--keyid <keyid>

Filter based on the ID of the SSH key provided

--full

Display additional information on each registered SSH key

Note

The ability to view SSH keys is subject to Role Based Access Control (RBAC). Cluster Administrators (users having the superadmin role) are able to view all registered SSH keys in a cluster. All other users with different roles can only view SSH keys that they have registered themseleves.

Example:

# robin ssh-key list --full
+----+----------+----------+
| ID | Username | Key Name |
+----+----------+----------+
| 4  |   jay    |   Key4   |
+----+----------+----------+

  SSH Key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC75FipCAYFsIwv1u1twSkO2ZtpV3+VyIzYP1NXmGbkGK//I8LQZViW2K691xcxOyNz8pBVKt+Z5eZoQ/uZW6xT5poGU1zsF1Ir/ML+r3NrVtW0PdcqpFTQtW3T+VZbVUiTXMXI4Zch6SAC6ZYrrVfMOeHaUVX+9s6GsQldTMXU/NgfBHAQT+nttBzdGsa9ICKxPHmEZ6O8dnP/MC5YtoF6YJDOcYZC/jV/9ZtezJhyM5Yhk5KWWEa+3Stj+iM/1z7yy3z/iOksY3CGjJwTdhb+GZRSZV4RXMzRoNUGzpJMR root@master

+----+----------+----------+
| ID | Username | Key Name |
+----+----------+----------+
| 1  |  robin   |   Key1   |
+----+----------+----------+

  SSH Key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCGCQ6LoHKk5VvuMaW3/WF0kLxn7DcevkrDsLJX3hSsIMmk3JkAj5fw9waVYaJK5gXu9qABgecC3ORWxK+QH1RNX7W0T0DAG/LHwUA5ZJbL3BKRfHCgN98ZGoFNigRBbpDXiKaYseeKB0CKv48sjF6Lz/BlLfMN98yvzvmzxY7hYw29m0NW7nUGQYB08kc+TscH1NIlK4bXlWYsx+Ve4Ey1h/LSRrGJWZlVPobWnflS2UcZDK4sodq/c+18HvY1BTWz3VTCN/eT3cvmCf2P0nJA7wAKRM1LnXAjnXWTRJcCPIKG root@master

+----+----------+----------+
| ID | Username | Key Name |
+----+----------+----------+
| 2  |  robin   |   Key2   |
+----+----------+----------+

  SSH Key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABA9om4/HAJk3b5gU4tatCvsD5ZDDYvwlfNwzbQ/sTvyR5D1kAvDzwK6uYZGNaTTnFGEQaFk5VzLBSBzo0Kx1Uu6b3dogRzc67HhlEbgKBjK30v5Ku54H8EnHgzbBrTZ2y/lLWgTGsHN3qhvbrhntNZWMvAAhcGZiOSXJZ/luJ1r0yc7awMsHcomOrs1Dof698WK7alrD8u0g9qguCq2FMY0Bfe6ICTsu4beXw/soLKa5zIp2OFDgXlKwCaLuUIGVdPBYzzlsrWXRUqwt4ndkmG2lNeT1RIV1QUv root@master

11.31.7.3. Delete a SSH key

To delete an SSH key such that it cannot be used in future application deployments, run the following command:

Important

When an SSH key is deleted from a cluster, it does not impact any applications deployed with it.

# robin ssh-key delete <keyid> --yes

keyid

ID of the SSH key to be deleted.

--yes

Do not prompt the user for confirmation.

Note

A superadmin user can delete SSH keys associated with any user within the cluster.

Example:

# robin ssh-key delete 1 --yes
Deleted key 1 (Key1).

11.31.7.4. SSH Key usage

After an SSH key is registered, it can be specified within the application manifest file in order to enable password-less login. The exact parameter that must be set in the manifest file is described `here <>`_. Once the application is deployed, users can ssh to the exposed IP Address or hostname of the instance without a password. An example is showcased below.

Note

The IP Address or hostname of a container can be found using the robin instance list command, detailed here.

# ssh 192.0.2.102
Last login: Tue Oct  4 05:18:30 2022 from 192.0.2.64

11.32. Application Highlight: Virtual Machine Support

From version 5.3.3 and above, Robin CNP supports Linux Kernel-based Virtual Machines (KVM) and consequently allows for virtual machines to be deployed within clusters. All necessary KVM parameters can be specified within a Robin bundle and the respective qcow2 images can also be uploaded to a File Collection within the cluster in order to spawn virtual machines with the desired customization. Since virtual machines are deployed via Robin Bundles, they are treated just like any other application on the platform with the full range of lifecycle management operations available for them.

Note

In order to create and manage virtual machines on CNP, knowledge of Robin Bundles and KVM are needed. More information on Robin Bundles can be found here.

In addition, below are some points that should be considered before deploying virtual machines:

  • OVS Networking for VMs from CNP version 5.3.3 onwards whereas Calico Networking is only supported on IPv4 clusters and from version 5.3.7 onwards

  • All recovery workflows such as snapshots, clones, backups, and restorations of VMs are supported

  • All virtual machines running an operating system that is compatible with qcow2 and the underpinning KVM version (1.5.3) are supported

11.32.1. High-Level Steps to Create and Manage VMs

The following are the high-level steps for creating and managing VMs on Robin CNP.

  1. Check prerequisites.

  2. Verify CNP configuration.

  3. Download required qcow2 image from a reliable source.

  4. Register the downloaded qcow2 image with Robin CNP.

  5. Customize the manifest.yaml file for creating KVM Robin Bundle.

  6. Create a KVM Robin Bundle tar file.

  7. Add the KVM Robin Bundle.

  8. Create a VM using the KVM Bundle.

  9. Lifecycle management of a virtual machine.

11.32.2. Prerequisites

11.32.2.1. Software Prerequisites

  • The Robin cluster on which the VM is to be deployed is installed with Robin Cloud Native Platform v5.3.3 or above.

In order to verify this, run the following command:

# robin version

11.32.2.2. Hardware Prerequisites

  • The following must be enabled in the BIOS settings of the bare metal server:

    • Intel Processors - VD-T

    • AMD Processors - SVM

    • BIOS VT-D (Intel)

    • SVM (AMD)

In order to verify these settings have been appropriately set, run the following command:

# virt-host-validate

11.32.2.3. Image Prerequisites

  • The VM image must be in qcow2 format.

  • The VM image should have the cloud init service. If the image does have cloud init service, the networking for the VM must be configured manually.

  • The VM image must mount when booting.

  • The Robin file collection on which the VM image is to be hosted must be larger than the size of the compressed aforementioned image.

In order to verify the size of the available file collection(s), run the following command:

# robin collection list

11.32.2.4. Robin Install Prerequisites

The following Robin installation pre-checks must pass:

  • KVM Virtualization

  • KVM vhost-net

  • KVM Networking

  • KVM PCI Device Passthrough (For SRIOV support)

In order to verify these pre-checks have passed, run the following command:

# ./robin-install.sh precheck

11.32.2.5. Networking Prerequisites

  • The Robin cluster is configured with a public OVS based IP pool from which the VM IPs are assigned from.

  • VM IP addresses must be in the same L3 subnet as the hosts. For example this means if the host IP is 101.1.1.10/24 then the IP-Pool must also have a netmask of 24 bits.

  • VM IP addresses must be in a routable LAN from the hosts on which they are deployed.

  • The VM image must be configured with static IP addresses.

11.32.2.6. Storage Prerequisites

  • The storage capacity of the nodes within the cluster must be greater than or equal to the planned size of the file system(s) of the VMs as defined in the manifest file for the respective Robin Bundle.

  • The specified capacity of the rootfs volume of the KVM based application to be deployed must be greater than the size of the associated VM image.

11.32.3. Register a VM Image

In order to create a KVM application, the appropriate qcow VM image must first be uploaded to a file collection and registered with Robin. The image can either be present locally or available for download via a registry already known to Robin. An example command for registering a pre-downloaded image is shown below. More details on the robin image add command can be found here.

Example

# robin image add centos7 2009 QCOW ~/centos-kvm/CentOS-7-x86_64-GenericCloud-2009.qcow2
File upload: 100% -- (1391329280/1391329280)
Job:   84 Name: ImageAdd             State: VALIDATED       Error: 0
Job:   84 Name: ImageAdd             State: COMPLETED       Error: 0

11.32.4. Create a KVM Robin Bundle

A KVM Robin Bundle is a tar file containing the following components: a manifest file, a directory for icons and a directory for scripts. The following section focuses on the manifest file as it is a mandatory file and is considered the blueprint for the application. The other components are optional and can be populated at the user’s descretion. More details on the aforementioned components and how to customize them can be found here.

Note

Given that a KVM bundles are treated similarly to other application bundles, the process of creating and registering them is the same. These steps are detailed here whilst the sections detailed below focus on customizing manifest file attributes which differentiate KVM based bundles from other application bundles.

11.32.4.1. Sample Manifest file

The following is an example of a manifest file for a KVM application running the CentOS operating system.

name: CentOS
version: "7"
icon: icon.png
snapshot: enabled
clone: enabled
roles: [server]

server:
   name: CentOS
   multinode: true
   scaleout: enabled
   scaledown_mem: enabled
   addvolume: enabled
   scaledown_mem: enabled
   compute:
      memory: 8G
      hugepages_1gi: 0G
      hugepages_2mi: 0G
      # hugepages_locked: "yes"
      # hugepages_noshared: "yes"
      # memballoon: "model=none,stats.period=10"
      cpu:
       reserve: true
       cores: 8
       # rt_cores: 1-7
       # rt_sched: "fifo"
       # rt_priority: 1
       # emulatorpin: "outside_cpuset"
       # cache_ways: 4
       # kvmopts: "mode=host-model,match=exact"
       # kvmopts: "mode=host-passthrough,require=tsc-deadline,check=none"
   devices:
   - name: fec
      type: pci
      class: "0x120000"
      vendor: "0x8086"
      count: 0
   image:
      name: centos7
      version: "2009"
      engine: kvm
      ostype: linux
      osvariant: rhel7
      graphics: "none"
      imgsize: "8G"
   storage:
   - type: root_fs
      media: ssd
      bus: scsi
      path: /
      size: 20G
   - type: data
      media: ssd
      bus: scsi
      count: 1
      path: /dev/data
      fstype: raw
      size: 10G
   - type: logs
      media: ssd
      bus: scsi
      count: 1
      path: /dev/log
      fstype: raw
      size: 10G
   # livenessProbe:
   #   tcpSocket:
   #     port: 22
   #   initialDelaySeconds: 180
   #   periodSeconds: 10
   env:
   # KVM specific env variables
   - CLOUD_INIT:
      type: boolean
      value: true
   - CLOUD_INIT_ADMIN_USER: robin
   - CLOUD_INIT_ADMIN_PASSWORD:
      type: password
      value: "robin123"
   - CLOUD_INIT_USERDATA:
      type: yaml
      value: |
         # cloud-config
         password: "{{ROLES.server.ENV.CLOUD_INIT_ADMIN_PASSWORD}}"
         chpasswd:
         list: |
            root: "{{ROLES.server.ENV.CLOUD_INIT_ADMIN_PASSWORD}}"
         expire: False
   - QEMU_GUEST_AGENT: qemu-guest-agent-2.12.0-3.el7.x86_64.rpm

11.32.4.2. Customizing the Manifest file

The following are the Role level sections that need to be edited for VM deployment. More details on all customisable sections and/or attributes within the manifest file can be found here.

Image

Within each role an image section must be specified. For VM deployment this section is associated to the KVM image that was uploaded to a file collection earlier. Below are the attributes that need to be customized for the respective image.

  • name - This name must match the image name supplied when the image was registered.

  • version - This version must match the image version supplied when the image was registered.

  • engine - Engine can be docker/kvm/lxc. Docker for docker containers, KVM for VM’s and LXC for Linux containers.

  • ostype - The guest configuration for a type of operating system (Example: Linux, Windows). This will attempt to pick the most suitable ACPI and APIC settings, optimally supported mouse drivers, Virtio, and generally accommodate other operating system quirks..

  • osvariant - It is the kind of GuestOS. It is an optional specification. However, it provides some default parameters for each virtual machine that can help improve performance for a specific operating system or distribution.

  • graphics - Name of the graphics device to allow for graphical interaction with the guest OS. Specify ‘none’ to indicate no such device.

  • imagesize - Specify the size of the image.

Note

Details for all of the above attributes apart from name and version with regards to valid values that can be specified for each of them, can be found in the official KVM documentation.

Devices

  • name - Name of the device.

  • type - PCI is the default type of device.

  • class - FPGA class.

  • vendor- Vendor name of the PCI card.

  • count - Number of devices to be allocated

Storage

Within each role a storage section must be specified. Below are the key attributes that need to be edited for storage space availability within the VM.

  • type - The value specified for this attribute indicates the volume type (e.g. data / commitlog / root_fs / etc.). There can be multiple volume types per role depending on the number of volumes however they all need to be unique within the role.

  • size - The size of volume created for the specified volume type within the role.

Note

Non root_fs partitions are created with a raw file system type and so will need to be formatted to the required file system type from within the VM.

Environment Variables

Within each role an env section can be used to specify environment variables to be exposed within the VM. Below are environment variables that Robin recommends be exposed for VM configuration.

  • CLOUD_INIT - This variable should be specified with its type set to boolean and the value as True for images that support the use of Cloud Init configurations.

  • CLOUD_INIT_ADMIN_USER - This variable should be set to the name of admin user that should be created as part of the VM deployment.

  • CLOUD_INIT_ADMIN_PASSWORD - This variable should be specified with its type set to password and the value being the password for the aforementioned admin user.

  • KVM_SKIP_NETWORKING - This variable should be specified with its type set to boolean and the value as False so that networking is automatically managed by Robin via the Cloud Init config. Set it to true if the networking is configured manually outside of the config specified.

Note

For more details on Cloud Init configurations and the possible values that can be specified, review the documentation here.

11.32.5. Create a Virtual Machine

After the respective VM images and associated KVM based application bundles are registered, a VM can be created using the robin app create from-bundle command. More details about this command can be found here. An example usage of the command is shown below.

Example

# robin app create from-bundle demo-vm 1 --rpool default --ip-pool public --wait
Job: 6365 Name: ApplicationCreate    State:VALIDATED    Error: 0
Job: 6365 Name: ApplicationCreate    State:PROCESSED    Error: 0
Job: 6365 Name: ApplicationCreate    State:WAITING      Error: 0
Job: 6365 Name: ApplicationCreate    State:COMPLETED    Error: 0

11.32.5.1. Create a VM Using Cisco DCNM E1000 Virtual Interface

Robin CNP supports Cisco Data Center Network Manager (DCNM) E1000 virtual network interface for KVMs. You can deploy the Cisco DCNM E1000 interface when creating a KVM on a Robin CNP cluster.

Note

The Cisco DCNM E1000 Virtual Interface is supported only on KVMs with OVS. You can deploy a KVM bundle to use an OVS IP Pool with the model as E1000 only using an input.yaml file.

Sample Input.yaml file

 roles:
 - name: server
    ippools:
    - ippool: ovs-3
       model: e1000
    - ippool: sec-3
       primary: ovs-3

Example

# robin app create from-bundle --rpool default --namespace z1 sec-pool 1 /root/abhi/e1000/sample_input.yaml --wait
Job:   86 Name: ApplicationCreate    State: PROCESSED       Error: 0
Job:   86 Name: ApplicationCreate    State: WAITING         Error: 0
Job:   86 Name: ApplicationCreate    State: COMPLETED       Error: 0

11.32.6. Access a Virtual Machine

To access a VM, the IP Address of the aforementioned machine needs to be determined first. In order to do so use the robin instance list command. More details about this command can be found here. An example usage of the command is shown below.

Example

# robin instance list
ID | Owner/Tenant         | ResPool | Container         | Hostname                 | IP Addresses   | Status | Autopilot | LastOpr | Host   | Engine | Cores | GPUs | Mem (GB) | Ctime
---+----------------------+---------+-------------------+--------------------------+----------------+--------+-----------+---------+--------+--------+-------+------+----------+----------------------
1  | robin/Administrators | default | demo-vm.server.01 | vnode74.robinsystems.com | 10.7.201.74/16 | ONLINE | Enabled   | STARTED | demo15 | kvm    | 8     | 0    | 8.0      | 26 Jan 2021 15:58:46

After the obtaining the IP Address for the relevant VM container, any supported remote access method, such as SSH, can be used to access the aforementioned machine alongside the credentials specified in the respective application bundle’s manifest file. An example is shown below.

Example

# ssh vmuser@10.7.201.74
vmuser@10.7.201.74's password:
Last login: Thu Jan 28 06:04:40 2021 from 10.10.100.116

11.32.7. Lifecycle Management of a Virtual Machine

11.32.7.1. Start a Virtual Machine

In order to start a previously stopped VM, use the robin app start command. More details about this command can be found here. An example usage of this command is shown below. If the application name is not known, the robin app list command can be used. Additional details for this command can be found here.

Note

If an application consists of multiple VM containers, and only individual containers need to be started use the respective robin instance start and robin instance list commands. More details for these commands can be found here.

Example

# robin app start demo-vm --wait
Job:  6589 Name: ApplicationStart          State: PROCESSED       Error: 0
Job:  6589 Name: ApplicationStart          State: AGENT_WAIT      Error: 0
Job:  6589 Name: ApplicationStart          State: COMPLETED       Error: 0

After a VM is started, it might be the case that the VM’s IP Address is not pingable even though the VM container is available and the IP Address can be used to gain access to the console. This can result in the above operation failing. One reason for this could be that the networking for the VM is customised directly in the manifest file for the associated application bundle. To avoid this issue enable networking using cloud-init in order to ensure the VM is always pingable. This can be achieved by modifying the VM image to be inline with cloud-init specifications.

Note

To disable ping checks entirely, set the attribute ping_check to have a value of false within the manifest file of the respective application bundle under the role level image section. This results in the platform not performing any ping checks on the VM’s IP Addresses as part of a health check during any lifecycle management operations.

11.32.7.2. Stop a Virtual Machine

In order to stop a running VM, use the robin app stop command. More details about this command can be found here. An example usage of this command is shown below. If the application name is not known, the robin app list command can be used. Additional details for this command can be found here.

Note

If an application consists of multiple VM containers, and only individual containers need to be stopped use the respective robin instance stop and robin instance list commands. More details for these commands can be found here.

Example

# robin app stop demo-vm --wait
Job:  6589 Name: ApplicationStop          State: PROCESSED       Error: 0
Job:  6589 Name: ApplicationStop          State: AGENT_WAIT      Error: 0
Job:  6589 Name: ApplicationStop          State: COMPLETED       Error: 0

11.32.7.3. Shutdown a Virtual Machine from Console

In order to shutdown a VM via the console, first access the console using the steps provided here. Next run the following command in the console:

# shutdown -h

When a VM is shutdown via console, the respective VM container is automatically restarted unless the Autopilot feature for the concerned application is disabled. More details on how to disable Autopilot via the robin ap disable command, can be found here.

11.32.7.4. Restart a Virtual Machine

In order to restart a VM, use the robin app restart command. More details about this command can be found here. An example usage of this command is shown below. If the application name is not known, the robin app list command can be used. Additional details for this command can be found here.

Note

If an application consists of multiple VM containers, and only individual containers need to be restarted use the respective robin instance restart and robin instance list commands. More details for these commands can be found here.

Example

# robin app restart demo-vm --wait
Job:  234 Name: ApplicationStart          State: VALIDATED       Error: 0
Job:  234 Name: ApplicationStart          State: PREPARED        Error: 0
Job:  234 Name: ApplicationStart          State: AGENT_WAIT      Error: 0
Job:  234 Name: ApplicationStart          State: COMPLETED       Error: 0

Note

When an VM container is restarted, the VM itself is rebooted.

11.32.7.5. Delete a Virtual Machine

In order to delete a VM, use the robin app delete command. More details about this command can be found here. An example usage of this command is shown below. If the application name is not known, the robin app list command can be used. Additional details for this command can be found here.

Note

If an application consists of multiple VM containers, and only individual containers need to be restarted use the respective robin instance delete and robin instance list commands however this is not recommended. More details for these commands can be found here.

Example

# robin app delete demo-vm --wait
Job:  238 Name: ApplicationDelete          State: VALIDATED       Error: 0
Job:  238 Name: ApplicationDelete          State: PREPARED        Error: 0
Job:  238 Name: ApplicationDelete          State: AGENT_WAIT      Error: 0
Job:  238 Name: ApplicationDelete          State: COMPLETED       Error: 0

11.32.7.6. View Virtual Machine Images

In order to view a list of registered VM images, run the robin image list command. More details about this command can be found here. An example usage of the command is shown below.

Example

# robin image list
Image Id | Owner/Tenant         | Name   | Version | Format | Content Id                       | File Object Id | File Name
---------+----------------------+--------+---------+--------+----------------------------------+----------------+-----------------------------------------
1        | robin/Administrators | centos | 2003    | QCOW   | ef7f109590094e37c54aead73f3cdedc | 1611689015480  | CentOS-7-x86_64-GenericCloud-2003.qcow2
2        | robin/Administrators | centos | 1907    | QCOW   | 160aa274e7a69f2edb50e2d89f54270b | 1611689714495  | CentOS-7-x86_64-GenericCloud-1907.qcow2

11.32.7.7. Delete Virtual Machine Bundle

In order to delete a VM bundle, use the robin bundle delete command as a VM bundle is treated the same to any other bundle. More details about this command can be found here. An example usage of this command is shown below. If the necessary parameters, namely bundle ID and zone ID, are not known the robin bundle list command can be used. Additional details for this command can be found here.

Note

Before a VM bundle can be deleted, all applications consisting of VM’s deployed from the respective bundle must be deleted via the robin app delete command. Details of this command can be found here.

Example

# robin bundle remove 1599768542 2 --wait
Are you sure you want to delete [y/n] ? y
Job:  437 Name: BundleRemove         State: VALIDATED       Error: 0
Job:  437 Name: BundleRemove         State: PREPARED        Error: 0
Job:  437 Name: BundleRemove         State: FINALIZED       Error: 0
Job:  437 Name: BundleRemove         State: COMPLETED       Error: 0

11.32.7.8. Delete Virtual Machine Images

In order to delete a VM image, use the robin image delete command. More details about this command can be found here. An example usage of this command is shown below. If the necessary parameter, namely the image ID, is not known the robin image list command can be used. Additional details for this command can be found here.

Note

Before a VM image can be deleted, all bundles (and consequently all applications) that refer to the respective image must be deleted via the robin bundle delete command. Details of this command can be found here.

Example

# robin image delete 1
Are you sure you want to delete [y/n] ? y
Job:  897 Name: ImageRemove          State: VALIDATED       Error: 0
Job:  897 Name: ImageRemove          State: COMPLETED       Error: 0