Management Workflows
Management Workflows
Management Workflows
Astra Automation
NetApp
December 04, 2023
These workflows can be expanded and enhanced by NetApp at any time and so you should
review them periodically.
General preparation
Before using any of the Astra workflows, make sure to review Prepare to use the workflows.
Workflow categories
The management workflows are organized in different categories to make it easier to locate the one you want.
Category Description
Application control These workflows allow you to control the managed and unmanaged applications.
You can list the apps as well as create and remove a managed app.
Application protection You can use these workflows to protect your managed applications through
snapshots and backups.
Cloning and restoring These workflow describe how to clone and restore your managed applications.
apps
Support There are several workflows available to debug and support your applications as
well as the general Kubernetes environment.
Additional considerations
There are a several additional considerations when using the management workflows.
Cloning an app
There are a few things to consider when cloning an application. The parameters described below are part of
the JSON input.
Cluster identifier
The value of clusterID identifies the cluster where the new app will be installed.
• When cloning within the same cluster, clusterID and sourceClusterID have the same value.
• When cloning across clusters, the two values are different and clusterID should be the ID of the
target cluster.
1
Namespaces
The namespace value must be different than the original source app. Further, the namespace for the clone
cannot exist and Astra will create it.
Restoring an app
App control
List the apps
You can list the applications that are currently managed by Astra. You might do this as
part of finding the snapshots or backups for a specific app.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
2
Curl example: Return the name, id, and state for all apps
{
"items": [
[
"mysql",
"4ee2b8fa-3696-4f32-8879-399792f477c3",
"ready"
],
[
"postgresql",
"3b984474-e5c9-4b64-97ee-cdeb9bcd212e",
"ready"
],
],
"metadata": {}
}
Get an app
You can retrieve all the resource variables describing a single application.
You must have the ID of the app you want to retrieve. If needed you can use the workflow List the apps to
locate the application.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
3
Parameter Type Required Description
app id Path Yes ID value of the application to retrieve.
Manage an app
You can create a managed application based on an application already known to Astra in
a specific namespace. When an application is managed or defined to Astra, you can
protect it by taking backups and snapshots.
Perform the workflow List the namespaces and select the namespace.
Perform the workflow List the clusters and select the cluster.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
4
{
"clusterID": "7ce83fba-6aa1-4e0c-a194-26e714f5eb46",
"name": "subtext",
"namespaceScopedResources": [{"namespace": "kube-matrix"}],
"type": "application/astra-app",
"version": "2.0"
}
Unmanage an app
You can remove a managed app when it’s no longer needed. Removing a managed
application also deletes the associated schedules.
You must have the ID of the app you want to unmanage. If needed you can use the workflow List the apps to
locate the application.
The application’s backups and snapshots are not automatically removed when it is deleted. If you no longer
need the backups and snapshots, you should delete them before removing the application.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
5
curl --location -i --request DELETE
'https://astra.netapp.io/accounts/<ACCOUNT_ID>/k8s/v2/apps/<APP_ID>'
--header 'Accept: */*' --header 'Authorization: Bearer <API_TOKEN>'
App protection
List the snapshots
You can list the snapshots that have been taken for a specific application.
You must have the ID of the app you want to list the snapshots for. If needed you can use the workflow List the
apps to locate the application.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
Curl example: Return all snapshots for the app and the count
6
JSON output example
{
"items": [
{
"type": "application/astra-appSnap",
"version": "1.1",
"id": "1ce34da4-bb0a-4926-b925-4a5d85dda8c2",
"hookState": "success",
"metadata": {
"createdBy": "a530e865-23e8-4e2e-8020-e92c419a3867",
"creationTimestamp": "2022-10-30T22:44:20Z",
"modificationTimestamp": "2022-10-30T22:44:20Z",
"labels": []
},
"snapshotAppAsset": "0ebfe3f8-40ed-4bdc-88c4-2144fbda85a0",
"snapshotCreationTimestamp": "2022-10-30T22:44:33Z",
"name": "snapshot-david-1",
"state": "completed",
"stateUnready": []
}
],
"metadata": {}
}
You must have the ID of the app you want to list the backups for. If needed you can use the workflow List the
apps to locate the application.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
7
Parameter Type Required Description
app id Path Yes Identifies the managed application owning the listed
backups.
{
"items": [
{
"type": "application/astra-appBackup",
"version": "1.1",
"id": "8edeb4a4-fd8b-4222-a559-1013145b28fc",
"name": "backup-david-oct28-1",
"bucketID": "a443e58f-59bd-4d45-835a-1bc7813f659a",
"snapshotID": "dfe237cb-57b7-4576-af4d-00ba3a8f2828",
"state": "completed",
"stateUnready": [],
"hookState": "success",
"totalBytes": 205219132,
"bytesDone": 205219132,
"percentDone": 100,
"metadata": {
"labels": [
{
"name": "astra.netapp.io/labels/read-
only/triggerType",
"value": "backup"
}
],
"creationTimestamp": "2022-10-28T21:58:37Z",
"modificationTimestamp": "2022-10-28T21:58:55Z",
"createdBy": "a530e865-23e8-4e2e-8020-e92c419a3867"
}
}
],
"metadata": {}
}
8
Create a snapshot for an app
You can create a snapshot for a specific application.
You must have the ID of the app you want to create a snapshot for. If needed you can use the workflow List the
apps to locate the application.
1. Create a snapshot
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
{
"type": "application/astra-appSnap",
"version": "1.1",
"name": "snapshot-david-1"
}
9
clone the app.
You must have the ID of the app you want to back up. If needed you can use the workflow List the apps to
locate the application.
1. Create a backup
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
{
"type": "application/astra-appBackup",
"version": "1.1",
"name": "backup-david-1"
}
Delete a snapshot
You can delete a snapshot associated with an application.
10
Before you begin
• ID of the app that owns the snapshot. If needed you can use the workflow List the apps to locate the
application.
• ID of the snapshot you want to delete. If needed you can use the workflow List the snapshots to locate the
snapshot.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
Delete a backup
You can delete a backup associated with an application.
• ID of the app that owns the backup. If needed you can use the workflow List the apps to locate the
application.
• ID of the backup you want to delete. If needed you can use the workflow List the backups to locate the
snapshot.
11
You can force the deletion of a failed backup using the optional request header as described
below.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
Curl example: Delete a single backup for the app with the force option
Perform the workflow List the apps and select the desired application.
Perform the following REST API call to create a protection policy for a specific app.
12
JSON input example
{
"type": "application/astra-schedule",
"version": "1.3",
"name": "Backup Schedule",
"enabled": "true",
"granularity": "monthly",
"minute": "0",
"hour": "0",
"dayOfMonth": "1",
"snapshotRetention": "12",
"backupRetention": "12"
}
Curl example
To clone an app to a different cluster, you need to update the clusterId parameter in the
JSON input as appropriate for your environment.
Perform the workflow List the apps and select application you want to clone. Several of the resource values are
needed for the REST call used to clone the app.
13
2. Clone the app
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
{
"type": "application/astra-app",
"version": "2.0",
"name": "mysql-clone",
"clusterID": "30880586-d579-4d27-930f-a9633e59173b",
"sourceClusterID": "30880586-d579-4d27-930f-a9633e59173b",
"namespace": "mysql-ns",
"sourceAppID": "e591ee59-ea90-4a9f-8e6c-d2b6e8647096"
}
14
To clone an app to a different cluster, you need to update the clusterId parameter in the
JSON input as appropriate for your environment.
Perform the workflow List the apps and select application you want to clone. Several of the resource values are
needed for the REST call used to clone the app.
Perform the workflow List the snapshots and select snapshot you want to use.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
{
"type": "application/astra-app",
"version": "2.0",
"name": "mysql-clone2",
"clusterID": "30880586-d579-4d27-930f-a9633e59173b",
"sourceClusterID": "30880586-d579-4d27-930f-a9633e59173b",
"namespace": "mysql",
"snapshotID": "e24515bd-a28e-4b28-b832-f3c74dbf32fb"
}
15
Clone an app from a backup
You can create a new application by cloning it from a backup.
To clone an app to a different cluster, you need to update the clusterId parameter in the
JSON input as appropriate for your environment.
Perform the workflow List the apps and select application you want to clone. Several of the resource values are
needed for the REST call used to clone the app.
Perform the workflow List the backups and select backup you want to use.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
16
{
"type": "application/astra-app",
"version": "2.0",
"name": "mysql-clone3",
"clusterID": "30880586-d579-4d27-930f-a9633e59173b",
"sourceClusterID": "30880586-d579-4d27-930f-a9633e59173b",
"namespace": "mysql",
"backupID": "e24515bd-a28e-4b28-b832-f3c74dbf32fb"
}
Perform the workflow List the apps and select application you want to clone. Several of the resource values are
needed for the REST call used to restore the app.
Perform the workflow List the backups and select backup you want to use.
Perform the following REST API call. You must provide the ID for either a backup (as shown below) or
snapshot.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
17
JSON input example
{
"type": "application/astra-app",
"version": "2.0",
"backupID": "e24515bd-a28e-4b28-b832-f3c74dbf32fb"
}
Namespaces
List the namespaces
You can list the available namespaces.
Curl example: Return name, state, and cluster ID for all namespaces
18
JSON output example
{
"items": [
[
"default",
"discovered",
"922f924a-a476-4a79-97f6-472571698154"
],
[
"kube-node-lease",
"discovered",
"922f924a-a476-4a79-97f6-472571698154"
],
[
"kube-public",
"discovered",
"922f924a-a476-4a79-97f6-472571698154"
],
[
"kube-system",
"discovered",
"922f924a-a476-4a79-97f6-472571698154"
],
[
"mysql",
"discovered",
"922f924a-a476-4a79-97f6-472571698154"
],
[
"mysql-clone1",
"discovered",
"922f924a-a476-4a79-97f6-472571698154"
],
[
"netapp-acc-operator",
"discovered",
"922f924a-a476-4a79-97f6-472571698154"
],
[
"openshift",
"discovered",
"922f924a-a476-4a79-97f6-472571698154"
],
[
"trident",
19
"discovered",
"922f924a-a476-4a79-97f6-472571698154"
]
],
"metadata": {}
}
Support
List the notifications
You can list the notifications for a specific Astra account. You might do this as part of
monitoring the system activity or debugging an issue.
In addition to the parameters common with all REST API calls, the following parameters are also used in the
curl examples for this step.
Curl example: Return the description for notifications with severity of warning
20
JSON output example
{
"items": [
[
"Trident on cluster david-ie-00 has failed or timed out;
installation of the Trident operator failed or is not yet complete;
operator failed to reach an installed state within 300.00 seconds;
container trident-operator not found in operator deployment"
],
[
"Trident on cluster david-ie-00 has failed or timed out;
installation of the Trident operator failed or is not yet complete;
operator failed to reach an installed state within 300.00 seconds;
container trident-operator not found in operator deployment"
]
],
"metadata": {}
}
Perform the workflow List the apps and select application you want to remove.
Delete all the app backups by performing the workflow Delete a backup for each backup in the list.
Perform the workflow Delete a snapshot from each snapshot in the list.
21
Copyright information
Copyright © 2023 NetApp, Inc. All Rights Reserved. Printed in the U.S. No part of this document covered by
copyright may be reproduced in any form or by any means—graphic, electronic, or mechanical, including
photocopying, recording, taping, or storage in an electronic retrieval system—without prior written permission
of the copyright owner.
Software derived from copyrighted NetApp material is subject to the following license and disclaimer:
THIS SOFTWARE IS PROVIDED BY NETAPP “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE, WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL
NETAPP BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NetApp reserves the right to change any products described herein at any time, and without notice. NetApp
assumes no responsibility or liability arising from the use of products described herein, except as expressly
agreed to in writing by NetApp. The use or purchase of this product does not convey a license under any
patent rights, trademark rights, or any other intellectual property rights of NetApp.
The product described in this manual may be protected by one or more U.S. patents, foreign patents, or
pending applications.
LIMITED RIGHTS LEGEND: Use, duplication, or disclosure by the government is subject to restrictions as set
forth in subparagraph (b)(3) of the Rights in Technical Data -Noncommercial Items at DFARS 252.227-7013
(FEB 2014) and FAR 52.227-19 (DEC 2007).
Data contained herein pertains to a commercial product and/or commercial service (as defined in FAR 2.101)
and is proprietary to NetApp, Inc. All NetApp technical data and computer software provided under this
Agreement is commercial in nature and developed solely at private expense. The U.S. Government has a non-
exclusive, non-transferrable, nonsublicensable, worldwide, limited irrevocable license to use the Data only in
connection with and in support of the U.S. Government contract under which the Data was delivered. Except
as provided herein, the Data may not be used, disclosed, reproduced, modified, performed, or displayed
without the prior written approval of NetApp, Inc. United States Government license rights for the Department
of Defense are limited to those rights identified in DFARS clause 252.227-7015(b) (FEB 2014).
Trademark information
NETAPP, the NETAPP logo, and the marks listed at http://www.netapp.com/TM are trademarks of NetApp, Inc.
Other company and product names may be trademarks of their respective owners.
22