Skip to content

Commit

Permalink
Documentation update (#87)
Browse files Browse the repository at this point in the history
* Automation of new Azure Repo

Using PowerShell builds the ARM Parameters files, runs them against the ARM Template files to generate the required objects.

Creates new keys in the keyvault.

* Updates

Updated Function and script parameters for the construction of the private repo.

Added a new library that offers a new function allowing for adding new manifests to the repo.

* Update PrivateRepoLib.ps1

* Update

* Update new-private-repository-azure.md

Initial attempt at instructions

* Update new-private-repository-azure.md

* Update new-private-repository-azure.md

* Update new-private-repository-azure.md

* Update new-private-repository-azure.md

* Update new-private-repository-azure.md

* Update new-private-repository-azure.md

* Included PowerShell Module Checking

Checks for the required Azure Modules before running the script.

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Updated Automation Script

- Included PowerShell Module Detection
- Updated Get-Help Description
- Included information on how to connect to your new private repo
- Cleaned up code

* Update PrivateRepoLib.ps1

Included a Class for use with the Automation script.

* Removed ARMObject Class

* Update new-private-repository-azure.md

- Updated instructions with missing steps
- Corrected steps on setting up the Cosmos Account/DB/Container.
- Organized the Key Vault steps.

* Update automation.ps1

Moved a hardcoded value to variable, and set it in the Begin stage of the function for easy update / reference.

* Update new-private-repository-azure.md

Updated the Cosmos DB Account instructions to include Firewall exception rule.

* Update automation.ps1

Moved the ArchiveFunction path to be a script parameter input.

* Moved Scripts to new home

* Update .gitignore

Updating the Ignore list to include *.zip files in the root of the Infrastructure folder.

* Update keyvault.sample.json

Removed person object ID

* Delete CompiledFunctions.zip

Deleted

* Update README.md

Updated path and included link to automation.ps1 script

* Update PrivateRepoLib.ps1

Removed custom class

* Update .gitignore

Co-authored-by: jamespik <[email protected]>

* Update README.md

Thank you!

Co-authored-by: jamespik <[email protected]>

* Update README.md

Co-authored-by: jamespik <[email protected]>

* Update Tools/PrivateRepoLib.ps1

Co-authored-by: jamespik <[email protected]>

* Update Tools/PrivateRepoLib.ps1

Co-authored-by: jamespik <[email protected]>

* Update README.md

Co-authored-by: jamespik <[email protected]>

* Update automation.ps1

Corrected the reporting to show "Install" instead of "Import"

* Update PrivateRepoLib.ps1

Expanded the validation and error checking of the PowerShell function library.

* Update automation.ps1

Corrected relative path to Archive file and the parameter and template folders.

* Update automation.ps1

Corrected the relative path to the Archive files and the template and parameter folders

Updated the warning message to read as Install-Module instead of Import-Module

* Update PrivateRepoLib.ps1

Import error reporting

* Update PrivateRepoLib.ps1

Enhanced error checking

* Update new-private-repository-azure.md

Updated the name from "private repository" to "private source"

Added instructions on how to use the script lib to add manifests to the private source.

* Update automation.ps1

Lots of Updates

* Update PrivateRepoLib.ps1

Cleaned up comments

* Updated Scripts

Code Review Updates.

* Updated Comments and uncommented build call

* Major update

Major updates to the PrivateRepoLib.ps1

* Update PrivateRepoLib.ps1

* Imported PowerShell Module

Imported the Microsoft.WinGet.Source PowerShell module. Moved old scripts to an "Old" folder (temporarily before deletion.).

* Update Add-WinGetManifest.ps1

Bulk Add manifests to WinGet Source

* Added Comments and Get-Help information

* Removed Old Code

* Update Remove-WinGetManifest.ps1

* Updated and new Documetnation

* Fixed Demo *.yaml files

* Included new Sample app manifests

* Included MyEmployees-Finance as a Sample app

* Cleaned up Respository

* Update solution, remove files that should be sourced from build.

* Removing content that doesn't belong in the repo.

* Update solution view

* Delete extraneous changes from keyvault sample template

* Update solution items and remove bogus git ignore items

* remove extraneous metadata

* update

* Documentation update

* documentation update

* Git Hub corrections.

* New Read and Write Keys

Updated template AzureFunction.JSON, and Script. Keyvault keys are created and the Function references them.

* Pushing changes.

* Add details about IP addresses

* Trim extra behavior from remove manifest

* Adding CosmosDatabase and CosmosContainer to function ARM

* Removed reference to $Index

* Line Length normalization

* Enabled Add-WinGetManifest to add new or update

* Removed Debugging

* Documentation Update

* Update new-private-repository-azure.md

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: jamespik <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update Tools/PowershellModule/doc/new-private-repository-azure.md

Co-authored-by: denelon <[email protected]>

* Update new-private-repository-azure.md

* Update new-private-repository-azure.md

* Update new-private-repository-azure.md

* Update new-private-repository-azure.md

* Update

* Updated

* Update new-winget-rest-source-azure.md

* REST

* Private

* Manifest to Package ID

* Update new-winget-rest-source-azure.md

* Update new-winget-rest-source-azure.md

* Defaults

* Fixed some excess capitalization

* Example standardization

* Title Changes

* Update Add-AzureResourceGroup.ps1

* Update Tools/PowershellModule/doc/new-winget-rest-source-azure.md

Co-authored-by: jamespik <[email protected]>

* Update new-winget-rest-source-azure.md

* Update new-winget-rest-source-azure.md

* Update new-winget-rest-source-azure.md

* Update new-winget-rest-source-azure.md

* Update new-winget-rest-source-azure.md

* Update new-winget-rest-source-azure.md

* Update new-winget-rest-source-azure.md

* Update new-winget-rest-source-azure.md

* Relative links

* WinGet.RestSource.Functions.zip

* Update Tools/PowershellModule/src/Library/New-WinGetSource.ps1

* Update Tools/PowershellModule/doc/PowerShell/Get-WinGetManifest.md

* Update Tools/PowershellModule/src/Library/Add-WinGetManifest.ps1

* Apply suggestions from code review

* Apply suggestions from code review

* Naming and caps

Co-authored-by: roymaclachlan <[email protected]>
Co-authored-by: jamespik <[email protected]>
Co-authored-by: Union Palenshus <[email protected]>
Co-authored-by: denelon <[email protected]>
  • Loading branch information
5 people authored Nov 1, 2021
1 parent 15805cb commit d80e01d
Show file tree
Hide file tree
Showing 16 changed files with 290 additions and 382 deletions.
12 changes: 6 additions & 6 deletions Tools/PowershellModule/doc/PowerShell/Add-WinGetManifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ The following Azure Modules are used by this script:

### EXAMPLE 1
```
Add-WinGetManifest -FunctionName "PrivateSource" -Path "C:\AppManifests\Microsoft.PowerToys\PowerToys.json"
Add-WinGetManifest -FunctionName "contosorestsource" -Path "C:\AppManifests\Microsoft.PowerToys\PowerToys.json"
```

Connects to Azure, then runs the Azure Function "PrivateSource" REST APIs to add the specified Manifest file (*.json) to the Windows Package Manager REST source
Connects to Azure, then runs the Azure Function "contosorestsource" REST APIs to add the specified Manifest file (*.json) to the Windows Package Manager REST source

### EXAMPLE 2
```
Add-WinGetManifest -FunctionName "PrivateSource" -Path "C:\AppManifests\Microsoft.PowerToys\"
Add-WinGetManifest -FunctionName "contosorestsource" -Path "C:\AppManifests\Microsoft.PowerToys\"
```

Connects to Azure, then runs the Azure Function "PrivateSource" REST APIs to adds the Manifest file(s) (*.json / *.yaml) found in the specified folder to the Windows Package Manager REST source
Connects to Azure, then runs the Azure Function "contosorestsource" REST APIs to adds the Manifest file(s) (*.json / *.yaml) found in the specified folder to the Windows Package Manager REST source

### EXAMPLE 3
```
Add-WinGetManifest -FunctionName "PrivateSource" -Path "C:\AppManifests\Microsoft.PowerToys\PowerToys.json" -SubscriptionName "Visual Studio Subscription"
Add-WinGetManifest -FunctionName "contosorestsource" -Path "C:\AppManifests\Microsoft.PowerToys\PowerToys.json" -SubscriptionName "Visual Studio Subscription"
```

Connects to Azure and the specified Subscription, then runs the Azure Function "PrivateSource" REST APIs to add the specified Manifest file (*.json) to the Windows Package Manager REST source
Connects to Azure and the specified Subscription, then runs the Azure Function "contosorestsource" REST APIs to add the specified Manifest file (*.json) to the Windows Package Manager REST source

## PARAMETERS

Expand Down
40 changes: 10 additions & 30 deletions Tools/PowershellModule/doc/PowerShell/Get-WinGetManifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# Get-WinGetManifest

## SYNOPSIS
Connects to the specified source REST API, or local file system path to retrieve the application Manifests, returning an array of all Manifests found.
Connects to the specified source REST API, or local file system path to retrieve the package Manifests, returning an array of all Manifests found.
Allows for filtering results based on the name when targetting the REST APIs.

## SYNTAX
Expand All @@ -24,13 +24,8 @@ Get-WinGetManifest [-FunctionName] <String> [[-ManifestIdentifier] <String>] [[-
Get-WinGetManifest [-Path] <String> [<CommonParameters>]
```

### Custom
```
Get-WinGetManifest [-URL] <String> [<CommonParameters>]
```

## DESCRIPTION
Connects to the specified source REST API, or local file system path to retrieve the application Manifests, returning an array of all Manifests found.
Connects to the specified source REST API, or local file system path to retrieve the package Manifests, returning an array of all Manifests found.
Allows for filtering results based on the name.

The following Azure Modules are used by this script:
Expand All @@ -46,35 +41,35 @@ The following Azure Modules are used by this script:
Get-WinGetManifest -Path "C:\AppManifests\Microsoft.PowerToys"
```

Returns an array of all Manifest objects based on the files found within the specified Path.
Returns an array of the Package Manifest objects based on the files (*.yaml or *.json) found within the specified Path.

### EXAMPLE 2
```
Get-WinGetManifest -Path "C:\AppManifests\Microsoft.PowerToys\Microsoft.PowerToys.json"
```

Returns a Manifest object (*.json) of the specified JSON file.
Returns a Package Manifest object of the specified JSON file.

### EXAMPLE 3
```
Get-WinGetManifest -FunctionName "PrivateSource" -ManifestIdentifier "Windows.PowerToys"
Get-WinGetManifest -FunctionName "contosorestsource" -ManifestIdentifier "Windows.PowerToys"
```

Returns a Manifest object of the specified Manifest Identifier that is queried against in the REST APIs.
Returns an Manifest object of the specified Application Package Identifier that is queried against in the REST APIs.

### EXAMPLE 4
```
Get-WinGetManifest -FunctionName "PrivateSource" -ManifestIdentifier "Windows.PowerToys" -SubscriptionName "Visual Studio Subscription"
Get-WinGetManifest -FunctionName "contosorestsource" -ManifestIdentifier "Windows.PowerToys" -SubscriptionName "Visual Studio Subscription"
```

Returns a Manifest object of the specified Manifest Identifier that is queried against in the REST APIs from the specified Subscription Name.
Returns a Package Manifest object of the specified Package Identifier that is queried against in the REST APIs from the specified Subscription Name.

### EXAMPLE 5
```
Get-WinGetManifest -FunctionName "PrivateSource"
Get-WinGetManifest -FunctionName "contosorestsource"
```

Returns an array of Manifest objects that are found in the specified Azure Function.
Returns an array of Package Manifest objects that are found in the specified Azure Function.

## PARAMETERS

Expand All @@ -93,21 +88,6 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -URL
Web URL to the host site containing the REST APIs with access key (if required).
```yaml
Type: String
Parameter Sets: Custom
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -FunctionName
Name of the Azure Function Name that contains the Windows Package Manager REST APIs.
Expand Down
16 changes: 8 additions & 8 deletions Tools/PowershellModule/doc/PowerShell/New-WinGetSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# New-WinGetSource

## SYNOPSIS
Creates a Windows Package Manager REST source in Azure for private storage of Windows Package Manager application Manifests.
Creates a Windows Package Manager REST source in Azure for storage of Windows Package Manager package Manifests.

## SYNTAX

Expand All @@ -20,7 +20,7 @@ New-WinGetSource [-Name] <String> [[-Index] <String>] [[-ResourceGroup] <String>
```

## DESCRIPTION
Creates a Windows Package Manager REST source in Azure for private storage of Windows Package Manager application Manifests.
Creates a Windows Package Manager REST source in Azure for storage of Windows Package Manager package Manifests.

The following Azure Modules are used by this script:
Az.Resources
Expand All @@ -32,17 +32,17 @@ The following Azure Modules are used by this script:

### EXAMPLE 1
```
New-WinGetSource -Name "contoso0002"
New-WinGetSource -Name "contosorestsource"
```

Creates the Windows Package Manager REST source in Azure with resources named "contoso0002" in the westus region of Azure with the basic level performance.
Creates the Windows Package Manager REST source in Azure with resources named "contosorestsource" in the westus region of Azure with the basic level performance.

### EXAMPLE 2
```
New-WinGetSource -Name "contoso0002" -ResourceGroup "WinGetSource" -SubscriptionName "Visual Studio Subscription" -Region "westus" -ParameterOutput "C:\WinGet" -ImplementationPerformance "Basic" -ShowConnectionInstructions
New-WinGetSource -Name "contosorestsource" -ResourceGroup "WinGet" -SubscriptionName "Visual Studio Subscription" -Region "westus" -ParameterOutput "C:\WinGet" -ImplementationPerformance "Basic" -ShowConnectionInstructions
```

Creates the Windows Package Manager REST source in Azure with resources named "contoso0002" in the westus region of Azure with the basic level performance in the "Visual Studio Subscription" Subscription.
Creates the Windows Package Manager REST source in Azure with resources named "contosorestsource" in the westus region of Azure with the basic level performance in the "Visual Studio Subscription" Subscription.
Displays the required command to connect the WinGet client to the new REST source after the repository has been created.

## PARAMETERS
Expand Down Expand Up @@ -78,7 +78,7 @@ Accept wildcard characters: False
```
### -ResourceGroup
\[Optional\] The Name of the Resource Group that the Windows Package Manager REST source will reside. All Azure resources will be created in in this Resource Group (Default: WinGetRESTSource)
\[Optional\] The Name of the Resource Group that the Windows Package Manager REST source will reside. All Azure resources will be created in in this Resource Group (Default: WinGetRestSource)
(Default: WinGetRestSource)
```yaml
Expand Down Expand Up @@ -119,7 +119,7 @@ Aliases:

Required: False
Position: 5
Default value: Westus
Default value: westus
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
49 changes: 3 additions & 46 deletions Tools/PowershellModule/doc/PowerShell/Remove-WinGetManifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,14 @@ Removes a Manifest file from the Azure REST source
Remove-WinGetManifest [[-ManifestIdentifier] <String>] [[-SubscriptionName] <String>] [<CommonParameters>]
```

### Custom
```
Remove-WinGetManifest [-URL] <String> [-Key] <String> [[-ManifestIdentifier] <String>]
[[-SubscriptionName] <String>] [<CommonParameters>]
```

### Azure
```
Remove-WinGetManifest [-FunctionName] <String> [[-ManifestIdentifier] <String>] [[-SubscriptionName] <String>]
[<CommonParameters>]
```

## DESCRIPTION
This function will connect to the Azure Tenant that hosts the Windows Package Manager REST source, removing the specified application Manifest.
This function will connect to the Azure Tenant that hosts the Windows Package Manager REST source, removing the specified package Manifest.

The following Azure Modules are used by this script:
Az.Resources
Expand All @@ -42,50 +36,13 @@ The following Azure Modules are used by this script:

### EXAMPLE 1
```
Remove-WinGetManifest -FunctionName "RestSource" -ManifestIdentifier "Windows.PowerToys"
```

Connects to Azure, then runs the Azure Function "RestSource" REST APIs to remove the specified Manifest file from the Windows Package Manager REST source

### EXAMPLE 2
```
Remove-WinGetManifest -URL "https://contoso.azure.web.net/api/packageManifests" -ManifestIdentifier "Windows.PowerToys"
Remove-WinGetManifest -FunctionName "contosorestsource" -ManifestIdentifier "Windows.PowerToys"
```

Connects to a remote URL REST APIs to remove the Application Manifest from the Windows Package Manager REST source
Connects to Azure, then runs the Azure Function "contosorestsource" REST APIs to remove the specified Manifest file from the Windows Package Manager REST source

## PARAMETERS

### -URL
Name of the URL that hosts the REST source.

```yaml
Type: String
Parameter Sets: Custom
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Key
{{ Fill Key Description }}
```yaml
Type: String
Parameter Sets: Custom
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -FunctionName
Name of the Azure Function that hosts the REST source.

Expand Down
Loading

0 comments on commit d80e01d

Please sign in to comment.