Skip to content

Commit 9163477

Browse files
committed
Update Blog “how-to-use-dscc-api-and-ansible-to-collect-the-storage-configuration”
1 parent d54fb95 commit 9163477

File tree

2 files changed

+36
-26
lines changed

2 files changed

+36
-26
lines changed

content/blog/how-to-use-dscc-api-and-ansible-to-collect-the-storage-configuration.md

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,50 @@ disable: false
88
---
99
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.
1010

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+
1226

13-
## Retrieving a DSCC access token
1427

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-->.
1628

17-
Once you do have your client id and client secret, you can generate an access token that is valid for two hours.
1829

1930

2031

2132

2233

34+
35+
36+
37+
![](/img/capturestorage-flowdiagram.png "Capture Storage System Flow Diagram")
38+
39+
40+
41+
42+
43+
![Get Storage-Systems API Response](/img/getstoragesystems.png "Get Storage-Systems API Response")
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+
2355
```
2456
- name: Include encrypted vars
2557
include_vars: credentials.yml
@@ -46,14 +78,8 @@ Once you do have your client id and client secret, you can generate an access to
4678
mode: "0644"
4779
```
4880

49-
50-
51-
52-
5381
## DSCC REST API call
5482

55-
56-
5783
```
5884
- name: Include encrypted vars
5985
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
123149

124150

125151

126-
# Capture the storage system configuration
127-
128-
129-
130-
131-
132-
133-
134-
![](/img/capturestorage-flowdiagram.png "Capture Storage System Flow Diagram")
135-
136-
137-
138152
Used Playbook hierarchy:
139153

140-
141-
142154
* Capture-Systems.yaml
143155

144156
* DSCC-API-Call.yaml
@@ -147,6 +159,4 @@ Used Playbook hierarchy:
147159

148160
* Loop-Links.yaml
149161

150-
151-
152162
Playbooks currently stored at: <https://github.com/tbeha/DSCC-Ansible>

static/img/getstoragesystems.png

108 KB
Loading

0 commit comments

Comments
 (0)