Skip to content

Commit

Permalink
Merge pull request #3 from mwpreston/dev
Browse files Browse the repository at this point in the history
Fix versioning and many formatting/null check
  • Loading branch information
tpcarman authored Apr 18, 2020
2 parents d7724fd + ff1c181 commit 3edb7b3
Show file tree
Hide file tree
Showing 6 changed files with 513 additions and 174 deletions.
Binary file modified AsBuiltReport.Rubrik.CDM.json
Binary file not shown.
31 changes: 28 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,39 @@
# Rubrik CDM As Built Report Changelog

## [0.0.7] - 2020-04-17

### Modified

* Null checks on backup sources
* Increased and made version consistent across files

## [0.0.6] - 2020-03-28

### Modified

* Added SLA Backup Windows and fixed SLA Frequency detection of advancedUiConfig
* Added more null checks around level 3 and 5 protected objects
* Updated readme to reflect verbose logging
* Fixed version numbering to reflect more dev
* Fixed changelog formatting
* Increase version

## [0.0.5] 2020-03-05

### Added

* Null/Count/Total checks to many outputs
* Verbose logging capabilities

## [0.0.2] 2020-01-16

### Modified

- replaced a number of incorrect references to point to the Rubrik CDM repository
- modified all colors to fall in line with Rubrik branding
* replaced a number of incorrect references to point to the Rubrik CDM repository
* modified all colors to fall in line with Rubrik branding

## [0.0.1] 2019-12-09

### Added

- initial codebase for Rubrik As Built Report
* initial codebase for Rubrik As Built Report
64 changes: 44 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
# Rubrik CDM As Built Report

## Sample Reports

### Sample Report 1 - Default Style

Sample Rubrik report using default report style

![](Samples/Rubrik-Report-1.png)

### Sample Report 2 - Custom Style

Sample Rubrik report using custom report styles

![](Samples/Rubrik-Report-2.png)

# Getting Started

Below are the instructions on how to install, configure, and generate a Rubrik CDM As Built report.

## Pre-requisites

The following PowerShell modules are required for generating a Rubrik As Built report.

Each of these modules can be easily downloaded and installed via the PowerShell Gallery
Each of these modules can be easily downloaded and installed via the PowerShell Gallery

- [Rubrik CDM Powershell SDK](https://www.powershellgallery.com/packages/Rubrik/)
*Note:* The Rubrik As Built Report Module currently relies on the `devel` branch of the Rubrik PowerShell SDK. Follow the instructions below to ensure the `devel` branch is the active installation.
- [Rubrik CDM Powershell SDK](https://www.powershellgallery.com/packages/Rubrik/)
- [AsBuiltReport Module](https://www.powershellgallery.com/packages/AsBuiltReport/)

### Module Installation

#### Installing the Rubrik CDM PowerShell SDK devel branch
#### Installing the Rubrik SDK for PowerShell

The `devel` branch within the Rubrik CDM PowerShell SDK contains the cmdlets, functions, and code needed in order to successfully generate a Rubrik As Built Report. Therefore, ensure that `devel` is the active Rubrik module on the system generating the report. To install the `devel` branch follow the steps below:

1. Download the [devel](https://github.com/rubrikinc/rubrik-sdk-for-powershell/tree/devel) branch to your workstation.
1. Open a Powershell console with the _Run as Administrator_ option.
1. Run `Set-ExecutionPolicy` using the parameter _RemoteSigned_ or _Bypass_.
1. Run the `Install-Rubrik.ps1` script in the root of this repository and follow the prompts to install, upgrade, or delete your Rubrik Module contents.
1. Ensure you have the Windows Management Framework 5.0 or greater installed.
1. Open a Powershell console with the Run as Administrator option.
1. Run `Set-ExecutionPolicy` using the parameter RemoteSigned or Bypass.
1. Run `Install-Module -Name Rubrik -Scope CurrentUser` to download the module from the PowerShell Gallery. Note that the first time you install from the remote repository it may ask you to first trust the repository.
1. Alternatively `Install-Module -Name Rubrik -Scope AllUsers` can be execute be used if you would like to install the module for all users on the current system.

#### Installing the As Built Report Module

Installing the As Built Report core module with the below instructions takes care of installing all of subsidary reports, including the Rubrik CDM core report.
Installing the As Built Report core module with the below instructions takes care of installing all of subsidiary reports, including the Rubrik CDM core report.

Open a Windows PowerShell terminal window and install each of the required modules as follows;
```powershell
Expand All @@ -45,20 +59,21 @@ In order to generate a Rubrik CDM As Built Report, user credentials with the adm

### Configuration

The Rubrik CDM As Built Report utilises a JSON file to allow configuration of report information, options, detail and healthchecks.
The Rubrik CDM As Built Report utilises a JSON file to allow configuration of report information, options, detail and healthchecks.

A Rubrik report configuration file can be generated by executing the following command;
```powershell
New-AsBuiltReportConfig -Report Rubrik.CDM -Path <User specified folder> -Name <Optional>
New-AsBuiltReportConfig -Report Rubrik.CDM -Path <User specified folder> -Name <Optional>
```

Executing this command will copy the default Rubrik report JSON configuration to a user specified folder.
Executing this command will copy the default Rubrik report JSON configuration to a user specified folder.

All report settings can then be configured by directly modifying the JSON file.

The following provides information of how to configure each schema within the report's JSON file.

### Report

The **Report** sub-schema provides configuration of the vSphere report information

| Schema | Sub-Schema | Description |
Expand All @@ -68,11 +83,13 @@ The **Report** sub-schema provides configuration of the vSphere report informati
| Report | Status | The report release status

### Options

The **Options** sub-schema allows certain options within the report to be toggled on or off.

Currently the Rubrik CDM As Built Report does not utlize this section.

### InfoLevel

The **InfoLevel** sub-schema allows configuration of each section of the report at a granular level. The following sections can be set

| Schema | Sub-Schema | Default Setting |
Expand All @@ -87,19 +104,20 @@ There are 4 levels (0/1/3/5) of detail granularity for each section as follows;
| Setting | InfoLevel | Description |
| ------- | ---- | ----------- |
| 0 | Disabled | does not collect or display any information
| 1 | Summary** | provides summarized information for a collection of objects
| 2 | Informative | reserved for future use
| 1 | Summary | provides summarized information for a collection of objects
| 2 | Unused | reserved for future use
| 3 | Detailed | provides detailed information for individual objects
| 4 | Advanced Detailed | reserved for future use
| 4 | Unused | reserved for future use
| 5 | Comprehensive | provides comprehensive information for individual objects, such as advanced configuration settings

***Note*** While you can specify InfoLevels of 2 and 4, they will simply default to the closest defined level below them. IE 2 becomes 1 and 4 becomes 3.
***Note*** While you can specify InfoLevels of 2 and 4, they will simply default to the closest defined level below them. IE 2 becomes 1 and 4 becomes 3.

### Healthchecks

The `Healthcheck` section of the Rubrik CDM As Built Report is not currently utilized.

## Examples
## Examples

- Generate HTML & Word reports with Timestamp
Generate a Rubrik CDM As Built Report for a cluster named 'cluster1.domain.local' using specified credentials. Export report to HTML & DOC formats. Use default report style. Append timestamp to report filename. Save reports to 'C:\Reports\'
```powershell
Expand Down Expand Up @@ -128,6 +146,12 @@ New-AsBuiltReport -Target 'cluster1.domain.local' -Username 'administrator@domai
New-AsBuiltReport -Report Rubrik.CDM -Target <targetcluster> -Credential (Import-CliXML -Path <path_to_encrypted_creds>) -Format Word -Orientation Portrait -OutputPath <path_to_generated_report> -ReportConfigPath <path_to_AsBuiltReport.Rubrik.CDM.json> -AsBuiltConfigPath <path_to_as_built_config>
```

- Generate Word reports using the generated JSON config, along with verbose logging
```powershell
New-AsBuiltReport -Report Rubrik.CDM -Target <targetcluster> -Credential (Import-CliXML -Path <path_to_encrypted_creds>) -Format Word -Orientation Portrait -OutputPath <path_to_generated_report> -ReportConfigPath <path_to_AsBuiltReport.Rubrik.CDM.json> -AsBuiltConfigPath <path_to_as_built_config> -Verbose
```

## Known Issues
- InfoLevel 3 and above causes "User Not Found" messages to be displayed on the console.

- InfoLevel 3 and above causes "User Not Found" messages to be displayed on the console.
- While not a show stopper, when running the Rubrik CDM As Built Report with Cluster Info Level of 3 or higher User not found messages are shown in the console. This is the result of Rubrik trying to query deeper information about users who no longer have an LDAP Account within the system. Reports continue to generate regardless of the error shown.
Binary file added Samples/Rubrik-Report-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Samples/Rubrik-Report-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3edb7b3

Please sign in to comment.