You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/how-to-use-dscc-api-and-ansible-to-collect-the-storage-configuration.md
+36-26Lines changed: 36 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,18 +8,50 @@ disable: false
8
8
---
9
9
Capturing the current storage configuration in order to verify it against best practices or configuration rules is a task that customer requested regularly. If the customer is using Ansible as the automation platform, then there is on one hand the [HPE 3PAR Ansible module](https://github.com/HewlettPackard/hpe3par_ansible_module?tab=readme-ov-file), that is used to create and delete hosts, volumes etc, but it is not really a solution for gathering the complete current configuration. Furthermore, this module uses the WSAPI of individual Alletra storage systems, while the HPE Data Services Cloud Console (DSCC) would be the better option to collect storage configuration data of multiple systems that might even be distributed across multiple sites. The DSCC would over a central, single location to get the data of all storage systems. [Ansible playbooks for the DSCC](https://developer.hpe.com/blog/automating-operations-on-dscc-using-ansible-playbooks/) were discussed in one of the previous HPE developer blogs. The playbooks offer fact gatherings for storage systems, hosts and volumes, but once you dig into the details, you will find that the modules were not updated for more than two years and for instance do not support the HPE Alletra MP B10000 storage array. In this blog, I will discuss a possible approach for DSCC data gathering using Ansible built-in functionality to overcome the lack of continuous playbook development.
10
10
11
-
# Basic tasks
11
+
# Capture the storage system configuration
12
+
13
+
14
+
15
+
DSCC@HPEDev:
16
+
17
+
<!--StartFragment-->
18
+
19
+
[Data Services on the HPE GreenLake platform | HPE Developer Portal](https://developer.hpe.com/greenlake/data-services-on-the-hpe-greenlake-platform/home/)
20
+
21
+
<!--EndFragment-->
22
+
23
+
24
+
25
+
12
26
13
-
## Retrieving a DSCC access token
14
27
15
-
The steps to first generate the client Id and the client secret used to access the DSCC REST API was already described in a blog on the HPE Developer Portal: <!--StartFragment-->[Using HPE GreenLake Console's API Gateway for Data Services Cloud Console ](https://developer.hpe.com/blog/api-console-for-data-services-cloud-console/)<!--EndFragment-->.
16
28
17
-
Once you do have your client id and client secret, you can generate an access token that is valid for two hours.
18
29
19
30
20
31
21
32
22
33
34
+
35
+
36
+
37
+

38
+
39
+
40
+
41
+
42
+
43
+

44
+
45
+
46
+
47
+
# Basic tasks
48
+
49
+
## Retrieving a DSCC access token
50
+
51
+
The steps to first generate the client Id and the client secret used to access the DSCC REST API was already described in a blog on the HPE Developer Portal: <!--StartFragment-->[Using HPE GreenLake Console's API Gateway for Data Services Cloud Console ](https://developer.hpe.com/blog/api-console-for-data-services-cloud-console/)<!--EndFragment-->.
52
+
53
+
Once you do have your client id and client secret, you can generate an access token that is valid for two hours.
54
+
23
55
```
24
56
- name: Include encrypted vars
25
57
include_vars: credentials.yml
@@ -46,14 +78,8 @@ Once you do have your client id and client secret, you can generate an access to
46
78
mode: "0644"
47
79
```
48
80
49
-
50
-
51
-
52
-
53
81
## DSCC REST API call
54
82
55
-
56
-
57
83
```
58
84
- name: Include encrypted vars
59
85
include_vars: vars/credentials.yml
@@ -123,22 +149,8 @@ Once you do have your client id and client secret, you can generate an access to
123
149
124
150
125
151
126
-
# Capture the storage system configuration
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-

135
-
136
-
137
-
138
152
Used Playbook hierarchy:
139
153
140
-
141
-
142
154
* Capture-Systems.yaml
143
155
144
156
* DSCC-API-Call.yaml
@@ -147,6 +159,4 @@ Used Playbook hierarchy:
147
159
148
160
* Loop-Links.yaml
149
161
150
-
151
-
152
162
Playbooks currently stored at: <https://github.com/tbeha/DSCC-Ansible>
0 commit comments