******************************
Managing Stateful Applications
******************************
.. role:: raw-html(raw)
:format: html
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
=============================== =================================================================================
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?
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:
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.
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.
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. To command to create/register
a FlexApp, is detailed in the sections below.
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.
Upload a Robin Application Bundle
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add a bundle to the Robin cluster with the following command:
.. code-block:: text
# robin bundle add
An example of its usage is shown below:
.. code-block:: text
# 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 `_.
Listing Application Bundles
^^^^^^^^^^^^^^^^^^^^^^^^^^^
List all the bundles currently present on the Robin cluster with the following command:
.. code-block:: text
# robin bundle list
An example of its usage is shown below:
.. code-block:: text
# 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 `_.
Create an Application from a Robin Application Bundle
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Create a Robin bundle based application with the following command:
.. code-block:: text
# robin app create from-bundle --rpool
An example of its usage is shown below:
.. code-block:: text
# 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 `_.
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 on a node, rack, or datacenter
which is also running service . 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 on a node, rack, or datacenter
which is also running service . 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.
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.
- Releases 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.
..
Register a Helm Release
^^^^^^^^^^^^^^^^^^^^^^^
*Helm 3 workflow goes here*
Register a Helm Release (Helm 2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
Support for Helm 2 and Tiller is deprecated and will be removed in the next release.
Following is a step-by-step walkthrough, showing how to configure the
Helm environment 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:**
.. code-block:: text
# robin login admin
Password:
User admin is logged into Administrators tenant
**Generate a list of Robin Platform users:**
.. code-block:: text
# 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**
**Deploy Tiller objects for user1's assigned namespace:**
The following command creates a number of Kubernetes resources
(tiller ServiceAccount and RoleBinding) that will be needed by Tiller
when it gets deployed into the user's assigned namespace.
.. code-block:: text
# robin k8s deploy-tiller-objects t003-u000004
Tiller objects were successfully deployed for namespace 't003-u000004'
**Log in as user1:**
.. code-block:: text
# robin login 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.
.. code-block:: text
# robin whoami
username: user1
tenant: t1
tenants: ['t1']
namespace: t003-u000004
session_expires: 2020-01-24T11:53:02
**Set up Helm and deploy Tiller in user1's assigned namespace:**
The following command sets up Helm for use by the current Robin
Platform user (user1). It first copies the CA cert and the user’s
cert and key into the .helm directory in the user’s HOME directory.
It then issues a 'helm2 init' command to deploy Tiller into the user's
assigned namespace.
.. code-block:: text
# robin k8s helm-setup t003-u000004
Helm initialized successfully
**Wait for Tiller to be deployed:**
.. code-block:: text
# helm2 list --tls --tiller-namespace=t003-u000004
Error: could not find tiller
Repeat the above command until no errors are returned
**Add the stable Helm repo for the current user:**
.. code-block:: text
# helm2 repo add stable https://kubernetes-charts.storage.googleapis.com
"stable" has been added to your repositories
**Install the stable/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.
.. code-block:: text
# helm install stable/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 Helm 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).
.. code-block:: text
# 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 Helm release as a HELM Application:**
.. code-block:: text
# robin app register mysql --app helm/billowing-tortoise -n t003-u000004
Job: 114 Name: K8SAppRegister State: PREPARED Error: 0
Job: 114 Name: K8SAppRegister State: COMPLETED Error: 0
**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.
.. code-block:: text
# 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:**
.. code-block:: text
# 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': []}
Upload a Helm chart as a Bundle
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In addition to supporting the registration of a Helm release as an
application, Robin Platform also provides a mechanism for uploading a
Helm chart to a Robin Platform cluster as a Helm Bundle. This allows
for Helm chart installation and Helm release registration to be
performed in a single operation. In addition, creating the
application using a Helm Bundle will ensure that the application is
deployed in the proper Kubernetes namespace (the current user's
assigned namespace) and that the application uses Robin Storage (both
requirements).
The following steps outline how to upload a Helm chart to a Robin
Platform cluster as a Helm Bundle and how to deploy an application
using the uploaded bundle. The following example assumes that Robin
Platform user **user1* who is a member of tenant **t1** already
exists in the cluster.
**Log in as user1:**
.. code-block:: text
# robin login user1
Password:
User user1 is logged into t1 tenant
**Search for the stable/mysql Helm chart:**
.. code-block:: text
# helm search stable/mysql
NAME CHART VERSION APP VERSION DESCRIPTION
stable/mysql 1.6.2 5.7.28 Fast, reliable, scalable, and easy to use open-source rel...
stable/mysqldump 2.6.0 2.4.1 A Helm chart to help backup MySQL databases using mysqldump
**Fetch a copy of the stable/mysql Helm chart from the Helm Repository:**
.. code-block:: text
# helm fetch stable/mysql
**Upload the stable/mysql Helm chart to the Robin Platform cluster as a HELM Bundle:**
.. code-block:: text
# robin bundle add mysql helm-1.6.2 mysql-1.6.2.tgz --helmchart
File upload: 100% -- (11063/11063)
Job: 61 Name: BundleAdd State: VALIDATED Error: 0
Job: 61 Name: BundleAdd State: COMPLETED Error: 0
# robin bundle list
Bundle Id | Type | Owner/Tenant | Name | Version | Zone Id | Content Id | Description | Group Id | #Templates | #Apps
----------+-------+----------------------+----------+------------+------------+----------------------------------+-------------+----------+------------+-------
1 | HELM | admin1/t1 | mysql | helm-1.6.2 | 1580884960 | 00f4243a24cc74624d7272a6217d425f | - | 3 | 0 | 0
**Create a HELM Application using the uploaded HELM Bundle:**
.. code-block:: text
# 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
**Verify that the mysql-hb1 Helm release has been created:**
.. code-block:: text
# helm list --tls mysql-hb1 --tiller-namespace=t003-u000004
NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE
mysql-hb1 1 Wed Feb 5 16:20:13 2020 DEPLOYED mysql-1.6.2 5.7.28 t003-u000004
**Verify that the mysql-hb1 HELM Application has been registered:**
Note that the listing will include all applications the current user
is entitled to view. This would include applications created from
Robin Bundles as well as registered applications of type ``helm``
and ``flexapp``.
.. code-block:: text
# 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-hb1 | helm | ONLINE | user1/t1 | t003-u000004 | 0 | 0 |
+-----------+------+--------+--------------+--------------+-----------+---------+
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:
.. code-block:: text
# robin app register
--selector =
--resource /
--namespace
--dry-run
=================================================== =================================
```` Name to assign to FlexApp
``--selector =`` Resources with these Kubernetes labels would be
selected to be part of this FlexApp
``--resource /`` Resources of the specified type and name would
be selected to be part of this FlexApp
``--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
/``, where ```` 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 ````
* Running ``kubectl get `` would list all valid ```` of that specific resource type
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
========================= ===================
Create an application from a Bundle
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. tabs::
.. tab:: CLI
An application instance can be created from either Robin Application or Helm based Bundle
with the following command:
.. code-block:: text
# robin app create from-bundle []
--rpool
--ip-pools
--restart-attempts
--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 `` Name of the resource pool to use. This is a mandatory parameter for Robin Application Bundle based applications
``--ip-pools `` Name of IP pools from which to allocated IP addresses for the application
``--restart-attempts `` Number of restart attempts when the app is in a failed state
``--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):**
.. code-block:: text
# 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):**
.. code-block:: text
# 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
.. tab:: API
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: `` - This mandatory field within the payload specifies the name of the application to be created.
- ``bundleid: `` - This mandatory field within the payload specifies the ID of the bundle from which the application will be created.
- ``rpool: `` - This mandatory field within the payload specifies the name of the resource pool in which the application will be created.
- ``template_json: `` - 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: `` - 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: `` - 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: `` - 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: `` - 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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
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.
.. tabs::
.. tab:: CLI
A clone of an existing application instance can be created from an
application snapshot with the following command:
.. code-block:: text
# robin app create from-snapshot
--rpool
--ip-pools
--role-ip-pools
--role-vnode-hostnames
--role-cpus
--role-gpus
--role-mem
================================================= =========================================================
``app_name`` Application instance name
``snapshotid`` Unique ID of the application snapshot
``--rpool `` 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 `` 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 `` Comma separated list of IP Pools for a role in the format: ``:``. This parameter only applies to clones of Robin Bundle based applications
``--role-vnode-hostnames `` Comma separated list of vnode hostnames for a role in the format: ``:``. This parameter only applies to clones of Robin Bundle based applications
``--role-cpus `` CPU count for a role in the format: ``:``. This parameter only applies to clones of Robin Bundle based applications
``--role-gpus `` GPU count for a role in the format: ``:``. This parameter only applies to clones of Robin Bundle based applications
``--role-mem `` Memory for a role in the format: ``:``. 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):**
.. code-block:: text
# 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):**
.. code-block:: text
# 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
.. tab:: API
Clones an existing application instance using a snapshot of the aformentioned application.
**End Point:** /api/v3/robin_server/apps/
**Method:** PUT
**URL Parameters:** None
**Data Parameters:**
- ``action: clone`` - This mandatory field within the payload specifies that the clone operation should be performed.
- ``clonename: `` - This mandatory field within the payload specifies the name of the clone to be created.
- ``rpool: `` - This mandatory field within the payload specifies the name of the resource pool in which the clone will be created.
- ``cloneconfig: `` - 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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
Create an application from a backup
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. tabs::
.. tab:: CLI
A application instance can be created from an application backup with
the following command:
.. code-block:: text
# robin app create from-backup
--rpool
--ip-pools
--restart-attempts
--namespace
--media
--disable-hooks
--disable-auto-relocate
--genplan
--start-hydration
==================================== =========================================================
``app_name`` Application instance name
``backupid`` Unique ID of the Application backup
``--rpool `` 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 `` 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 `` Number of restart attempts when the app is in a failed state. Note this option is only valid for Robin Bundle based applications
``--namespace `` Kubernetes namespace in which the application will be deployed
``--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):**
.. code-block:: text
# 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):**
.. code-block:: text
# 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
.. tab:: API
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: `` - This mandatory parameter within the url specifies the ID of the backup for which to retrieve the configuration of.
:raw-html:`
`
**Data Parameters:** None
**Port:** RCM Port (default value is 29442)
**Headers:**
- ``Authorization: `` : Authorization token to identify which user is sending the request. The token can be acquired from the login API.
:raw-html:`
`
**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:**
.. raw:: html
Output
.. code-block:: text
{
"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"
}
]
}
.. raw:: html
:raw-html:`
`
.. 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: `` - This mandatory field within the payload specifies the name of the application to be created.
- ``rpool: `` - This mandatory field within the payload specifies the name of the resource pool in which the application will be created.
- ``ip_pools: `` - 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: `` - 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: `` - 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.
:raw-html:`
`
.. 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: `` : Authorization token to identify which user is sending the request. The token can be acquired from the login API.
:raw-html:`
`
**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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
Register a Stateful Application
===============================
.. tabs::
.. tab:: CLI
Run this command to register a stateful application with Robin Platform:
.. code-block:: text
# robin app register
--app
--resource
--selector
--namespace
--dry-run
--specs
============================= ========================================
```` 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 `` Helm or operator based applications. Ex: helm/
``--resource `` Kubernetes native objects. Ex: pvc/ or pod/
``--selector `` Kubernetes selectors. Ex: release=mongo-1.0,heritage=tiller
``--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):**
.. code-block:: text
# 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.
.. tab:: API
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: `` - This mandatory field within the payload specifies the name of the application to be registered.
- ``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: `` -- 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: `` - This mandatory field within the dictionary specifies a list of strings representing a group of specific Kubernetes resources in the format '/' to be registered. To indicate no resources, specify an empty list.
- ``selectors: `` - This mandatory field within the dictionary specifies a list of strings representing a set of selectors in the format '=' to query Kubernetes objects with. To indicate no selectors, specify an empty list.
- ``apps: `` - This mandatory field within the dictionary specifies a list of strings in the format 'helm/' and represents the helm charts to register as part of the application. To indicate no Helm releases, specify an empty list.
- ``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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"jobid":248
}
.. raw:: html
Unregister a Stateful Application
=================================
.. tabs::
.. tab:: CLI
Issue the following command to unregister a stateful application from
Robin Platform:
.. code-block:: text
# robin app unregister
============================= =============================================================
```` The name of a previously registered stateful application.
============================= =============================================================
**Example:**
.. code-block:: text
# 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.
.. tab:: API
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: `` - This mandatory field within the payload specifies the name of the application to be unregistered.
**Port:** RCM Port (default value is 29442)
**Headers:**
- ``Authorization: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"jobid":178
}
.. raw:: html
Delete an Application
=====================
.. tabs::
.. tab:: CLI
Issue the following command to delete an application from a Robin
Platform cluster:
.. code-block:: text
# robin app delete
--force
================ ================================================================================
``app_name`` Application instance name
``--force`` Force the deletion of the application and all associated Kubernetes objects.
================ ================================================================================
**Example:**
.. code-block:: text
# 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.
.. tab:: API
Delete an application from a Robin Platform cluster
**End Point:** /api/v6/robin_server/apps/
**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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
List all Applications
=====================
.. tabs::
.. tab:: CLI
The following command will list all applications created or
registered with Robin Platform:
.. code-block:: text
# robin app list --app-kind
--app-types
============================ ======================================================================================
``--app-kind `` Filter by application kind (valid choices are 'robin', 'helm', and 'flexapp')
``--app-types `` Filter by application type (valid choices are'MASTER' and 'CLONE')
============================ ======================================================================================
**Example 1 (Listing all Applications):**
.. code-block:: text
# 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):**
.. code-block:: text
# 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 |
+-------+--------------+--------+--------+---------------+--------+-----+-----+-------------+--------+---------+-----------+-------+
.. tab:: API
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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
]
}
.. raw:: html
Show information about a specific Application
=============================================
.. tabs::
.. tab:: CLI
Issue the following command to get detailed information about a
specific application instance:
.. code-block:: text
# robin app info
--services
--network
================ =========================================================
``app_name`` Application instance name
``--services`` Display information about services for an application
``--network`` Display network information for an application
================ =========================================================
**Example 1 (Showing information about a Robin app):**
.. code-block:: text
# 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):**
.. code-block:: text
# 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):**
.. code-block:: text
# 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):**
.. code-block:: text
# 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 |
+--------------------+--------------+-----------------+
.. tab:: API
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/?info=true&details=vnodes
**Method:** GET
**URL Parameters:** None
**Data Parameters:** None
**Port:** RCM Port (default value is 29442)
**Headers:**
- ``Authorization: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
Stop a Robin Application
========================
.. tabs::
.. tab:: CLI
Issue the following command to stop an application:
.. code-block:: text
# robin app stop []
--all
================ =========================================================
``app_name`` Application instance name
``--all`` Stop all applications
================ =========================================================
**Example:**
.. code-block:: text
# 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.
.. tab:: API
Stops a Robin bundle based application that is currently running.
**End Point:** /api/v3/robin_server/apps/
**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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
Start a Robin Application
=========================
.. tabs::
.. tab:: CLI
Issue the following command to stop an application:
.. code-block:: text
# robin app start []
--all
================ =========================================================
``app_name`` Application instance name
``--all`` Start all applications
================ =========================================================
**Example:**
.. code-block:: text
# 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.
.. tab:: API
Starts a Robin bundle based application that is currently not running.
**End Point:** /api/v3/robin_server/apps/
**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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
Restart a Robin Application
===========================
.. tabs::
.. tab:: CLI
Issue the following command to restart an application:
.. code-block:: text
# robin app restart []
--all
================ =========================================================
``app_name`` Application instance name
``--all`` Restart all applications
================ =========================================================
**Example:**
.. code-block:: text
# 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.
.. tab:: API
Restarts a Robin bundle based application.
**End Point:** /api/v3/robin_server/apps/
**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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
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.
Sharing an Application
^^^^^^^^^^^^^^^^^^^^^^
.. tabs::
.. tab:: CLI
Run the following command to share an app with one or more users:
.. code-block:: text
# robin app share name [user_list]
--operations
--all-tenant-users
============================= =======================================================================
``name`` Application instance name
``user_list`` Optional comma separated list of users the application
will be shared with
``--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:**
.. code-block:: text
# 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 :ref:`UserManagement` 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.
.. tab:: API
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/
**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: `` - 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: `` - 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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
Stop Sharing an Application
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. tabs::
.. tab:: CLI
Run the following command to stop sharing an app with one or more users:
.. code-block:: text
# robin app unshare name [user_list]
--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 `` 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:**
.. code-block:: text
# 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
:ref:`UserManagement` for details on how Robin RBAC works.
* Tenant Administrators will only be able to stop sharing
applications that are bound to their tenant.
.. tab:: API
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/
**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: `` - 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: `` - 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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
List Application Shares
^^^^^^^^^^^^^^^^^^^^^^^
.. tabs::
.. tab:: CLI
Run the following command to list application shares:
.. code-block:: text
# 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:**
.. code-block:: text
# 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 :ref:`UserManagement` for
details on how Robin RBAC works.
.. tab:: API
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: `` - 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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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"
}
]
}
.. raw:: html
Reassign Ownership of an Application
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. tabs::
.. tab:: CLI
Run the following command to reassign ownership of an app to a different tenant user:
.. code-block:: text
# robin app change-owner [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:**
.. code-block:: text
# 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
:ref:`UserManagement` 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.
.. tab:: API
Reassigns ownership of an application to a different tenant user.
**End Point:** /api/v3/robin_server/apps/
**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: `` - 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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
Scaling services for a Robin Application
=============================================
.. tabs::
.. tab:: CLI
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:
.. code-block:: text
# robin app scale
--vnode-hostnames
--env
--ippools
--tags
--cpu
--gpu
--mem
--storage
=================================== ===========================================================================================
``app_name`` Application instance name
``role_name`` Name of role to scale
``count`` Number of instances to scale the role to
``--vnode-hostnames `` Provide the hostnames on which the additional vnodes will be deployed
``--env `` Environment variables for additional vnodes
``--ippools `` IP Pool names and a comma seperated list of respective static IPs to allocate from them for each additional vnode e.g. =, etc.
``--tags `` Tags for additional vnodes
``--cpu `` CPU limits for additional vnodes
``--gpu `` GPU limits for additional vnodes
``--mem `` Memory limits for additional vnodes
``--storage `` Storage config for additional vnodes
=================================== ===========================================================================================
**Example:**
.. code-block:: text
# 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
Scaling resources for a Robin Application
=========================================
.. tabs::
.. tab:: CLI
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.
.. code-block:: text
# robin app computeqos
--role
--cpus
--gpus
--memory
--hugepages-2mi
--hugepages-1gi
--swap
=============================== ===========================================================================================
``app_name`` Application instance name
``--role `` Name of role to scale
``--cpus `` Maximum number of CPUs per instance
``--gpus `` Maximum number of GPUs per instance
``--memory `` Memory limit per instance in bytes
``--hugepages-2mi `` 2Mi Hugepages limit per instance in bytes
``--hugepages-1gi `` 1Gi Hugepages limit per instance in bytes
``--swap `` Swap limit per instance in bytes
=============================== ===========================================================================================
**Example:**
.. code-block:: text
# 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
Storage QoS for a Robin Application
=============================================
.. tabs::
.. tab:: CLI
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:
.. code-block:: text
# robin app computeqos
--role
--volume-type
--read-min-iops
--read-max-iops
--read-weight
--write-min-iops
--write-max-iops
--write-weight
================================= ===========================================================================================
``app_name`` Application instance name
``--role `` Name of role to scale storage I/OPs for
``--volume-type `` Type of volume to scale storage I/OPs for
``--read-min-iops `` Minimum I/OPs for read operations
``--read-max-iops `` Maximum I/OPs for read operations
``--read-weight `` Relative weightage for read operations
``--write-min-iops `` Minimum I/OPs for write operations
``--write-max-iops `` Maximum I/OPs for write operations
``--write-weight `` Relative weightage for write operations
================================= ===========================================================================================
Upgrading a Robin Application
=============================================
.. tabs::
.. tab:: CLI
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 `_.
.. code-block:: text
# robin app upgrade
--bundleid
--image
--test
--rolling
--online
--skip-snap
============================ ===========================================================================================
``app_name`` Application instance name
``--bundleid `` ID of bundle to upgrade to
``--image `` 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):**
.. code-block:: text
# robin app upgrade a4 --bundleid 4 --rolling --wait
Upgrading application a4...Done
**Example 2 (Online upgrade for an application without a snapshot):**
.. code-block:: text
# robin app upgrade kvm1 --bundleid 4 --online --skip-snap --wait
Upgrading application kvm1...Done
.. tab:: API
Upgrades an application from the current bundle and image to a newly specified bundle and image.
**End Point:** /api/v3/robin_server/apps/
**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: `` - 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: `` - 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: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
Attach an External Storage Repo to an Application
=================================================
.. tabs::
.. tab:: CLI
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:
.. code-block:: text
# robin app attach-repo
================ =========================================================
``app_name`` Application instance name
``repo_name`` Name of the storage repo
================ =========================================================
**Example:**
.. code-block:: text
# robin app attach-repo mysql-c1 testrepo --wait
Job: 115 Name: ApplicationAddRepo State: VALIDATED Error: 0
Job: 115 Name: ApplicationAddRepo State: COMPLETED Error: 0
.. tab:: API
Attaches a repo to an application in order to enable backups for it.
**End Point:** /api/v3/robin_server/apps/
**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: `` - This mandatory field within the payload specifies the repo to be attached to the application.
- ``name: `` - This mandatory field within the payload specifies the application to which the aforementioned repo should be attached.
**Port:** RCM Port (default value is 29442)
**Headers:**
- ``Authorization: `` : 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:**
.. raw:: html
Output
.. code-block:: text
{
"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
}
.. raw:: html
Detach an External Storage Repo from an Application
===================================================
.. tabs::
.. tab:: CLI
A previously attached storage repo can be detached from an
Application using this command:
.. code-block:: text
# robin app detach-repo
--purge-in-repo
--yes
=================== =================================================================
``app_name`` Application instance name
``repo_name`` Name of the storage repo
``--purge-in-repo`` Delete all backup copies in repo associated from this cluster
``--yes`` Do not prompt the user for confirmation
=================== =================================================================
**Example:**
.. code-block:: text
# robin app detach-repo mysql-c1 testrepo --wait
Job: 116 Name: ApplicationRemoveRepo State: PREPARED Error: 0
Job: 116 Name: ApplicationRemoveRepo State: COMPLETED Error: 0
.. tab:: API
Detaches a previously attached repo from an application.
**End Point:** /api/v3/robin_server/apps/
**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: `` - This mandatory field within the payload specifies the repo to be detached from the application.
- ``name: `` - This mandatory field within the payload specifies the application from which the aforementioned repo should be detached.
- ``purge: true`` - Utilizing this parameter results in all backups associated with this cluster within the specified repo being deleted.
**Port:** RCM Port (default value is 29442)
**Headers:**
- ``Authorization: `` : 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:**
.. raw:: html